mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-22 23:35:22 +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
|
# /usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
|
||||||
%s &
|
%s &
|
||||||
WM_PID=$!
|
WM_PID=$!
|
||||||
|
if which dbus-run-session >/dev/null 2>&1; then
|
||||||
|
dbus-run-session -- %s
|
||||||
|
else
|
||||||
dbus-launch --exit-with-session %s
|
dbus-launch --exit-with-session %s
|
||||||
|
fi
|
||||||
kill -TERM $WM_PID 2> /dev/null
|
kill -TERM $WM_PID 2> /dev/null
|
||||||
""" % (command, wm, command))
|
""" % (command, wm, command, command))
|
||||||
fd.close()
|
fd.close()
|
||||||
os.chmod(execfile, 0o700)
|
os.chmod(execfile, 0o700)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user