o Modify the access control checks for the ia64 /dev/mem (and friends)
to use securelevel_gt() instead of direct variable checks. Obtained from: TrustedBSD Project
This commit is contained in:
parent
54045486e0
commit
b9c6f21493
@ -115,12 +115,16 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td)
|
||||
static int
|
||||
mmopen(dev_t dev, int flags, int fmt, struct thread *td)
|
||||
{
|
||||
int error;
|
||||
|
||||
switch (minor(dev)) {
|
||||
case 0:
|
||||
case 1:
|
||||
if ((flags & FWRITE) && securelevel > 0)
|
||||
return (EPERM);
|
||||
if (flags & FWRITE) {
|
||||
error = securelevel_gt(td->td_proc->p_ucred, 0);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
#ifdef PERFMON
|
||||
|
Loading…
x
Reference in New Issue
Block a user