Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2004 21:20:45 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 45107 for review
Message-ID:  <200401110520.i0B5Kj8K062923@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=45107

Change 45107 by rwatson@rwatson_paprika on 2004/01/10 21:19:46

	Get bsm_klib.c to almost entirely build:
	
	- Fix many includes.
	- Use udev_t rather than dev_t, since dev_t in the FreeBSD
	    kernel is "special".  This might require revisiting.
	- Comment out vn_getpath(), we don't have one of those yet.
	- Function prototypes for msgctl_to_event() and
	    semctl_to_event() since they're declared in one place
	    and used in another.
	- More forward structure definitions.

Affected files ...

.. //depot/projects/trustedbsd/audit2/sys/security/audit/bsm_klib.c#5 edit
.. //depot/projects/trustedbsd/audit2/sys/security/audit/bsm_klib.h#3 edit
.. //depot/projects/trustedbsd/audit2/sys/security/audit/kern_audit.h#3 edit

Differences ...

==== //depot/projects/trustedbsd/audit2/sys/security/audit/bsm_klib.c#5 (text+ko) ====

@@ -26,6 +26,15 @@
 #include <sys/param.h>
 #include <sys/audit.h>
 #include <sys/bsm_kevents.h>
+#include <sys/fcntl.h>
+#include <sys/filedesc.h>
+#include <sys/ipc.h>
+#include <sys/libkern.h>
+#include <sys/proc.h>
+#include <sys/sem.h>
+#include <sys/socket.h>
+#include <sys/ucred.h>
+#include <sys/vnode.h>
 
 #include <security/audit/kern_audit.h>
 #include <security/audit/bsm_klib.h>
@@ -740,7 +749,10 @@
 	}
 	if (vnp != NULL) {
 		len = MAXPATHLEN;
+#error DARWIN_FOO
+#ifdef DARWIN_FOO
 		vn_getpath(vnp, cpath, &len);
+#endif
 		/* The length returned by vn_getpath() is two greater than the 
 		 * number of characters in the string.
 		 */

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

@@ -30,17 +30,19 @@
 #define AU_PRS_FAILURE  2
 #define AU_PRS_BOTH     (AU_PRS_SUCCESS|AU_PRS_FAILURE)
 
-#ifdef _KERNEL
+struct vattr;
 int au_preselect(au_event_t event, au_mask_t *mask_p, int sorf);
 au_event_t flags_to_openevent(int oflags);
 void fill_vattr(struct vattr *v, struct vnode_au_info *vn_info);
 void canon_path(struct proc *p, char *path, char *cpath);
+
+int	msgctl_to_event(int cmd);
+int	semctl_to_event(int cmd);
+
 /*
  * Define a system call to audit event mapping table.
  */
 extern au_event_t sys_au_event[];
 extern int nsys_au_event;	/* number of entries in this table */
 
-#endif /*_KERNEL*/
-
 #endif /* ! _BSM_KLIB_H_ */

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

@@ -89,7 +89,7 @@
 	mode_t		vn_mode;
 	uid_t		vn_uid;
 	gid_t		vn_gid;
-	dev_t		vn_dev;
+	udev_t		vn_dev;
 	long		vn_fsid;
 	long		vn_fileid;
 	long		vn_gen;
@@ -106,6 +106,9 @@
 	int	soprotocol;
 };
 
+struct xucred;
+struct sockaddr;
+struct ipc_perm;
 struct audit_record {
 	/* Audit record header. */
 	u_int32_t		ar_magic;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401110520.i0B5Kj8K062923>