diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-06-05 14:53:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-06-05 14:53:55 +0000 |
commit | 68239103ca69ad700547a0a80b8af367f735e0d1 (patch) | |
tree | 230cbbf17decee8cffa54408bc4fa0b76b6da98d /sys/kern/kern_prot.c | |
parent | 051a92f4cd76b6608fa5a85e1d95a4ddfd8be0e7 (diff) | |
download | FreeBSD-src-68239103ca69ad700547a0a80b8af367f735e0d1.zip FreeBSD-src-68239103ca69ad700547a0a80b8af367f735e0d1.tar.gz |
o Introduce kern.suser_permitted, a sysctl that disables the suser_xxx()
returning anything but EPERM.
o suser is enabled by default; once disabled, cannot be reenabled
o To be used in alternative security models where uid0 does not connote
additional privileges
o Should be noted that uid0 still has some additional powers as it
owns many important files and executables, so suffers from the same
fundamental security flaws as securelevels. This is fixed with
MAC integrity protection code (in progress)
o Not safe for consumption unless you are *really* sure you don't want
things like shutdown to work, et al :-)
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 3be52c8..9194e55 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -950,6 +950,8 @@ suser_xxx(cred, proc, flag) struct proc *proc; int flag; { + if (!suser_permitted) + return (EPERM); if (!cred && !proc) { printf("suser_xxx(): THINK!\n"); return (EPERM); |