If you copy and paste the patch, and it doesn't apply, try filling in the blank lines with a single space character. The joy of text being put thru the HTML mill. :)
FWIW: I intend to upgrade KernelTrap to Drupal 4.5 some time in the next few weeks, at which time we will gain the ability to include attachements with comments...
The other patch is a better one, since this makes __VMALLOC_RESERVE be entirely different from the one defined in the kernel, while the other one makes the kernel var accessible to modules.
coder@~$ cdrecord dev=/dev/hdc -overburn blank=fast
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 JЖrg Schilling
cdrecord: Warning: Running on Linux-2.6.9
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
cdrecord: Warning: Linux-2.6.8 introduced incompatible interface changes.
cdrecord: Warning: SCSI transport does no longer work for suid root programs.
cdrecord: Warning: if cdrecord fails, try to run it from a root account.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.
Until 2.6.7 included CDrecord, if installed setuid, did something as root and then dropped the priviledges to do the actual burning. It was recognized, however, that you can destroy physically hard disks with some IDE/SCSI commands, so issuing such commands (even the ones for burning CDs) is now restricted to root. But cdrecord is no more root when burning the CD, so it fails.
Solution: fix CDrecord. Don't ask me why I've not yet seen such a patch.
Hey guys, maybe you haven't seen such a patch...I did!
Try out this one:
--- cdrtools-2.01/cdrecord/cdrecord.c.fixed 2004-08-27 10:24:17.000000000 +0200
+++ cdrtools-2.01/cdrecord/cdrecord.c 2004-03-07 23:43:08.000000000 +0100
@@ -452,8 +452,11 @@ main(ac, av)
/*
* XXX Below this point we do not need root privilleges anymore.
*/
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
#else
@@ -465,7 +468,9 @@ main(ac, av)
#endif
comerr("Panic cannot set back effective uid.\n");
}
- /*
+ */
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
* WARNING: We now are no more able to do any privilleged operation
* unless we have been called by root.
*
@@ -955,10 +960,13 @@ if (lverbose > 2)
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
*/
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /*
if (oeuid != getuid()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
- }
+ }*/
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
/*
* fork() here to start the extra process needed for
@@ -973,11 +981,13 @@ if (lverbose > 2)
/*
* XXX Below this point we never need root privilleges anymore.
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /* if (geteuid() != getuid()) { */ /* AIX does not like to do this */
/* If we are not root */
- if (setreuid(-1, getuid()) < 0)
+ /* if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
- }
+ } */
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
}
if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {
This one is for cdrtools-2.01a38, so do not expect it to work with old cdrecord 2.01 stable releases. (Not sure about that!)
Here you go - I also uploaded it to Gentoo's bugzilla, so hopefully they'll include it soon...
--- cdrtools-2.01/cdrecord/cdrecord.c.orig 2004-10-28 12:44:39.927882183 -0400
+++ cdrtools-2.01/cdrecord/cdrecord.c 2004-10-28 13:00:02.627948467 -0400
@@ -492,8 +492,11 @@
/*
* XXX Below this point we do not need root privilleges anymore.
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+
+ // fixing issue with kernel >= 2.6.8.1
+ //if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
#else
@@ -505,6 +508,8 @@
#endif
comerr("Panic cannot set back effective uid.\n");
}
+ */
+
/*
* WARNING: We now are no more able to do any privilleged operation
* unless we have been called by root.
@@ -1009,10 +1014,14 @@
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
*/
+
+ // fixing issue with kernel >= 2.6.8.1
+ /*
if (oeuid != getuid()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
}
+ */
#endif
/*
* fork() here to start the extra process needed for
@@ -1027,11 +1036,14 @@
/*
* XXX Below this point we never need root privilleges anymore.
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ // fixing issue with kernel >= 2.6.8.1
+ //if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
}
+ */
#endif
}
if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {
nVidia 6111 driver doesn't work with it
FYI for those who have that driver version.
for nvidia 6111 try this kernel patch
If you copy and paste the pat
If you copy and paste the patch, and it doesn't apply, try filling in the blank lines with a single space character. The joy of text being put thru the HTML mill. :)
re: HTML mill
FWIW: I intend to upgrade KernelTrap to Drupal 4.5 some time in the next few weeks, at which time we will gain the ability to include attachements with comments...
for nvidia 6111, alternative 6111 driver patch
From Gentoo linux
The other is better
The other patch is a better one, since this makes __VMALLOC_RESERVE be entirely different from the one defined in the kernel, while the other one makes the kernel var accessible to modules.
cdrecord doesn't work
coder@~$ cdrecord dev=/dev/hdc -overburn blank=fast
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 JЖrg Schilling
cdrecord: Warning: Running on Linux-2.6.9
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
cdrecord: Warning: Linux-2.6.8 introduced incompatible interface changes.
cdrecord: Warning: SCSI transport does no longer work for suid root programs.
cdrecord: Warning: if cdrecord fails, try to run it from a root account.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.
From root evrything works fine.
CDrecord bug - happening since 2.6.9
Until 2.6.7 included CDrecord, if installed setuid, did something as root and then dropped the priviledges to do the actual burning. It was recognized, however, that you can destroy physically hard disks with some IDE/SCSI commands, so issuing such commands (even the ones for burning CDs) is now restricted to root. But cdrecord is no more root when burning the CD, so it fails.
Solution: fix CDrecord. Don't ask me why I've not yet seen such a patch.
CDrecord patch
Hey guys, maybe you haven't seen such a patch...I did!
Try out this one:
--- cdrtools-2.01/cdrecord/cdrecord.c.fixed 2004-08-27 10:24:17.000000000 +0200
+++ cdrtools-2.01/cdrecord/cdrecord.c 2004-03-07 23:43:08.000000000 +0100
@@ -452,8 +452,11 @@ main(ac, av)
/*
* XXX Below this point we do not need root privilleges anymore.
*/
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
#else
@@ -465,7 +468,9 @@ main(ac, av)
#endif
comerr("Panic cannot set back effective uid.\n");
}
- /*
+ */
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
* WARNING: We now are no more able to do any privilleged operation
* unless we have been called by root.
*
@@ -955,10 +960,13 @@ if (lverbose > 2)
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
*/
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /*
if (oeuid != getuid()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
- }
+ }*/
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
/*
* fork() here to start the extra process needed for
@@ -973,11 +981,13 @@ if (lverbose > 2)
/*
* XXX Below this point we never need root privilleges anymore.
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /* if (geteuid() != getuid()) { */ /* AIX does not like to do this */
/* If we are not root */
- if (setreuid(-1, getuid()) < 0)
+ /* if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
- }
+ } */
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
}
if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {
This one is for cdrtools-2.01a38, so do not expect it to work with old cdrecord 2.01 stable releases. (Not sure about that!)
Shutdown
And what about final cdrecord-2.01
Hi there!
Is there any patch that could be succesfully applied on final version of cdrecord?
Re: And what about final cdrecord-2.01
Here you go - I also uploaded it to Gentoo's bugzilla, so hopefully they'll include it soon...
--- cdrtools-2.01/cdrecord/cdrecord.c.orig 2004-10-28 12:44:39.927882183 -0400 +++ cdrtools-2.01/cdrecord/cdrecord.c 2004-10-28 13:00:02.627948467 -0400 @@ -492,8 +492,11 @@ /* * XXX Below this point we do not need root privilleges anymore. */ - if (geteuid() != getuid()) { /* AIX does not like to do this */ + + // fixing issue with kernel >= 2.6.8.1 + //if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ + /* #ifdef HAVE_SETREUID if (setreuid(-1, getuid()) < 0) #else @@ -505,6 +508,8 @@ #endif comerr("Panic cannot set back effective uid.\n"); } + */ + /* * WARNING: We now are no more able to do any privilleged operation * unless we have been called by root. @@ -1009,10 +1014,14 @@ * even on OS that do not support getreuid() which is *BSD * and SUSv3 only. */ + + // fixing issue with kernel >= 2.6.8.1 + /* if (oeuid != getuid()) { if (setreuid(-1, oeuid) < 0) errmsg("Could set back effective uid.\n"); } + */ #endif /* * fork() here to start the extra process needed for @@ -1027,11 +1036,14 @@ /* * XXX Below this point we never need root privilleges anymore. */ - if (geteuid() != getuid()) { /* AIX does not like to do this */ + // fixing issue with kernel >= 2.6.8.1 + //if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ + /* if (setreuid(-1, getuid()) < 0) comerr("Panic cannot set back effective uid.\n"); } + */ #endif } if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {how to patch cdrecord
How do I patch cdrecord? I don't know which command I sould use?
Try this while inside the ext
Try this while inside the extracted sources:
patch -p1 < your_patch.patch
:p