diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2001-09-26 20:13:16 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2001-09-26 20:13:16 +0000 |
commit | f7312ca2a9237b04268d67df0f86187ab10ebf7f (patch) | |
tree | bc86c08efd6251d6dca8ae70ff397f06cbf2842c /sys/cam | |
parent | 5578cfa2fa591458185a392dd7044af101b79d13 (diff) |
Notes
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 22d49fe98b349..964d3837f8595 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); } /* |