diff options
author | 2012-01-03 12:35:05 +0100 | |
---|---|---|
committer | 2012-01-03 12:35:05 +0100 | |
commit | ee8f8dbe57562eb907d3af27efc0357fbef4ab1e (patch) | |
tree | 7c029838c2c1b393c680e27468072853e74213e8 | |
parent | Generate D-Bus configuration file in runtime. (diff) | |
download | pms-test-suite-ee8f8dbe57562eb907d3af27efc0357fbef4ab1e.tar.gz pms-test-suite-ee8f8dbe57562eb907d3af27efc0357fbef4ab1e.tar.bz2 pms-test-suite-ee8f8dbe57562eb907d3af27efc0357fbef4ab1e.zip |
Allow current user rather than explicit root.
-rw-r--r-- | pmstestsuite/dbus_handler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pmstestsuite/dbus_handler.py b/pmstestsuite/dbus_handler.py index 456e63d..694ed84 100644 --- a/pmstestsuite/dbus_handler.py +++ b/pmstestsuite/dbus_handler.py @@ -20,7 +20,7 @@ dbus_config = """<?xml version="1.0"?> <user>%s</user> <policy context="default"> - <allow user="root"/> + <allow user="%s"/> <allow send_destination="*" eavesdrop="true"/> <allow eavesdrop="true"/> @@ -33,7 +33,7 @@ class DBusHandler(object): def start_dbus(self, uid): tmpf = tempfile.NamedTemporaryFile('w') - tmpf.write(dbus_config % uid) + tmpf.write(dbus_config % (uid, os.getuid())) tmpf.flush() (read_fd, write_fd) = os.pipe() |