[Goodies-dev] xfce4-sensors-plugin: hddtemp not setuid message

Fabian Nowak timystery at arcor.de
Fri Feb 29 22:39:27 CET 2008


Am Dienstag, den 26.02.2008, 02:44 -0200 schrieb Mariano Besio:
> Hi people, I've just installed version sensors plugin 0.10.99.4 from
> Debian reps (please keep reading), which is based on svn revision 3775
> and the new plugin started to show a message each time its started
> saying that hddtemp is not being setuid root. The problem is that it
> seems to be setuid correctly and hddtemp can be executed as non-root

"Correct" (actually, setuid root is ugly):
-rwsr-xr-x 1 root root 26716 17. Feb 18:52 /usr/sbin/hddtemp


> user without any trouble. So I decided to look after the code of svn
> version to fix it and found that get_hddtemp_value routine has on line
> 299 a validation with the access function against 0. Looking at access
> man pages, shouldn't this value be -1? I think that this is causing
> the message to appear when the disk string is "/dev/fd".

No, it looks for being executable in general but returning invalid
stuff; so it comes to the conclusion that the SMARt sensor cannot be
polled due to missing permissions.


Anyway, did some changes in svn, you might want to check them and
whether it's working better. If not, it might be nice to give me the
return codes and output to stdout and stderr of running hddtemp on valid
and invalid devices both with sudo/setuid root and without.

Thanks and cheers,

Fabian




More information about the Goodies-dev mailing list