diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/dbus.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/firejail/dbus.c b/src/firejail/dbus.c index b046b3279..b856ff809 100644 --- a/src/firejail/dbus.c +++ b/src/firejail/dbus.c | |||
@@ -29,7 +29,7 @@ void dbus_disable(void) { | |||
29 | if (asprintf(&path, "/run/user/%d/bus", getuid()) == -1) | 29 | if (asprintf(&path, "/run/user/%d/bus", getuid()) == -1) |
30 | errExit("asprintf"); | 30 | errExit("asprintf"); |
31 | char *env_var; | 31 | char *env_var; |
32 | if (asprintf(&env_var, "DBUS_SESSION_BUS_ADDRESS=unix:path=%s", path) == -1) | 32 | if (asprintf(&env_var, "unix:path=%s", path) == -1) |
33 | errExit("asprintf"); | 33 | errExit("asprintf"); |
34 | 34 | ||
35 | // set a new environment variable: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/<UID>/bus | 35 | // set a new environment variable: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/<UID>/bus |
@@ -43,9 +43,17 @@ void dbus_disable(void) { | |||
43 | free(path); | 43 | free(path); |
44 | free(env_var); | 44 | free(env_var); |
45 | 45 | ||
46 | |||
47 | // blacklist the dbus-launch user directory | ||
48 | if (asprintf(&path, "%s/.dbus", cfg.homedir) == -1) | ||
49 | errExit("asprintf"); | ||
50 | disable_file_or_dir(path); | ||
51 | free(path); | ||
52 | |||
46 | // blacklist also system D-Bus socket | 53 | // blacklist also system D-Bus socket |
47 | disable_file_or_dir("/run/dbus/system_bus_socket"); | 54 | disable_file_or_dir("/run/dbus/system_bus_socket"); |
48 | 55 | ||
56 | |||
49 | // look for a possible abstract unix socket | 57 | // look for a possible abstract unix socket |
50 | 58 | ||
51 | // --net=none | 59 | // --net=none |