spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r392081 - /spamassassin/branches/3.1/spamd/spamd.raw
Date Thu, 06 Apr 2006 21:21:50 GMT
Author: dos
Date: Thu Apr  6 14:21:47 2006
New Revision: 392081

URL: http://svn.apache.org/viewcvs?rev=392081&view=rev
Log:
bug 3871: add option to spamd to specify group to run as

Modified:
    spamassassin/branches/3.1/spamd/spamd.raw

Modified: spamassassin/branches/3.1/spamd/spamd.raw
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/spamd/spamd.raw?rev=392081&r1=392080&r2=392081&view=diff
==============================================================================
--- spamassassin/branches/3.1/spamd/spamd.raw (original)
+++ spamassassin/branches/3.1/spamd/spamd.raw Thu Apr  6 14:21:47 2006
@@ -164,6 +164,7 @@
   'daemonize!'               => \$opt{'daemonize'},
   'debug|D:s'                => \$opt{'debug'},
   'd'                        => \$opt{'daemonize'},
+  'groupname|g=s'            => \$opt{'groupname'},
   'helper-home-dir|H:s'      => \$opt{'home_dir_for_helpers'},
   'help|h'                   => \$opt{'help'},
   'ident-timeout=f'          => \$opt{'ident-timeout'},
@@ -854,6 +855,10 @@
         die "spamd: cannot run as nonexistent user or root with -u option\n";
       }
 
+      if ( $opt{'groupname'} ) {
+        $ugid = getgrnam( $opt{'groupname'} ) || $ugid;
+      }
+
       $uuid =~ /^(\d+)$/ and $uuid = $1;    # de-taint
       $ugid =~ /^(\d+)$/ and $ugid = $1;    # de-taint
 
@@ -2208,6 +2213,7 @@
  -s facility, --syslog=facility     Specify the syslog facility
  --syslog-socket=type               How to connect to syslogd
  -u username, --username=username   Run as username
+ -g groupname, --groupname=groupname Run as groupname
  -v, --vpopmail                     Enable vpopmail config
  -x, --nouser-config                Disable user config files
  --auth-ident                       Use ident to authenticate spamc user
@@ -2443,6 +2449,12 @@
 
 Note: "--username=root" is not a valid option.  If specified, C<spamd> will
 exit with a fatal error on startup.
+
+=item B<-g> I<groupname>, B<--groupname>=I<groupname>
+
+Run as the named group if --username is being used. If this option is
+not set when --username is used then the primary group for the user
+given to --username is used.
 
 =item B<-x>, B<--nouser-config>, B<--user-config>
 



Mime
View raw message