On 01/16/2012 07:01 PM, Adam Williamson wrote: > I'm attaching a patch which updates the udev rule generation stuff in > libconcord. It adds a fourth option to gen_udev_support (because, you > know, it wasn't messy enough already). > > Modern udev - well, udev since June 2009 - can control access to device > nodes via ACLs, avoiding the need for anything external (hal, policykit, > consolekit, whatever) for controlling access. The existing 'generic > udev' support is kind of hacky, abusing a system group and requiring you > to add user accounts to it manually. The existing 'policykit' and > 'consolekit' support (which should really be named hal/policykit and > hal/consolekit) rely on hal and are therefore useless on modern > distributions where hal is being nuked with a vengeance. I doubt the > policykit stuff would work with pk 1.0 either, though I haven't checked > (can't check, no hal in fedora). Using udev-acl is very simple and > elegant and avoids all that complexity and reliance on dead/dying > interfaces.
Yeah, I haven't kept up-to-date and for a variety of reasons, I'm often using root on my harmony (because a lot of my dev scripts still use 'sudo' from the days before I ever thought of udev support). This is awesome. > This will only work with udev builds that have this commit in them: > > https://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=5e199245f2d2fd03c2586a7f1140300b073a4abe So this adds a ID_REMOTE_CONTROL bit which can possibly be set in a udev rule, right? And if so, adds some udev-acl tag > SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c1[1-4][0-9a-f]", > ENV{ID_REMOTE_CONTROL}="1" OK, I have to say, I to say, I'm not sure I get this. It... is a matching line. But I don't see an action. I mean, it sets ID_REMOTE_CONTROL, but like... what does something with that? I don't see where that defines normal users can use it or what mode the device should be or... anything. Oh - at the bottom of the 70-udev-acl.rules it checks if consolekit is around and then runs udev-acl which I guess is the magic there. OK, cool. OK, patch looks good, assuming my understanding is correct. A few questions... 1. are there any modern distros using consolekit or policykit anymore? If not, lets just drop that stuff. 2. If the new udev method doesn't depend on anything, why does it test for consolekit stuff in 70-udev-acl.rules? > plus a line for the one device with the old vendor ID. This would > obviate the need for the 'neat trick' entirely. This is also a > suggestion from Kay, so credit to him. I also have a trivial patch to > fix compilation with GCC 4.7. Send it on! -- Phil Dibowitz p...@ipom.com Open Source software and tech docs Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel