Matthias Andree wrote:
> 
> On Thu, Mar 11, 1999 at 10:58:00PM +0000, Bernard Hatt wrote:
> > My two generated directories contain:
> >
> > bmh@nevermind]$ ls -l /proc/sg/type
> > lr-xr-xr-x   1 root root  0 Mar 11 21:29 ARCHIVE_VIPER_150_21247 -> /dev/sgb
> > lr-xr-xr-x   1 root root  0 Mar 11 21:29 IBM_DCAS-34330 -> /dev/sgc
> 
> What if I have two of them? We cannot have two inodes with the same
> name. Append serial numbers of the drive, assuming that they are
> different?

Hmmm, yes, I should have thought more about this case, I'd assumed that
in the case of duplicate devices, that the sg/addr/scsiX_idY would be
used.

There is also the case of two identical devices, with the same SCSI id
on different controllers of the same type, to which I can't see a
solution.

Having thought more about my /proc/sg link solution there is a much more
serious flaw - If my scanner is attached to /dev/sga and I set the
permissions
to allow anyone to use the scanner, then when the system is booted
without
the scanner, then anyone can send SCSI commands to my root disk.

This could be fixed with boot time scripts to change the mode of all
/dev/sg? devices to 0600, and then change /dev/type/UMAX_Astra_1220S
to 0666 etc., but if you're going to do this you might as well generate
the symbolic links at boot time from /proc/scsi/scsi.

Still, if it wasn't for the flaws it would be a perfect solution :-)

Bernard
[EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to