Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2003 16:53:43 -0400
From:      Jeff Walters <jeff@walters.name>
To:        current@freebsd.org
Subject:   Comment on devfs.conf
Message-ID:  <200305151653.43540.jeff@walters.name>

next in thread | raw e-mail | index | archive | help
The new /etc/devfs.conf arrangement is a good thing but it doesn't work for 
devices that are created on the fly after boot, and it gives an error on 
wildcards on device names.  

I suggest for /etc/rc.d/devfs that instead of changing the permissions and 
ownerships directly on device nodes, create a default devfs ruleset based on 
/etc/devfs.conf entries and apply the set.  For example, previously you could 
modify /etc/rc.devfs with the logic like:

#### Customizations
# define ruleset number for following rules
devfs ruleset 10
devfs rule delset

# define custom rules
# give operator access to the CDs, floppy and USB Compact Flash drives
devfs rule add path "acd*" group operator mode 660
devfs rule add path "fd0*" group operator mode 660
devfs rule add path "da*" group operator mode 660

# apply ruleset
devfs rule applyset

Currently devfs.conf doesn't do the corresponding thing.  I have a small patch 
(I could submit (where?)) on /etc/rc.d/devfs, and adds the ability to put a 
"rule" type of line in /etc/devfs.conf:

# give operator access to the CD, floppy and Compact Flash drives
rule   "acd*"   group operator mode 660
rule   "fd0*"   group operator mode 660
rule   "da*"    group operator mode 660

... and have devfs ruleset 10 (arbitrary) created and applied with these 
rules, if anyone else likes the idea.


Jeff



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