diff options
Diffstat (limited to 'src/firejail/no_sandbox.c')
-rw-r--r-- | src/firejail/no_sandbox.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/firejail/no_sandbox.c b/src/firejail/no_sandbox.c index 7cca6b291..ecbc5d1d0 100644 --- a/src/firejail/no_sandbox.c +++ b/src/firejail/no_sandbox.c | |||
@@ -118,7 +118,7 @@ int check_kernel_procs(void) { | |||
118 | /* coverity[toctou] */ | 118 | /* coverity[toctou] */ |
119 | FILE *fp = fopen(fname, "r"); | 119 | FILE *fp = fopen(fname, "r"); |
120 | if (!fp) { | 120 | if (!fp) { |
121 | fprintf(stderr, "Warning: cannot open %s\n", fname); | 121 | fwarning("cannot open %s\n", fname); |
122 | free(fname); | 122 | free(fname); |
123 | continue; | 123 | continue; |
124 | } | 124 | } |
@@ -126,7 +126,7 @@ int check_kernel_procs(void) { | |||
126 | // read file | 126 | // read file |
127 | char buf[100]; | 127 | char buf[100]; |
128 | if (fgets(buf, 10, fp) == NULL) { | 128 | if (fgets(buf, 10, fp) == NULL) { |
129 | fprintf(stderr, "Warning: cannot read %s\n", fname); | 129 | fwarning("cannot read %s\n", fname); |
130 | fclose(fp); | 130 | fclose(fp); |
131 | free(fname); | 131 | free(fname); |
132 | continue; | 132 | continue; |
@@ -171,7 +171,7 @@ void run_no_sandbox(int argc, char **argv) { | |||
171 | strcmp(argv[i], "--zsh") == 0 || | 171 | strcmp(argv[i], "--zsh") == 0 || |
172 | strcmp(argv[i], "--shell=none") == 0 || | 172 | strcmp(argv[i], "--shell=none") == 0 || |
173 | strncmp(argv[i], "--shell=", 8) == 0) | 173 | strncmp(argv[i], "--shell=", 8) == 0) |
174 | fprintf(stderr, "Warning: shell-related command line options are disregarded - using SHELL environment variable\n"); | 174 | fwarning("shell-related command line options are disregarded - using SHELL environment variable\n"); |
175 | } | 175 | } |
176 | 176 | ||
177 | // use $SHELL to get shell used in sandbox | 177 | // use $SHELL to get shell used in sandbox |
@@ -225,9 +225,8 @@ void run_no_sandbox(int argc, char **argv) { | |||
225 | command = cfg.shell; | 225 | command = cfg.shell; |
226 | else | 226 | else |
227 | command = argv[prog_index]; | 227 | command = argv[prog_index]; |
228 | if (!arg_quiet) | 228 | fwarning("an existing sandbox was detected. " |
229 | fprintf(stderr, "Warning: an existing sandbox was detected. " | 229 | "%s will run without any additional sandboxing features\n", command); |
230 | "%s will run without any additional sandboxing features\n", command); | ||
231 | 230 | ||
232 | arg_quiet = 1; | 231 | arg_quiet = 1; |
233 | start_application(); | 232 | start_application(); |