mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
5578cfa2fa
commit
f7312ca2a9
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue