diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 13 | ||||
-rw-r--r-- | src/firejail/profile.c | 13 |
2 files changed, 8 insertions, 18 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index ef8166204..d99e4e0b9 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1285,15 +1285,10 @@ int main(int argc, char **argv, char **envp) { | |||
1285 | #endif | 1285 | #endif |
1286 | else if (strncmp(argv[i], "--protocol=", 11) == 0) { | 1286 | else if (strncmp(argv[i], "--protocol=", 11) == 0) { |
1287 | if (checkcfg(CFG_SECCOMP)) { | 1287 | if (checkcfg(CFG_SECCOMP)) { |
1288 | if (cfg.protocol) { | 1288 | const char *add = argv[i] + 11; |
1289 | fwarning("more than one protocol list is present, \"%s\" will be installed\n", cfg.protocol); | 1289 | profile_list_augment(&cfg.protocol, add); |
1290 | } | 1290 | if (arg_debug) |
1291 | else { | 1291 | fprintf(stderr, "[option] combined protocol list: \"%s\"\n", cfg.protocol); |
1292 | // store list | ||
1293 | cfg.protocol = strdup(argv[i] + 11); | ||
1294 | if (!cfg.protocol) | ||
1295 | errExit("strdup"); | ||
1296 | } | ||
1297 | } | 1292 | } |
1298 | else | 1293 | else |
1299 | exit_err_feature("seccomp"); | 1294 | exit_err_feature("seccomp"); |
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 7b5fbfedf..f3266c23e 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -911,15 +911,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
911 | 911 | ||
912 | if (strncmp(ptr, "protocol ", 9) == 0) { | 912 | if (strncmp(ptr, "protocol ", 9) == 0) { |
913 | if (checkcfg(CFG_SECCOMP)) { | 913 | if (checkcfg(CFG_SECCOMP)) { |
914 | if (cfg.protocol) { | 914 | const char *add = ptr + 9; |
915 | fwarning("more than one protocol list is present, \"%s\" will be installed\n", cfg.protocol); | 915 | profile_list_augment(&cfg.protocol, add); |
916 | return 0; | 916 | if (arg_debug) |
917 | } | 917 | fprintf(stderr, "[profile] combined protocol list: \"%s\"\n", cfg.protocol); |
918 | |||
919 | // store list | ||
920 | cfg.protocol = strdup(ptr + 9); | ||
921 | if (!cfg.protocol) | ||
922 | errExit("strdup"); | ||
923 | } | 918 | } |
924 | else | 919 | else |
925 | warning_feature_disabled("seccomp"); | 920 | warning_feature_disabled("seccomp"); |