diff options
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 9194e55..e001e2e 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 |