summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mac.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-09-05 07:02:43 +0000
committerbde <bde@FreeBSD.org>2002-09-05 07:02:43 +0000
commit725b1916bdb3e6e0e9a4c6a986ad2e2e5a3502af (patch)
tree25b5631067d8992aca96b66f0a05fce78e316a77 /sys/kern/kern_mac.c
parent796fa43815244d2faba60f92c4eff26aae612386 (diff)
downloadFreeBSD-src-725b1916bdb3e6e0e9a4c6a986ad2e2e5a3502af.zip
FreeBSD-src-725b1916bdb3e6e0e9a4c6a986ad2e2e5a3502af.tar.gz
Include <sys/malloc.h> instead of depending on namespace pollution 2
layers deep in <sys/proc.h> or <sys/vnode.h>. Removed unused includes. Fixed some printf format errors (1 fatal on i386's; 1 fatal on alphas; 1 not fatal on any supported machine).
Diffstat (limited to 'sys/kern/kern_mac.c')
-rw-r--r--sys/kern/kern_mac.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c
index 98aad1e..c04294e 100644
--- a/sys/kern/kern_mac.c
+++ b/sys/kern/kern_mac.c
@@ -51,8 +51,8 @@
#include <sys/extattr.h>
#include <sys/kernel.h>
#include <sys/lock.h>
+#include <sys/malloc.h>
#include <sys/mutex.h>
-#include <sys/sx.h>
#include <sys/mac.h>
#include <sys/module.h>
#include <sys/proc.h>
@@ -66,7 +66,6 @@
#include <sys/socket.h>
#include <sys/pipe.h>
#include <sys/socketvar.h>
-#include <sys/sx.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
@@ -78,7 +77,6 @@
#include <fs/devfs/devfs.h>
-#include <net/bpf.h>
#include <net/bpfdesc.h>
#include <net/if.h>
#include <net/if_var.h>
@@ -2214,9 +2212,10 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred,
revokeperms = vme->max_protection & ~result;
if (!revokeperms)
continue;
- printf("pid %d: revoking %s perms from %#lx:%d "
- "(max %s/cur %s)\n", td->td_proc->p_pid,
- prot2str(revokeperms), vme->start, vme->end - vme->start,
+ printf("pid %ld: revoking %s perms from %#lx:%ld "
+ "(max %s/cur %s)\n", (long)td->td_proc->p_pid,
+ prot2str(revokeperms), (u_long)vme->start,
+ (long)(vme->end - vme->start),
prot2str(vme->max_protection), prot2str(vme->protection));
vm_map_lock_upgrade(map);
/*
OpenPOWER on IntegriCloud