File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / sys / h / audit.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

#ifndef MAXPATHLEN
#ifdef KERNEL
#include "../h/param.h"
#else
#include <sys/param.h>
#endif
#endif

/*
 * Record written to audit file.
 */
struct aud_rec
{
	unsigned short a_flag;		/* flag bits +0 */
	unsigned short a_uid;		/* effective user-id */
	long	a_time;			/* date and time */
	char	a_comm[MAXPATHLEN+1];	/* command name */
	char	a_path[MAXPATHLEN+1];	/* path name */
};

/* a_flag values */
#define	AUDSUCCESS	0x01		/* file accessed successfully */
#define	AUDREAD 	0x02		/* file opened for reading */
#define	AUDWRITE	0x04		/* file opened for writing */
#define	AUDEXEC		0x08		/* file executed */
#define	AUDUNLINK	0x10		/* file removed */
#define	AUDOFFTON	0x20		/* status changed to sensitive */
#define	AUDONTOFF	0x40		/* status changed to non-sensitive */

/*
 * Audit system call flags.
 */
#define	UNSECURE	0		/* turn audit trail security off */
#define	SECURE		1		/* turn audit trail security on */
#define	QUERY		2		/* request audit trail security */
#define	MASK		3		/* set audit status with umask */
#define	AUDMASK	010000		/* flag bit in the umask to turn on auditing */

#ifdef KERNEL

/*
 * Root relative vs. current working directory relative flags.
 */
#define	ROOTREL		0		/* pathname relative to the root */
#define	CDIRREL		1		/* pathname relative to curr dir */

#define	SUCCESS		0
#define	FAILURE		1

#define	AUDBUFLEN	24			/* length of data buffers */
#define	AUDPRI	26				/* Sleeping on audbuf priority */

struct audbuf {
	struct audbuf *a_fptr;		/* pointer to next in chain */
	struct audbuf *a_bptr;		/* pointer to last in chain */
	unsigned short a_flags;		/* flag word */
	char	a_buf[AUDBUFLEN];	/* data buffer */
} *audbuf;

int	naudbuf;

/* a_flags */

#define	AUDFREE	0			/* aud buffer on the freelist */
#define	AUDBUSY	1			/* aud buffer in use */

struct audcb {
	struct audbuf *acb_fptr;	/* pointer to first on freelist */
	struct audbuf *acb_bptr;	/* pointer to last on freelist  */
	short	acb_flags;		/* flag word */
};

/* acb_flags */
#define AUDWANTED 1			/* a process is in need of aud buf */

struct audcb audcrb, *acb;		/* audit buffer control block */
#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.