Code review comment for lp:~ycheng-twn/powerd/powerd_allow-non-root-dbus-cmd

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

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.

review: Needs Fixing

« Back to merge proposal