From: Andreas Messer <andreas.messer@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1
Date: Tue, 17 Aug 2004 00:59:37 +0200 [thread overview]
Message-ID: <200408170059.37152.satura@proton> (raw)
[-- 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
next reply other threads:[~2004-08-16 23:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-16 22:59 Andreas Messer [this message]
2004-08-17 17:18 ` [PATCH] change scsi_ioctl to allow cd-recording 2.6.8.1 Andreas Messer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200408170059.37152.satura@proton \
--to=andreas.messer@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox