Re: PROPOSAL: /proc/dev

Andreas Jellinghaus (aj@dungeon.inka.de)
Sun, 4 Jan 1998 13:56:20 +0100


>What about this use case:
>
> user opens device
> hourly cron job snapshots owners and modes in /dev
> system crashes
> system reboots
> init-job restores owners and modes in /dev

not a good thing :
the virtual tty/pty devices are chown'ed to the users who use them.
no need to save these permissions.

the only person who nows, if it's save to allow a global read or write
access is the device driver author. so the device driver should make a
suggestion.

if the devices would register as "disk" "mouse" "serial" "audio" ...
and we could find a way to set all devices of this type at the same
time, it would be very easy.

for example, debian is using makedev-c : in it's config file,
each device uses a permissions class, and /etc/makedev.cfg lists
owner,group and permission for that class. currently 20 classes are
used, but i don't think we need more than 10.

we could stick to the current (IMO ugly) naming scheme, or change it :

if we have a devfs, we could use /dev/ttyS* for all serial cards,
and /dev/cdrom* for all cdroms (or non-atapi, non-scsi cdroms), etc.
with /proc/devices/serial would list all ttyS* devices, modes and who
registerd them, same with .../cdrom and so on.

andreas