aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-09-26 20:08:15 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-09-26 20:08:15 +0000
commit330e78897a777a14b314b25dd774cd70ff6572aa (patch)
treedfb5444487e98636c0d18681474284d226329fa0 /sys
parent1851c8fd4126a03ad45c459a07578cf7d0c10d93 (diff)
Notes
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 acca4e7cb5cb..dc9022c7b398 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 acca4e7cb5cb..dc9022c7b398 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