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

Next file: linux/arch/i386/kernel/irq.c
Previous file: linux/arch/i386/kernel/io_apic.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/arch/i386/kernel/ioport.c linux/arch/i386/kernel/ioport.c
@@ -58,7 +58,7 @@
 
 	if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32))
 		return -EINVAL;
-	if (!suser())
+	if (!capable(CAP_SYS_RAWIO))
 		return -EPERM;
 	/*
 	 * If it's the first ioperm() call in this thread's lifetime, set the
@@ -94,7 +94,7 @@
 
 	if (level > 3)
 		return -EINVAL;
-	if (!suser())
+	if (!capable(CAP_SYS_RAWIO))
 		return -EPERM;
 	regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12);
 	return 0;

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