Re: Ejecting a mounted CD-ROM works :-(

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Fri, 19 Feb 1999 18:28:43 +0000


On Feb 19, Raphael Becker wrote:

> Jeff Epler wrote:
> >
> > On Fri, Feb 19, 1999 at 08:30:14AM +0100, Gerd Knorr wrote:
> > > If you ask the kernel for ejecting the cdrom (CDROMEJECT ioctl), you'll
> > > get a EBUSY.
> > >
> > > cdrecord talks directly to the device (via generic scsi), therefore
> > > the kernel can't block the eject attempt.
> >
> > Should we disallow generic scsi access to a device that's otherwise in use?
> > How hard is this to do?
>
> The kernel should allow access to only a specific device (eg the
> cd-recorder). accesses to other devices sould be blocked by the kernel
> (in the kernel-setup you have to give a list of BUS/ID/LUN-Komponents
> the kernel should allow to control by software OR you have an external
> software, which tells the kernel which device may be accessed by using
> general scsi-interface).
> This feature should make roasting a cd less unsecure and we may think
> about a non-root cd-record.

completely blocking generic scsi access for a device in use is a _bad_ idea
because then /dev/sg* can't be used anymore for mode selects, config changes etc.
on the (mounted) system disk.

using an `external program' to (b)lock/un(b)lock some devices (CDR) might be
a better idea...

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

- 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/