PERFORCE change 84632 for review

Wayne Salamon wsalamon at FreeBSD.org
Sat Oct 1 16:20:21 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=84632

Change 84632 by wsalamon at gretsch on 2005/10/01 23:19:27

	Move some function definitions and common defines into the kernel 
	private header in preparation for new system call source file. 
	Define the include guard to be similar to the file name.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#3 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#3 (text+ko) ====

@@ -21,15 +21,24 @@
  * @APPLE_LICENSE_HEADER_END@
  */
 
-#ifndef _BSM_AUDIT_KLIB_H_
-#define _BSM_AUDIT_KLIB_H_
+#ifndef _BSM_AUDIT_PRIVATE_H
+#define _BSM_AUDIT_PRIVATE_H
 
 #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
 
 #ifdef _KERNEL
+#include <sys/fcntl.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
 #include <security/audit/audit.h>
+
 /*
  * Some of the BSM tokenizer functions take different parameters in the
  * kernel implementations in order to save the copying of large kernel
@@ -58,6 +67,13 @@
 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);
+
 #endif /* _KERNEL */
 
-#endif /* ! _BSM_AUDIT_KLIB_H_ */
+#endif /* ! _BSM_AUDIT_PRIVATE_H */


More information about the p4-projects mailing list