diff options
-rw-r--r-- | src/firejail/fs_bin.c | 5 | ||||
-rw-r--r-- | src/firejail/netfilter.c | 2 | ||||
-rwxr-xr-x | test/fs/private-bin.exp | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/firejail/fs_bin.c b/src/firejail/fs_bin.c index dc8423071..38110a75d 100644 --- a/src/firejail/fs_bin.c +++ b/src/firejail/fs_bin.c | |||
@@ -40,7 +40,6 @@ static char *paths[] = { | |||
40 | // return 1 if found, 0 if not found | 40 | // return 1 if found, 0 if not found |
41 | static char *check_dir_or_file(const char *name) { | 41 | static char *check_dir_or_file(const char *name) { |
42 | assert(name); | 42 | assert(name); |
43 | |||
44 | struct stat s; | 43 | struct stat s; |
45 | char *fname = NULL; | 44 | char *fname = NULL; |
46 | 45 | ||
@@ -162,8 +161,10 @@ static void duplicate(char *fname, FILE *fplist) { | |||
162 | // is required for the following cases: | 161 | // is required for the following cases: |
163 | // - if user's $PATH order is not the same as the above | 162 | // - if user's $PATH order is not the same as the above |
164 | // paths[] variable order | 163 | // paths[] variable order |
165 | if (!valid_full_path_file(fname)) | 164 | if (!valid_full_path_file(fname)) { |
165 | fwarning("invalid private-bin path %s\n", fname); | ||
166 | return; | 166 | return; |
167 | } | ||
167 | 168 | ||
168 | full_path = strdup(fname); | 169 | full_path = strdup(fname); |
169 | if (!full_path) | 170 | if (!full_path) |
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c index dd4009a2e..fd62c3f54 100644 --- a/src/firejail/netfilter.c +++ b/src/firejail/netfilter.c | |||
@@ -183,7 +183,7 @@ void netfilter_print(pid_t pid, int ipv6) { | |||
183 | 183 | ||
184 | // find iptables executable | 184 | // find iptables executable |
185 | char *iptables = NULL; | 185 | char *iptables = NULL; |
186 | char *iptables_restore = NULL; | 186 | // char *iptables_restore = NULL; |
187 | if (ipv6) { | 187 | if (ipv6) { |
188 | if (stat("/sbin/ip6tables", &s) == 0) | 188 | if (stat("/sbin/ip6tables", &s) == 0) |
189 | iptables = "/sbin/ip6tables"; | 189 | iptables = "/sbin/ip6tables"; |
diff --git a/test/fs/private-bin.exp b/test/fs/private-bin.exp index 8403b8442..8a3114a11 100755 --- a/test/fs/private-bin.exp +++ b/test/fs/private-bin.exp | |||
@@ -68,10 +68,10 @@ send -- "exit\r" | |||
68 | after 100 | 68 | after 100 |
69 | 69 | ||
70 | 70 | ||
71 | send -- "firejail --debug --private-bin=/etc/shadow \r" | 71 | send -- "firejail --private-bin=/etc/shadow\r" |
72 | expect { | 72 | expect { |
73 | timeout {puts "TESTING ERROR 13\n";exit} | 73 | timeout {puts "TESTING ERROR 13\n";exit} |
74 | "Warning: file /etc/shadow not found" | 74 | "Warning: invalid private-bin path /etc/shadow" |
75 | } | 75 | } |
76 | after 100 | 76 | after 100 |
77 | 77 | ||