Re: [PATCH udev] rules: set group ownership of new firewire driver device files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 21, 2009 at 20:08, Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> wrote:

> With some effort, we could add some fw_device attributes which reflect
> fw_unit properties.  We would have to encode a little bit of higher-level
> knowledge into the fw_device handling part; but why not if it makes life for
> userland considerably simpler.

Sounds ok to me, if we will end up with that solution.

>> Or maybe delay all uevents until the childs are all created, and send
>> the events only after that, so the child devices can be seen at the
>> time the event is sent out.

> How would that be done?  Like this?
>
>        dev_set_uevent_suppress(parent, 1);
>        device_add(parent);
>
>        for_each_unit(;;)

These unit events need to be suppressed too.

>                device_add(child);
>
>        dev_set_uevent_suppress(parent, 0);
>        kobject_uevent(&parent->kobj, KOBJ_ADD);

And send after the device event.

> And then, how would an udev rule look like to match attributes in the
> fw_device's subdirectories instead of direct attributes?
>
> SUBSYSTEM=="firewire", \
>        ATTR{*/specifier_id}=="0x00a02d", \
>        ATTR{*/version}=="0x00010?", \
>        GROUP="video"

This is always numeric, and the unit directory names are not
predictable, right? Then we would need something like the "*/..."
magic to udev.

>> We fixed almost all these know issues in other subsystems now and I
>> would really like to see that solved properly, without chrgrp hacks
>> like in the rules above. It would hit us back badly, when generic
>> infrastructure which will expect proper event timing regarding device
>> properties.
>
> Hmm, or maybe we should associate character device files with the fw_units
> instead?  Could break Fedora's userland though.  Alas I don't know in detail
> what Fedora does to set ACLs on /dev/fw*.

Maybe it would be nice anyway, if some units-types can be excluded
from access by normal users. Sometimes it would be nice to have
something like this for USB, so we could grant access to the 3G modem
of mobile phone, but not to the firmware update interface :)

> And it would remove the possibility to use the firewire-cdev ABI with nodes
> which do not have any unit directories, but this is a rather hypothetical
> case since higher-level IEEE 1394 based protocols are all coupled with unit
> directories.

Maybe you can just keep current node at the device for such cases? It
would just not be used in the usual setup.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux