From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev rules for new firewire driver stack
Date: Wed, 20 Aug 2008 22:52:52 +0000 [thread overview]
Message-ID: <48ACA044.2050304@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.3253e0826700753e@s5r6.in-berlin.de>
David Moore wrote:
> On Wed, 2008-08-20 at 22:57 +0200, Stefan Richter wrote:
>> David Moore wrote:
>>> On Wed, 2008-08-20 at 21:39 +0200, Stefan Richter wrote:
>>>> SUBSYSTEM="firewire", ATTR{specifier_id}="0x00a02d", ATTR{version}="0x010001",\
>>>> PROGRAM="/bin/chgrp video /dev/%P"
>>>>
>>> I tried playing with rules like this about a year ago, but it didn't
>>> work because the spec_id was only available in the child nodes of the
>>> firewire device, so udev couldn't match on it (see more below). Has
>>> that changed so these work now?
>> This hasn't changed; hence I use chgrp on %P which is the parent.
>>
>> I.e. these rules trigger on fwX.Y events but modify the (then already
>> existing) /dev/fwX file.
>>
>
> Okay, I see. The reason that didn't work on Fedora 7 was that a SYMLINK
> rule can't use this %P trick since the target of the symlink can't be
> overriden (at least to my knowledge). And Fedora didn't like putting
> chgrp commands directly in the udev rule since there was some PAM
> console.perms magic elsewhere that dealt with the chgrping all in one
> place based on filename.
>
> Of course, for Fedora at least, all that is moot now since the PAM magic
> is replaced with PolicyKit magic. I'm not sure if other distributions
> still use console.perms.
The simplest alternative would of course just be
SUBSYSTEM="firewire", GROUP="video"
or
KERNEL="fw[0-9]*", GROUP="video"
or an equivalent PAM or CamelCaseKit based approach. This would leave
an opportunity unused to improve device security relative to raw1394,
but that's not a big deal.
Another alternative is that we add a sysfs attribute to the parent
device, e.g. one which contains a list of the specifier:version tuples
of all unit directories of a node --- if that would make life easier for
integrators.
--
Stefan Richter
-===-=--- =--- =-=-http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-08-20 22:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 19:39 udev rules for new firewire driver stack Stefan Richter
2008-08-20 20:31 ` David Moore
2008-08-20 20:57 ` Stefan Richter
2008-08-20 21:23 ` David Moore
2008-08-20 22:52 ` Stefan Richter [this message]
2008-08-21 18:32 ` Stefan Richter
2008-08-21 18:57 ` David Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48ACA044.2050304@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).