o Modify pcvt ioctl() security checks to use securelevel_gt() instead

of direct securelevel variable checks.  (Yet another API to perform
  direct hardware I/O using KDENABIO.)

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2001-09-26 20:21:28 +00:00
parent 9997f52470
commit ce3a32b6da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83980

View file

@ -2619,8 +2619,9 @@ usl_vt_ioctl(dev_t dev, int 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(p->p_ucred, 0);
if (error != 0)
return (error);
fp->tf_eflags |= PSL_IOPL;