From owner-p4-projects@FreeBSD.ORG Mon Oct 17 08:56:05 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2F5316A421; Mon, 17 Oct 2005 08:56:04 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9333416A41F for ; Mon, 17 Oct 2005 08:56:04 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CEF543D75 for ; Mon, 17 Oct 2005 08:55:58 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9H8twIK047429 for ; Mon, 17 Oct 2005 08:55:58 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9H8tv0E047426 for perforce@freebsd.org; Mon, 17 Oct 2005 08:55:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 17 Oct 2005 08:55:57 GMT Message-Id: <200510170855.j9H8tv0E047426@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 85421 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 08:56:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=85421 Change 85421 by rwatson@rwatson_peppercorn on 2005/10/17 08:54:57 style(9). Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#8 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #ifndef _BSM_AUDIT_PRIVATE_H -#define _BSM_AUDIT_PRIVATE_H +#define _BSM_AUDIT_PRIVATE_H #ifndef _KERNEL #error "no user-serviceable parts inside" @@ -45,25 +45,25 @@ * Audit control variables that are usually set/read via system calls * and used to control various aspects of auditing. */ -extern struct au_qctrl audit_qctrl; -extern struct audit_fstat audit_fstat; -extern struct au_mask audit_nae_mask; -extern int audit_panic_on_write_fail; -extern int audit_fail_stop; +extern struct au_qctrl audit_qctrl; +extern struct audit_fstat audit_fstat; +extern struct au_mask audit_nae_mask; +extern int audit_panic_on_write_fail; +extern int audit_fail_stop; /* * Success/failure conditions for the conversion of a kernel audit record to * BSM format. */ -#define BSM_SUCCESS 0 -#define BSM_FAILURE 1 -#define BSM_NOAUDIT 2 +#define BSM_SUCCESS 0 +#define BSM_FAILURE 1 +#define BSM_NOAUDIT 2 /* * Defines for the kernel audit record k_ar_commit field. */ -#define AR_COMMIT_KERNEL 0x00000001U -#define AR_COMMIT_USER 0x00000010U +#define AR_COMMIT_KERNEL 0x00000001U +#define AR_COMMIT_USER 0x00000010U /* * Audit data is generated as a stream of struct audit_record structures, @@ -207,35 +207,35 @@ */ void audit_abort(struct kaudit_record *ar); void audit_commit(struct kaudit_record *ar, int error, - int retval); + int retval); struct kaudit_record *audit_new(int event, struct thread *td); /* * Functions relating to the conversion of internal kernel audit records to * the BSM file format. */ -int kaudit_to_bsm(struct kaudit_record *kar, +int kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau); -int bsm_rec_verify(void *rec); +int bsm_rec_verify(void *rec); /* * Kernel versions of the libbsm audit record functions. */ -void kau_free(struct au_record *rec); -void kau_init(void); +void kau_free(struct au_record *rec); +void kau_init(void); /* * Return values for pre-selection and post-selection decisions. */ -#define AU_PRS_SUCCESS 1 -#define AU_PRS_FAILURE 2 -#define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE) +#define AU_PRS_SUCCESS 1 +#define AU_PRS_FAILURE 2 +#define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE) /* * Flags to use on audit files when opening and closing. */ -#define AUDIT_OPEN_FLAGS FWRITE | O_APPEND -#define AUDIT_CLOSE_FLAGS FWRITE | O_APPEND +#define AUDIT_OPEN_FLAGS (FWRITE | O_APPEND) +#define AUDIT_CLOSE_FLAGS (FWRITE | O_APPEND) #include #include @@ -247,34 +247,35 @@ * kernel implementations in order to save the copying of large kernel * data structures. The prototypes of these functions are declared here. */ -token_t *kau_to_socket(struct socket_au_info *soi); +token_t *kau_to_socket(struct socket_au_info *soi); /* * audit_klib prototypes */ -int au_preselect(au_event_t event, au_mask_t *mask_p, int sorf); -au_event_t flags_and_error_to_openevent(int oflags, int error); -void au_evclassmap_init(void); -void au_evclassmap_insert(au_event_t event, au_class_t class); -au_class_t au_event_class(au_event_t event); -au_event_t ctlname_to_sysctlevent(int name[], uint64_t valid_arg); -int auditon_command_event(int cmd); -int msgctl_to_event(int cmd); -int semctl_to_event(int cmr); -void canon_path(struct thread *td, char *path, char *cpath); +int au_preselect(au_event_t event, au_mask_t *mask_p, int sorf); +au_event_t flags_and_error_to_openevent(int oflags, int error); +void au_evclassmap_init(void); +void au_evclassmap_insert(au_event_t event, au_class_t class); +au_class_t au_event_class(au_event_t event); +au_event_t ctlname_to_sysctlevent(int name[], uint64_t valid_arg); +int auditon_command_event(int cmd); +int msgctl_to_event(int cmd); +int semctl_to_event(int cmr); +void canon_path(struct thread *td, char *path, char *cpath); /* * Audit trigger events notify user space of kernel audit conditions * asynchronously. */ -void audit_trigger_init(void); -void send_trigger(unsigned int trigger); +void audit_trigger_init(void); +void send_trigger(unsigned int trigger); /* * General audit related functions. */ -struct kaudit_record * currecord(void); -void audit_shutdown(void *arg, int howto); -void audit_rotate_vnode(struct ucred *cred, struct vnode *vp); +struct kaudit_record *currecord(void); +void audit_shutdown(void *arg, int howto); +void audit_rotate_vnode(struct ucred *cred, + struct vnode *vp); #endif /* ! _BSM_AUDIT_PRIVATE_H */