patch-2.0.34 linux/arch/i386/kernel/ioport.c

Next file: linux/arch/i386/kernel/process.c
Previous file: linux/arch/i386/kernel/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.33/linux/arch/i386/kernel/ioport.c linux/arch/i386/kernel/ioport.c
@@ -54,7 +54,7 @@
 		return -EINVAL;
 	if (from + num > IO_BITMAP_SIZE*32)
 		return -EINVAL;
-	if (!suser())
+	if (!suser() || securelevel > 0)
 		return -EPERM;
 
 	set_bitmap((unsigned long *)current->tss.io_bitmap, from, num, !turn_on);
@@ -82,7 +82,7 @@
 
 	if (level > 3)
 		return -EINVAL;
-	if (!suser())
+	if (!suser() || securelevel > 0)
 		return -EPERM;
 	*(&eflags) = (eflags & 0xffffcfff) | (level << 12);
 	return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov