On Tue, Apr 10, 2001 at 02:40:24PM -0700, Sean Chittenden wrote:
> Anyone know of any reasion why I shouldn't set the qmail-qread
> and qmail-qstat as setuid root? I've looked through the source, but
> am looking for a last confirmation or "don't do that." -sc
qmail-qstat is a shellscript. Making shellscripts suid is always
calling for trouble.
As for qmail-qread: suid qmails+sgid qmail is much better than suid
root, but let me read the code for a bit.
Basically, qmail-qread was not designed to be run suid. It sends
messages to stdout/stderr at will, risking tricks with fd's. It may
have other environmental dependencies that are not a problem in a
non-suid environment.
I wouldn't do it. How about just running it under tcpserver on
localhost and writing a small script that uses tcpclient to connect to
it? Much safer.
Greetz, Peter.