diff options
author | 2021-10-20 20:05:58 -0400 | |
---|---|---|
committer | 2021-10-20 20:05:58 -0400 | |
commit | bd15e763eab8c07072f8ef495a17d387c26150c7 (patch) | |
tree | 4b3ea24608c260d94b7c123fb4c50bfa592882a9 /src | |
parent | Merge pull request #4521 from rusty-snake/disable-proc.inc (diff) | |
download | firejail-bd15e763eab8c07072f8ef495a17d387c26150c7.tar.gz firejail-bd15e763eab8c07072f8ef495a17d387c26150c7.tar.zst firejail-bd15e763eab8c07072f8ef495a17d387c26150c7.zip |
--noprinter option
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 4 | ||||
-rw-r--r-- | src/firejail/profile.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index c5b3d5739..f3c54e1ef 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -2156,6 +2156,10 @@ int main(int argc, char **argv, char **envp) { | |||
2156 | arg_novideo = 1; | 2156 | arg_novideo = 1; |
2157 | else if (strcmp(argv[i], "--no3d") == 0) | 2157 | else if (strcmp(argv[i], "--no3d") == 0) |
2158 | arg_no3d = 1; | 2158 | arg_no3d = 1; |
2159 | else if (strcmp(argv[i], "--noprinter") == 0) { | ||
2160 | profile_add("blacklist /dev/lp*"); | ||
2161 | profile_add("blacklist /run/cups/cups.sock"); | ||
2162 | } | ||
2159 | else if (strcmp(argv[i], "--notv") == 0) | 2163 | else if (strcmp(argv[i], "--notv") == 0) |
2160 | arg_notv = 1; | 2164 | arg_notv = 1; |
2161 | else if (strcmp(argv[i], "--nodvd") == 0) | 2165 | else if (strcmp(argv[i], "--nodvd") == 0) |
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 9d92b6199..7ffb10be1 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -449,6 +449,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
449 | arg_no3d = 1; | 449 | arg_no3d = 1; |
450 | return 0; | 450 | return 0; |
451 | } | 451 | } |
452 | else if (strcmp(ptr, "noprinter") == 0) { | ||
453 | profile_add("blacklist /dev/lp*"); | ||
454 | profile_add("blacklist /run/cups/cups.sock"); | ||
455 | return 0; | ||
456 | } | ||
452 | else if (strcmp(ptr, "noinput") == 0) { | 457 | else if (strcmp(ptr, "noinput") == 0) { |
453 | arg_noinput = 1; | 458 | arg_noinput = 1; |
454 | return 0; | 459 | return 0; |