Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u8RBsj1N021689 for ; Tue, 27 Sep 2016 07:54:53 -0400 Received: from anor.bigon.be (localhost.localdomain [127.0.0.1]) by anor.bigon.be (Postfix) with ESMTP id 975B21A1A8 for ; Tue, 27 Sep 2016 13:54:30 +0200 (CEST) Received: from anor.bigon.be ([127.0.0.1]) by anor.bigon.be (anor.bigon.be [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Nzax3PVBu4wi for ; Tue, 27 Sep 2016 13:54:27 +0200 (CEST) Received: from valinor.bigon.be (unknown [193.53.238.201]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bigon) by anor.bigon.be (Postfix) with ESMTPSA id 0AD6C1A06E for ; Tue, 27 Sep 2016 13:54:27 +0200 (CEST) From: Laurent Bigonville To: selinux@tycho.nsa.gov Subject: [Patch v2] sandbox: Use dbus-run-session instead of dbus-launch when available Date: Tue, 27 Sep 2016 13:54:26 +0200 Message-Id: <20160927115426.23097-1-bigon@debian.org> List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: From: Laurent Bigonville 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 --- policycoreutils/sandbox/sandbox | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox index b6bc805..bfb2de3 100644 --- a/policycoreutils/sandbox/sandbox +++ b/policycoreutils/sandbox/sandbox @@ -285,7 +285,11 @@ 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)) fd.close() -- 2.9.3