Skip to contentSkip to conversation

sandbox: Use dbus-launch instead of dbus-run-session

PATCH Superseded Laurent Bigonville 2 participants 2 messages Sep 18, 2016 – Sep 19, 2016 SELinux security module

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: Use dbus-launch instead of dbus-run-session

From: Laurent Bigonville <[email protected]>

According to dbus upstream: "dbus-launch is fairly horrible code, complicated by the historical need for it to support X11 autolaunching, so the D-Bus maintainers would like to move it out of the critical path and minimize its use."

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836289

---
 policycoreutils/sandbox/sandbox | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/sandbox/sandbox +1 -1
index 726ba9b..f537dc6 100644
@@ -285,7 +285,7 @@ class Sandbox:
 /usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
 %s &
 WM_PID=$!
-dbus-launch --exit-with-session %s
+dbus-run-session -- %s
 kill -TERM $WM_PID  2> /dev/null
 """ % (command, wm, command))
         fd.close()
Signature · 1 line
2.9.3
#1 lore raw
Quoted 8 lines · Laurent Bigonville

From: Laurent Bigonville <[email protected]>

According to dbus upstream: "dbus-launch is fairly horrible code, complicated by the historical need for it to support X11 autolaunching, so the D-Bus maintainers would like to move it out of the critical path and minimize its use."

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836289

dbus-run-session was introduced in dbus-1.8.0. This change would break systems with older dbus, e.g., rhel-7 ships dbus-1.6.12.

Would it make sense to do a test whether dbus-run-session is available or not?

Petr

Quoted 18 lines
---
 policycoreutils/sandbox/sandbox | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/sandbox/sandbox +1 -1
index 726ba9b..f537dc6 100644
@@ -285,7 +285,7 @@ class Sandbox:
 /usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
 %s &
 WM_PID=$!
-dbus-launch --exit-with-session %s
+dbus-run-session -- %s
 kill -TERM $WM_PID  2> /dev/null
 """ % (command, wm, command))
         fd.close()