summaryrefslogtreecommitdiff
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2000-06-05 18:30:55 +0000
committerRobert Watson <rwatson@FreeBSD.org>2000-06-05 18:30:55 +0000
commit579f4eb4cd43fee8f0187a256d34cdcb25931765 (patch)
tree8317d86becabfc3b399b306d8ff95681d5c01332 /sys/kern/kern_prot.c
parent4c859e8ae9cf0db4a9b98ba7e581170754989abf (diff)
Notes
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 9194e55eb164..e001e2ec6a54 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -53,6 +53,7 @@
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/pioctl.h>
+#include <sys/sysctl.h>
static MALLOC_DEFINE(M_CRED, "cred", "credentials");
@@ -931,6 +932,11 @@ groupmember(gid, cred)
return (0);
}
+static int suser_permitted = 1;
+
+SYSCTL_INT(_kern, OID_AUTO, suser_permitted, CTLFLAG_RW, &suser_permitted, 0,
+ "processes with uid 0 have privilege");
+
/*
* Test whether the specified credentials imply "super-user"
* privilege; if so, and we have accounting info, set the flag