diff options
author | netblue30 <netblue30@yahoo.com> | 2015-12-06 19:37:08 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-12-06 19:37:08 -0500 |
commit | 1365b0d41b013a8fd209acfd2f7adefb9b6adbdc (patch) | |
tree | 48e0ce6dad2ecf712cbc5b598b222209d93501f4 | |
parent | tracelog (diff) | |
download | firejail-1365b0d41b013a8fd209acfd2f7adefb9b6adbdc.tar.gz firejail-1365b0d41b013a8fd209acfd2f7adefb9b6adbdc.tar.zst firejail-1365b0d41b013a8fd209acfd2f7adefb9b6adbdc.zip |
tracelog fixes
39 files changed, 114 insertions, 53 deletions
diff --git a/etc/conkeror.profile b/etc/conkeror.profile index dde756754..7c1384523 100644 --- a/etc/conkeror.profile +++ b/etc/conkeror.profile | |||
@@ -7,7 +7,6 @@ caps.drop all | |||
7 | seccomp | 7 | seccomp |
8 | protocol unix,inet,inet6 | 8 | protocol unix,inet,inet6 |
9 | netfilter | 9 | netfilter |
10 | tracelog | ||
11 | noroot | 10 | noroot |
12 | whitelist ~/.conkeror.mozdev.org | 11 | whitelist ~/.conkeror.mozdev.org |
13 | whitelist ~/Downloads | 12 | whitelist ~/Downloads |
diff --git a/etc/deluge.profile b/etc/deluge.profile index 98c2e4fc5..4f76f3666 100644 --- a/etc/deluge.profile +++ b/etc/deluge.profile | |||
@@ -12,7 +12,6 @@ caps.drop all | |||
12 | seccomp | 12 | seccomp |
13 | protocol unix,inet,inet6 | 13 | protocol unix,inet,inet6 |
14 | netfilter | 14 | netfilter |
15 | tracelog | ||
16 | noroot | 15 | noroot |
17 | 16 | ||
18 | 17 | ||
diff --git a/etc/dnscrypt-proxy.profile b/etc/dnscrypt-proxy.profile index 8a57a8975..e0c5c93a3 100644 --- a/etc/dnscrypt-proxy.profile +++ b/etc/dnscrypt-proxy.profile | |||
@@ -5,5 +5,4 @@ include /etc/firejail/disable-mgmt.inc | |||
5 | private | 5 | private |
6 | private-dev | 6 | private-dev |
7 | seccomp.drop mount,umount2,ptrace,kexec_load,kexec_file_load,open_by_handle_at,init_module,finit_module,delete_module,iopl,ioperm,swapon,swapoff,syslog,process_vm_readv,process_vm_writev,sysfs,_sysctl,adjtimex,clock_adjtime,lookup_dcookie,perf_event_open,fanotify_init,kcmp,add_key,request_key,keyctl,uselib,acct,modify_ldt,pivot_root,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,mbind,get_mempolicy,set_mempolicy,migrate_pages,move_pages,vmsplice,perf_event_open | 7 | seccomp.drop mount,umount2,ptrace,kexec_load,kexec_file_load,open_by_handle_at,init_module,finit_module,delete_module,iopl,ioperm,swapon,swapoff,syslog,process_vm_readv,process_vm_writev,sysfs,_sysctl,adjtimex,clock_adjtime,lookup_dcookie,perf_event_open,fanotify_init,kcmp,add_key,request_key,keyctl,uselib,acct,modify_ldt,pivot_root,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,mbind,get_mempolicy,set_mempolicy,migrate_pages,move_pages,vmsplice,perf_event_open |
8 | tracelog | ||
9 | 8 | ||
diff --git a/etc/dropbox.profile b/etc/dropbox.profile index c0b7e6342..248e3ac9e 100644 --- a/etc/dropbox.profile +++ b/etc/dropbox.profile | |||
@@ -11,5 +11,4 @@ caps | |||
11 | seccomp | 11 | seccomp |
12 | protocol unix,inet,inet6 | 12 | protocol unix,inet,inet6 |
13 | noroot | 13 | noroot |
14 | tracelog | ||
15 | 14 | ||
diff --git a/etc/evince.profile b/etc/evince.profile index 977a2bd68..34d8162b3 100644 --- a/etc/evince.profile +++ b/etc/evince.profile | |||
@@ -12,4 +12,3 @@ caps.drop all | |||
12 | seccomp | 12 | seccomp |
13 | protocol unix,inet,inet6 | 13 | protocol unix,inet,inet6 |
14 | noroot | 14 | noroot |
15 | tracelog | ||
diff --git a/etc/fbreader.profile b/etc/fbreader.profile index 1a530a867..f94fc28df 100644 --- a/etc/fbreader.profile +++ b/etc/fbreader.profile | |||
@@ -13,6 +13,5 @@ caps.drop all | |||
13 | seccomp | 13 | seccomp |
14 | protocol unix,inet,inet6 | 14 | protocol unix,inet,inet6 |
15 | netfilter | 15 | netfilter |
16 | tracelog | ||
17 | noroot | 16 | noroot |
18 | 17 | ||
diff --git a/etc/filezilla.profile b/etc/filezilla.profile index 3f20fe755..ba8649067 100644 --- a/etc/filezilla.profile +++ b/etc/filezilla.profile | |||
@@ -11,6 +11,5 @@ seccomp | |||
11 | protocol unix,inet,inet6 | 11 | protocol unix,inet,inet6 |
12 | noroot | 12 | noroot |
13 | netfilter | 13 | netfilter |
14 | tracelog | ||
15 | 14 | ||
16 | 15 | ||
diff --git a/etc/google-chrome-beta.profile b/etc/google-chrome-beta.profile index d08a5f41d..6122876bf 100644 --- a/etc/google-chrome-beta.profile +++ b/etc/google-chrome-beta.profile | |||
@@ -9,7 +9,6 @@ include /etc/firejail/disable-common.inc | |||
9 | # | 9 | # |
10 | 10 | ||
11 | netfilter | 11 | netfilter |
12 | tracelog | ||
13 | whitelist ${DOWNLOADS} | 12 | whitelist ${DOWNLOADS} |
14 | whitelist ~/.config/google-chrome-beta | 13 | whitelist ~/.config/google-chrome-beta |
15 | whitelist ~/.cache/google-chrome-beta | 14 | whitelist ~/.cache/google-chrome-beta |
diff --git a/etc/google-chrome-unstable.profile b/etc/google-chrome-unstable.profile index 06b1399e1..7b8b12d04 100644 --- a/etc/google-chrome-unstable.profile +++ b/etc/google-chrome-unstable.profile | |||
@@ -9,7 +9,6 @@ include /etc/firejail/disable-common.inc | |||
9 | # | 9 | # |
10 | 10 | ||
11 | netfilter | 11 | netfilter |
12 | tracelog | ||
13 | whitelist ${DOWNLOADS} | 12 | whitelist ${DOWNLOADS} |
14 | whitelist ~/.config/google-chrome-unstable | 13 | whitelist ~/.config/google-chrome-unstable |
15 | whitelist ~/.cache/google-chrome-unstable | 14 | whitelist ~/.cache/google-chrome-unstable |
diff --git a/etc/google-chrome.profile b/etc/google-chrome.profile index 7d2580116..351490d7f 100644 --- a/etc/google-chrome.profile +++ b/etc/google-chrome.profile | |||
@@ -9,7 +9,6 @@ include /etc/firejail/disable-common.inc | |||
9 | # | 9 | # |
10 | 10 | ||
11 | netfilter | 11 | netfilter |
12 | tracelog | ||
13 | whitelist ${DOWNLOADS} | 12 | whitelist ${DOWNLOADS} |
14 | whitelist ~/.config/google-chrome | 13 | whitelist ~/.config/google-chrome |
15 | whitelist ~/.cache/google-chrome | 14 | whitelist ~/.cache/google-chrome |
diff --git a/etc/midori.profile b/etc/midori.profile index 9722d0313..77a6fb984 100644 --- a/etc/midori.profile +++ b/etc/midori.profile | |||
@@ -8,5 +8,4 @@ caps.drop all | |||
8 | seccomp | 8 | seccomp |
9 | protocol unix,inet,inet6 | 9 | protocol unix,inet,inet6 |
10 | netfilter | 10 | netfilter |
11 | tracelog | ||
12 | 11 | ||
diff --git a/etc/opera-beta.profile b/etc/opera-beta.profile index ab8f55e28..c1672abce 100644 --- a/etc/opera-beta.profile +++ b/etc/opera-beta.profile | |||
@@ -5,7 +5,6 @@ include /etc/firejail/disable-secret.inc | |||
5 | include /etc/firejail/disable-common.inc | 5 | include /etc/firejail/disable-common.inc |
6 | include /etc/firejail/disable-devel.inc | 6 | include /etc/firejail/disable-devel.inc |
7 | netfilter | 7 | netfilter |
8 | tracelog | ||
9 | whitelist ~/.config/opera-beta | 8 | whitelist ~/.config/opera-beta |
10 | whitelist ${DOWNLOADS} | 9 | whitelist ${DOWNLOADS} |
11 | whitelist ~/.cache/opera-beta | 10 | whitelist ~/.cache/opera-beta |
diff --git a/etc/opera.profile b/etc/opera.profile index c307e7703..a76806ed0 100644 --- a/etc/opera.profile +++ b/etc/opera.profile | |||
@@ -5,7 +5,6 @@ include /etc/firejail/disable-secret.inc | |||
5 | include /etc/firejail/disable-common.inc | 5 | include /etc/firejail/disable-common.inc |
6 | include /etc/firejail/disable-devel.inc | 6 | include /etc/firejail/disable-devel.inc |
7 | netfilter | 7 | netfilter |
8 | tracelog | ||
9 | whitelist ~/.config/opera | 8 | whitelist ~/.config/opera |
10 | whitelist ${DOWNLOADS} | 9 | whitelist ${DOWNLOADS} |
11 | whitelist ~/.cache/opera | 10 | whitelist ~/.cache/opera |
diff --git a/etc/qbittorrent.profile b/etc/qbittorrent.profile index af5a6f697..dd50c779e 100644 --- a/etc/qbittorrent.profile +++ b/etc/qbittorrent.profile | |||
@@ -12,6 +12,5 @@ caps.drop all | |||
12 | seccomp | 12 | seccomp |
13 | protocol unix,inet,inet6 | 13 | protocol unix,inet,inet6 |
14 | netfilter | 14 | netfilter |
15 | tracelog | ||
16 | noroot | 15 | noroot |
17 | 16 | ||
diff --git a/etc/rtorrent.profile b/etc/rtorrent.profile index 03aa8a71f..c2c0356d9 100644 --- a/etc/rtorrent.profile +++ b/etc/rtorrent.profile | |||
@@ -7,5 +7,4 @@ caps.drop all | |||
7 | seccomp | 7 | seccomp |
8 | protocol unix,inet,inet6 | 8 | protocol unix,inet,inet6 |
9 | netfilter | 9 | netfilter |
10 | tracelog | ||
11 | noroot | 10 | noroot |
diff --git a/etc/skype.profile b/etc/skype.profile index f1519b0ff..4d2d042cc 100644 --- a/etc/skype.profile +++ b/etc/skype.profile | |||
@@ -6,7 +6,6 @@ include /etc/firejail/disable-common.inc | |||
6 | include /etc/firejail/disable-devel.inc | 6 | include /etc/firejail/disable-devel.inc |
7 | caps.drop all | 7 | caps.drop all |
8 | netfilter | 8 | netfilter |
9 | tracelog | ||
10 | noroot | 9 | noroot |
11 | seccomp | 10 | seccomp |
12 | protocol unix,inet,inet6 | 11 | protocol unix,inet,inet6 |
diff --git a/etc/spotify.profile b/etc/spotify.profile index 0063564ae..414660857 100644 --- a/etc/spotify.profile +++ b/etc/spotify.profile | |||
@@ -16,6 +16,5 @@ caps.drop all | |||
16 | seccomp | 16 | seccomp |
17 | protocol unix,inet,inet6 | 17 | protocol unix,inet,inet6 |
18 | netfilter | 18 | netfilter |
19 | tracelog | ||
20 | noroot | 19 | noroot |
21 | 20 | ||
diff --git a/etc/steam.profile b/etc/steam.profile index af49580ce..5b9244567 100644 --- a/etc/steam.profile +++ b/etc/steam.profile | |||
@@ -7,7 +7,6 @@ include /etc/firejail/disable-common.inc | |||
7 | include /etc/firejail/disable-devel.inc | 7 | include /etc/firejail/disable-devel.inc |
8 | caps.drop all | 8 | caps.drop all |
9 | netfilter | 9 | netfilter |
10 | tracelog | ||
11 | noroot | 10 | noroot |
12 | seccomp | 11 | seccomp |
13 | protocol unix,inet,inet6 | 12 | protocol unix,inet,inet6 |
diff --git a/etc/transmission-gtk.profile b/etc/transmission-gtk.profile index 1245a514b..f23c50528 100644 --- a/etc/transmission-gtk.profile +++ b/etc/transmission-gtk.profile | |||
@@ -12,7 +12,7 @@ caps.drop all | |||
12 | seccomp | 12 | seccomp |
13 | protocol unix,inet,inet6 | 13 | protocol unix,inet,inet6 |
14 | netfilter | 14 | netfilter |
15 | noroot | ||
16 | tracelog | 15 | tracelog |
16 | noroot | ||
17 | 17 | ||
18 | 18 | ||
diff --git a/etc/weechat.profile b/etc/weechat.profile index 1a9fa02b3..79e3ae774 100644 --- a/etc/weechat.profile +++ b/etc/weechat.profile | |||
@@ -7,5 +7,4 @@ caps.drop all | |||
7 | seccomp | 7 | seccomp |
8 | protocol unix,inet,inet6 | 8 | protocol unix,inet,inet6 |
9 | netfilter | 9 | netfilter |
10 | tracelog | ||
11 | noroot | 10 | noroot |
diff --git a/etc/wine.profile b/etc/wine.profile index 6d1106993..8a7f66773 100644 --- a/etc/wine.profile +++ b/etc/wine.profile | |||
@@ -8,6 +8,5 @@ include /etc/firejail/disable-common.inc | |||
8 | include /etc/firejail/disable-devel.inc | 8 | include /etc/firejail/disable-devel.inc |
9 | caps.drop all | 9 | caps.drop all |
10 | netfilter | 10 | netfilter |
11 | tracelog | ||
12 | noroot | 11 | noroot |
13 | seccomp | 12 | seccomp |
diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c index d89998f61..0e133d7e4 100644 --- a/src/libtracelog/libtracelog.c +++ b/src/libtracelog/libtracelog.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <syslog.h> | 32 | #include <syslog.h> |
33 | #include <dirent.h> | 33 | #include <dirent.h> |
34 | 34 | ||
35 | //#define DEBUG | 35 | #define DEBUG |
36 | 36 | ||
37 | // break recursivity on fopen call | 37 | // break recursivity on fopen call |
38 | typedef FILE *(*orig_fopen_t)(const char *pathname, const char *mode); | 38 | typedef FILE *(*orig_fopen_t)(const char *pathname, const char *mode); |
@@ -63,6 +63,9 @@ static inline uint32_t hash(const char *str) { | |||
63 | } | 63 | } |
64 | 64 | ||
65 | static void storage_add(const char *str) { | 65 | static void storage_add(const char *str) { |
66 | #ifdef DEBUG | ||
67 | printf("add %s\n", str); | ||
68 | #endif | ||
66 | ListElem *ptr = malloc(sizeof(ListElem)); | 69 | ListElem *ptr = malloc(sizeof(ListElem)); |
67 | if (!ptr) { | 70 | if (!ptr) { |
68 | fprintf(stderr, "Error: cannot allocate memory\n"); | 71 | fprintf(stderr, "Error: cannot allocate memory\n"); |
@@ -82,11 +85,20 @@ static void storage_add(const char *str) { | |||
82 | } | 85 | } |
83 | 86 | ||
84 | static char *storage_find(const char *str) { | 87 | static char *storage_find(const char *str) { |
88 | #ifdef DEBUG | ||
89 | printf("storage find %s\n", str); | ||
90 | #endif | ||
85 | const char *tofind = str; | 91 | const char *tofind = str; |
86 | int allocated = 0; | 92 | int allocated = 0; |
87 | 93 | ||
88 | if (strstr(str, "..") || strstr(str, "/./")) { | 94 | if (strstr(str, "..") || strstr(str, "/./")) { |
89 | tofind = realpath(str, NULL); | 95 | tofind = realpath(str, NULL); |
96 | if (!tofind) { | ||
97 | #ifdef DEBUG | ||
98 | printf("realpath failed\n"); | ||
99 | #endif | ||
100 | return NULL; | ||
101 | } | ||
90 | allocated = 1; | 102 | allocated = 1; |
91 | } | 103 | } |
92 | 104 | ||
@@ -96,6 +108,9 @@ static char *storage_find(const char *str) { | |||
96 | if (strcmp(tofind, ptr->path) == 0) { | 108 | if (strcmp(tofind, ptr->path) == 0) { |
97 | if (allocated) | 109 | if (allocated) |
98 | free((char *) tofind); | 110 | free((char *) tofind); |
111 | #ifdef DEBUG | ||
112 | printf("storage found\n"); | ||
113 | #endif | ||
99 | return ptr->path; | 114 | return ptr->path; |
100 | } | 115 | } |
101 | ptr = ptr->next; | 116 | ptr = ptr->next; |
@@ -103,6 +118,9 @@ static char *storage_find(const char *str) { | |||
103 | 118 | ||
104 | if (allocated) | 119 | if (allocated) |
105 | free((char *) tofind); | 120 | free((char *) tofind); |
121 | #ifdef DEBUG | ||
122 | printf("storage not found\n"); | ||
123 | #endif | ||
106 | return NULL; | 124 | return NULL; |
107 | } | 125 | } |
108 | 126 | ||
@@ -249,6 +267,9 @@ static char *name(void) { | |||
249 | typedef int (*orig_open_t)(const char *pathname, int flags, mode_t mode); | 267 | typedef int (*orig_open_t)(const char *pathname, int flags, mode_t mode); |
250 | static orig_open_t orig_open = NULL; | 268 | static orig_open_t orig_open = NULL; |
251 | int open(const char *pathname, int flags, mode_t mode) { | 269 | int open(const char *pathname, int flags, mode_t mode) { |
270 | #ifdef DEBUG | ||
271 | printf("%s\n", __FUNCTION__); | ||
272 | #endif | ||
252 | if (!orig_open) | 273 | if (!orig_open) |
253 | orig_open = (orig_open_t)dlsym(RTLD_NEXT, "open"); | 274 | orig_open = (orig_open_t)dlsym(RTLD_NEXT, "open"); |
254 | 275 | ||
@@ -261,9 +282,16 @@ int open(const char *pathname, int flags, mode_t mode) { | |||
261 | return rv; | 282 | return rv; |
262 | } | 283 | } |
263 | 284 | ||
285 | |||
286 | |||
287 | |||
288 | //#if 0 - todo: fix problems on google-chrome and opera - seems to be crashing when open64 is called | ||
264 | typedef int (*orig_open64_t)(const char *pathname, int flags, mode_t mode); | 289 | typedef int (*orig_open64_t)(const char *pathname, int flags, mode_t mode); |
265 | static orig_open64_t orig_open64 = NULL; | 290 | static orig_open64_t orig_open64 = NULL; |
266 | int open64(const char *pathname, int flags, mode_t mode) { | 291 | int open64(const char *pathname, int flags, mode_t mode) { |
292 | #ifdef DEBUG | ||
293 | printf("%s %s\n", __FUNCTION__, pathname); | ||
294 | #endif | ||
267 | if (!orig_open64) | 295 | if (!orig_open64) |
268 | orig_open64 = (orig_open64_t)dlsym(RTLD_NEXT, "open64"); | 296 | orig_open64 = (orig_open64_t)dlsym(RTLD_NEXT, "open64"); |
269 | if (!blacklist_loaded) | 297 | if (!blacklist_loaded) |
@@ -274,11 +302,16 @@ int open64(const char *pathname, int flags, mode_t mode) { | |||
274 | sendlog(name(), __FUNCTION__, pathname); | 302 | sendlog(name(), __FUNCTION__, pathname); |
275 | return rv; | 303 | return rv; |
276 | } | 304 | } |
305 | //#endif | ||
306 | |||
277 | 307 | ||
278 | // openat | 308 | // openat |
279 | typedef int (*orig_openat_t)(int dirfd, const char *pathname, int flags, mode_t mode); | 309 | typedef int (*orig_openat_t)(int dirfd, const char *pathname, int flags, mode_t mode); |
280 | static orig_openat_t orig_openat = NULL; | 310 | static orig_openat_t orig_openat = NULL; |
281 | int openat(int dirfd, const char *pathname, int flags, mode_t mode) { | 311 | int openat(int dirfd, const char *pathname, int flags, mode_t mode) { |
312 | #ifdef DEBUG | ||
313 | printf("%s\n", __FUNCTION__); | ||
314 | #endif | ||
282 | if (!orig_openat) | 315 | if (!orig_openat) |
283 | orig_openat = (orig_openat_t)dlsym(RTLD_NEXT, "openat"); | 316 | orig_openat = (orig_openat_t)dlsym(RTLD_NEXT, "openat"); |
284 | if (!blacklist_loaded) | 317 | if (!blacklist_loaded) |
@@ -293,6 +326,9 @@ int openat(int dirfd, const char *pathname, int flags, mode_t mode) { | |||
293 | typedef int (*orig_openat64_t)(int dirfd, const char *pathname, int flags, mode_t mode); | 326 | typedef int (*orig_openat64_t)(int dirfd, const char *pathname, int flags, mode_t mode); |
294 | static orig_openat64_t orig_openat64 = NULL; | 327 | static orig_openat64_t orig_openat64 = NULL; |
295 | int openat64(int dirfd, const char *pathname, int flags, mode_t mode) { | 328 | int openat64(int dirfd, const char *pathname, int flags, mode_t mode) { |
329 | #ifdef DEBUG | ||
330 | printf("%s\n", __FUNCTION__); | ||
331 | #endif | ||
296 | if (!orig_openat64) | 332 | if (!orig_openat64) |
297 | orig_openat64 = (orig_openat64_t)dlsym(RTLD_NEXT, "openat64"); | 333 | orig_openat64 = (orig_openat64_t)dlsym(RTLD_NEXT, "openat64"); |
298 | if (!blacklist_loaded) | 334 | if (!blacklist_loaded) |
@@ -307,6 +343,9 @@ int openat64(int dirfd, const char *pathname, int flags, mode_t mode) { | |||
307 | 343 | ||
308 | // fopen | 344 | // fopen |
309 | FILE *fopen(const char *pathname, const char *mode) { | 345 | FILE *fopen(const char *pathname, const char *mode) { |
346 | #ifdef DEBUG | ||
347 | printf("%s\n", __FUNCTION__); | ||
348 | #endif | ||
310 | if (!orig_fopen) | 349 | if (!orig_fopen) |
311 | orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen"); | 350 | orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen"); |
312 | if (!blacklist_loaded) | 351 | if (!blacklist_loaded) |
@@ -320,6 +359,9 @@ FILE *fopen(const char *pathname, const char *mode) { | |||
320 | 359 | ||
321 | #ifdef __GLIBC__ | 360 | #ifdef __GLIBC__ |
322 | FILE *fopen64(const char *pathname, const char *mode) { | 361 | FILE *fopen64(const char *pathname, const char *mode) { |
362 | #ifdef DEBUG | ||
363 | printf("%s\n", __FUNCTION__); | ||
364 | #endif | ||
323 | if (!orig_fopen64) | 365 | if (!orig_fopen64) |
324 | orig_fopen64 = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen64"); | 366 | orig_fopen64 = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen64"); |
325 | if (!blacklist_loaded) | 367 | if (!blacklist_loaded) |
@@ -337,6 +379,9 @@ FILE *fopen64(const char *pathname, const char *mode) { | |||
337 | typedef FILE *(*orig_freopen_t)(const char *pathname, const char *mode, FILE *stream); | 379 | typedef FILE *(*orig_freopen_t)(const char *pathname, const char *mode, FILE *stream); |
338 | static orig_freopen_t orig_freopen = NULL; | 380 | static orig_freopen_t orig_freopen = NULL; |
339 | FILE *freopen(const char *pathname, const char *mode, FILE *stream) { | 381 | FILE *freopen(const char *pathname, const char *mode, FILE *stream) { |
382 | #ifdef DEBUG | ||
383 | printf("%s\n", __FUNCTION__); | ||
384 | #endif | ||
340 | if (!orig_freopen) | 385 | if (!orig_freopen) |
341 | orig_freopen = (orig_freopen_t)dlsym(RTLD_NEXT, "freopen"); | 386 | orig_freopen = (orig_freopen_t)dlsym(RTLD_NEXT, "freopen"); |
342 | if (!blacklist_loaded) | 387 | if (!blacklist_loaded) |
@@ -352,6 +397,9 @@ FILE *freopen(const char *pathname, const char *mode, FILE *stream) { | |||
352 | typedef FILE *(*orig_freopen64_t)(const char *pathname, const char *mode, FILE *stream); | 397 | typedef FILE *(*orig_freopen64_t)(const char *pathname, const char *mode, FILE *stream); |
353 | static orig_freopen64_t orig_freopen64 = NULL; | 398 | static orig_freopen64_t orig_freopen64 = NULL; |
354 | FILE *freopen64(const char *pathname, const char *mode, FILE *stream) { | 399 | FILE *freopen64(const char *pathname, const char *mode, FILE *stream) { |
400 | #ifdef DEBUG | ||
401 | printf("%s\n", __FUNCTION__); | ||
402 | #endif | ||
355 | if (!orig_freopen64) | 403 | if (!orig_freopen64) |
356 | orig_freopen64 = (orig_freopen64_t)dlsym(RTLD_NEXT, "freopen64"); | 404 | orig_freopen64 = (orig_freopen64_t)dlsym(RTLD_NEXT, "freopen64"); |
357 | if (!blacklist_loaded) | 405 | if (!blacklist_loaded) |
@@ -368,6 +416,9 @@ FILE *freopen64(const char *pathname, const char *mode, FILE *stream) { | |||
368 | typedef int (*orig_unlink_t)(const char *pathname); | 416 | typedef int (*orig_unlink_t)(const char *pathname); |
369 | static orig_unlink_t orig_unlink = NULL; | 417 | static orig_unlink_t orig_unlink = NULL; |
370 | int unlink(const char *pathname) { | 418 | int unlink(const char *pathname) { |
419 | #ifdef DEBUG | ||
420 | printf("%s\n", __FUNCTION__); | ||
421 | #endif | ||
371 | if (!orig_unlink) | 422 | if (!orig_unlink) |
372 | orig_unlink = (orig_unlink_t)dlsym(RTLD_NEXT, "unlink"); | 423 | orig_unlink = (orig_unlink_t)dlsym(RTLD_NEXT, "unlink"); |
373 | if (!blacklist_loaded) | 424 | if (!blacklist_loaded) |
@@ -382,6 +433,9 @@ int unlink(const char *pathname) { | |||
382 | typedef int (*orig_unlinkat_t)(int dirfd, const char *pathname, int flags); | 433 | typedef int (*orig_unlinkat_t)(int dirfd, const char *pathname, int flags); |
383 | static orig_unlinkat_t orig_unlinkat = NULL; | 434 | static orig_unlinkat_t orig_unlinkat = NULL; |
384 | int unlinkat(int dirfd, const char *pathname, int flags) { | 435 | int unlinkat(int dirfd, const char *pathname, int flags) { |
436 | #ifdef DEBUG | ||
437 | printf("%s\n", __FUNCTION__); | ||
438 | #endif | ||
385 | if (!orig_unlinkat) | 439 | if (!orig_unlinkat) |
386 | orig_unlinkat = (orig_unlinkat_t)dlsym(RTLD_NEXT, "unlinkat"); | 440 | orig_unlinkat = (orig_unlinkat_t)dlsym(RTLD_NEXT, "unlinkat"); |
387 | if (!blacklist_loaded) | 441 | if (!blacklist_loaded) |
@@ -397,6 +451,9 @@ int unlinkat(int dirfd, const char *pathname, int flags) { | |||
397 | typedef int (*orig_mkdir_t)(const char *pathname, mode_t mode); | 451 | typedef int (*orig_mkdir_t)(const char *pathname, mode_t mode); |
398 | static orig_mkdir_t orig_mkdir = NULL; | 452 | static orig_mkdir_t orig_mkdir = NULL; |
399 | int mkdir(const char *pathname, mode_t mode) { | 453 | int mkdir(const char *pathname, mode_t mode) { |
454 | #ifdef DEBUG | ||
455 | printf("%s\n", __FUNCTION__); | ||
456 | #endif | ||
400 | if (!orig_mkdir) | 457 | if (!orig_mkdir) |
401 | orig_mkdir = (orig_mkdir_t)dlsym(RTLD_NEXT, "mkdir"); | 458 | orig_mkdir = (orig_mkdir_t)dlsym(RTLD_NEXT, "mkdir"); |
402 | if (!blacklist_loaded) | 459 | if (!blacklist_loaded) |
@@ -411,6 +468,9 @@ int mkdir(const char *pathname, mode_t mode) { | |||
411 | typedef int (*orig_mkdirat_t)(int dirfd, const char *pathname, mode_t mode); | 468 | typedef int (*orig_mkdirat_t)(int dirfd, const char *pathname, mode_t mode); |
412 | static orig_mkdirat_t orig_mkdirat = NULL; | 469 | static orig_mkdirat_t orig_mkdirat = NULL; |
413 | int mkdirat(int dirfd, const char *pathname, mode_t mode) { | 470 | int mkdirat(int dirfd, const char *pathname, mode_t mode) { |
471 | #ifdef DEBUG | ||
472 | printf("%s\n", __FUNCTION__); | ||
473 | #endif | ||
414 | if (!orig_mkdirat) | 474 | if (!orig_mkdirat) |
415 | orig_mkdirat = (orig_mkdirat_t)dlsym(RTLD_NEXT, "mkdirat"); | 475 | orig_mkdirat = (orig_mkdirat_t)dlsym(RTLD_NEXT, "mkdirat"); |
416 | if (!blacklist_loaded) | 476 | if (!blacklist_loaded) |
@@ -425,6 +485,9 @@ int mkdirat(int dirfd, const char *pathname, mode_t mode) { | |||
425 | typedef int (*orig_rmdir_t)(const char *pathname); | 485 | typedef int (*orig_rmdir_t)(const char *pathname); |
426 | static orig_rmdir_t orig_rmdir = NULL; | 486 | static orig_rmdir_t orig_rmdir = NULL; |
427 | int rmdir(const char *pathname) { | 487 | int rmdir(const char *pathname) { |
488 | #ifdef DEBUG | ||
489 | printf("%s\n", __FUNCTION__); | ||
490 | #endif | ||
428 | if (!orig_rmdir) | 491 | if (!orig_rmdir) |
429 | orig_rmdir = (orig_rmdir_t)dlsym(RTLD_NEXT, "rmdir"); | 492 | orig_rmdir = (orig_rmdir_t)dlsym(RTLD_NEXT, "rmdir"); |
430 | if (!blacklist_loaded) | 493 | if (!blacklist_loaded) |
@@ -440,6 +503,9 @@ int rmdir(const char *pathname) { | |||
440 | typedef int (*orig_stat_t)(const char *pathname, struct stat *buf); | 503 | typedef int (*orig_stat_t)(const char *pathname, struct stat *buf); |
441 | static orig_stat_t orig_stat = NULL; | 504 | static orig_stat_t orig_stat = NULL; |
442 | int stat(const char *pathname, struct stat *buf) { | 505 | int stat(const char *pathname, struct stat *buf) { |
506 | #ifdef DEBUG | ||
507 | printf("%s\n", __FUNCTION__); | ||
508 | #endif | ||
443 | if (!orig_stat) | 509 | if (!orig_stat) |
444 | orig_stat = (orig_stat_t)dlsym(RTLD_NEXT, "stat"); | 510 | orig_stat = (orig_stat_t)dlsym(RTLD_NEXT, "stat"); |
445 | if (!blacklist_loaded) | 511 | if (!blacklist_loaded) |
@@ -455,6 +521,9 @@ int stat(const char *pathname, struct stat *buf) { | |||
455 | typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf); | 521 | typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf); |
456 | static orig_stat64_t orig_stat64 = NULL; | 522 | static orig_stat64_t orig_stat64 = NULL; |
457 | int stat64(const char *pathname, struct stat64 *buf) { | 523 | int stat64(const char *pathname, struct stat64 *buf) { |
524 | #ifdef DEBUG | ||
525 | printf("%s\n", __FUNCTION__); | ||
526 | #endif | ||
458 | if (!orig_stat) | 527 | if (!orig_stat) |
459 | orig_stat64 = (orig_stat64_t)dlsym(RTLD_NEXT, "stat64"); | 528 | orig_stat64 = (orig_stat64_t)dlsym(RTLD_NEXT, "stat64"); |
460 | if (!blacklist_loaded) | 529 | if (!blacklist_loaded) |
@@ -470,6 +539,9 @@ int stat64(const char *pathname, struct stat64 *buf) { | |||
470 | typedef int (*orig_lstat_t)(const char *pathname, struct stat *buf); | 539 | typedef int (*orig_lstat_t)(const char *pathname, struct stat *buf); |
471 | static orig_lstat_t orig_lstat = NULL; | 540 | static orig_lstat_t orig_lstat = NULL; |
472 | int lstat(const char *pathname, struct stat *buf) { | 541 | int lstat(const char *pathname, struct stat *buf) { |
542 | #ifdef DEBUG | ||
543 | printf("%s\n", __FUNCTION__); | ||
544 | #endif | ||
473 | if (!orig_lstat) | 545 | if (!orig_lstat) |
474 | orig_lstat = (orig_lstat_t)dlsym(RTLD_NEXT, "lstat"); | 546 | orig_lstat = (orig_lstat_t)dlsym(RTLD_NEXT, "lstat"); |
475 | if (!blacklist_loaded) | 547 | if (!blacklist_loaded) |
@@ -485,6 +557,9 @@ int lstat(const char *pathname, struct stat *buf) { | |||
485 | typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf); | 557 | typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf); |
486 | static orig_lstat64_t orig_lstat64 = NULL; | 558 | static orig_lstat64_t orig_lstat64 = NULL; |
487 | int lstat64(const char *pathname, struct stat64 *buf) { | 559 | int lstat64(const char *pathname, struct stat64 *buf) { |
560 | #ifdef DEBUG | ||
561 | printf("%s\n", __FUNCTION__); | ||
562 | #endif | ||
488 | if (!orig_lstat) | 563 | if (!orig_lstat) |
489 | orig_lstat64 = (orig_lstat64_t)dlsym(RTLD_NEXT, "lstat64"); | 564 | orig_lstat64 = (orig_lstat64_t)dlsym(RTLD_NEXT, "lstat64"); |
490 | if (!blacklist_loaded) | 565 | if (!blacklist_loaded) |
@@ -501,6 +576,9 @@ int lstat64(const char *pathname, struct stat64 *buf) { | |||
501 | typedef int (*orig_access_t)(const char *pathname, int mode); | 576 | typedef int (*orig_access_t)(const char *pathname, int mode); |
502 | static orig_access_t orig_access = NULL; | 577 | static orig_access_t orig_access = NULL; |
503 | int access(const char *pathname, int mode) { | 578 | int access(const char *pathname, int mode) { |
579 | #ifdef DEBUG | ||
580 | printf("%s\n", __FUNCTION__); | ||
581 | #endif | ||
504 | if (!orig_access) | 582 | if (!orig_access) |
505 | orig_access = (orig_access_t)dlsym(RTLD_NEXT, "access"); | 583 | orig_access = (orig_access_t)dlsym(RTLD_NEXT, "access"); |
506 | if (!blacklist_loaded) | 584 | if (!blacklist_loaded) |
@@ -516,6 +594,9 @@ int access(const char *pathname, int mode) { | |||
516 | typedef DIR *(*orig_opendir_t)(const char *pathname); | 594 | typedef DIR *(*orig_opendir_t)(const char *pathname); |
517 | static orig_opendir_t orig_opendir = NULL; | 595 | static orig_opendir_t orig_opendir = NULL; |
518 | DIR *opendir(const char *pathname) { | 596 | DIR *opendir(const char *pathname) { |
597 | #ifdef DEBUG | ||
598 | printf("%s\n", __FUNCTION__); | ||
599 | #endif | ||
519 | if (!orig_opendir) | 600 | if (!orig_opendir) |
520 | orig_opendir = (orig_opendir_t)dlsym(RTLD_NEXT, "opendir"); | 601 | orig_opendir = (orig_opendir_t)dlsym(RTLD_NEXT, "opendir"); |
521 | if (!blacklist_loaded) | 602 | if (!blacklist_loaded) |
diff --git a/test/chromium.exp b/test/chromium.exp index 9f4aa9ea4..77325d070 100755 --- a/test/chromium.exp +++ b/test/chromium.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog chromium www.gentoo.org\r" | 7 | send -- "firejail chromium www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/chromium.profile" | 10 | "Reading profile /etc/firejail/chromium.profile" |
diff --git a/test/deluge.exp b/test/deluge.exp index 88982f189..49266813e 100755 --- a/test/deluge.exp +++ b/test/deluge.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog deluge\r" | 7 | send -- "firejail deluge\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/deluge.profile" | 10 | "Reading profile /etc/firejail/deluge.profile" |
diff --git a/test/evince.exp b/test/evince.exp index 6c94dff9a..0c57f3871 100755 --- a/test/evince.exp +++ b/test/evince.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog evince\r" | 7 | send -- "firejail evince\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/evince.profile" | 10 | "Reading profile /etc/firejail/evince.profile" |
@@ -38,7 +38,7 @@ spawn $env(SHELL) | |||
38 | send -- "firemon --seccomp\r" | 38 | send -- "firemon --seccomp\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5\n";exit} | 40 | timeout {puts "TESTING ERROR 5\n";exit} |
41 | ":firejail --tracelog evince" | 41 | ":firejail evince" |
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firemon --caps\r" | 52 | send -- "firemon --caps\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6\n";exit} | 54 | timeout {puts "TESTING ERROR 6\n";exit} |
55 | ":firejail --tracelog evince" | 55 | ":firejail evince" |
56 | } | 56 | } |
57 | expect { | 57 | expect { |
58 | timeout {puts "TESTING ERROR 6.1\n";exit} | 58 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/fbreader.exp b/test/fbreader.exp index 97df8aca8..65a193c54 100755 --- a/test/fbreader.exp +++ b/test/fbreader.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog fbreader\r" | 7 | send -- "firejail fbreader\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/fbreader.profile" | 10 | "Reading profile /etc/firejail/fbreader.profile" |
@@ -38,7 +38,7 @@ spawn $env(SHELL) | |||
38 | send -- "firemon --seccomp\r" | 38 | send -- "firemon --seccomp\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5\n";exit} | 40 | timeout {puts "TESTING ERROR 5\n";exit} |
41 | ":firejail --tracelog fbreader" | 41 | ":firejailfbreader" |
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firemon --caps\r" | 52 | send -- "firemon --caps\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6\n";exit} | 54 | timeout {puts "TESTING ERROR 6\n";exit} |
55 | ":firejail --tracelog fbreader" | 55 | ":firejail fbreader" |
56 | } | 56 | } |
57 | expect { | 57 | expect { |
58 | timeout {puts "TESTING ERROR 6.1\n";exit} | 58 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/firefox.exp b/test/firefox.exp index e1b31dd87..c2e64e04f 100755 --- a/test/firefox.exp +++ b/test/firefox.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog firefox www.gentoo.org\r" | 7 | send -- "firejail firefox www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/firefox.profile" | 10 | "Reading profile /etc/firejail/firefox.profile" |
diff --git a/test/gnome-mplayer.exp b/test/gnome-mplayer.exp index e0157ffa9..193d532ae 100755 --- a/test/gnome-mplayer.exp +++ b/test/gnome-mplayer.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog gnome-mplayer\r" | 7 | send -- "firejail gnome-mplayer\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/gnome-mplayer.profile" | 10 | "Reading profile /etc/firejail/gnome-mplayer.profile" |
@@ -68,5 +68,5 @@ expect { | |||
68 | } | 68 | } |
69 | sleep 1 | 69 | sleep 1 |
70 | 70 | ||
71 | puts "\n" | 71 | puts "\nall done\n" |
72 | 72 | ||
diff --git a/test/google-chrome.exp b/test/google-chrome.exp index f66608de4..7999831d7 100755 --- a/test/google-chrome.exp +++ b/test/google-chrome.exp | |||
@@ -4,10 +4,10 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog google-chrome www.gentoo.org\r" | 7 | send -- "firejail google-chrome www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/chromium.profile" | 10 | "Reading profile /etc/firejail/google-chrome.profile" |
11 | } | 11 | } |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/hexchat.exp b/test/hexchat.exp index 90d775574..0653bcb13 100755 --- a/test/hexchat.exp +++ b/test/hexchat.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog hexchat\r" | 7 | send -- "firejail hexchat\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/hexchat.profile" | 10 | "Reading profile /etc/firejail/hexchat.profile" |
diff --git a/test/icedove.exp b/test/icedove.exp index af2bd1ace..be5309e07 100755 --- a/test/icedove.exp +++ b/test/icedove.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog icedove\r" | 7 | send -- "firejail icedove\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/icedove.profile" | 10 | "Reading profile /etc/firejail/icedove.profile" |
@@ -38,7 +38,7 @@ spawn $env(SHELL) | |||
38 | send -- "firemon --seccomp\r" | 38 | send -- "firemon --seccomp\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5\n";exit} | 40 | timeout {puts "TESTING ERROR 5\n";exit} |
41 | ":firejail --tracelog icedove" | 41 | ":firejail icedove" |
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firemon --caps\r" | 52 | send -- "firemon --caps\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6\n";exit} | 54 | timeout {puts "TESTING ERROR 6\n";exit} |
55 | ":firejail --tracelog icedove" | 55 | ":firejail icedove" |
56 | } | 56 | } |
57 | expect { | 57 | expect { |
58 | timeout {puts "TESTING ERROR 6.1\n";exit} | 58 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/midori.exp b/test/midori.exp index f8f39d579..ec33816dd 100755 --- a/test/midori.exp +++ b/test/midori.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog midori www.gentoo.org\r" | 7 | send -- "firejail midori www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/midori.profile" | 10 | "Reading profile /etc/firejail/midori.profile" |
diff --git a/test/opera.exp b/test/opera.exp index 62dc22279..f536ae866 100755 --- a/test/opera.exp +++ b/test/opera.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog opera www.gentoo.org\r" | 7 | send -- "firejail opera www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/opera.profile" | 10 | "Reading profile /etc/firejail/opera.profile" |
diff --git a/test/transmission-gtk.exp b/test/transmission-gtk.exp index 01e220573..77d5dd30c 100755 --- a/test/transmission-gtk.exp +++ b/test/transmission-gtk.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog transmission-gtk\r" | 7 | send -- "firejail transmission-gtk\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 1\n";exit} | 9 | timeout {puts "TESTING ERROR 1\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -34,7 +34,7 @@ spawn $env(SHELL) | |||
34 | send -- "firemon --seccomp\r" | 34 | send -- "firemon --seccomp\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 5\n";exit} | 36 | timeout {puts "TESTING ERROR 5\n";exit} |
37 | ":firejail --tracelog transmission-gtk" | 37 | ":firejail transmission-gtk" |
38 | } | 38 | } |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 40 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -48,7 +48,7 @@ sleep 1 | |||
48 | send -- "firemon --caps\r" | 48 | send -- "firemon --caps\r" |
49 | expect { | 49 | expect { |
50 | timeout {puts "TESTING ERROR 6\n";exit} | 50 | timeout {puts "TESTING ERROR 6\n";exit} |
51 | ":firejail --tracelog transmission-gtk" | 51 | ":firejail transmission-gtk" |
52 | } | 52 | } |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6.1\n";exit} | 54 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/transmission-qt.exp b/test/transmission-qt.exp index 785e35649..d27c16d6d 100755 --- a/test/transmission-qt.exp +++ b/test/transmission-qt.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog transmission-qt\r" | 7 | send -- "firejail transmission-qt\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/transmission-qt.profile" | 10 | "Reading profile /etc/firejail/transmission-qt.profile" |
@@ -38,7 +38,7 @@ spawn $env(SHELL) | |||
38 | send -- "firemon --seccomp\r" | 38 | send -- "firemon --seccomp\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5\n";exit} | 40 | timeout {puts "TESTING ERROR 5\n";exit} |
41 | ":firejail --tracelog transmission-qt" | 41 | ":firejail transmission-qt" |
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firemon --caps\r" | 52 | send -- "firemon --caps\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6\n";exit} | 54 | timeout {puts "TESTING ERROR 6\n";exit} |
55 | ":firejail --tracelog transmission-qt" | 55 | ":firejail transmission-qt" |
56 | } | 56 | } |
57 | expect { | 57 | expect { |
58 | timeout {puts "TESTING ERROR 6.1\n";exit} | 58 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/vlc.exp b/test/vlc.exp index a9a0a3fb1..53d25c9dd 100755 --- a/test/vlc.exp +++ b/test/vlc.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog vlc\r" | 7 | send -- "firejail vlc\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/vlc.profile" | 10 | "Reading profile /etc/firejail/vlc.profile" |
@@ -38,7 +38,7 @@ spawn $env(SHELL) | |||
38 | send -- "firemon --seccomp\r" | 38 | send -- "firemon --seccomp\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 5\n";exit} | 40 | timeout {puts "TESTING ERROR 5\n";exit} |
41 | ":firejail --tracelog vlc" | 41 | ":firejail vlc" |
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 44 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firemon --caps\r" | 52 | send -- "firemon --caps\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 6\n";exit} | 54 | timeout {puts "TESTING ERROR 6\n";exit} |
55 | ":firejail --tracelog vlc" | 55 | ":firejail vlc" |
56 | } | 56 | } |
57 | expect { | 57 | expect { |
58 | timeout {puts "TESTING ERROR 6.1\n";exit} | 58 | timeout {puts "TESTING ERROR 6.1\n";exit} |
diff --git a/test/weechat.exp b/test/weechat.exp index 8a928b0e9..ac2430280 100755 --- a/test/weechat.exp +++ b/test/weechat.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog weechat-curses\r" | 7 | send -- "firejail weechat-curses\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/weechat.profile" | 10 | "Reading profile /etc/firejail/weechat.profile" |
diff --git a/test/wine.exp b/test/wine.exp index 1e7df434c..d87c1f205 100755 --- a/test/wine.exp +++ b/test/wine.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog wine --help\r" | 7 | send -- "firejail wine --help\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/wine.profile" | 10 | "Reading profile /etc/firejail/wine.profile" |
diff --git a/test/xchat.exp b/test/xchat.exp index d1b06b2c0..babbcf87d 100755 --- a/test/xchat.exp +++ b/test/xchat.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --tracelog xchat\r" | 7 | send -- "firejail xchat\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/xchat.profile" | 10 | "Reading profile /etc/firejail/xchat.profile" |