diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-16 15:34:16 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-16 15:34:16 -0400 |
commit | 8f676d599934e0e56038876138f87aee1317ecd3 (patch) | |
tree | d1561a64a5d30c86160931aabd9f96c8f4bbaeaf | |
parent | Merge pull request #29 from pmillerchip/symlink-fixes (diff) | |
download | firejail-8f676d599934e0e56038876138f87aee1317ecd3.tar.gz firejail-8f676d599934e0e56038876138f87aee1317ecd3.tar.zst firejail-8f676d599934e0e56038876138f87aee1317ecd3.zip |
moved warning under --debug option
-rw-r--r-- | src/firejail/fs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index c38317371..4b4e63288 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -137,14 +137,16 @@ static void disable_file(OPERATION op, const char *filename, const char *emptydi | |||
137 | // Resolve all symlinks | 137 | // Resolve all symlinks |
138 | char* fname = realpath(filename, NULL); | 138 | char* fname = realpath(filename, NULL); |
139 | if (fname == NULL) { | 139 | if (fname == NULL) { |
140 | printf("Warning: %s is an invalid file, skipping...\n", filename); | 140 | if (arg_debug) |
141 | printf("Warning: %s is an invalid file, skipping...\n", filename); | ||
141 | return; | 142 | return; |
142 | } | 143 | } |
143 | 144 | ||
144 | // if the file is not present, do nothing | 145 | // if the file is not present, do nothing |
145 | struct stat s; | 146 | struct stat s; |
146 | if (stat(fname, &s) == -1) { | 147 | if (stat(fname, &s) == -1) { |
147 | printf("Warning: %s does not exist, skipping...\n", fname); | 148 | if (arg_debug) |
149 | printf("Warning: %s does not exist, skipping...\n", fname); | ||
148 | free(fname); | 150 | free(fname); |
149 | return; | 151 | return; |
150 | } | 152 | } |