Patch got this one wrong, we want to check securelevel in open()

This commit is contained in:
phk 1999-11-07 12:32:45 +00:00
parent a7f67fc819
commit 34f8a5b20f
2 changed files with 10 additions and 10 deletions

View File

@ -111,11 +111,6 @@ mmclose(dev, flags, fmt, p)
struct proc *p;
{
switch (minor(dev)) {
case 0:
case 1:
if (securelevel >= 1)
return (EPERM);
break;
case 14:
curproc->p_md.md_regs->tf_eflags &= ~PSL_IOPL;
break;
@ -135,6 +130,11 @@ mmopen(dev, flags, fmt, p)
int error;
switch (minor(dev)) {
case 0:
case 1:
if (securelevel >= 1)
return (EPERM);
break;
case 14:
error = suser(p);
if (error != 0)

View File

@ -111,11 +111,6 @@ mmclose(dev, flags, fmt, p)
struct proc *p;
{
switch (minor(dev)) {
case 0:
case 1:
if (securelevel >= 1)
return (EPERM);
break;
case 14:
curproc->p_md.md_regs->tf_eflags &= ~PSL_IOPL;
break;
@ -135,6 +130,11 @@ mmopen(dev, flags, fmt, p)
int error;
switch (minor(dev)) {
case 0:
case 1:
if (securelevel >= 1)
return (EPERM);
break;
case 14:
error = suser(p);
if (error != 0)