diff options
-rw-r--r-- | src/firejail/dbus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/firejail/dbus.c b/src/firejail/dbus.c index 6c122c6d0..20a8e5277 100644 --- a/src/firejail/dbus.c +++ b/src/firejail/dbus.c | |||
@@ -29,7 +29,7 @@ void dbus_session_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,6 +43,12 @@ void dbus_session_disable(void) { | |||
43 | free(path); | 43 | free(path); |
44 | free(env_var); | 44 | free(env_var); |
45 | 45 | ||
46 | // blacklist the dbus-launch user directory | ||
47 | if (asprintf(&path, "%s/.dbus", cfg.homedir) == -1) | ||
48 | errExit("asprintf"); | ||
49 | disable_file_or_dir(path); | ||
50 | free(path); | ||
51 | |||
46 | // look for a possible abstract unix socket | 52 | // look for a possible abstract unix socket |
47 | 53 | ||
48 | // --net=none | 54 | // --net=none |