/*
 * *****************************************************************
 * *                                                               *
 * *    Copyright Compaq Computer Corporation, 2000                *
 * *                                                               *
 * *   The software contained on this media  is  proprietary  to   *
 * *   and  embodies  the  confidential  technology  of  Compaq    *
 * *   Computer Corporation.  Possession, use,  duplication  or    *
 * *   dissemination of the software and media is authorized only  *
 * *   pursuant to a valid written license from Compaq Computer    *
 * *   Corporation.                                                *
 * *                                                               *
 * *   RESTRICTED RIGHTS LEGEND   Use, duplication, or disclosure  *
 * *   by the U.S. Government is subject to restrictions  as  set  *
 * *   forth in Subparagraph (c)(1)(ii)  of  DFARS  252.227-7013,  *
 * *   or  in  FAR 52.227-19, as applicable.                       *
 * *                                                               *
 * *****************************************************************
 */
/*
 * HISTORY
 */
/*
 * @(#)$RCSfile: include_sec,v $ $Revision: 4.2.12.2 $ (DEC) $Date: 1995/04/28 21:21:50 $
 */
/*
 * (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 */
/*
 * OSF/1 Release 1.0
 */
/*
 * @(#)include_sec    3.1 10:01:25 6/7/90 SecureWare
 *
 * OSF/1 Include File Header
 *
 * This file is included by all files in the sec kernel directory
 * to avoid large sections of vendor-dependent code at the top of
 * each kernel module that SecureWare adds to the vendor's kernel.
 */

/*
 * Set up conditional compilation symbols.
 */

#include <sys/secdefines.h>

#include <kern/lock.h>

/*
 * SecureWare-specific include files.
 */

#include <sys/security.h>
#include <sys/audit.h>
#include <sys/secpolicy.h>
#include <sys/secioctl.h>

/*
 * These are vendor include files, which may or may not depend
 * on the SecureWare base or derived conditionals.
 */

#include <sys/mount.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/conf.h>
#include <sys/vnode.h>
#include <ufs/inode.h>
#include <ufs/fs.h>
#include <ufs/ufsmount.h>
#include <sys/kernel.h>
#include <sys/msg.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/utsname.h>
#include <sys/user.h>
#include <kern/parallel.h>

/*
 * Define various vendor-dependent macros that are
 * used by SecureWare kernel modules.
 */

/* Get the current time in seconds as a time_t */

#define SYSTEM_TIME	time.tv_sec

/*
 * Tell whether a given shared memory segment is in use.
 * Use the "number attached" to determin if this secment is 
 * currently attacked.
 * XXX Need a way for our caller to prevent changes to the reference
 * count  between this test and the actions that are based on the
 * result of it.
 */

#define shm_active(OBJ)	(((struct shmid_internal *)(OBJ))->s.shm_nattch != 0)


