PERFORCE change 45110 for review
Robert Watson
rwatson at FreeBSD.org
Sun Jan 11 05:40:10 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=45110
Change 45110 by rwatson at rwatson_paprika on 2004/01/10 21:39:15
Make bsm_audit.c compile:
- Includes
- Dummy mach functions
- Unneeded local variable
- Do return a value if we define a return value.
Affected files ...
.. //depot/projects/trustedbsd/audit2/sys/security/audit/bsm_audit.c#5 edit
Differences ...
==== //depot/projects/trustedbsd/audit2/sys/security/audit/bsm_audit.c#5 (text+ko) ====
@@ -22,20 +22,19 @@
*
* @APPLE_LICENSE_HEADER_END@
*/
-#include <sys/types.h>
-#include <sys/vnode.h>
+
+#include <sys/param.h>
+#include <sys/audit.h>
+#include <sys/bsm_token.h>
+#include <sys/bsm_kevents.h>
+#include <sys/fcntl.h>
#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/socketvar.h>
-#include <sys/socket.h>
-#include <sys/queue.h>
-#include <sys/fcntl.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/bsm_token.h>
-#include <sys/bsm_kevents.h>
-#include <sys/user.h>
-#include <sys/audit.h>
+#include <sys/socket.h>
+#include <sys/systm.h>
+#include <sys/ucred.h>
+#include <sys/vnode.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
@@ -44,6 +43,14 @@
#include <security/audit/kern_audit.h>
#include <security/audit/bsm_klib.h>
+/* XXXDARWIN */
+typedef struct mutex mutex_t;
+#define kmem_alloc(map, ptrref, size)
+#define kmem_free(map, ptr, size)
+#define mutex_alloc(x) (NULL)
+#define mutex_lock(x)
+#define mutex_unlock(x)
+
/* The number of BSM records allocated. */
static int bsm_rec_count = 0;
@@ -160,7 +167,6 @@
u_char *dptr;
size_t tot_rec_size;
token_t *cur, *hdr, *trail;
- int retval = 0;
tot_rec_size = rec->len + HEADER_SIZE + TRAILER_SIZE;
if(tot_rec_size <= MAX_AUDIT_RECORD_SIZE) {
@@ -185,6 +191,7 @@
dptr += cur->len;
}
}
+ return (0);
}
/*
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