summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-09-26 20:20:05 +0000
committerrwatson <rwatson@FreeBSD.org>2001-09-26 20:20:05 +0000
commit53363e1502b6827a33fcb60f020120c57d0a90d9 (patch)
tree371668d8c4cd1175a9800f9f441414992c1fe9b8
parentc9c82b43c3b67649e07ebe33426871afc1cdc864 (diff)
downloadFreeBSD-src-53363e1502b6827a33fcb60f020120c57d0a90d9.zip
FreeBSD-src-53363e1502b6827a33fcb60f020120c57d0a90d9.tar.gz
o Modify spigot_open() to use securelevel_gt() instead of direct
securelevel variable checks. Obtained from: TrustedBSD Project
-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 0bd87ff..f41b763 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;
OpenPOWER on IntegriCloud