Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74762 - SUID support for radeontool 1.5 - would be nice to have in cvs :-)
Summary: SUID support for radeontool 1.5 - would be nice to have in cvs :-)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-17 10:13 UTC by Joël
Modified: 2005-03-12 07:12 UTC (History)
0 users

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


Attachments
New patch for radeontool-1.5 (radeontool-1.5.ebuild.diff,433 bytes, patch)
2004-12-18 07:57 UTC, Joël
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joël 2004-12-17 10:13:21 UTC
It allows screen blanking in user mode, when the "suid" USE flag is enabled.
Here's the patch:

--- /usr/portage/app-laptop/radeontool/radeontool-1.5.ebuild    2004-10-28 18:07:32.000000000 +0200
+++ radeontool-1.5.ebuild       2004-12-17 19:07:03.801228112 +0100
@@ -8,7 +8,7 @@
 LICENSE="ZLIB"
 SLOT="0"
 KEYWORDS="x86 ~amd64"
-IUSE=""
+IUSE="suid"
 DEPEND="sys-apps/pciutils"

 src_compile() {
@@ -19,3 +19,9 @@
        dobin radeontool
        dodoc CHANGES
 }
+
+pkg_postinst() {
+       if use suid; then
+               chmod u+s ${ROOT}/usr/bin/radeontool
+       fi
+}
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-12-17 23:19:03 UTC
please put patches as attachments.

Also I think the suid should be set in src_install.
Comment 2 Henrik Brix Andersen 2004-12-18 03:06:50 UTC
Why infest your system with another suid binary? Why not use 'sudo' for this?
Comment 3 Joël 2004-12-18 07:57:43 UTC
Created attachment 46268 [details, diff]
New patch for radeontool-1.5

Ok, I attached the new patch, which optionally sets SUID in src_install().

Note: The reason why I first did it in pkg_postinst(), is because
app-crypt/gringotts does it this way.
Comment 4 Joël 2004-12-18 08:02:09 UTC
Indeed, why not sudo ? Well there's the case when people launch radeontool from xscreensaver, to blank the LCD screen. In that case, the script (ie: lightwatch.pl) is launched with user priviledges..
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-18 08:09:06 UTC
WHy not use "xset dpms force off" for that? It works on my radeon card since I have Option "dpms" in my montior section in xorg.conf.
Comment 6 Joël 2004-12-18 12:40:30 UTC
Well, I've just tried "/usr/X11R6/bin/xset dpms force off" -- the screen goes black, but the LCD backlight stays on. I do have the proper dpms line in xorg.conf's monitor section.

When invoking "/usr/bin/radeontool light off", everything including the backlight, is powered off.
Comment 7 Henrik Brix Andersen 2004-12-27 08:49:56 UTC
I will not enable SUID in the radeontool ebuild since sudo works just fine for this. Closing as WONTFIX.
Comment 8 Joël 2005-03-12 06:18:46 UTC
Please have a look at comments #4 and #6 again - the reasons seem valid to me.
Thanks
Comment 9 Henrik Brix Andersen 2005-03-12 06:53:13 UTC
> Please have a look at comments #4 and #6 again - the reasons seem valid to me.

Of course they seem valid to you - you wrote them. I see no reason to introduce yet another SUID binary in the system, if you feel otherwise you can change the binary to SUID on your system.

This enhancement request is closed.
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2005-03-12 07:01:30 UTC
I think you should try to get that accepted by the author of the package.. if he agrees that his binary should be installed suid.. you have better chances to get it into portage. Or it enters portage automatically then with a version bump :)
Comment 11 Joël 2005-03-12 07:12:20 UTC
Thanks to both for your prompt response..

I understand your security concerns about SUID executables, and I apologize for having insisted.

The reason was, sudo can't help in non-interactive backlight powersaving situations. You gave me a good idea: I'll ask the author what better ways there could be.

Thanks again