diff options
author | 2020-05-03 18:24:53 +0200 | |
---|---|---|
committer | 2020-05-07 01:56:39 +0200 | |
commit | 8b5cb76fd4f0ae52922a198ab50ad3799aac44a3 (patch) | |
tree | 4b9f24e63cba0ed328ee7d843772f1ecda7d4e78 /src/firejail/profile.c | |
parent | add ommitted scripts from contrib (#3405) (diff) | |
download | firejail-8b5cb76fd4f0ae52922a198ab50ad3799aac44a3.tar.gz firejail-8b5cb76fd4f0ae52922a198ab50ad3799aac44a3.tar.zst firejail-8b5cb76fd4f0ae52922a198ab50ad3799aac44a3.zip |
Add --dbus-*.see options
The SEE policy of xdg-dbus-proxy allows clients to see objects and bus
names, but not interact with them. The --call and --broadcast can allow
interactions with objects that have the SEE policy set. Profile support
for these proxy options will be added in a future commit.
Diffstat (limited to 'src/firejail/profile.c')
-rw-r--r-- | src/firejail/profile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 0be119903..f2959686a 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -452,6 +452,13 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
452 | } | 452 | } |
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | else if (strncmp(ptr, "dbus-user.see ", 14) == 0) { | ||
456 | if (!dbus_check_name(ptr + 14)) { | ||
457 | printf("Invalid dbus-user.see name: %s\n", ptr + 15); | ||
458 | exit(1); | ||
459 | } | ||
460 | return 1; | ||
461 | } | ||
455 | else if (strncmp(ptr, "dbus-user.talk ", 15) == 0) { | 462 | else if (strncmp(ptr, "dbus-user.talk ", 15) == 0) { |
456 | if (!dbus_check_name(ptr + 15)) { | 463 | if (!dbus_check_name(ptr + 15)) { |
457 | printf("Invalid dbus-user.talk name: %s\n", ptr + 15); | 464 | printf("Invalid dbus-user.talk name: %s\n", ptr + 15); |
@@ -482,6 +489,13 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
482 | } | 489 | } |
483 | return 0; | 490 | return 0; |
484 | } | 491 | } |
492 | else if (strncmp(ptr, "dbus-system.see ", 16) == 0) { | ||
493 | if (!dbus_check_name(ptr + 16)) { | ||
494 | fprintf(stderr, "Invalid dbus-system.see name: %s\n", ptr + 17); | ||
495 | exit(1); | ||
496 | } | ||
497 | return 1; | ||
498 | } | ||
485 | else if (strncmp(ptr, "dbus-system.talk ", 17) == 0) { | 499 | else if (strncmp(ptr, "dbus-system.talk ", 17) == 0) { |
486 | if (!dbus_check_name(ptr + 17)) { | 500 | if (!dbus_check_name(ptr + 17)) { |
487 | fprintf(stderr, "Invalid dbus-system.talk name: %s\n", ptr + 17); | 501 | fprintf(stderr, "Invalid dbus-system.talk name: %s\n", ptr + 17); |