summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-09-26 20:13:16 +0000
committerrwatson <rwatson@FreeBSD.org>2001-09-26 20:13:16 +0000
commit5918c1e495019411d85d56162501e91d4705e029 (patch)
treebc86c08efd6251d6dca8ae70ff397f06cbf2842c /sys/cam
parent176ff42ed56bc6389cbd5c72b49b375f0daef9a3 (diff)
downloadFreeBSD-src-5918c1e495019411d85d56162501e91d4705e029.zip
FreeBSD-src-5918c1e495019411d85d56162501e91d4705e029.tar.gz
o Modify access control code for the CAM SCSI pass-through device to
use securelevel_gt() instead of direct securelevel variable test. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_pass.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 22d49fe..964d383 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -37,6 +37,7 @@
#include <sys/conf.h>
#include <sys/errno.h>
#include <sys/devicestat.h>
+#include <sys/proc.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
@@ -370,9 +371,10 @@ passopen(dev_t dev, int flags, int fmt, struct thread *td)
/*
* Don't allow access when we're running at a high securelevel.
*/
- if (securelevel > 1) {
+ error = securelevel_gt(td->td_proc->p_ucred, 1);
+ if (error) {
splx(s);
- return(EPERM);
+ return(error);
}
/*
OpenPOWER on IntegriCloud