Re: [bug] 2.6.8: CDROM_SEND_PACKET ioctls failing as non-root on ide scsi drives

Luke Kenneth Casson Leighton
2004-10-04T14:12:13Z

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

On Mon, Oct 04, 2004 at 02:30:03PM +0100, Sean Neakums wrote:

> > ... what gives?
>
> CDROM_SEND_PACKET calls down to sg_io, which calls verify_command,
> which will not permit anyone but root to use any unrecognised
> commands. GET CONFIGURATION does not seems to be one of those
> recognised.

oh, right, i didn't think of checking that.

so if i just add that command, everything works hunky-dory.

well, i'll try it!

l.

--
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love. If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
lkcl.net
lkcl@lkcl.net

[-- Attachment #2: scsi_ioctl.diff --]
[-- Type: text/plain, Size: 588 bytes --]

Index: drivers/block/scsi_ioctl.c
===================================================================
RCS file: /cvsroot/selinux/nsa/linux-2.6/drivers/block/scsi_ioctl.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 scsi_ioctl.c
--- drivers/block/scsi_ioctl.c 19 Aug 2004 14:25:16 -0000 1.1.1.9
+++ drivers/block/scsi_ioctl.c 4 Oct 2004 14:07:25 -0000
@@ -146,6 +146,7 @@
safe_for_read(GPCMD_READ_TOC_PMA_ATIP),
safe_for_read(GPCMD_REPORT_KEY),
safe_for_read(GPCMD_SCAN),
+ safe_for_read(GPCMD_GET_CONFIGURATION),

/* Basic writing commands */
safe_for_write(WRITE_6),