patch-2.4.15 linux/arch/i386/kernel/apm.c

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

diff -u --recursive --new-file v2.4.14/linux/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
@@ -1471,7 +1471,7 @@
 	as = filp->private_data;
 	if (check_apm_user(as, "ioctl"))
 		return -EIO;
-	if (!as->suser)
+	if ((!as->suser) || (!as->writer))
 		return -EPERM;
 	switch (cmd) {
 	case APM_IOC_STANDBY:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)