[Pkg-dspam-misc] Bug#449530: /usr/bin/dspamc should be setgid, like /usr/bin/dspam

dAniel hAhler debian-bugs at thequod.de
Tue Nov 6 10:40:19 UTC 2007


Package: dspam
Version: 3.6.8-5
Severity: normal
Tags: patch

--- Please enter the report below this line. ---
The following bug has been reported in Ubuntu by Swâmi Petaramesh at 
https://launchpad.net/bugs/158136 - the report below is from him:

/usr/bin/dspamc file permissions should be the same as for /usr/bin/dspam 
(owned by dspam:dspam, setgid bit set) otherwise calling it as non-root 
causes it to complain it cannot read /etc/dspam/dspam.conf, and abort.

Both the "dspam" and "dspamc" binaries perform the same function : Check a 
message for being spam or not, and either one or the other is used by MTA or 
MDA (or any user on the system).
"dspam" can be run either one-shot or as a daemon. "dspamc" is actually just a 
lighter, stripped-down version of dspam (which means logically, more secure), 
that can only act as a client to "dspam" running in daemon mode.
Which means that one processes a message either with one-shot dspam (slow 
startup and databases opening), or with a dspam running as a daemon, sending 
messages to the lighter "dspamc" which is the client to the daemon.
"dspam" comes sgid dspam, "dspamc" should as well. There's no reason why the 
first would be and not the 2nd. With the current package, calling "dspam" 
will work for any user, where calling "dspamc" won't, which is abnormal (for 
dspamc will be unable to read its config file). Here' calling dspamc will 
work only for the users dspam or root, or for a user which is part of the 
dspam group. This is unfortunate as several users need to be able to call it 
(MTA, MDA, Apache from the dspam web interface), plus any system user whot 
may need to retrain messages or learn spam/ham corpus manually.
I don't see no issue putting "dspamc" sgid dspam where "dspam" already is. 
We're not talking of "suid root" here, and the dspam user has no specific 
overall rights on the system, just the right to access its own files..
I've used dspam for years now, so I believe I know quite well how it works ;-)

Calling "dspamc" is functionally equivalent to calling "dspam --client", but 
the dspamc binary is much lighter.

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.22-14-generic

Debian Release: lenny/sid

--- Package information. ---
Depends              (Version) | Installed
==============================-+-==============
procmail                       | 3.22-16ubuntu3
 OR sensible-mda               | 
libc6               (>= 2.6-1) | 2.6.1-1ubuntu10
libdspam7                      | 3.6.8-5ubuntu1
libldap2         (>= 2.1.17-1) | 2.1.30-13.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dspam-setgid-dspamc.diff
Type: text/x-diff
Size: 912 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20071106/c4dd5fdd/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20071106/c4dd5fdd/attachment-0001.pgp 


More information about the Pkg-dspam-misc mailing list