lkml.org 
[lkml]   [1998]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PROPOSAL: /proc/dev
From
Date
>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



\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.033 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site