Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#1536 - cdrtools 2.01-1: cdrecord required to run as root with kernel 2.6.8.1
Attached to Project:
Arch Linux
Opened by Chris (colnago) - Sunday, 26 September 2004, 22:03 GMT
Last edited by Judd Vinet (judd) - Tuesday, 28 September 2004, 04:46 GMT
Opened by Chris (colnago) - Sunday, 26 September 2004, 22:03 GMT
Last edited by Judd Vinet (judd) - Tuesday, 28 September 2004, 04:46 GMT
|
Detailscdrecord (in cdrtools 2.01) only works as a privelledged user. This is true even if kernel 2.6.8.1 patches are applied, as cdrecord.c itself checks. Applying a patch (hack?) such as the following allows for use as a normal user. Note that k3b now uses cdrecord (in k3b 0.11.17) rather than cdrdao (in k3b 0.11.16) and is thus broken for kernel 2.6.8.1 users as well.
Example patch follows, it just comments out the 3 sections: --------------------------------------------------------- --- cdrtools-2.01/cdrecord/cdrecord.c 2004-09-08 10:26:35.000000000 -0700 +++ cdrecord.c 2004-09-26 12:22:54.000000000 -0700 @@ -492,8 +492,9 @@ /* * XXX Below this point we do not need root privilleges anymore. */ - if (geteuid() != getuid()) { /* AIX does not like to do this */ + /*if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ + /* #ifdef HAVE_SETREUID if (setreuid(-1, getuid()) < 0) #else @@ -504,8 +505,8 @@ #endif #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 +1010,10 @@ * even on OS that do not support getreuid() which is *BSD * and SUSv3 only. */ - if (oeuid != getuid()) { + /*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 +1028,12 @@ /* * XXX Below this point we never need root privilleges anymore. */ - if (geteuid() != getuid()) { /* AIX does not like to do this*/ + /*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"); - } + }*/ + #endif } if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) { |
This task depends upon
Closed by dorphell (dorphell)
Saturday, 16 October 2004, 16:45 GMT
Reason for closing: Won't implement
Saturday, 16 October 2004, 16:45 GMT
Reason for closing: Won't implement
The drawback is the lowered priority w/o suid (and possible buffer underruns?).