Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208088 - USE="suid" for app-cdr/cdrtools?
Summary: USE="suid" for app-cdr/cdrtools?
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-29 19:15 UTC by rafnov
Modified: 2008-01-30 21:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rafnov 2008-01-29 19:15:40 UTC
What about adding suid USE for cdrtools?
Everytime we update cdrtools, binaries /usr/bin/cdr* get standard permissions:

ls -l /usr/bin/cdr*
-rwxr-xr-x 1 root root 697063 lut  8  2007 /usr/bin/cdrdao
-rwxr-xr-x 1 root root 280180 sty 27 22:45 /usr/bin/cdrecord

but for them to work, suid is required:

chmod +s /usr/bin/cdr*
ls -l /usr/bin/cdr*
-rwsr-sr-x 1 root root 697063 lut  8  2007 /usr/bin/cdrdao
-rwsr-sr-x 1 root root 280180 sty 27 22:45 /usr/bin/cdrecord.

Without suid recording fails with following errors:

Cdrecord-ProDVD-ProBD-Clone 2.01.01a37 (i686-pc-linux-gnu) Copyright (C) 1995-2008 Jörg Schilling
cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
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.9'.
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'HL-DT-ST'
Identifikation : 'DVD-RW GWA-4082N'
Revision       : 'CB03'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl.
cdrecord: Operation not permitted. Cannot open or use SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

If USE="suid" was added, Gentoo user could easily control if he wants cdr* automatically suid'ed by portage or not.

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-29 21:10:55 UTC
No, thanks. Use app-cdr/cdrkit if you have troubles.
Comment 2 Martin Väth 2008-01-30 10:04:20 UTC
(In reply to comment #1)
> No, thanks. Use app-cdr/cdrkit if you have troubles.

AFAIK this only avoids the message, not the cause.

Schilling is certainly a difficult person, but when he says that there is a risk of buffer underrun (although this is certainly highly exaggerated and will work on fast computers in many cases anyway) I believe that he has the technical competence to judge this.

Also in other cases, gentoo is upstream-oriented. So why not make it possible to install the package in the way upstream wants?
Comment 3 rafnov 2008-01-30 10:40:43 UTC
> Also in other cases, gentoo is upstream-oriented. So why not make it possible
> to install the package in the way upstream wants?
Gentoo is a distribution of choice as well. Aplications such as iptraf, ntfs3g or xscreensaver have USE="suid", why not add it to cdrtools, if it fixes problem (makes cd burning possible)?

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-01-30 13:51:22 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > No, thanks. Use app-cdr/cdrkit if you have troubles.
> 
> AFAIK this only avoids the message, not the cause.

It avoids using a broken application; burning with root privs is stupid. If you feel the need to continue this debate, move it to Bug 116026. Installing something suid doesn't fix anything, the problem is elsewhere.
Comment 5 Martin Väth 2008-01-30 21:42:38 UTC
(In reply to comment #4)
> It avoids using a broken application; burning with root privs is stupid.

I will not continue to debate. But reading such replies to a technically well justified requirement, I am beginning to understand why Schilling is often so upset.