develooper Front page | perl.cvs.qpsmtpd | Postings from December 2005

[svn:qpsmtpd] r585 - trunk

From:
aqua
Date:
December 11, 2005 01:14
Subject:
[svn:qpsmtpd] r585 - trunk
Message ID:
20051211091420.18006.qmail@x1.develooper.com
Author: aqua
Date: Sun Dec 11 01:14:20 2005
New Revision: 585

Modified:
   trunk/qpsmtpd-forkserver
Log:
Merge r584 from 0.3x branch (drop root privs in forkserver before loading
plugins)


Modified: trunk/qpsmtpd-forkserver
==============================================================================
--- trunk/qpsmtpd-forkserver	(original)
+++ trunk/qpsmtpd-forkserver	Sun Dec 11 01:14:20 2005
@@ -132,7 +132,6 @@ if ($PID_FILE) {
 
 # Load plugins here
 my $qpsmtpd = Qpsmtpd::TcpServer->new();
-$qpsmtpd->load_plugins;
 
 # Drop privileges
 my (undef, undef, $quid, $qgid) = getpwnam $USER or
@@ -141,7 +140,6 @@ my $groups = "$qgid $qgid";
 while (my ($name,$passwd,$gid,$members) = getgrent()) {
     my @m = split(/ /, $members);
     if (grep {$_ eq $USER} @m) {
-	::log(LOGINFO,"$USER is member of group $name($gid)");
 	$groups .= " $gid";
     }
 }
@@ -152,6 +150,8 @@ POSIX::setuid($quid) or
       die "unable to change uid: $!\n";
 $> = $quid;
 
+$qpsmtpd->load_plugins;
+
 ::log(LOGINFO,"Listening on port $PORT");
 ::log(LOGINFO, 'Running as user '.
 	(getpwuid($>) || $>) .



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About