PERFORCE change 45107 for review
Robert Watson
rwatson at FreeBSD.org
Sun Jan 11 05:20:45 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=45107
Change 45107 by rwatson at 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;
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list