lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Stop APM readers from responding to events
Hi Linus,

This is just a small patch, but fills a hole. Thanks to Thomas Hood for a
patch.

Alan, This will also apply to 2.4.13-ac5.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.4.14-pre5/arch/i386/kernel/apm.c 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c
--- 2.4.14-pre5/arch/i386/kernel/apm.c Wed Oct 24 16:12:20 2001
+++ 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c Thu Nov 1 01:09:48 2001
@@ -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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.044 / U:10.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site