1
--- acpid-1.0.8.orig/event.c
2
+++ acpid-1.0.8/event.c
12
struct dirent *dirent;
21
continue; /* skip non-regular files */
24
- r = parse_file(file);
26
- enlist_rule(&cmd_list, r);
28
+ /* check for run-parts style filename */
29
+ basen = basename(file);
30
+ if (regcomp(&preg, "^[a-zA-Z0-9_-]+$", RULE_REGEX_FLAGS) == 0){
31
+ if (regexec(&preg, basen, 0, NULL, 0) == 0){
32
+ r = parse_file(file);
34
+ enlist_rule(&cmd_list, r);
38
+ acpid_log(LOG_DEBUG, "ignoring conf file %s\n", file);