33 lines
940 B
Diff
33 lines
940 B
Diff
--- acpid-1.0.6.orig/acpid.c 2007-09-24 18:49:02.000000000 -0400
|
|
+++ acpid-1.0.6/acpid.c 2007-09-24 18:52:44.000000000 -0400
|
|
@@ -397,7 +397,7 @@ open_log(void)
|
|
int log_opts;
|
|
|
|
/* open /dev/null */
|
|
- nullfd = open("/dev/null", O_RDONLY, 0640);
|
|
+ nullfd = open("/dev/null", O_RDONLY);
|
|
if (nullfd < 0) {
|
|
fprintf(stderr, "%s: can't open %s: %s\n", progname,
|
|
"/dev/null", strerror(errno));
|
|
diff -urp acpid-1.0.6.orig/event.c acpid-1.0.6/event.c
|
|
--- acpid-1.0.6.orig/event.c 2007-09-24 18:49:02.000000000 -0400
|
|
+++ acpid-1.0.6/event.c 2007-09-24 18:55:10.000000000 -0400
|
|
@@ -318,6 +318,7 @@ parse_file(const char *file)
|
|
file);
|
|
}
|
|
free_rule(r);
|
|
+ fclose(fp);
|
|
return NULL;
|
|
}
|
|
fclose(fp);
|
|
@@ -667,7 +668,7 @@ parse_cmd(const char *cmd, const char *e
|
|
i = 0;
|
|
|
|
memset(buf, 0, sizeof(buf));
|
|
- while (i < (sizeof(buf)-1)) {
|
|
+ while ((size_t)i < (sizeof(buf)-1)) {
|
|
if (*p == '%') {
|
|
p++;
|
|
if (*p == 'e') {
|
|
|