Date: Fri, 17 Dec 2004 22:39:22 +0900 From: Jun Kuriyama <kuriyama@imgsrc.co.jp> To: perl@FreeBSD.org Subject: SpamAssassin spamd -u option Message-ID: <7macsd82np.wl@black.imgsrc.co.jp>
next in thread | raw e-mail | index | archive | help
Hi,
I found using -u option with spamd does not work on my box. Current
spamd uses changing euid/uid like this:
$> = $uuid; # effective uid
$< = $uuid; # real uid. we now cannot setuid anymore
But changing effective uid from root to specified user causes
impossible to change real uid lator.
The problem of this is, when forked spamd child finishes first
process, effective uid is back to root, rather than keeping specified
user id.
On my box, this patch seems to work fine. How about adding this
patch? (and 3.0.2 was released, btw).
--- spamd/spamd.raw.orig Fri Dec 17 22:31:18 2004
+++ spamd/spamd.raw Fri Dec 17 22:31:36 2004
@@ -699,8 +699,8 @@
$( = $ugid; # real gid
# Change UID
- $> = $uuid; # effective uid
$< = $uuid; # real uid. we now cannot setuid anymore
+ $> = $uuid; # effective uid
if ( $> != $uuid and $> != ( $uuid - 2**32 ) ) {
die "fatal: setuid to uid $uuid failed\n";
}
--
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.
<kuriyama@FreeBSD.org> // FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7macsd82np.wl>
