diff -c -r inn-2.3.1/doc/man/nnrpd.8 inn-2.3.1-modified/doc/man/nnrpd.8 *** inn-2.3.1/doc/man/nnrpd.8 Thu Jan 11 10:39:28 2001 --- inn-2.3.1-modified/doc/man/nnrpd.8 Wed Jan 31 20:43:35 2001 *************** *** 8,13 **** --- 8,16 ---- .BI \-b " address" ] [ + .BI \-c " configfile" + ] + [ .B \-D ] [ *************** *** 83,88 **** --- 86,102 ---- This has to be a valid Internet address in dotted-quad format belonging to an interface of the local host. + .TP + .B \-c + By default, + .I nnrpd + reads the + .I /readers.conf + to determine how to authenticate connections. The ``\-c'' flag + specifies an alternate file for this purpose in the same directory. + (This is useful to have several instances of + .I nnrpd + running on different ports or IP addresses with different settings.) .TP .B \-D If specified, this parameter causes diff -c -r inn-2.3.1/nnrpd/nnrpd.c inn-2.3.1-modified/nnrpd/nnrpd.c *** inn-2.3.1/nnrpd/nnrpd.c Thu Jan 11 10:39:38 2001 --- inn-2.3.1-modified/nnrpd/nnrpd.c Wed Jan 31 20:13:10 2001 *************** *** 758,763 **** --- 758,764 ---- UID_T NewsUID; int one = 1; FILE *pidfile; + char *AltConfigFile = NULL; struct passwd *pwd; int clienttimeout; #if HAVE_GETSPNAM *************** *** 788,796 **** if (ReadInnConf() < 0) exit(1); #ifdef HAVE_SSL ! while ((i = getopt(argc, argv, "b:Di:g:op:Rr:s:tS")) != EOF) #else ! while ((i = getopt(argc, argv, "b:Di:g:op:Rr:s:t")) != EOF) #endif /* HAVE_SSL */ switch (i) { default: --- 789,797 ---- if (ReadInnConf() < 0) exit(1); #ifdef HAVE_SSL ! while ((i = getopt(argc, argv, "b:c:Di:g:op:Rr:s:tS")) != EOF) #else ! while ((i = getopt(argc, argv, "b:c:Di:g:op:Rr:s:t")) != EOF) #endif /* HAVE_SSL */ switch (i) { default: *************** *** 802,807 **** --- 803,811 ---- if (ListenAddr == -1) ListenAddr = htonl(INADDR_ANY); break; + case 'c': /* alternate readers.conf */ + AltConfigFile = COPY(optarg); + break; case 'D': /* standalone daemon mode */ DaemonMode = TRUE; break; *************** *** 853,859 **** ACTIVE = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVE)); ACTIVETIMES = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVETIMES)); NEWSGROUPS = COPY(cpcatpath(innconf->pathdb, _PATH_NEWSGROUPS)); ! NNRPACCESS = COPY(cpcatpath(innconf->pathetc, _PATH_NNRPACCESS)); SPOOLlen = strlen(innconf->patharticles); if (DaemonMode) { --- 857,865 ---- ACTIVE = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVE)); ACTIVETIMES = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVETIMES)); NEWSGROUPS = COPY(cpcatpath(innconf->pathdb, _PATH_NEWSGROUPS)); ! NNRPACCESS = COPY(cpcatpath(innconf->pathetc, (NULL == AltConfigFile ! ? _PATH_NNRPACCESS ! : AltConfigFile))); SPOOLlen = strlen(innconf->patharticles); if (DaemonMode) { diff -c -r inn-2.3.1/nnrpd/perm.c inn-2.3.1-modified/nnrpd/perm.c *** inn-2.3.1/nnrpd/perm.c Thu Jan 11 10:39:38 2001 --- inn-2.3.1-modified/nnrpd/perm.c Wed Jan 31 20:18:59 2001 *************** *** 1205,1211 **** ConfigBit = NEW(char, ConfigBitsize); memset(ConfigBit, '\0', ConfigBitsize); } ! PERMreadfile(cpcatpath(innconf->pathetc, _PATH_NNRPACCESS)); strip_accessgroups(); --- 1205,1211 ---- ConfigBit = NEW(char, ConfigBitsize); memset(ConfigBit, '\0', ConfigBitsize); } ! PERMreadfile(NNRPACCESS); strip_accessgroups();