Skip to content

Commit

Permalink
--noprinter option
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Oct 21, 2021
1 parent 72e9016 commit bd15e76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,10 @@ int main(int argc, char **argv, char **envp) {
arg_novideo = 1;
else if (strcmp(argv[i], "--no3d") == 0)
arg_no3d = 1;
else if (strcmp(argv[i], "--noprinter") == 0) {
profile_add("blacklist /dev/lp*");
profile_add("blacklist /run/cups/cups.sock");
}
else if (strcmp(argv[i], "--notv") == 0)
arg_notv = 1;
else if (strcmp(argv[i], "--nodvd") == 0)
Expand Down
5 changes: 5 additions & 0 deletions src/firejail/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
arg_no3d = 1;
return 0;
}
else if (strcmp(ptr, "noprinter") == 0) {
profile_add("blacklist /dev/lp*");
profile_add("blacklist /run/cups/cups.sock");
return 0;
}
else if (strcmp(ptr, "noinput") == 0) {
arg_noinput = 1;
return 0;
Expand Down

0 comments on commit bd15e76

Please sign in to comment.