diff options
author | 2022-04-21 22:02:12 -0400 | |
---|---|---|
committer | 2022-04-21 22:02:12 -0400 | |
commit | d4106f7aaa0e013d59ef8b3690fb54a0069b1090 (patch) | |
tree | 854fb962c1924ba4169ea927ca87d16b3355a092 /src/firecfg/main.c | |
parent | firejail-welcome.sh fixes (diff) | |
download | firejail-d4106f7aaa0e013d59ef8b3690fb54a0069b1090.tar.gz firejail-d4106f7aaa0e013d59ef8b3690fb54a0069b1090.tar.zst firejail-d4106f7aaa0e013d59ef8b3690fb54a0069b1090.zip |
fix firecfg --guide
Diffstat (limited to 'src/firecfg/main.c')
-rw-r--r-- | src/firecfg/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firecfg/main.c b/src/firecfg/main.c index 19f2573f3..0c81f69bd 100644 --- a/src/firecfg/main.c +++ b/src/firecfg/main.c | |||
@@ -443,11 +443,15 @@ int main(int argc, char **argv) { | |||
443 | } | 443 | } |
444 | 444 | ||
445 | if (arg_guide) { | 445 | if (arg_guide) { |
446 | int status = system("sudo "LIBDIR "/firejail/firejail-welcome.sh zenity " SYSCONFDIR); | 446 | char *cmd; |
447 | if (asprintf(&cmd, "sudo %s/firejail/firejail-welcome.sh /usr/bin/zenity %s %s", LIBDIR, SYSCONFDIR, user) == -1) | ||
448 | errExit("asprintf"); | ||
449 | int status = system(cmd); | ||
447 | if (status == -1) { | 450 | if (status == -1) { |
448 | fprintf(stderr, "Error: cannot run firejail-welcome.sh\n"); | 451 | fprintf(stderr, "Error: cannot run firejail-welcome.sh\n"); |
449 | exit(1); | 452 | exit(1); |
450 | } | 453 | } |
454 | free(cmd); | ||
451 | 455 | ||
452 | // the last 8 bits of the status is the return value of the command executed by system() | 456 | // the last 8 bits of the status is the return value of the command executed by system() |
453 | // firejail-welcome.sh returns 55 if setting sysmlinks is required | 457 | // firejail-welcome.sh returns 55 if setting sysmlinks is required |