diff options
author | smitsohu <smitsohu@gmail.com> | 2019-12-11 16:44:34 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2019-12-11 16:44:34 +0100 |
commit | ed17011e5010164254433ea4486b05f5b12f18d3 (patch) | |
tree | 4f1db93621bc44adcb377cc3ee37f658ed1b9a08 /src/firejail/util.c | |
parent | gpg additions (#3077) (diff) | |
download | firejail-ed17011e5010164254433ea4486b05f5b12f18d3.tar.gz firejail-ed17011e5010164254433ea4486b05f5b12f18d3.tar.zst firejail-ed17011e5010164254433ea4486b05f5b12f18d3.zip |
little things
Diffstat (limited to 'src/firejail/util.c')
-rw-r--r-- | src/firejail/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c index 4634993df..dd70d68a9 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -1111,10 +1111,10 @@ unsigned extract_timeout(const char *str) { | |||
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | void disable_file_or_dir(const char *fname) { | 1113 | void disable_file_or_dir(const char *fname) { |
1114 | if (arg_debug) | ||
1115 | printf("blacklist %s\n", fname); | ||
1116 | struct stat s; | 1114 | struct stat s; |
1117 | if (stat(fname, &s) != -1) { | 1115 | if (stat(fname, &s) != -1) { |
1116 | if (arg_debug) | ||
1117 | printf("blacklist %s\n", fname); | ||
1118 | if (is_dir(fname)) { | 1118 | if (is_dir(fname)) { |
1119 | if (mount(RUN_RO_DIR, fname, "none", MS_BIND, "mode=400,gid=0") < 0) | 1119 | if (mount(RUN_RO_DIR, fname, "none", MS_BIND, "mode=400,gid=0") < 0) |
1120 | errExit("disable directory"); | 1120 | errExit("disable directory"); |
@@ -1123,8 +1123,8 @@ void disable_file_or_dir(const char *fname) { | |||
1123 | if (mount(RUN_RO_FILE, fname, "none", MS_BIND, "mode=400,gid=0") < 0) | 1123 | if (mount(RUN_RO_FILE, fname, "none", MS_BIND, "mode=400,gid=0") < 0) |
1124 | errExit("disable file"); | 1124 | errExit("disable file"); |
1125 | } | 1125 | } |
1126 | fs_logger2("blacklist", fname); | ||
1126 | } | 1127 | } |
1127 | fs_logger2("blacklist", fname); | ||
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | void disable_file_path(const char *path, const char *file) { | 1130 | void disable_file_path(const char *path, const char *file) { |