diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-09-26 20:13:16 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-09-26 20:13:16 +0000 |
commit | 5918c1e495019411d85d56162501e91d4705e029 (patch) | |
tree | bc86c08efd6251d6dca8ae70ff397f06cbf2842c /sys/cam | |
parent | 176ff42ed56bc6389cbd5c72b49b375f0daef9a3 (diff) | |
download | FreeBSD-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.c | 6 |
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); } /* |