o Modify syscons ioctl securelevel checks to use securelevel_gt() (oh look,

yet another API to do direct hardware I/O access.)

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2001-09-26 20:17:15 +00:00
parent 19f1565901
commit 8c7cc7234e

View File

@ -980,8 +980,9 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
return EPERM;
error = securelevel_gt(td->td_proc->p_ucred, 0);
if (error != 0)
return error;
#ifdef __i386__
td->td_frame->tf_eflags |= PSL_IOPL;
#endif