* selectively disabling ACLs
@ 2009-08-05 14:16 Bill Nottingham
2009-08-05 16:27 ` Kay Sievers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bill Nottingham @ 2009-08-05 14:16 UTC (permalink / raw)
To: linux-hotplug
In the old HAL days, it was reasonable to configure which devices
would and would not get ownership/ACLs applied at the system level,
as HAL contained system level customization (via FDIs) to set this.
As I look at the current code in udev, I don't see a good way to
override this. The only infrastructure is a 70-acl.rules file
that has:
...
# optical drives
SUBSYSTEM="block", ENV{ID_CDROM}="1", ENV{ACL_MANAGE}="1"
# sound devices
SUBSYSTEM="sound", ENV{ACL_MANAGE}="1"
...
# apply ACL for all locally logged in users
LABEL="acl_apply", ENV{ACL_MANAGE}="?*",
# TEST="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
...
The only way I can see to disable ACLs, for, say, a webcam, would
be to write a rule that runs *before* this rules file, that sets
last_rule. That's quite a hack.
Is there a better way to set this that I don't see?
Bill
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: selectively disabling ACLs
2009-08-05 14:16 selectively disabling ACLs Bill Nottingham
@ 2009-08-05 16:27 ` Kay Sievers
2009-08-05 16:47 ` Matthias Schwarzott
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-08-05 16:27 UTC (permalink / raw)
To: linux-hotplug
On Wed, Aug 5, 2009 at 16:16, Bill Nottingham<notting@redhat.com> wrote:
> In the old HAL days, it was reasonable to configure which devices
> would and would not get ownership/ACLs applied at the system level,
> as HAL contained system level customization (via FDIs) to set this.
>
> As I look at the current code in udev, I don't see a good way to
> override this. The only infrastructure is a 70-acl.rules file
> that has:
>
> ...
> # optical drives
> SUBSYSTEM="block", ENV{ID_CDROM}="1", ENV{ACL_MANAGE}="1"
>
> # sound devices
> SUBSYSTEM="sound", ENV{ACL_MANAGE}="1"
> ...
> # apply ACL for all locally logged in users
> LABEL="acl_apply", ENV{ACL_MANAGE}="?*",
> # TEST="/var/run/ConsoleKit/database", \
> Â RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
>
> ...
>
> The only way I can see to disable ACLs, for, say, a webcam, would
> be to write a rule that runs *before* this rules file, that sets
> last_rule. That's quite a hack.
>
> Is there a better way to set this that I don't see?
I guess the current logic could just check ACL_MANAGE=0, and skip the
device if that is set?
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: selectively disabling ACLs
2009-08-05 14:16 selectively disabling ACLs Bill Nottingham
2009-08-05 16:27 ` Kay Sievers
@ 2009-08-05 16:47 ` Matthias Schwarzott
2009-08-05 16:48 ` Bill Nottingham
2009-08-05 18:29 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Matthias Schwarzott @ 2009-08-05 16:47 UTC (permalink / raw)
To: linux-hotplug
On Mittwoch, 5. August 2009, Kay Sievers wrote:
> On Wed, Aug 5, 2009 at 16:16, Bill Nottingham<notting@redhat.com> wrote:
> > In the old HAL days, it was reasonable to configure which devices
> > would and would not get ownership/ACLs applied at the system level,
> > as HAL contained system level customization (via FDIs) to set this.
> >
> > As I look at the current code in udev, I don't see a good way to
> > override this. The only infrastructure is a 70-acl.rules file
> > that has:
> >
> > ...
> > # optical drives
> > SUBSYSTEM="block", ENV{ID_CDROM}="1", ENV{ACL_MANAGE}="1"
> >
> > # sound devices
> > SUBSYSTEM="sound", ENV{ACL_MANAGE}="1"
> > ...
> > # apply ACL for all locally logged in users
> > LABEL="acl_apply", ENV{ACL_MANAGE}="?*",
> > # TEST="/var/run/ConsoleKit/database", \
> > Â RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
> >
> > ...
> >
> > The only way I can see to disable ACLs, for, say, a webcam, would
> > be to write a rule that runs *before* this rules file, that sets
> > last_rule. That's quite a hack.
> >
> > Is there a better way to set this that I don't see?
>
> I guess the current logic could just check ACL_MANAGE=0, and skip the
> device if that is set?
>
Then one has to copy possibly complicated matching logic just to revert the
result.
Why not let the match rules set some kind of ACL_CLASS to some user friendly
name. (examples: block, sound, ptp, mtp, scanner, printer, optical, v4l,
dvb, ...)
That way one can add rules like this to disable acl for joysticks
ENV{ACL_MANAGE}="1", ENV{ACL_CLASS}="joystick", ENV{ACL_MANAGE}="0"
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: selectively disabling ACLs
2009-08-05 14:16 selectively disabling ACLs Bill Nottingham
2009-08-05 16:27 ` Kay Sievers
2009-08-05 16:47 ` Matthias Schwarzott
@ 2009-08-05 16:48 ` Bill Nottingham
2009-08-05 18:29 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Bill Nottingham @ 2009-08-05 16:48 UTC (permalink / raw)
To: linux-hotplug
Matthias Schwarzott (zzam@gentoo.org) said:
> Then one has to copy possibly complicated matching logic just to revert the
> result.
> Why not let the match rules set some kind of ACL_CLASS to some user friendly
> name. (examples: block, sound, ptp, mtp, scanner, printer, optical, v4l,
> dvb, ...)
>
> That way one can add rules like this to disable acl for joysticks
> ENV{ACL_MANAGE}="1", ENV{ACL_CLASS}="joystick", ENV{ACL_MANAGE}="0"
Given that it's in the same rule file now, you'd need to split what's
currently there so you have a chance to set this.
Bill
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: selectively disabling ACLs
2009-08-05 14:16 selectively disabling ACLs Bill Nottingham
` (2 preceding siblings ...)
2009-08-05 16:48 ` Bill Nottingham
@ 2009-08-05 18:29 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-08-05 18:29 UTC (permalink / raw)
To: linux-hotplug
On Wed, Aug 5, 2009 at 18:47, Matthias Schwarzott<zzam@gentoo.org> wrote:
> On Mittwoch, 5. August 2009, Kay Sievers wrote:
>> I guess the current logic could just check ACL_MANAGE=0, and skip the
>> device if that is set?
>>
> Then one has to copy possibly complicated matching logic just to revert the
> result.
> Why not let the match rules set some kind of ACL_CLASS to some user friendly
> name. (examples: block, sound, ptp, mtp, scanner, printer, optical, v4l,
> dvb, ...)
>
> That way one can add rules like this to disable acl for joysticks
> ENV{ACL_MANAGE}="1", ENV{ACL_CLASS}="joystick", ENV{ACL_MANAGE}="0"
For now, that all should be as simple as possible, and not spread
around packages with magic properties. It will likely change all with
the upcoming multi-seat support, which needs its own configuration and
which could define such facility.
Thanks,
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-05 18:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05 14:16 selectively disabling ACLs Bill Nottingham
2009-08-05 16:27 ` Kay Sievers
2009-08-05 16:47 ` Matthias Schwarzott
2009-08-05 16:48 ` Bill Nottingham
2009-08-05 18:29 ` Kay Sievers
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).