[2831] in linux-scsi channel archive
Re: Access problems with /dev/sr0
daemon@ATHENA.MIT.EDU (Gerard Roudier)
Tue Nov 18 17:52:50 1997
Date: Tue, 18 Nov 1997 23:47:29 +0100 (MET)
From: Gerard Roudier <groudier@club-internet.fr>
To: Dirk Foersterling <milliByte@DeathsDoor.com>
cc: Linux SCSI list <linux-scsi@vger.rutgers.edu>
In-Reply-To: <19971118075139.55981@infinity.milliByte.de>
On Tue, 18 Nov 1997, Dirk Foersterling wrote:
> Hi, list readers...
>
> [Please email me directly, because I'm not on the list due to technical
> problems]
>
> I experienced the following:
>
> Script started on Tue Nov 18 07:45:46 1997
> NOTE: umask now is 077
> dirk@infinity:~ >ls -l /dev/sr0
> brw-rw-rw- 1 root root 11, 0 Jun 4 1996 /dev/sr0
> dirk@infinity:~ >scsiinfo -i /dev/sr0
>
> ioctl(SCSI_IOCTL_SEND_COMMAND) status = -1
> dirk@infinity:~ >exit
>
> Script done on Tue Nov 18 07:45:58 1997
>
> As root, I can run scsiinfo -i /dev/sr0 without any problem. What is my
The SCSI_IOCTL_SEND_COMMAND allows to send any SCSI command to a device.
Only the super-user is allowed to use this SCSI ioctl, since some misused
SCSI commands would just destroy hard disks data or make the involved
device unusable (at least temporarily).
> mistake? What mode should the device file have to answer correctly to
> INQUIRY commands? I tried another program that issues an INQUIRY
> command, and as "dirk" it failed on /dev/sr0, but as "root" it worked.
> how can I issue an INQUIRY command as "dirk" ?
I agree that an INQUIRY command is not that dangerous and such a command
could be allowed to any user having some permission for the device.
IMO, it should'nt be that hard to implement a specific SCSI ioctl command
that performs a INQUIRY SCSI command.
> I'm using Linux 2.0.31 without any patches or additional drivers. The
> low-level SCSI driver is ncr53c8xx (825 chip).
Gerard.