--- acpid.c.orig	2009-07-15 11:56:15.000000000 +0200
+++ acpid.c	2009-07-15 12:01:00.000000000 +0200
@@ -59,6 +59,11 @@
 static int foreground;
 static const char *pidfile = ACPID_PIDFILE;
 static int netlink;
+/* 
+ * disable access to the input layer
+ * Added by Stefan Tomanek <stefan@pico.ruhr.de>
+ */
+static int noinput;
 
 int
 main(int argc, char **argv)
@@ -84,7 +89,9 @@
 	if (netlink)
 	{
 		/* open the input layer */
-		open_input();
+                if (!noinput) {
+                    open_input();
+                }
 
 		/* open netlink */
 		open_netlink();
@@ -138,8 +145,16 @@
 	if (open_log() < 0) {
 		exit(EXIT_FAILURE);
 	}
-	acpid_log(LOG_INFO, "starting up with %s\n",
-		netlink ? "netlink and the input layer" : "proc fs");
+        
+        if (netlink) {
+            if (noinput) {
+                acpid_log(LOG_INFO, "starting up with netlink layer\n");
+            } else {
+                acpid_log(LOG_INFO, "starting up with netlink and input layer\n");
+            }
+        } else {
+            acpid_log(LOG_INFO, "starting up with proc fs\n");
+        }
 
 	/* trap key signals */
 	signal(SIGHUP, reload_conf);
@@ -233,6 +248,7 @@
 		{"pidfile", 1, 0, 'p'},
 		{"lockfile", 1, 0, 'L'},
 		{"netlink", 0, 0, 'n'},
+		{"noinput", 0, 0, 'i'},
 		{"version", 0, 0, 'v'},
 		{"help", 0, 0, 'h'},
 		{NULL, 0, 0, 0},
@@ -251,6 +267,7 @@
 		"Use the specified PID file.",		/* pidfile */
 		"Use the specified lockfile to stop processing.", /* lockfile */
 		"Force netlink/input layer mode. (overrides -e)", /* netlink */
+                "Disable input layer access", /* noinput */
 		"Print version information.",		/* version */
 		"Print this message.",			/* help */
 	};
@@ -261,7 +278,7 @@
 	for (;;) {
 		int i;
 		i = getopt_long(*argc, *argv,
-		    "c:C:de:flg:m:s:Sp:L:nvh", opts, NULL);
+		    "c:C:de:flg:m:s:Sp:L:nivh", opts, NULL);
 		if (i == -1) {
 			break;
 		}
@@ -306,6 +323,9 @@
 		case 'n':
 			netlink = 1;
 			break;
+		case 'i':
+			noinput = 1;
+			break;
 		case 'v':
 			printf(PACKAGE "-" VERSION "\n");
 			exit(EXIT_SUCCESS);
