From owner-freebsd-perl@FreeBSD.ORG Fri Dec 17 13:39:27 2004 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF3DB16A4CE for ; Fri, 17 Dec 2004 13:39:27 +0000 (GMT) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [210.226.20.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0530043D2D for ; Fri, 17 Dec 2004 13:39:25 +0000 (GMT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by black.imgsrc.co.jp (Postfix) with ESMTP id EE58951356 for ; Fri, 17 Dec 2004 22:39:23 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [IPv6:2001:218:422:2::9999]) by black.imgsrc.co.jp (Postfix) with ESMTP id 81BF251370 for ; Fri, 17 Dec 2004 22:39:22 +0900 (JST) Date: Fri, 17 Dec 2004 22:39:22 +0900 Message-ID: <7macsd82np.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: perl@FreeBSD.org User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd 0.1 Subject: SpamAssassin spamd -u option X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2004 13:39:27 -0000 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 // IMG SRC, Inc. // FreeBSD Project