summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
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