diff options
author | 2019-02-22 18:41:38 +0100 | |
---|---|---|
committer | 2019-02-22 18:45:07 +0100 | |
commit | 5cabd894a9d700bd4457d6e6dbd9472629a6dbfe (patch) | |
tree | 5deb5581385d0cc33898462c35257be3b2503b07 /src/firejail/profile.c | |
parent | Harden gnome-recipes.profile (#2444) (diff) | |
download | firejail-5cabd894a9d700bd4457d6e6dbd9472629a6dbfe.tar.gz firejail-5cabd894a9d700bd4457d6e6dbd9472629a6dbfe.tar.zst firejail-5cabd894a9d700bd4457d6e6dbd9472629a6dbfe.zip |
misc cleanup
removing the branches checking for "." has no effect,
as calling openat on this just reopens the previous path element.
Diffstat (limited to 'src/firejail/profile.c')
-rw-r--r-- | src/firejail/profile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index c163133c3..53947d889 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -241,9 +241,6 @@ error: | |||
241 | // return 1 if the command is to be added to the linked list of profile commands | 241 | // return 1 if the command is to be added to the linked list of profile commands |
242 | // return 0 if the command was already executed inside the function | 242 | // return 0 if the command was already executed inside the function |
243 | int profile_check_line(char *ptr, int lineno, const char *fname) { | 243 | int profile_check_line(char *ptr, int lineno, const char *fname) { |
244 | #ifdef HAVE_WHITELIST | ||
245 | static int whitelist_warning_printed = 0; | ||
246 | #endif | ||
247 | EUID_ASSERT(); | 244 | EUID_ASSERT(); |
248 | 245 | ||
249 | // check and process conditional profile lines | 246 | // check and process conditional profile lines |
@@ -1314,6 +1311,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
1314 | ptr += 10; | 1311 | ptr += 10; |
1315 | } | 1312 | } |
1316 | else { | 1313 | else { |
1314 | static int whitelist_warning_printed = 0; | ||
1317 | if (!whitelist_warning_printed) { | 1315 | if (!whitelist_warning_printed) { |
1318 | warning_feature_disabled("whitelist"); | 1316 | warning_feature_disabled("whitelist"); |
1319 | whitelist_warning_printed = 1; | 1317 | whitelist_warning_printed = 1; |