diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index a0128a248..1e01ccc71 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -561,11 +561,25 @@ static void disable_firejail_config(void) { | |||
561 | struct stat s; | 561 | struct stat s; |
562 | if (stat("/etc/firejail", &s) == 0) | 562 | if (stat("/etc/firejail", &s) == 0) |
563 | disable_file(BLACKLIST_FILE, "/etc/firejail"); | 563 | disable_file(BLACKLIST_FILE, "/etc/firejail"); |
564 | 564 | ||
565 | char *fname; | 565 | char *fname; |
566 | if (asprintf(&fname, "%s/.config/firejail", cfg.homedir) == -1) | 566 | if (asprintf(&fname, "%s/.config/firejail", cfg.homedir) == -1) |
567 | errExit("asprintf"); | 567 | errExit("asprintf"); |
568 | disable_file(BLACKLIST_FILE, fname); | 568 | if (stat(fname, &s) == 0) |
569 | disable_file(BLACKLIST_FILE, fname); | ||
570 | |||
571 | if (stat("/usr/local/etc/firejail", &s) == 0) | ||
572 | disable_file(BLACKLIST_FILE, "/usr/local/etc/firejail"); | ||
573 | |||
574 | if (strcmp(PREFIX, "/usr/local")) { | ||
575 | if (asprintf(&fname, "%s/etc/firejail", PREFIX) == -1) | ||
576 | errExit("asprintf"); | ||
577 | if (stat(fname, &s) == 0) | ||
578 | disable_file(BLACKLIST_FILE, fname); | ||
579 | } | ||
580 | |||
581 | |||
582 | |||
569 | free(fname); | 583 | free(fname); |
570 | } | 584 | } |
571 | 585 | ||