summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-09-26 20:20:05 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-09-26 20:20:05 +0000
commit9997f524704ccc2dc0479ec79a8afd07c26bf995 (patch)
tree371668d8c4cd1175a9800f9f441414992c1fe9b8
parentf86cf763ef24121ddffc3ca84a585fce95618b6c (diff)
Notes
-rw-r--r--sys/i386/isa/spigot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index 0bd87ff8fe0e..f41b7634df43 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -182,8 +182,9 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
error = suser_td(td);
if (error != 0)
return error;
- if (securelevel > 0)
- return EPERM;
+ error = securelevel_gt(p, 0);
+ if (error != 0)
+ return error;
#endif
ss->flags |= OPEN;
@@ -238,8 +239,9 @@ struct spigot_info *info;
error = suser_td(td);
if (error != 0)
return error;
- if (securelevel > 0)
- return EPERM;
+ error = securelevel_gt(p->p_ucred, 0);
+ if (error)
+ return error;
#endif
td->td_frame->tf_eflags |= PSL_IOPL;
break;