Re: Floppy handling

From: Chris Swiedler (chris.swiedler@rememberit.com)
Date: Tue Jun 20 2000 - 09:19:42 EST


> > I think it would be most intuitive for users if we can manage to have
the
> > floppy automounted when it is inserted and autounmounted when removed.
Dirty
> > data needs to be flushed expediently for this to work well.
>
> And what user owns the floppy ? Everybody who is logged in?
> Can anybody write to it? Can everybody write to it.
>
> It the user who put the floppy in the drive stores some sensitive
> data (X.509 certificates come to mind) who can read it?.

These are more reasons why I suggested a single-user mode as the answer. If
we assume that the only user is sitting at the computer, then we can
restrict priveledges to that user.

To expand the idea a little: trying to rewrite Linux as a single-user OS is
obviously extreme. What if instead we had special recognition for the user
at the console? I.e., if the user has logged in via the terminal itself (not
a serial connection, telnet session, or anything else) then we can assume
that floppies which are inserted can be automounted, and privledges
restricted to that user alone. It certainly makes sense--how is someone
other than the console user going to insert a floppy? If there is no console
user logged in, the floppy must be mounted manually as usual. If the floppy
is really intended for a remote user, then the console user (if any) must
manually unmount the disk so that the remote user can mount it. If the disk
is removed prematurely, we know exactly who to notify.

How difficult would it be to put code in the kernel like

if (current->uid == console->uid)
{
        /* special case for console user */
        ...
}

?

chris

-
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.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:19 EST