From owner-freebsd-ports@FreeBSD.ORG Fri Jan 23 06:40:20 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3107116A4D0 for ; Fri, 23 Jan 2004 06:40:20 -0800 (PST) Received: from cerberus.apdata.com.au (cerberus.apdata.com.au [150.101.250.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32CB943D53 for ; Fri, 23 Jan 2004 06:40:10 -0800 (PST) (envelope-from davidh@apdata.com.au) Received: from localhost.apdata.com.au (localhost.apdata.com.au [127.0.0.1]) by cerberus.apdata.com.au (Postfix) with SMTP id 4507C36107; Sat, 24 Jan 2004 01:10:08 +1030 (CST) Received: from flanker.phoenix.apdata.com.au (Flanker.phoenix.apdata.com.au [192.168.6.2]) by cerberus.apdata.com.au (Postfix) with ESMTP id CA2BE36111; Sat, 24 Jan 2004 01:10:02 +1030 (CST) From: David Hunt Organization: Applied Data Control Pty. Ltd. To: jesse@gallup.com Date: Sat, 24 Jan 2004 01:10:03 +1030 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_DJTEAjYOGV69SrV" Message-Id: <200401240110.03758.davidh@apdata.com.au> X-Kavpostfix-Config: /etc/mail/kavpostfix.cfg X-Kavpostfix-Version: 2.019 X-Spam-Checked: This message probably not SPAM X-Spam-Score: -3.7, Required: 5 X-Complete-Junk: NO cc: ports@FreeBSD.org Subject: FreeBSD Port: p5-Net-Server-0.85 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2004 14:40:20 -0000 --Boundary-00=_DJTEAjYOGV69SrV Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi There Not being entirely sure how to apply the patchs to the port, for the uid failure with amavisd-new. Can you please tell me how I can apply the following 2 patches to the port. Amavisd-new error: an 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: 2004/01/24-01:08:55 Amavis (type Net::Server::PreForkSimple) starting! pid(2335) Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: Binding to UNIX socket file /var/amavis/amavisd.sock using SOCK_STREAM Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: Setting gid to "1004 1004" Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: Setting uid to "1004" Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: 2004/01/24-01:08:55 Couldn't become uid "1004"\n\n at line 479 in file /usr/local/lib/perl5/site_perl/5.005/Net/Server.pm Jan 24 01:08:55 gateway.internal.lawsoft.com.au amavisd[2335]: Net::Server: 2004/01/24-01:08:55 Server closing! Many thanks David H --Boundary-00=_DJTEAjYOGV69SrV Content-Type: text/x-diff; charset="us-ascii"; name="net-server.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="net-server.patch" --- Server.pm~ 2003-03-07 15:51:35.000000000 +0100 +++ Server.pm 2003-04-25 13:59:12.000000000 +0200 @@ -475,8 +475,10 @@ } }; if( $@ ){ - if( $< == 0 || $> == 0 ){ + if( $> == 0 ){ $self->fatal( $@ ); + } elsif( $< == 0){ + $self->log(2,"NOTICE: Effective UID changed, but Real UID is 0: $@"); }else{ $self->log(2,$@); } --- Server/Daemonize.pm~ 2002-09-24 20:55:15.000000000 +0200 +++ Server/Daemonize.pm 2003-04-25 13:58:16.000000000 +0200 @@ -204,8 +204,7 @@ die "Couldn't become uid \"$uid\"\n"; } my $result = POSIX::setuid( $uid ); - if( ! defined($result) - || $result != $uid ){ # assuming this is true for all systems + if( ! defined($result) ){ die "Couldn't POSIX::setuid to \"$uid\" [$!]\n"; } return 1; --Boundary-00=_DJTEAjYOGV69SrV Content-Type: text/x-diff; charset="us-ascii"; name="net-server.patch2" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="net-server.patch2" --- Server.pm~ Thu Nov 6 21:04:11 2003 +++ Server.pm Thu Nov 20 16:59:02 2003 @@ -480,7 +480,7 @@ if( $> == 0 ){ $self->fatal( $@ ); } elsif( $< == 0){ - $self->log(2,"NOTICE: Effective UID changed, but Real UID is 0: $@"); + $self->log(2,"WARNING: Effective UID changed, but Real UID is 0: $@"); }else{ $self->log(2,$@); } --- Server/Daemonize.pm~ Thu Nov 6 21:04:11 2003 +++ Server/Daemonize.pm Thu Nov 20 16:59:53 2003 @@ -199,7 +199,8 @@ ### change the process to run as this uid sub set_uid { my $uid = get_uid( shift() ); - $< = $> = $uid; + $< = $uid; # real UID, must be changed first on some systems (FreeBSD) + $> = $uid; # effective UID if( $< != $uid ){ die "Couldn't become uid \"$uid\"\n"; } --Boundary-00=_DJTEAjYOGV69SrV--