Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Mar 2002 21:16:59 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        cjclark@alum.mit.edu, current@FreeBSD.ORG
Subject:   Re: devfs(5) Permissions 
Message-ID:  <25568.1015186619@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 03 Mar 2002 20:10:18 GMT." <20020303201018.GA88366@hamilton.maths.tcd.ie> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20020303201018.GA88366@hamilton.maths.tcd.ie>, David Malone writes:
>On Sun, Mar 03, 2002 at 05:36:04PM +0100, Poul-Henning Kamp wrote:
>> In message <20020303083136.A84637@blossom.cjclark.org>, "Crist J. Clark" writes
>> :
>> >I've checked the manpages, the files in /etc, and Googled, and I can't
>> >find the answer. I am begining to worry there isn't one. How does one
>> >change the permissions on dynamically created devices? That is, when
>> >the node comes into existence, it has the permissions I want, and not
>> >necessarily the defaults.
>> 
>> The overall plan is that it will be possible to push a ruleset into
>> the kernel which changes the defaults.  ETA: this summer (If I have to
>> do it, if somebody wants to help code it it can probably be done faster).
>
>I have a very similar problem trying to sync my Handspring Visor
>as a regular user 'cos the devices only come into existance when
>you press the sync button.
>
>Do you have any designs for this ruleset stuff? From what you said
>at BSDconEurope it will have to be fairly complicated to achieve
>the your aim of being better than a static permission for a given
>device.

Not really, the basic idea is just a linked list of rules:

	name=="/dev/uscanner*" -> chmod 0644
	driver=="bpf" -> chown user

It's not too much work, I just havn't had the time for it yet.
(Junior Kernel Hackers can apply here :-)

>Otherwise, one option would just be to have devfs check for a file
>in the /dev directory it is mounted over and then use that files
>permissions as a default. That would at least get us back the
>features of the old /dev which we're missing now.

This is much harder than you think...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25568.1015186619>