mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-25 23:42:05 +00:00
sandbox: Use dbus-run-session instead of dbus-launch when available
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 Signed-off-by: Laurent Bigonville <bigon@bigon.be>
This commit is contained in:
parent
ff0d3dde2e
commit
a992b9993d
@ -285,9 +285,13 @@ class Sandbox:
|
||||
# /usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
|
||||
%s &
|
||||
WM_PID=$!
|
||||
dbus-launch --exit-with-session %s
|
||||
if which dbus-run-session >/dev/null 2>&1; then
|
||||
dbus-run-session -- %s
|
||||
else
|
||||
dbus-launch --exit-with-session %s
|
||||
fi
|
||||
kill -TERM $WM_PID 2> /dev/null
|
||||
""" % (command, wm, command))
|
||||
""" % (command, wm, command, command))
|
||||
fd.close()
|
||||
os.chmod(execfile, 0o700)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user