FS#67265 - [cdrtools] no suid bit in /usr/bin/cdrecord
Attached to Project:
Community Packages
Opened by Krzysztof Szpunar (szpunarek) - Monday, 13 July 2020, 14:27 GMT
Last edited by Jerome Leclanche (Adys) - Thursday, 12 November 2020, 11:59 GMT
Opened by Krzysztof Szpunar (szpunarek) - Monday, 13 July 2020, 14:27 GMT
Last edited by Jerome Leclanche (Adys) - Thursday, 12 November 2020, 11:59 GMT
|
Details
Description:
After last upgrading the cdrtools package (07.07.2020) brasero can't record CD images. brasero Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: |
This task depends upon
Closed by Jerome Leclanche (Adys)
Thursday, 12 November 2020, 11:59 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in -4.
Thursday, 12 November 2020, 11:59 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in -4.
Edit:
As the sed call deletes lines it should be in prepare() instead of build() so it is only executed once.
Just issue as root a "chmod 4711 cdrecord" to set it (in fact change from 0711 to 4711).
However, I am waiting also for a package fix, since the diff has already been supplied a month ago.
When would you consider fixing this?
It seems the fix is attached. Nothing consuming to do. I cannot use sudo as the files created are owned by root. If you do not fix it, then provide some help how to use cdda2wav now seamlessly. I just hate setting suid manually on /usr/bin/cdda2wav.
Thx for your time.
Gábor
Btw. it didn't work for me if I place the sed command as suggested in a prepare-section, and also not if I patch the install-sh directly, only sed in the build-section did it for me.
However, you can send a mail to Jerome to ask him, why he neither fix it with the attached patch, nor close the bug with a good reason. Actually we have the expression that nobody takes care of it.
But again, it does not really bother me since we have several working solutions for the problem.
I looked into this. Apparently some of the executables can run user content (not sure what). So libcap, which this depends on i.e. Linux Capabilities is a better way than suid. Indeed, when looking the source, it does use libcap, and it drops capabilities wheneven possible. So, I assume, when user content read and executed it is done with the least capabilities. Not sure what that "user content" might be, but this is superior to suid as the latter runs as root throughout. The source even tells us what "setcap" commands to run to make them usable. I clued myself up on Linux Capabilities, and, indeed, they make sense. Just "grep -r setcap" to find the commands.
Based on those I have made the attached patch and tested. I tested only cdda2wav as I have no CD to write, but this works like a charm.
I will ping Jerome to apply that.
[1] https://github.com/archlinux/svntogit-packages/blob/packages/shadow/trunk/shadow.install
I looked into this. Apparently some of the executables can run user content (not sure what). So libcap, which this depends on i.e. Linux Capabilities is a better way than suid. Indeed, when looking the source, it does use libcap, and it drops capabilities wheneven possible. So, I assume, when user content read and executed it is done with the least capabilities. Not sure what that "user content" might be, but this is superior to suid as the latter runs as root throughout. The source even tells us what "setcap" commands to run to make them usable. I clued myself up on Linux Capabilities, and, indeed, they make sense. Just "grep -r setcap" to find the commands.
Based on those I have made the attached patch and tested. I tested only cdda2wav as I have no CD to write, but this works like a charm.
I will ping Jerome to apply that.
Good idea. Too late now, but at worst at the weekend I will prep another patch along those lines.
Thx!