aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/sbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/sbox.c')
-rw-r--r--src/firejail/sbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c
index a92d62940..a2aaa86eb 100644
--- a/src/firejail/sbox.c
+++ b/src/firejail/sbox.c
@@ -263,6 +263,7 @@ int sbox_run(unsigned filtermask, int num, ...) {
263 263
264int sbox_run_v(unsigned filtermask, char * const arg[]) { 264int sbox_run_v(unsigned filtermask, char * const arg[]) {
265 EUID_ROOT(); 265 EUID_ROOT();
266 assert(arg);
266 267
267 if (arg_debug) { 268 if (arg_debug) {
268 printf("sbox run: "); 269 printf("sbox run: ");
@@ -288,7 +289,7 @@ int sbox_run_v(unsigned filtermask, char * const arg[]) {
288 if (waitpid(child, &status, 0) == -1 ) { 289 if (waitpid(child, &status, 0) == -1 ) {
289 errExit("waitpid"); 290 errExit("waitpid");
290 } 291 }
291 if (WIFEXITED(status) && status != 0) { 292 if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
292 fprintf(stderr, "Error: failed to run %s\n", arg[0]); 293 fprintf(stderr, "Error: failed to run %s\n", arg[0]);
293 exit(1); 294 exit(1);
294 } 295 }