diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index 22d49fe98b3..964d3837f85 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -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); } /*