diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-09-26 20:22:38 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-09-26 20:22:38 +0000 |
commit | d2bcf9062d3b26fdd3b5a0c0cbf1bda53512704e (patch) | |
tree | f58b978325fc0b4c3e5a6f1b1babbcdf1a4982ea | |
parent | ec4feb1e54fed5f27d0ce9b967bba07133f7ef31 (diff) | |
download | FreeBSD-src-d2bcf9062d3b26fdd3b5a0c0cbf1bda53512704e.zip FreeBSD-src-d2bcf9062d3b26fdd3b5a0c0cbf1bda53512704e.tar.gz |
o Modify access control checks in linux_iopl() to use securelevel_gt()
rather than direct variable checks. (Yet another API to perform
direct hardware I/O.)
Obtained from: TrustedBSD Project
-rw-r--r-- | sys/i386/linux/linux_machdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index ba443bb..7443aac 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -560,8 +560,8 @@ linux_iopl(struct thread *td, struct linux_iopl_args *args) return (EINVAL); if ((error = suser_td(td)) != 0) return (error); - if (securelevel > 0) - return (EPERM); + if ((error = securelevel_gt(td->td_proc->p_ucred, 0)) != 0) + return (error); td->td_frame->tf_eflags = (td->td_frame->tf_eflags & ~PSL_IOPL) | (args->level * (PSL_IOPL / 3)); return (0); |