diff options
author | 2021-12-28 18:48:55 +0000 | |
---|---|---|
committer | 2021-12-28 18:48:55 +0000 | |
commit | ff094c1803540428c9c1c733b8934aac9eb3e741 (patch) | |
tree | 4f6f8fd560ca3c3ef978ce809d32213f1264a0c3 /src | |
parent | Merge pull request #4755 from kmk3/mpv-add-yt-dlp (diff) | |
parent | Merge branch 'master' into whitelist-ro (diff) | |
download | firejail-ff094c1803540428c9c1c733b8934aac9eb3e741.tar.gz firejail-ff094c1803540428c9c1c733b8934aac9eb3e741.tar.zst firejail-ff094c1803540428c9c1c733b8934aac9eb3e741.zip |
Merge pull request #4740 from WhyNotHugo/whitelist-ro
Implement a `whitelist-ro` command
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/profile.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 9504b26de..92dbecac1 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -1752,6 +1752,18 @@ void profile_read(const char *fname) { | |||
1752 | continue; | 1752 | continue; |
1753 | } | 1753 | } |
1754 | 1754 | ||
1755 | if (strncmp(ptr, "whitelist-ro ", 13) == 0) { | ||
1756 | char *whitelist, *readonly; | ||
1757 | if (asprintf(&whitelist, "whitelist %s", ptr + 13) == -1) | ||
1758 | errExit("asprintf"); | ||
1759 | profile_add(whitelist); | ||
1760 | if (asprintf(&readonly, "read-only %s", ptr + 13) == -1) | ||
1761 | errExit("asprintf"); | ||
1762 | profile_add(readonly); | ||
1763 | free(ptr); | ||
1764 | continue; | ||
1765 | } | ||
1766 | |||
1755 | // process quiet | 1767 | // process quiet |
1756 | // todo: a quiet in the profile file cannot be disabled by --ignore on command line | 1768 | // todo: a quiet in the profile file cannot be disabled by --ignore on command line |
1757 | if (strcmp(ptr, "quiet") == 0) { | 1769 | if (strcmp(ptr, "quiet") == 0) { |