Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 369667

Summary: Restore "plugdev" group functionality HAL -style by using polkit's vendor.d files
Product: Gentoo Linux Reporter: Samuli Suominen (RETIRED) <ssuominen>
Component: Current packagesAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: 1i5t5.duncan, axiator, benjaminfranzke, hwoarang, leho, maksbotan, rdalek1967
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: udisks ebuild patch
01-org.freedesktop.udisks.pkla
01-org.freedesktop.upower.pkla
upower ebuild patch
01-org.freedesktop.consolekit.pkla
patch for consolekit ebuild

Description Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 14:27:42 UTC
Created attachment 275499 [details, diff]
udisks ebuild patch

By popular demand.  This will workaround broken setups as side effect but is useful for PAM-less setups (no pam_ck_connector.so) and useful for remote logins.

Using this same bug for both udisks and upower.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 14:28:24 UTC
Created attachment 275501 [details]
01-org.freedesktop.udisks.pkla

For files/ directory in udisks
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 14:32:35 UTC
Created attachment 275503 [details]
01-org.freedesktop.upower.pkla

For files/ directory of upower
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 14:33:27 UTC
Created attachment 275505 [details, diff]
upower ebuild patch
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 14:36:12 UTC
And to communicate with users, something like this should propably go into both ebuilds pkg_postinst():

elog "PolicyKit authorization file 01-org.freedesktop.uXXXX has been installed" elog "into /etc/polkit-1/localauthority/10-vendor.d for group plugdev."
elog "See \"man 8 pklocalauthority\" for more information."
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2011-06-01 14:57:38 UTC
I am sorry, I am not _that_ familiar with the "PAM-less" definition. You mean systems without a polikt agent?
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 15:02:23 UTC
(In reply to comment #5)
> I am sorry, I am not _that_ familiar with the "PAM-less" definition. You mean
> systems without a polikt agent?

USE="pam" in consolekit installs pam_ck_connector.so pam module
USE="consolekit" in pambase adds pam_ck_connector.so line in /etc/pam.d/system-login

So when you login normally to console, you get a ConsoleKit session, viewable by `ck-list-sessions`.  Then if you run startx with proper ck-launch-session stuff it gets passed on...

So if you don't use PAM, ConsoleKit mostly won't work for you at all

So we install .pkla files for PolicyKit to get the authorization regardless, with group plugdev
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 16:24:10 UTC
Created attachment 275519 [details]
01-org.freedesktop.consolekit.pkla

For files/ directory of consolekit
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2011-06-01 16:24:32 UTC
Created attachment 275521 [details, diff]
patch for consolekit ebuild
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2011-10-22 05:05:56 UTC
on a second thought, this is a poor idea and users really just need to read the pklocalauthority manpage if they want something like this