lkml.org 
[lkml]   [1998]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectDEVFS and permissions/group/owner

On Fri, 7 Aug 1998, Richard Gooch wrote:

[--------snip------------]
> Certainly the dcache does speed future accesses up
> enormously. It's also true that millions of inodes in /dev is simply
> unworkable. At the very least a solution like scsidev is required.
> However, scsidev only solves the issue of SCSI devices. USB devices
> are another case looking for a solution. I think the USB case is even
> harder, because here you have a case of hot-plugging. While also
> possible with SCSI, it's less common there, so perhaps hot-plugging
> SCSI devices is more likely to be ignored. As I understand it,
> hot-plugging is pretty intrinsic to the ideas of USB, so you can't
> ignore it.
>
[--------snip------------]

Hi Richard,

A quick question. devfs always creates device special files with
some default permissions (presumable root, root, 400(?)), and to
make these into something sane (i.e. changing group to cdrom or floppy,
for instance, or setting permissions to maybe 444), you use a tar file
to save/restore these attributes across mountings.

My question is, how is this permission/owner/group adjustment to be handled
for dynamically created devices such as USB stuff, or module loaded drivers?
Must you have a cron job that polls for the existance of a particular device
and then updates its permissions when the device comes into existance? I
can imagine that (at least with a module like cdrom) you could add a post-
install method to your conf.modules file. Unfortunatly though, this method
has its own problems (i.e. dynamic loading I presume wouldn't work becasue
the device file doesn't exist yet to inform the kernel that the device needs
loading -- and the permissions are wrong for typical users to access them
anyway because the cron job hasn't updated the not-yet-existing device file).

I would presume these problems are the same or worse for hot pluggable
devices.

Wouldn't it be better to have some sort of a daemon (like kmod for example)
who checks a file in user-space (i.e. /etc/dev_permsissions ) and whenever
devfs adds a device (after the root filesystem is mounted) it sets the
permissions/owner/group of the device if it has an entry in this special
file. It would have to have special treatment of dev files that are
created before / is mounted and the daemon started, but this is certainly
doable and avoids the "ugly-hack" arguments we have been hearing. It doesn't
fix my dynamic module loading concern -- but then I could be way off here...

my $0.02,

-Erik

--
Erik B. Andersen Web: http://www.inconnect.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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