Try the attached patch.
diff -N -r -U 10 -x '*.o' -x '*~' -x '.*' -x '*.out' -x CVS -x '*.moc' 
acpid-2.0.6/event.c acpid/event.c
--- acpid-2.0.6/event.c 2010-03-28 10:00:04.000000000 -0400
+++ acpid/event.c       2010-09-27 18:26:48.000000000 -0400
@@ -115,20 +115,26 @@
        }
 
        /* scan all the files */
        while ((dirent = readdir(dir))) {
                int len;
                struct rule *r;
                struct stat stat_buf;
 
                len = strlen(dirent->d_name);
 
+               /* skip "." and ".." */
+               if (strncmp(dirent->d_name, ".", sizeof(dirent->d_name)) == 0)
+                       continue;
+               if (strncmp(dirent->d_name, "..", sizeof(dirent->d_name)) == 0)
+                       continue;
+
                /* skip any files that don't match the run-parts convention */
                if (regexec(&preg, dirent->d_name, 0, NULL, 0) != 0) {
                        acpid_log(LOG_INFO, "skipping conf file %s/%s\n", 
                                confdir, dirent->d_name);
                        continue;
                }
 
                /* Compute the length of the full path name adding one for */
                /* the slash and one more for the NULL. */
                len += strlen(confdir) + 2;
diff -N -r -U 10 -x '*.o' -x '*~' -x '.*' -x '*.out' -x CVS -x '*.moc' 
acpid-2.0.6/proc.c acpid/proc.c
--- acpid-2.0.6/proc.c  2010-03-28 10:02:42.000000000 -0400
+++ acpid/proc.c        2010-09-27 18:30:28.000000000 -0400
@@ -81,21 +81,21 @@
 
 int
 open_proc()
 {
        int fd;
        struct connection c;
        
        fd = open(eventfile, O_RDONLY);
        if (fd < 0) {
                if (errno == ENOENT) {
-                       acpid_log(LOG_INFO, "Deprecated %s was not found.  "
+                       acpid_log(LOG_DEBUG, "Deprecated %s was not found.  "
                                "Trying netlink and the input layer...\n", 
eventfile);
                } else {
                        acpid_log(LOG_ERR, "can't open %s: %s (%d)\n", 
eventfile, 
                                strerror(errno), errno);
                }
                return -1;
                
        }
        fcntl(fd, F_SETFD, FD_CLOEXEC);
 

Reply via email to