1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
diff -Nur paxd-libre-1.3.orig/flags.c paxd-libre-1.3/flags.c
--- paxd-libre-1.3.orig/flags.c 2014-11-08 19:40:27.000000000 -0200
+++ paxd-libre-1.3/flags.c 2014-12-29 23:04:54.096274926 -0200
@@ -16,13 +16,13 @@
}
static void line_ignored(size_t n, const char *line) {
- fprintf(stderr, "ignored invalid line %zu in /etc/paxd-libre-libre.conf: %s", n, line);
+ fprintf(stderr, "ignored invalid line %zu in /etc/paxd-libre.conf: %s", n, line);
}
void update_attributes(void) {
- FILE *conf = fopen("/etc/paxd-libre-libre.conf", "r");
+ FILE *conf = fopen("/etc/paxd-libre.conf", "r");
if (!conf) {
- perror("could not open /etc/paxd-libre-libre.conf");
+ perror("could not open /etc/paxd-libre.conf");
return;
}
@@ -33,7 +33,7 @@
ssize_t bytes_read = getline(&line, &line_len, conf);
if (bytes_read == -1) {
if (ferror(conf)) {
- perror("failed to read line from /etc/paxd-libre-libre.conf");
+ perror("failed to read line from /etc/paxd-libre.conf");
break;
} else {
break;
diff -Nur paxd-libre-1.3.orig/paxd-libre.c paxd-libre-1.3/paxd-libre.c
--- paxd-libre-1.3.orig/paxd-libre.c 2014-11-08 19:40:27.000000000 -0200
+++ paxd-libre-1.3/paxd-libre.c 2014-11-28 15:30:42.304537269 -0200
@@ -28,7 +28,7 @@
perror("inotify");
return EXIT_FAILURE;
}
- int watch_conf = inotify_add_watch_x(inotify, "/etc/paxd.conf", IN_MODIFY);
+ int watch_conf = inotify_add_watch_x(inotify, "/etc/paxd-libre.conf", IN_MODIFY);
int watch_conf_dir = inotify_add_watch_x(inotify, "/etc/", IN_CREATE | IN_MOVED_TO);
int watch_pacman = inotify_add_watch_x(inotify, "/var/lib/pacman/", IN_DELETE);
@@ -45,10 +45,10 @@
if (event->wd == watch_conf) {
fprintf(stderr, "configuration modified, updating attributes\n");
- } else if (event->wd == watch_conf_dir && !strcmp(event->name, "paxd.conf")) {
+ } else if (event->wd == watch_conf_dir && !strcmp(event->name, "paxd-libre.conf")) {
fprintf(stderr, "configuration created or moved to, updating attributes\n");
close(watch_conf);
- watch_conf = inotify_add_watch_x(inotify, "/etc/paxd.conf", IN_MODIFY);
+ watch_conf = inotify_add_watch_x(inotify, "/etc/paxd-libre.conf", IN_MODIFY);
} else if (event->wd == watch_pacman && !strcmp(event->name, "db.lck")) {
fprintf(stderr, "pacman finished a transaction, updating attributes\n");
} else {
|