summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-09-26 20:08:15 +0000
committerrwatson <rwatson@FreeBSD.org>2001-09-26 20:08:15 +0000
commit82b4fa83fc304390bc4c4f701a1f8f8cfef1aeb3 (patch)
treedfb5444487e98636c0d18681474284d226329fa0 /sys
parent955613d62b1740790ccfc84f02f5714ff4a94908 (diff)
downloadFreeBSD-src-82b4fa83fc304390bc4c4f701a1f8f8cfef1aeb3.zip
FreeBSD-src-82b4fa83fc304390bc4c4f701a1f8f8cfef1aeb3.tar.gz
o Modify i386_set_ioperm() to use securelevel_gt() instead of
direct securelevel variable checks. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/sys_machdep.c4
-rw-r--r--sys/i386/i386/sys_machdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index acca4e7..dc9022c 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -185,8 +185,8 @@ i386_set_ioperm(td, args)
if ((error = suser_td(td)) != 0)
return (error);
- if (securelevel > 0)
- return (EPERM);
+ if ((error = securelevel_gt(td->td_proc->p_ucred, 0)) != 0)
+ return (error);
/*
* XXX
* While this is restricted to root, we should probably figure out
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index acca4e7..dc9022c 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -185,8 +185,8 @@ i386_set_ioperm(td, args)
if ((error = suser_td(td)) != 0)
return (error);
- if (securelevel > 0)
- return (EPERM);
+ if ((error = securelevel_gt(td->td_proc->p_ucred, 0)) != 0)
+ return (error);
/*
* XXX
* While this is restricted to root, we should probably figure out
OpenPOWER on IntegriCloud