I have tried :
-r-x--s--- 1 dspam dspam 91576 2006-12-24 11:06 /usr/bin/dspam

But I get exactly the same problem: nothing happens when I sudo 'dspam'...

I also tried creating a simple script that displays the current user (whoami), same permissions :

-r-x--s--- 1 dspam dspam 177 2007-03-30 15:22 test

RESULT:
tetivps:~# cat test.mail | sudo -u dspam ./test --user gaspard.tetivps.net --debug
*************************************
***** [Fri Mar 30 15:26:31 +0200 2007] user is dspam
*************************************

The script runs fine...

So what is wrong with dspam ? Is there any log I could read or a possibility to have error output on stdin ? dspam just returns -1 without any notice...

Gaspard

gaspard bucher wrote, on 30. mar 2007 14:47:

I know it must be very simple to solve, but I have been trying for days, pulling my hair off. When running the following from the command line (debian etch, dspam 3.6.8-5), it works sudo 'root' but not 'dspam' : THIS PRODUCES NO OUTPUT, NADA, NIET (/var/log/dspam/dspam.debug = nada) cat test.mail | sudo -u dspam /usr/bin/dspam --user gaspard.tetivps.net --debug
THIS WORKS FINE
cat test.mail | sudo -u root /usr/bin/dspam --user gaspard.tetivps.net --debug
why ??
Many thanks for your help.

Have a look at the permissions on your dspam binary; Jonathan doesn't (and most security people, of which I'm one) don't like suid/sgid perms, but I've run dspam g+s for a l o n g time without being attached by Martians:

1468 [root:tru.leerlingen] /usr/lib # l /usr/bin/dspam
-r-x--s---  1 root root 371906 Mar 20 09:59 /usr/bin/dspam

--Tonni

--
Tony Earnshaw
Email: tonni at hetnet dot nl

Reply via email to