Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

cdrecord and suid

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

cdrecord and suid

  • Quote

Post by Guinpen » Thu Oct 15, 2009 10:42 pm

Hi,

When running cdrecord as a user, I get:

Code: Select all

$ cdrecord /dev/sr0
cdrecord: No write mode specified.
cdrecord: Assuming -sao mode.
cdrecord: If your drive does not accept -sao, try -tao.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
Cdrecord-ProDVD-ProBD-Clone 2.01.01a66 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2009 Jörg Schilling
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler.
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
No target specified, trying to find one...
Using dev=1,0,0.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'HL-DT-ST'
Identifikation : 'DVD-RAM GH22LS30'
Revision       : '1.00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : NO-CD DVD MMC-3 SWABAUDIO BURNFREE
Supported modes: PACKET SAO LAYER_JUMP
cdrecord: Track 1 has unknown length.
cdrecord: Use tsize= option in SAO mode to specify track size.
Note the warning about setting the RR-scheduler. Running with sudo does not show this warning.

The solution described in hundreds of places is setting cdrecord as suid with "sudo chown u+s /usr/bin/cdrecord". But my cdrecord is already suid!

Code: Select all

-rws--x--x 1 root bin 306128 2009-10-16 01:01 /usr/bin/cdrecord
So what am I missing?

Note: I am aware of the security implications of setting cdrecord as suid, so let's ignore those for the time being.

Thanks!
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sun Oct 18, 2009 11:03 pm

Anyone?
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Tue Oct 27, 2009 1:00 pm

Try "emerge -C cdrtools && emerge cdrkit" better.
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Tue Oct 27, 2009 1:05 pm

As far as I know, cdrkit is a a fork created for licensing reasons, which is technically inferior and not maintained much. Most distributions use cdrtools, so I'm willing to trust that better.

In any case, my questions still stands. What is the technical difference between running something that is SUID root and running something that is SUID root with sudo?
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Tue Oct 27, 2009 3:13 pm

Godji wrote:As far as I know, cdrkit is a a fork created for licensing reasons, which is technically inferior and not maintained much. Most distributions use cdrtools, so I'm willing to trust that better.
Yeah, I know all that stuff. However I've been having similar problems lately with k3b, with similar output in the logs, I couldn't even burn a dvd today. I followed that path and suddenly it worked again. I don't care about politics, I want to burn a disk once in a month without having to read a book each time I need to burn a damn disk. Lately this is becoming an Odyssey in Gentoo. The main problem is that, for the amount of disks I burn I really refuse to look into this issues. I already have a lot of things to worry about and almost no time to attend them all.

Besides that, I am really not sure which of them is better maintained. Both home pages are really ancient. But that's for another topic.
Top
SamuliSuominen
Retired Dev
Retired Dev
Posts: 2133
Joined: Fri Sep 30, 2005 8:38 am
Location: Finland

  • Quote

Post by SamuliSuominen » Tue Oct 27, 2009 3:44 pm

Godji wrote:In any case, my questions still stands. What is the technical difference between running something that is SUID root and running something that is SUID root with sudo?
cdrtools bundle a code that's checking if the binary is suid or not, and if it's not, you won't be able to see the device list properly.

otherwise there wouldn't be a difference.

(note: it's been like few months if not a year since i've last checked this)

and yeah, cdrtools is the preferred one in gentoo because cdrkit doesn't work for everyone at all.
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Tue Oct 27, 2009 4:15 pm

ssuominen wrote:cdrtools bundle a code that's checking if the binary is suid or not, and if it's not, you won't be able to see the device list properly.
The binary is suid. My question is the difference between running:
1) the suid binary as user (directly)
2) the suid binary with sudo

I believe there should be no difference, but 1) gives me "cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler. ", while 2) does not. That's the phenomenon I'm trying to understand.
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Tue Oct 27, 2009 4:23 pm

ssuominen wrote:and yeah, cdrtools is the preferred one in gentoo because cdrkit doesn't work for everyone at all.
Well.....

The owner of this thread and I are witnesses that cdrtools don't work for everyone at all, either ;) There are more at Google surely.
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Tue Oct 27, 2009 6:07 pm

Oh, don't get me wrong. Cdrecord works perfectly (it did NOT work on k3b 1.0 alpha2, but it did work after an upgrade to alpha3, without touching cdrecord).

This whole thread exists so that I can find out the answer of the fundamental UNIX question of why sudo makes a difference on a suid binary - since common sense tells me the application should be running as root due to the suid, whether I use sudo or not.

Destipe the cdrecord message, cdrtools burns fine :)
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Fri Nov 13, 2009 11:25 am

Anyone?
Top
ratthing
n00b
n00b
Posts: 10
Joined: Thu Mar 31, 2005 5:28 pm

  • Quote

Post by ratthing » Mon Jan 04, 2010 3:45 pm

The only difference I would think, between using sudo and running as root, is that sudo will not have root's environment unless you explicitly 'sudo su -' (or the equiv, 'sudo -s'? I don't remember) to get root's login environment. I'd try comparing that to your own env, see what differences exist.

=RT=
Top
Draco-LVNH
n00b
n00b
User avatar
Posts: 30
Joined: Wed Dec 07, 2005 3:12 pm
Location: Mexico, Michoacan, Morelia
Contact:
Contact Draco-LVNH
Website

  • Quote

Post by Draco-LVNH » Tue Jan 05, 2010 2:13 am

Add me to the count..... cdrkit worked better for me, cdrecord also gave me an error and installing cdrkit solved the problem for me.

I am also tired of hearing of licensed things and all that, like when KDE was marked as the ugly duck because the licence of Qt, people just used to say that and do not give KDE a chance just because of that, at least I think that is a topic of the past.

Some people should be a little more open, if you do not accept software because it's licence is not GPL then you are not different from the Windows' users who are closed to say that Windows and Microsoft are everything and anything else is "bad and sucks".

Let us have more open minds and use things that solve our problems and if the neighbor uses a different tool then it's the neighbor live and let us keep going.
Top
Post Reply

12 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy