"Andrey Borzenkov" <[EMAIL PROTECTED]> writes:

> > ------- Additional Comments From [EMAIL PROTECTED]  2003-28-07 19:11 -------
> > Yes, a setuid wrapper could be made for exemple to solve the problem.
> 
> > I don't know if supermount can be modified safely to release floppy as soon as
> > an application try to open /dev/fd0 in writing, but it should be possible too
> > and it could be the best place to fix the problem.
> 
> supermount can release device (and block further access to it);
> you have to do it manually using /proc interface.
> 
> doing this automatically involves too many cnages in kernel and I
> won't do it; adding wrapper that does
> 
> echo /dev/fd0 release disable > /proc/fs/supermount/subfs
> 
> to GNOME formatter is far more simple.

Yes, I agree, I didn't want to parse /etc/mtab and do an umount (in root, or
practically setuid root script) if the device was mounted.

> > Note: formating a floppy while mounted is impossible, the device is busy, there
> > is nothing to do here unless umounting the floppy (in root furthermore when
> > using supermount).
> 
> do not use real device name when mounting supermount; use "none". Then
> nobody can ever check that /dev/fd0 is mounted by supermount.
> 
> use /proc interface to release it before formatting.
> 
> tell Juan to include my supermount to make it possible :)

Ah, does it means the current kernel doesn't support this functionnalities ?

Can you make /proc/fs/supermount/subfs owner the user who has control over the
floppy device ? It is maybe already the case but it will be much safer to allow
the same user and only him to release the supermounted floppy.

François.

Reply via email to