Merge lp:~ycheng-twn/powerd/powerd_allow-non-root-dbus-cmd into lp:powerd
Proposed by
Yuan-Chen Cheng
Status: | Merged |
---|---|
Approved by: | Ricardo Salveti |
Approved revision: | 117 |
Merged at revision: | 117 |
Proposed branch: | lp:~ycheng-twn/powerd/powerd_allow-non-root-dbus-cmd |
Merge into: | lp:powerd |
Diff against target: |
83 lines (+46/-9) 2 files modified
cli/powerd-cli.c (+1/-2) debian/powerd.conf (+45/-7) |
To merge this branch: | bzr merge lp:~ycheng-twn/powerd/powerd_allow-non-root-dbus-cmd |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ricardo Salveti (community) | Approve | ||
Review via email: mp+209199@code.launchpad.net |
Commit message
Allow non-root to talk to powerd.
Description of the change
allow non-root to talk to powerd.
To post a comment you must log in.
19 --- debian/changelog 2014-01-29 11:24:39 +0000
20 +++ debian/changelog 2014-03-04 09:18:20 +0000
Please don't change the changelog directly, this will be done by the CI train (please make sure the MR commit message contains whatever you wanted in the changelog though).
34 --- debian/powerd.conf 2013-05-20 17:33:44 +0000
35 +++ debian/powerd.conf 2014-03-04 09:18:20 +0000
I'd prefer if we could only open a few dbus properties and methods, instead of everything. We don't want an app to be able to request a suspend blocker, but we can allow the user to use a custom value for brightness.
I changed the powerd.conf file to only export a few interfaces by default, check http:// paste.ubuntu. com/7154678/ (already tested).
8 - myeuid = geteuid();
9 - if (myeuid != 0) {
10 - fprintf(stderr,"You must be root to run %s\n",argv[0]);
11 - return -1;
12 - }
As we might just be exporting a few interfaces, I'd just remove the line with 'return -1', and change the error message saying that running as user is not fully supported.