public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1
@ 2004-08-16 22:59 Andreas Messer
  2004-08-17 17:18 ` Andreas Messer
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Messer @ 2004-08-16 22:59 UTC (permalink / raw)
  To: linux-kernel

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

Hello,

this is my first Email to the kernel-mailing list. I hope i have understand 
the howto-post-a-patch the right way. 
As burning cd's as user is not possible with 2.6.8.1 without setting cdrecord 
setuid root and burning with k3b wont work at all, i decided to change 
driver/block/scsi_ioctl.c to allow it again. I allowed the commands listended 
in MMC-2 paper. Burning cds with k3b works now fine again, burning dvds 
should also work again. 

regards
Andreas
-- 
gnuPG keyid: 0xE94F63B7 fingerprint: D189 D5E3 FF4B 7E24 E49D 7638 07C5 924C 
E94F 63B7

[-- Attachment #2: patch-scsi_ioctl-cdrecord --]
[-- Type: text/x-diff, Size: 2007 bytes --]

--- linux-2.6.8.1/drivers/block/scsi_ioctl.c	2004-08-16 21:44:53.000000000 +0200
+++ linux/drivers/block/scsi_ioctl.c	2004-08-17 00:53:12.000000000 +0200
@@ -156,6 +156,35 @@
 		safe_for_write(WRITE_16),
 		safe_for_write(WRITE_BUFFER),
 		safe_for_write(WRITE_LONG),
+
+                /* Some defs for recording CDs */
+
+                /* obsolete: 0x01 REZERO_UNIT, 0x5c READ_BUFFER */
+		/*           used by k3b, but also work without */
+
+
+                safe_for_read(GPCMD_GET_CONFIGURATION),
+                safe_for_read(GPCMD_MODE_SELECT_10), /* read needed by k3b */
+                safe_for_read(GPCMD_SET_SPEED), /* obsolete but often used */
+                safe_for_read(GPCMD_LOAD_UNLOAD),
+
+                safe_for_write(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL),
+                safe_for_write(GPCMD_FLUSH_CACHE),
+                safe_for_write(GPCMD_CLOSE_TRACK),
+                safe_for_write(GPCMD_FORMAT_UNIT),
+                safe_for_write(GPCMD_BLANK),
+                safe_for_write(GPCMD_READ_FORMAT_CAPACITIES),
+                safe_for_write(GPCMD_RESERVE_RZONE_TRACK),
+                safe_for_write(GPCMD_SEND_KEY),
+                safe_for_write(GPCMD_SEND_OPC),
+                safe_for_write(GPCMD_SET_STREAMING),
+
+                /* possibly needed: 0x5d SEND_CUE_SHEET/SEND_EVENT*/
+                /*                  0xbf SEND_DVD_STRUCTURE */
+                /* but not defined yet in linux/cdrom.h */
+
+                safe_for_write(0x5d),
+                safe_for_write(0xbf),
 	};
 	unsigned char type = cmd_type[cmd[0]];
 
@@ -173,6 +202,14 @@
 	if (capable(CAP_SYS_RAWIO))
 		return 0;
 
+        /* Added for debugging*/
+       
+	if(file->f_mode & FMODE_WRITE)
+	  printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with write-mode\n",cmd[0]);
+        else
+          printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with read-mode\n",cmd[0]);
+
+
 	/* Otherwise fail it with an "Operation not permitted" */
 	return -EPERM;
 }

[-- Attachment #3: readme --]
[-- Type: text/plain, Size: 50 bytes --]

andreas.messer@gmx.de  allows users to record cd's

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1
  2004-08-16 22:59 [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1 Andreas Messer
@ 2004-08-17 17:18 ` Andreas Messer
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Messer @ 2004-08-17 17:18 UTC (permalink / raw)
  To: linux-kernel

Hello,

please don't answer or refer to the previous message. Please 
look at the "Mis-detect CRDW as CDROM" thread.

Andreas
-- 
gnuPG keyid: 0xE94F63B7 
fingerprint: D189 D5E3 FF4B 7E24 E49D 7638 07C5 924C E94F 63B7

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-17 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-16 22:59 [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1 Andreas Messer
2004-08-17 17:18 ` Andreas Messer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox