Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 161904 - sys-power/powersave-0.14.0 has wrong dbus-1 policies
Summary: sys-power/powersave-0.14.0 has wrong dbus-1 policies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
: 209529 (view as bug list)
Depends on:
Blocks: 132621
  Show dependency tree
 
Reported: 2007-01-13 14:35 UTC by Lloeki
Modified: 2008-02-10 14:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dbus-hald-user-access-denied.patch (dbus-hald-user-access-denied.patch,1021 bytes, patch)
2007-02-11 17:27 UTC, Lloeki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lloeki 2007-01-13 14:35:20 UTC
by default, installing sys-apps/powersave has dbus access permission (/etc/dbus-1/system.d/powersave.conf) set to group 'users'.
previously it was set to 'plugdev', but I geuss it was changed for convenience.
Problem is, not only desktop users should have access to powersaved, but also hald. hald is member of group plugdev, so it was working before, and it now doesnt work anymore:

$ powersave -C
Could not connect to powersaved because of missing permissions.
Are you priviledged to connect to the powersaved?

so, even being member of group users, I am denied access. but, in fact, it is not me, but hald who is denied access.

this is easily verified by either:
1. adding haldaemon user to group users
2. changing :
  <!--    Allow desktop users to connect -->
  <policy group="users">
to :
  <!--    Allow desktop users to connect -->
  <policy group="plugdev">
in dbus powersaved policy
3. adding :
  <!--    Allow haldaemon to connect -->
  <policy user="haldaemon">
    <allow send_interface="com.novell.powersave"/>
    <allow send_interface="com.novell.powersave.manager"/>
    <allow send_interface="com.novell.powersave.request"/>
    <allow send_interface="com.novell.powersave.action"/>

    <allow receive_interface="com.novell.powersave"/>
    <allow receive_interface="com.novell.powersave.manager"/>
    <allow receive_interface="com.novell.powersave.request"/>
    <allow receive_interface="com.novell.powersave.action"/>
  </policy>
to the policy.



Reproducible: Always

Steps to Reproduce:
1. if necessary, remove any instance of sys-apps/powersave, including any powersaved policy configuration files
2. emerge sys-power/powersave
3. run 'powersave -C' as a member of 'users' group

Actual Results:  
failure to connect due to wrong permissions

Expected Results:  
successful connection to powersaved via dbus, returning an empty or non-empty list of clients.

error message suggests the user's permission is wrong, when it's not. it is haldaemon user permissions which are missing
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2007-02-11 08:13:26 UTC
Maybe we should allow it for both the plugdev and the users group. Want to make a patch for it?

I changed it to only plugdev for now. Thanks, fixed
Comment 2 Lloeki 2007-02-11 17:27:56 UTC
Created attachment 109861 [details, diff]
dbus-hald-user-access-denied.patch

patch against dbus's powersave.conf to enable the 3rd solution (IMHO the good one).
replaces 'plugdev_access.patch' in sys-power/powersave-0.14.0
Comment 3 Stefan Schweizer (RETIRED) gentoo-dev 2007-02-11 19:42:54 UTC
thanks, committed the new one
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-02-10 14:04:22 UTC
*** Bug 209529 has been marked as a duplicate of this bug. ***