diff options
Diffstat (limited to 'src/firejail/profile.c')
-rw-r--r-- | src/firejail/profile.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 5390249ea..babc3941e 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, "noprinters") == 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; |
@@ -1129,8 +1134,14 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
1129 | 1134 | ||
1130 | // cgroup | 1135 | // cgroup |
1131 | if (strncmp(ptr, "cgroup ", 7) == 0) { | 1136 | if (strncmp(ptr, "cgroup ", 7) == 0) { |
1132 | if (checkcfg(CFG_CGROUP)) | 1137 | if (checkcfg(CFG_CGROUP)) { |
1133 | set_cgroup(ptr + 7); | 1138 | cfg.cgroup = strdup(ptr + 7); |
1139 | if (!cfg.cgroup) | ||
1140 | errExit("strdup"); | ||
1141 | |||
1142 | check_cgroup_file(cfg.cgroup); | ||
1143 | set_cgroup(cfg.cgroup, getpid()); | ||
1144 | } | ||
1134 | else | 1145 | else |
1135 | warning_feature_disabled("cgroup"); | 1146 | warning_feature_disabled("cgroup"); |
1136 | return 0; | 1147 | return 0; |