Skip to content

Commit

Permalink
Merge pull request #4740 from WhyNotHugo/whitelist-ro
Browse files Browse the repository at this point in the history
Implement a `whitelist-ro` command
  • Loading branch information
netblue30 committed Dec 28, 2021
2 parents 106440f + 92f438c commit ff094c1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/firejail/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,18 @@ void profile_read(const char *fname) {
continue;
}

if (strncmp(ptr, "whitelist-ro ", 13) == 0) {
char *whitelist, *readonly;
if (asprintf(&whitelist, "whitelist %s", ptr + 13) == -1)
errExit("asprintf");
profile_add(whitelist);
if (asprintf(&readonly, "read-only %s", ptr + 13) == -1)
errExit("asprintf");
profile_add(readonly);
free(ptr);
continue;
}

// process quiet
// todo: a quiet in the profile file cannot be disabled by --ignore on command line
if (strcmp(ptr, "quiet") == 0) {
Expand Down

0 comments on commit ff094c1

Please sign in to comment.