aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-12-06 11:18:39 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2017-12-06 11:18:39 -0500
commit8772ffe80c4dd47926ce05d29257d8c113ca4114 (patch)
treeae6f46d6e13861c8f043e37119fe2d067c685cb0
parentadding machine-id to a number of profiles (diff)
downloadfirejail-8772ffe80c4dd47926ce05d29257d8c113ca4114.tar.gz
firejail-8772ffe80c4dd47926ce05d29257d8c113ca4114.tar.zst
firejail-8772ffe80c4dd47926ce05d29257d8c113ca4114.zip
testing
-rw-r--r--src/firejail/fs_bin.c5
-rw-r--r--src/firejail/netfilter.c2
-rwxr-xr-xtest/fs/private-bin.exp4
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
41static char *check_dir_or_file(const char *name) { 41static 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"
68after 100 68after 100
69 69
70 70
71send -- "firejail --debug --private-bin=/etc/shadow \r" 71send -- "firejail --private-bin=/etc/shadow\r"
72expect { 72expect {
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}
76after 100 76after 100
77 77