Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/
Date: Tue, 03 Jan 2012 15:53:25
Message-Id: ee8f8dbe57562eb907d3af27efc0357fbef4ab1e.mgorny@gentoo
1 commit: ee8f8dbe57562eb907d3af27efc0357fbef4ab1e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 11:35:05 2012 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 11:35:05 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=ee8f8dbe
7
8 Allow current user rather than explicit root.
9
10 ---
11 pmstestsuite/dbus_handler.py | 4 ++--
12 1 files changed, 2 insertions(+), 2 deletions(-)
13
14 diff --git a/pmstestsuite/dbus_handler.py b/pmstestsuite/dbus_handler.py
15 index 456e63d..694ed84 100644
16 --- a/pmstestsuite/dbus_handler.py
17 +++ b/pmstestsuite/dbus_handler.py
18 @@ -20,7 +20,7 @@ dbus_config = """<?xml version="1.0"?>
19 <user>%s</user>
20
21 <policy context="default">
22 - <allow user="root"/>
23 + <allow user="%s"/>
24
25 <allow send_destination="*" eavesdrop="true"/>
26 <allow eavesdrop="true"/>
27 @@ -33,7 +33,7 @@ class DBusHandler(object):
28
29 def start_dbus(self, uid):
30 tmpf = tempfile.NamedTemporaryFile('w')
31 - tmpf.write(dbus_config % uid)
32 + tmpf.write(dbus_config % (uid, os.getuid()))
33 tmpf.flush()
34
35 (read_fd, write_fd) = os.pipe()