Index: doc/man/inn.conf.5 =================================================================== RCS file: /proj/cvs/isc/inn/inn/doc/man/inn.conf.5,v retrieving revision 1.126 diff -u -r1.126 inn.conf.5 --- doc/man/inn.conf.5 2005/04/11 18:25:22 1.126 +++ doc/man/inn.conf.5 2005/07/16 21:48:58 @@ -636,6 +636,13 @@ overview information slows down the overview commands, but reduces the number of \*(L"article is missing\*(R" errors seen by the client. This is a boolean value and the default is true. +.IP "\fInnrpdflags\fR" 4 +.IX Item "nnrpdflags" +When \fInnrpd\fR\|(8) is spawned from \fIinnd\fR\|(8), these flags are passed as +arguments to the nnrpd process. This setting does not affect instances +of nnrpd that are started in daemon mode, or instances that are started +via another listener process such as \fIinetd\fR\|(8) or \fIxinetd\fR\|(8). This is a +string value and the default is unset. .IP "\fInnrpperlauth\fR" 4 .IX Item "nnrpperlauth" This parameter is now obsolete; see \*(L"Changes to Perl Authentication Index: doc/man/nnrpd.8 =================================================================== RCS file: /proj/cvs/isc/inn/inn/doc/man/nnrpd.8,v retrieving revision 1.37 diff -u -r1.37 nnrpd.8 --- doc/man/nnrpd.8 2005/04/11 08:59:26 1.37 +++ doc/man/nnrpd.8 2005/07/16 21:48:58 @@ -159,6 +159,12 @@ connections. If you are instead running \fBnnrpd\fR with the \fB\-D\fR option, any configuration changes won't take effect until \fBnnrpd\fR is restarted. .PP +The \fIinn.conf\fR setting \fInnrpdflags\fR can be used to pass any of the +options below to instances of \fBnnrpd\fR that are spawned directly from +\&\fBinnd\fR. Many options only make sense when \fB\-D\fR is used, so these +options should not be used with \fInnrpdflags\fR. See also the discussion +of \fInnrpdflags\fR in \fIinn.conf\fR\|(5). +.PP When \fInnrpdloadlimit\fR in \fIinn.conf\fR is not 0, it will also reject connections if the load average is greater than that value (typically 16). \&\fBnnrpd\fR can also prevent high-volume posters from abusing your Index: doc/pod/inn.conf.pod =================================================================== RCS file: /proj/cvs/isc/inn/inn/doc/pod/inn.conf.pod,v retrieving revision 1.51 diff -u -r1.51 inn.conf.pod --- doc/pod/inn.conf.pod 2005/04/11 18:25:10 1.51 +++ doc/pod/inn.conf.pod 2005/07/16 21:48:58 @@ -571,6 +571,14 @@ overview information slows down the overview commands, but reduces the number of "article is missing" errors seen by the client. This is a boolean value and the default is true. + +=item I + +When nnrpd(8) is spawned from innd(8), these flags are passed as +arguments to the nnrpd process. This setting does not affect instances +of nnrpd that are started in daemon mode, or instances that are started +via another listener process such as inetd(8) or xinetd(8). This is a +string value and the default is unset. =item I Index: doc/pod/nnrpd.pod =================================================================== RCS file: /proj/cvs/isc/inn/inn/doc/pod/nnrpd.pod,v retrieving revision 1.9 diff -u -r1.9 nnrpd.pod --- doc/pod/nnrpd.pod 2005/04/11 08:59:26 1.9 +++ doc/pod/nnrpd.pod 2005/07/16 21:48:58 @@ -30,6 +30,12 @@ connections. If you are instead running B with the B<-D> option, any configuration changes won't take effect until B is restarted. +The F setting I can be used to pass any of the +options below to instances of B that are spawned directly from +B. Many options only make sense when B<-D> is used, so these +options should not be used with I. See also the discussion +of I in inn.conf(5). + When I in F is not 0, it will also reject connections if the load average is greater than that value (typically 16). B can also prevent high-volume posters from abusing your Index: include/inn/innconf.h =================================================================== RCS file: /proj/cvs/isc/inn/inn/include/inn/innconf.h,v retrieving revision 1.8 diff -u -r1.8 innconf.h --- include/inn/innconf.h 2004/06/09 22:04:34 1.8 +++ include/inn/innconf.h 2005/07/16 21:48:58 @@ -76,6 +76,7 @@ bool nfsreader; /* Use NFS reader functionality */ long nfsreaderdelay; /* Delay applied to article arrival */ bool nnrpdcheckart; /* Check article existence before returning? */ + char *nnrpdflags; /* Arguments to pass when spawning nnrpd */ long nnrpdloadlimit; /* Maximum getloadvg() we allow */ bool noreader; /* Refuse to fork nnrpd for readers? */ bool readerswhenstopped; /* Allow nnrpd when server is paused */ Index: innd/rc.c =================================================================== RCS file: /proj/cvs/isc/inn/inn/innd/rc.c,v retrieving revision 1.89 diff -u -r1.89 rc.c --- innd/rc.c 2005/04/14 06:48:02 1.89 +++ innd/rc.c 2005/07/16 21:48:58 @@ -13,6 +13,7 @@ #include "inn/innconf.h" #include "inn/network.h" +#include "inn/vector.h" #include "innd.h" #define TEST_CONFIG(a, b) \ @@ -386,9 +387,13 @@ void RChandoff(int fd, HANDOFF h) { - const char *argv[6]; + const char **argv; char buff[SMBUF]; - int i; + int i, j; + struct vector *flags; + + flags = vector_split_space(innconf->nnrpdflags, NULL); + argv = xmalloc( (flags->count + 6) * sizeof(char*) ); if (RCnnrpd == NULL) RCnnrpd = concatpath(innconf->pathbin, "nnrpd"); @@ -420,11 +425,17 @@ argv[i++] = "-t"; if (RCslaveflag) argv[i++] = RCslaveflag; + + for(j = 0; j < flags->count; j++) { + argv[i++] = flags->strings[j]; + } argv[i] = NULL; /* Call NNRP; don't send back a QUIT message if Spawn fails since * that's a major error we want to find out about quickly. */ Spawn(innconf->nicekids, fd, fd, fd, (char * const *)argv); + vector_free(flags); + free(argv); } Index: lib/innconf.c =================================================================== RCS file: /proj/cvs/isc/inn/inn/lib/innconf.c,v retrieving revision 1.16 diff -u -r1.16 innconf.c --- lib/innconf.c 2004/07/03 03:34:59 1.16 +++ lib/innconf.c 2005/07/16 21:48:58 @@ -203,6 +203,7 @@ { K(nfsreaderdelay), NUMBER (60) }, { K(nicenewnews), NUMBER (0) }, { K(nicennrpd), NUMBER (0) }, + { K(nnrpdflags), STRING ("") }, { K(nnrpdauthsender), BOOL (false) }, { K(nnrpdloadlimit), NUMBER (16) }, { K(nnrpdoverstats), BOOL (false) },