[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#268392: [kernel-source-2.6.8]: Kernel breaks CD burning software



reassign 268392 dvd+rw-tools
tags 268392 +patch
thanks


> growisofs
> -----------------------
> INFO: ISO-8859-15 character encoding detected by locale settings.
>  Assuming ISO-8859-15 encoded filenames on source filesystem,
>  use -input-charset to override.
> :-( unable to PREVENT MEDIA REMOVAL: Operation not permitted

GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL is explicitly allowed for writeable
fds.  But growiso opens it for readonly.  Try rebuilding ddvd+rw-tools
with the patch below - OTOH after reading through the code I wouldn't
want it to be anywhere near my computers.


--- dvd+rw-tools-5.20.4.10.8/growisofs.c~	2004-08-27 22:35:08.400657200 +0200
+++ dvd+rw-tools-5.20.4.10.8/growisofs.c	2004-08-27 22:36:33.443728688 +0200
@@ -504,10 +504,10 @@
      */
 #endif
 
-    if ((in_fd = open64 (device,O_RDONLY)) < 0)
+    if ((in_fd = open64 (device,O_RDWR)) < 0)
 	if (!(errno == ENOMEDIUM || errno == EMEDIUMTYPE) ||
-	    (in_fd = open64 (device,O_RDONLY|O_NONBLOCK)) < 0)
-	    fprintf (stderr,":-( unable to open64(\"%s\",O_RDONLY): ",device),
+	    (in_fd = open64 (device,O_RDWR|O_NONBLOCK)) < 0)
+	    fprintf (stderr,":-( unable to open64(\"%s\",O_RDWR): ",device),
 	    perror (NULL), exit (FATAL_START(errno));
 
 #ifdef GET_REAL
@@ -521,8 +521,8 @@
     if (!S_ISBLK(sb.st_mode))
     {	setuid(uid);		/* drop all privileges	*/
 	close (in_fd);		/* reopen as mortal	*/
-	if ((in_fd = open64 (device,O_RDONLY)) < 0)
-	    fprintf (stderr,":-( unable to re-open64(\"%s\",O_RDONLY): ",
+	if ((in_fd = open64 (device,O_RDWR)) < 0)
+	    fprintf (stderr,":-( unable to re-open64(\"%s\",O_RDWR): ",
 			    device),
 	    perror (NULL), exit (FATAL_START(errno));
       open_rw:



Reply to: