diff -Nacr inn-2.1/CONTRIBUTORS inn-2.2/CONTRIBUTORS *** inn-2.1/CONTRIBUTORS Fri Jul 24 13:13:00 1998 --- inn-2.2/CONTRIBUTORS Thu Jan 21 11:01:07 1999 *************** *** 26,32 **** Wrote the too-many-connects support ('-X -H -T' flags to innd). Landon Curt Noll: ! Wrote or cwo-wrote actsync, nntpsend, shrinkfile, innstat, news.daily, tally.control and misc man pages. He also was the person originally behind the site directory configuration/installation process. --- 26,32 ---- Wrote the too-many-connects support ('-X -H -T' flags to innd). Landon Curt Noll: ! Wrote or co-wrote actsync, nntpsend, shrinkfile, innstat, news.daily, tally.control and misc man pages. He also was the person originally behind the site directory configuration/installation process. *************** *** 90,96 **** as changes were made. Did a large amount of man page documentation and clean up. - Russell Vincent Expanded inn.conf to make many of the old compile time options into run time variables. Numerous bug fixes, small feature --- 90,95 ---- *************** *** 103,108 **** --- 102,113 ---- Steve Carrue: Modified nnrpd to allow detailed client tracking. + Adian Cully + Provided the patches to support the new storage.conf format. + Added the storage method selection to also be based + on Expires header. Also added the '@' article exclusion code to + incoming.conf. + Also: Dave Barr: *************** *** 118,125 **** Joshua M. Thompson Wrote the INSTALL documentation. ! The following people helped above and beyond the call of duty with ! testing (provided patches, bug reports, suggestions etc): Paul Vixie, Robert Elz, Evan Champion, Robert Keller, Barry Bouwsma, markd@mira.net.au, Ollivier Robert, Kevin Jameson, Heiko W. Rupp, Fletcher --- 123,130 ---- Joshua M. Thompson Wrote the INSTALL documentation. ! The following people helped above and beyond the call of duty with testing ! (provided patches, bug reports, suggestions and lobbying) Paul Vixie, Robert Elz, Evan Champion, Robert Keller, Barry Bouwsma, markd@mira.net.au, Ollivier Robert, Kevin Jameson, Heiko W. Rupp, Fletcher *************** *** 130,133 **** Lofstedt, Dan Ellis, Joe Ramey, Odd Einar Aurbakken, Jon Lewis, Dan Riley, Peter Eriksson, Ken Lalonde, Sven Paulus, Koichi Mouri, J. Richard Sladkey, Trine Krogstad, Holger Burbach, Per Hedeland, Larry Rosenman, ! Andrew Burgess, Michael Brunnbauer, mki@primenet.com --- 135,139 ---- Lofstedt, Dan Ellis, Joe Ramey, Odd Einar Aurbakken, Jon Lewis, Dan Riley, Peter Eriksson, Ken Lalonde, Sven Paulus, Koichi Mouri, J. Richard Sladkey, Trine Krogstad, Holger Burbach, Per Hedeland, Larry Rosenman, ! Andrew Burgess, Michael Brunnbauer, mki@primenet.com, Robert R. Collier, ! Mark Hittinger diff -Nacr inn-2.1/ChangeLog inn-2.2/ChangeLog *** inn-2.1/ChangeLog Thu Jan 1 00:00:00 1970 --- inn-2.2/ChangeLog Thu Oct 22 07:36:40 1998 *************** *** 0 **** --- 1,2033 ---- + Wed Oct 21 23:12:40 1998 Katsuhiro Kondou + + * samples/innreport_inn.pm: samples/innreport_inn.pm: + - fixed article stats calculation problem + + Wed Oct 21 22:09:58 1998 Clatyon O'Neill + + * include/innconf.h: Fixed config variable entry for nnrpperlauth + + * storage/cnfs/cnfs.c: + Doh, I didn't declare lastupdate to be static so it was rereading the + cycbuff headers everytime that CNFSArtMayBeHere() was called. + + Wed Oct 21 15:13:31 1998 David C Lawrence + + * obsolete/innshellvars.csh.in, samples/Attic/innshellvars.csh.in: + innshellvars.csh.in moved from samples to obsolete. + Per email with James Brister, Katsuhiro Kondou and David Lawrence + + Wed Oct 21 14:12:29 1998 Clatyon O'Neill + + * storage/cnfs/cnfs.c: + Changed CNFSArtMayBeHere to consider cycbuff headers to be stale if more + than 30 sec has elapsed instead of after 1000 calls. This makes a big + difference with nnrpd in daemon mode with SM_preopen. W/o this new articles + don't show up unless the client xover's or retrieves 1000 articles. + + Wed Oct 21 13:54:07 1998 David C Lawrence + + * samples/control.ctl: relcom.* is now PGP signed. + + Wed Oct 21 07:34:31 1998 James Brister + + * site/Makefile: + Added news2mail (and its sample cf file) pullnews and mailpost + Changed installation permission of the shellvars scripts to include + world-read. + + * nnrpd/Makefile: Fixed library ordering in build of nnrpd and actived. + + * innd/icd.c: + Changed second argument of 2-arg msync to active file size from 0 (bsd/os + 2.1 kept falling over). + + * doc/inn.conf.5: + Include note about pathtmp needing to be on the same partition as + the incoming spool directory (or else inews will break when spooling). + + * doc/Makefile: + Include new man files news2mail.8 pullnews.8 mailpost.8 in the processing + + * NEWS: Description of differences from version to next. + + * configure, configure.in: + Added new programs mailpost, new2mail and pullnews to the processed + files. + + * samples/news2mail.cf: Sample config file for news2mail + + * samples/pullnews.in: suck'ing feed perl script. + + * samples/news2mail.in: News to email gateway. + + * samples/mailpost.in: Email to news gateway. + + * doc/news2mail.8, doc/pullnews.8, doc/mailpost.8: + Man pages for new programs. + + Mon Oct 19 15:16:19 1998 James Brister + + * CONTRIBUTORS, README: 2.2 preparation. + + Mon Oct 19 09:19:28 1998 Katsuhiro Kondou + + * samples/version.pl.in, samples/sendme.pl.in, samples/sendsys.pl.in, samples/senduuname.pl.in, samples/controlchan.in, samples/ihave.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: Fluffy + - small patch for nonstandard mailers + + * README.perl_hook: README.perl_hook: + - add description of nnrpd_auth.pl + + Sun Oct 18 23:44:19 1998 Katsuhiro Kondou + + * samples/inn.conf.in: samples/inn.conf.in: + - sample (default) entry for nnrpperlauth is added + + * doc/inn.conf.5: doc/inn.conf.5: + - description of nnrpperlauth is added. + + Sun Oct 18 19:11:39 1998 David C Lawrence + + * site/Makefile: Removed bogus reference to doactsync. + + * samples/Attic/innshellvars.csh.in: Added inn_getftp variable. + + * site/Makefile: + Fixed my own boneheaded mismatch of a { opening brace with a ) closing paren. + + Sat Oct 17 01:07:28 1998 David C Lawrence + + * samples/innshellvars.tcl.in, samples/mod-active.in, samples/simpleftp.in, site/Makefile, backends/actsyncd.sh.in, samples/actsync.cfg.in, samples/innshellvars.in, samples/innshellvars.pl.in, configure, configure.in, MANIFEST: + This set of changes all has to do with enabling support for getting + ftp://ftp.isc.org/pub/usenet/CONFIG/active file for managing the + active file. Specifically: + + MANIFEST: lists new file in samples: mod-active.in and simpleftp.in + configure.in: Look for ncftp or wget for fetching active file + simpleftp.in: Used if neither ncftp nor wget is found. + innshellvars*: $GETFTP is ncftp, wget or simpleftp + actsyncd.sh.in: Support either ftp or nntp retrieval of remote active file + actsync.cfg.in: Use ftp://ftp.isc.org/pub/usenet/CONFIG/active by default + mod-active.in: process actsync or checkgroups output efficiently, performing + all newgroup/rmgroup/changegroup in one innd pause/edit/reload action. + site/Makefile: install mod-active and simpleftp + + Thu Oct 15 23:24:02 1998 Katsuhiro Kondou + + * configure, configure.in: configure.in: + configure: + - From: Aidan Cully + - On NetBSD, the command line to check for the necessary perl ldopts + gives me this: + Note (probably harmless): No library found for -ldb + -L/usr/local/lib /usr/local/lib/perl5.004/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5.004/CORE -lperl -lm -lc -lcrypt + + This is kind of a pissy thing to put in the Makefile.global.. + + Thu Oct 15 19:51:30 1998 David C Lawrence + + * samples/control.ctl: updated control message sender of ukr.* + + Thu Oct 15 01:59:38 1998 Clatyon O'Neill + + * nnrpd/commands.c, nnrpd/nnrpd.c: + - Fixed it so that nnrpd will compile if compiling w/o perl. + Startconnection and CMDauthinfo were assuming that you compiled with + --with-perl + + * nnrpd/post.c, nnrpd/group.c, nnrpd/misc.c, nnrpd/nnrpd.h, nnrpd/article.c: + - XOVER's no long require 2 calls to dbzfetch if you're running with + extendeddbz turned on. + + - Cleaned up a few more isxxx() calls and a few printf("%ld", int)'s + + - Reworked HISgetent so that it makes a little bit more sense. It looks + like the "flag" parameter was being used for about 3 different things and it + was _incredibly_ confusing. It appears to work with storage api, but I'm + not convinced it works for traditional spool. As a side note, the XPATH + command appears to be completely broken and probably should be removed. + + Wed Oct 14 17:26:19 1998 David C Lawrence + + * samples/signcontrol.in: + added simple comments about why particular headers are signed + + made error messages a tad more helpful for situations when it is hard + to know what message was trying to be signed (such as via an "at" job) + + ensure headers from @ignoreheaders are not in output, even if present + in @orderheaders. + + some minor cleanups. + + Wed Oct 14 05:38:59 1998 Katsuhiro Kondou + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - pagefudge calculation was incorrect. + + Tue Oct 13 23:17:53 1998 Clatyon O'Neill + + * samples/nnrpd_auth.pl.in, nnrpd/article.c, innd/his.c, lib/dbz.c, include/configdata.h, include/dbz.h, expire/expireindex.c, backends/actsync.c, backends/batcher.c, backends/innxmit.c: + - Fixed dbz.c so that the structures are packed again like they should be. + Just for future reference, don't change this unless you've got a damn good + reason. This makes about a 10-20% difference in the size of the + history.index file. + + - More gcc -Wall cleanups + + - Fixed a few places that had long or int instead of OFFSET_T. + + - changed the default for OFFSET_T to off_t + + * nnrpd/Makefile: Fixed nnrpd so that profiling works. + + Tue Oct 13 14:22:22 1998 Katsuhiro Kondou + + * samples/controlchan.in: samples/controlchan.in: + - From: Fluffy + - This makes the named-pipe syslog stuff only be tried if the host + system is running linux. + + The test for INN::Syslog is for a more portable version of the + module I'm working on. + + Tue Oct 13 14:07:35 1998 Clatyon O'Neill + + * expire/makehistory.c, expire/newsrequeue.c, expire/expireindex.c, expire/expireover.c, expire/fastrm.c, expire/makeactive.c, expire/convdate.c, expire/expire.c: + - Converted a couple of int references to OFFSET_T + + - More gcc -Wall warning cleanup + + * storage/timehash/timehash.c, storage/cnfs/cnfs.c, storage/interface.c: + More clean up of gcc -Wall warnings + + * lib/hash.c, lib/inndcomm.c, lib/parsedate.y, lib/perl.c, lib/reservedfd.c, lib/conffile.c, lib/dbz.c: + Cleanup of libinn to prevent warnings with gcc -Wall. Still a few left. + + * configure.in, configure: + Converted configure to only use largefile support if the user specifies + --with-largefiles on the command line. Right now still only supported with + CNFS. + + * samples/cnfsstat.in: + Changed cnfsstat so that it will remove nulls from the name of a spool + object before printing them. + + * configure.in, storage/cnfs/Makefile, configure, Makefile.global.in: + Added support to configure to autodetect an environment that supports + largefiles ala Unix98 and build CNFS with largefile support if there is + support. At some point we need to make this true for the entire tree, or at + least make it an option for the entire tree. + + * nnrpd/nnrpd.h: + - Added a perl hook for authentication into nnrpd. If inn.conf variable + 'nnrpperlauth' is true then nnrp.access is bypassed and the perl function + 'authenticate' is called. See the example program 'nnrpd_auth.pl' for more + info. + + - Removed PERMdefault since it was impossible to set it to anything but + false. + + Forgot to commit this the first time. + + * site/Makefile, nnrpd/misc.c, nnrpd/nnrpd.c, nnrpd/perl.c, nnrpd/post.c, nnrpd/actived.c, nnrpd/commands.c, nnrpd/group.c, include/paths.h.in, lib/getconfig.c, include/innconf.h, include/libinn.h: + - Added a perl hook for authentication into nnrpd. If inn.conf variable + 'nnrpperlauth' is true then nnrp.access is bypassed and the perl function + 'authenticate' is called. See the example program 'nnrpd_auth.pl' for more + info. + + - Removed PERMdefault since it was impossible to set it to anything but + false. + + * lib/cleanfrom.c: + Fixed a problem where nnrpd would go into an infinite loop if someone posted + with a From: line that had mismatched parentheses. + + Sun Oct 11 23:04:50 1998 Katsuhiro Kondou + + * samples/newgroup.pl.in, samples/rmgroup.pl.in: + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + - Error log was logged to notice + + Fri Oct 9 17:23:36 1998 Katsuhiro Kondou + + * samples/version.pl.in, samples/sendme.pl.in, samples/sendsys.pl.in, samples/senduuname.pl.in, samples/checkgroups.pl.in, samples/controlchan.in, samples/ihave.pl.in: + samples/checkgroups.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - To: inn-patches@isc.org + - Okay, so FreeBSD doesn't like for perl to have signal handler to + clean up after child processes. I ripped out the handler and + instead have a waitpid() after each open2() call. Bleah. + + There's also a fix to let syslog work under linux, the lib dir gets + grabbed up front in a variable so that there doesn't need to be a + hard-coded path in checkgroups.pl, and a couple other changes to + accommodate older INN versions are in there that shouldn't matter to + current. + + * innd/chan.c: innd/chan.c: + - From: Sang-yong Suh + - I found another buglet introduced by inn-1.5 and still undiscovered. + It's bp->Left in CHANreadtext() of chan.c. + I agree the idea. However, I want to read as many bytes as possible + if I am receiving the article text. Therefore I'd like to limit the + read size only when the channel is in CSgetcmd. + + * nnrpd/group.c: nnrpd/group.c: + - From: STEVEN_GILLARD@HP-Australia-om1.om.hp.com + - If a group has an empty overview index file, the GRPscandir routine + will open the file but never close it. + + Thu Oct 8 22:43:09 1998 Katsuhiro Kondou + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - needs to check to see if madvise() is available + + * innd/cc.c, innd/innd.h: innd/cc.c: + - From: Sang-yong Suh + - I often use ``ctlinnd xexec inndstart'' to restart innd. + However, I noticed that fd is leaking. + innd/innd.h: + - From: Sang-yong Suh + - Obviously, CHANnull expects the variable ``fd'' as the third value. + + Thu Oct 8 16:39:25 1998 Clatyon O'Neill + + * storage/cnfs/cnfs.c: + - CNFS method will now issue a MADV_SEQUENTIAL before reading the article if + the host system defines MADV_SEQUENTIAL + + - If the path in the cycbuff and the actual path mismatch log the error, but + don't consider it to be fatal. + + Wed Oct 7 07:22:13 1998 Katsuhiro Kondou + + * samples/newgroup.pl.in: samples/newgroup.pl.in: + - From: Fluffy + - fixed syntax erorr + + Tue Oct 6 14:25:32 1998 James Brister + + * expire/makeactive.c, backends/actsync.c, backends/innxmit.c, nnrpd/group.c, innd/ng.c, lib/hash.c: + Some minor lint removal + + Tue Oct 6 05:00:56 1998 Katsuhiro Kondou + + * backends/inndf.c: backends/inndf.c: + - include "clibrary.h" (some system claims optind is not defined) + + Mon Oct 5 23:14:24 1998 Katsuhiro Kondou + + * configure: configure: + - recreate configure with updated configure.in by tale + + * storage/qio.c: storage/qio.c: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This should fix the overview corruption some people see with + traditional overview because the buffer size is too small. + + * samples/sendsys.pl.in, samples/senduuname.pl.in, samples/version.pl.in, samples/newgroup.pl.in, samples/rmgroup.pl.in, samples/sendme.pl.in, samples/checkgroups.pl.in, samples/controlchan.in, samples/ihave.pl.in: + samples/checkgroups.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: fluffy@meow.org (Fluffy) + - There is a very important security fix here, plus a bunch of smaller + cleanup work. + + Sun Oct 4 10:45:46 1998 James Brister + + * frontends/rnews.c: New -r flag to specifiy the remote host. + + * doc/rnews.1: Document new -r flag. + + Fri Oct 2 18:01:09 1998 David C Lawrence + + * INSTALL: Updated comment about perl as a required package. + Added comment about GNU Make as a possibly required package. + + * configure.in: + Commented out check for perl5.004 in configure; should not be necessary + for building. We may want to re-enable the code to verify something like + embedded perl, or warn about auxiliary programs. + + * storage/buildconfig: + Remove requirement for perl5.003. Now perl4 compatible. + + Fri Oct 2 01:50:46 1998 Katsuhiro Kondou + + * samples/cnfsstat.in, samples/rc.news.in: samples/cnfsstat.in: + - From: Robert Collier + - I include here an updated version of cnfsstat[1], it adds two more + options that allow it to be used as an external program from mrtg, + and to generate a suitable mrtg.conf from your configuration files. + samples/rc.news.in: + - '-a' for 'cnfsstat -s' is useless + + * doc/cnfsstat.8: doc/cnfsstat.8: + - update for Robert's patch + + Mon Sep 28 23:06:29 1998 Katsuhiro Kondou + + * samples/version.pl.in, samples/rmgroup.pl.in, samples/sendme.pl.in, samples/sendsys.pl.in, samples/senduuname.pl.in, samples/controlchan.in, samples/ihave.pl.in, samples/newgroup.pl.in, samples/checkgroups.pl.in: + samples/checkgroups.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: Fluffy + - Following are patches against the scripts as distributed in the last + few snapshots. They could use some more exercise to make sure that + all possible places for tainted data to sneak in are covered. + + * doc/Makefile: doc/Makefile: + - cnfsstat.8 and controlchan.8 are added + + * doc/cnfsstat.8, doc/controlchan.8, doc/cycbuff.conf.5: + doc/cnfsstat.8: + doc/controlchan.8: + - add undocumented scripts + doc/cycbuff.conf.5: + - storage.ctl is not used already + + * MANIFEST: MANIFEST: + - add doc/cnfsstat.8 and doc/controlchan.8 + + Fri Sep 25 04:10:49 1998 Katsuhiro Kondou + + * nnrpd/article.c: nnrpd/article.c: + - don't close overview data until next 'group' is issued (for non- + storageapi) + + * expire/expireindex.c: expire/expireindex.c: + - From: "Wyer, Brett" + - I don't claim to be a C programmer, but the fix seemed fairly clear + once I looked at the code a bit for the prior post I put up. After + applying the fix, I was able to rebuild my news overview database + from scratch. Apparently my problem with overview corruption is not + too terribly common, or most people having to do rebuilds don't have + overviewmmap turned off--otherwise this would have shown up much + sooner. + + Thu Sep 24 23:56:46 1998 Katsuhiro Kondou + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - From: sfp@aplcomm.jhuapl.edu (Steve Parr) + - Two other Makefile questions. storage/buildconfig in the + distribution is much older than storage/buildconfig.in. Should a + make clobber be removing it? And in older versions, you could do a + make update from the top level and it would do a make install in all + subdirs except site where it would do a make update. It no longer + does the make update in site. Is that intended? + + * storage/buildconfig.in: storage/buildconfig.in: + - From: sfp@aplcomm.jhuapl.edu (Steve Parr) + - Two other Makefile questions. storage/buildconfig in the + distribution is much older than storage/buildconfig.in. Should a + make clobber be removing it? And in older versions, you could do a + make update from the top level and it would do a make install in all + subdirs except site where it would do a make update. It no longer + does the make update in site. Is that intended? + + * site/Makefile: site/Makefile: + - cnfsstat is added + + * contrib/Attic/cnfsstat.pl: contrib/cnfsstat.pl: + - cnfsstat.pl is moved to samples/cnfsstat + + * samples/rc.news.in, samples/cnfsstat.in, samples/inn.conf.in: + samples/cnfsstat.in: + - newly added + samples/inn.conf.in: + - docnfsstat is added + samples/rc.news.in: + - invoke cnfsstat if docnfsstat is true + + * nnrpd/nnrpd.c, nnrpd/misc.c: nnrpd/misc.c: + nnrpd/nnrpd.c: + - From: sfp@aplcomm.jhuapl.edu (Steve Parr) + - Here are some patches I made to the INN snapshot of 9/12. The most + significant one being the SIGCHLD handling of nnrpd in daemon mode. + Without the patch, postings to moderated groups get mailed but the + mail process gets reaped before nnrpd can check for errors and so + nnrpd says the posting may have failed. Since some clients + automatically retry the posting, this results in repeated mailings to + moderators. + + * doc/inn.conf.5: doc/inn.conf.5: + - docnfsstat is added + + * configure, configure.in, MANIFEST: MANIFEST: + configure.in: + configure: + - contrib/cnfsstat.pl is moved to samples/cnfsstat.in + + Wed Sep 23 13:27:24 1998 Dave Barr + + * samples/controlchan.in: + SECURITY: change system() call to be a list so /bin/sh is not called + + Wed Sep 23 07:30:58 1998 Katsuhiro Kondou + + * nnrpd/article.c: nnrpd/article.c: + - oops! nnrpdcheckart was not used for calling IsCancelled() + + * nnrpd/article.c: nnrpd/article.c: + - nnrpdcheckart was not used for xover + + * samples/controlchan.in: samples/controlchan.in: + - From: Fluffy + - You want protection? We got protection. I've gone a bit overboard + with the excluded characters, so adjust to taste. What this does is + prevent controls with "interesting" characters from being passed to + external procedures at all. + + * doc/expire.8: doc/expire.8: + - reflect Marc's comment(explain exception of remember line for self + expire) + + * contrib/format_overview.pl, contrib/Attic/cnfsstat.pl, contrib/count_overview.pl: + contrib/cnfsstat.pl: + - From: Kjetil Torgrim Homme + - I took Andreas Lamprecht's cnfsstat.pl and updated it to INN 2.1 + (ie. storage.conf, not storage.ctl). I also added an "-a" switch so + that it will report the approximate age of the oldest article in each + cycbuff, and modified the output format a little. + contrib/count_overview.pl: + - From: "Ronald A. Jarrell" + - This script breaks apart the overview record and pulls the xref + entries, and counts them. I intend, when I get a chance, to automate + it a little more, by allowing you to just specify a number, instead + of the overview file itself, and by having it look up in overview.ctl + what should be in the file, and not display the groups outside that + range. But this only took 10 mintues, and serves its purpose. + contrib/format_overview.pl: + - From: "Ronald A. Jarrell" + - I've found this next script makes life a LOT easier in managing + the format, and moving the damn numbers around. I just strip + all all the index numbers, and add in what group I need. When I'm + done, I feed it all to a sort -n, and quickly double check that + the alphabetic sort did order them properly (generally it should, + but I'm paranoid). Then I feed that list to this mindless + script. All of the above is quite trivial to do while still in + vi by doing a lot of :%!whatever's... + + * include/config.h.in: include/config.h.in: + - check getopt.h + + * backends/inndf.c: backends/inndf.c: + - check getopt.h + + * configure, MANIFEST, configure.in: MANIFEST: + - From: "Ronald A. Jarrell" + - add contrib/count_overview.pl contrib/format_overview.pl + configure.in: + configure: + - check getopt.h + + Tue Sep 22 06:51:24 1998 Katsuhiro Kondou + + * samples/controlchan.in: samples/controlchan.in: + - From: Fluffy + - > I don't see any check for a valid Reply-To address, so a string + > like xx';rm -rf /;'xx would cause lots of damage... + This is eliminated by adding a couple lines to CleanAddy + + Mon Sep 21 01:47:44 1998 Katsuhiro Kondou + + * lib/cleanfrom.c: lib/cleanfrom.c: + - Reported by "Pavel Gulchouck" + - Look into lib/cleanfrom.c. It takes only first line from folded + header field, and it thinks that all between first LPAREN and last + RPAREN are comments. :-( + + Sun Sep 20 13:25:08 1998 Katsuhiro Kondou + + * samples/controlbatch.in: samples/controlbatch.in: + - From: Fluffy + - Just a couple typos and forgotten bits, no showstoppers. + + * samples/innwatch.in: samples/innwatch.in: + - From: noroi@mob.or.jp (IKEDA Kenji) + - evaluating shell variables in a smart way + + Sat Sep 19 03:13:46 1998 Katsuhiro Kondou + + * samples/innwatch.in: samples/innwatch.in: + - From: noroi@mob.or.jp (IKEDA Kenji) + - ${LIM} included ${INNWATCH*} itself + + * storage/interface.c: storage/interface.c: + - if article which has Expires header but expire is not defined in + storage.conf, it may not be stored. + + * samples/innwatch.in: samples/innwatch.in: + - fixed syntax error + + Thu Sep 17 22:10:30 1998 Katsuhiro Kondou + + * backends/inndf.c: backends/inndf.c: + - From: "Igor Timkin" + - FreeBSD 3.0 have definition of getopt in unistd.h. + + - From: "Edward S. Marshall" + - This should solve the problem in a much more portable manner (works + on Linux, Solaris 2.x, FreeBSD, Digital UNIX, HP-UX, and (I think) + SunOS; I needed to do this for another project I wrote which used + getopt). + + * nnrpd/nnrpd.c: nnrpd/nnrpd.c: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This patch removes the HAVE_SHADOW stuff from + config/config.scoreboard. It is replaced by a configure test for + getspnam() and -lshadow. + + If nnrpd is run in standalone mode, it tries to add itself to the + supplimentary group "shadow" (configurable) before changing uid/gid. + This way, nnrpd is still able to access the shadow file read-only on + many systems. + + * include/configdata.h, include/config.h.in: include/config.h.in: + include/configdata.h: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This patch removes the HAVE_SHADOW stuff from + config/config.scoreboard. It is replaced by a configure test for + getspnam() and -lshadow. + + If nnrpd is run in standalone mode, it tries to add itself to the + supplimentary group "shadow" (configurable) before changing uid/gid. + This way, nnrpd is still able to access the shadow file read-only on + many systems. + + * doc/nnrp.access.5, doc/nnrpd.8: doc/nnrp.access.5: + doc/nnrpd.8: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This patch removes the HAVE_SHADOW stuff from + config/config.scoreboard. It is replaced by a configure test for + getspnam() and -lshadow. + + If nnrpd is run in standalone mode, it tries to add itself to the + supplimentary group "shadow" (configurable) before changing uid/gid. + This way, nnrpd is still able to access the shadow file read-only on + many systems. + + * configure, configure.in: configure.in: + configure: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This patch removes the HAVE_SHADOW stuff from + config/config.scoreboard. It is replaced by a configure test for + getspnam() and -lshadow. + + If nnrpd is run in standalone mode, it tries to add itself to the + supplimentary group "shadow" (configurable) before changing uid/gid. + This way, nnrpd is still able to access the shadow file read-only on + many systems. + + * config/config.scoreboard: config/config.scoreboard: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - This patch removes the HAVE_SHADOW stuff from + config/config.scoreboard. It is replaced by a configure test for + getspnam() and -lshadow. + + If nnrpd is run in standalone mode, it tries to add itself to the + supplimentary group "shadow" (configurable) before changing uid/gid. + This way, nnrpd is still able to access the shadow file read-only on + many systems. + + * storage/interface.c: storage/interface.c: + - From: Olaf Titz + - Selecting on "expires" in storage.conf fails for two reason: + 1. Parsing of the argument confuses d, h, m, s suffixes. + 2. parsedate() wants a null-terminated string, so we have to copy + here. I have replaced Now.time by time(0) because, for reasons I + don't know, parsedate left a 0 in Now.time when I was testing this + changed routine. + + * nnrpd/group.c: nnrpd/group.c: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - If nnrpd is running on traditional spool and "nnrpdcheckart" is true, + XHDR/XPAT can take a loooong time in for example alt.2600, because + the lowest article according to GRPscandir() is 414. + + This patch limits the articles reported by GRPscandir to the + range according to the active file. My news server finally has a + low load and people can read alt.2600 again ;) + + * nnrpd/group.c: nnrpd/group.c: + - xgtitle didn't work + + * samples/sendbatch.in, samples/innstat.in, samples/innwatch.ctl.in, samples/innwatch.in, samples/innshellvars.in, samples/innshellvars.pl.in, samples/innshellvars.tcl.in, samples/Attic/innshellvars.csh.in, samples/inn.conf.in, samples/inncheck.in: + samples/inn.conf.in: + samples/inncheck.in: + samples/innshellvars.csh.in: + samples/innshellvars.in: + samples/innshellvars.pl.in: + samples/innshellvars.tcl.in: + samples/innstat.in: + samples/innwatch.ctl.in: + samples/innwatch.in: + samples/sendbatch.in: + - incorporate inndf + + * include/config.h.in: include/config.h.in: + - incorporate inndf + + * doc/inndf.8, doc/innwatch.8, doc/innwatch.ctl.5, doc/Makefile, doc/inn.conf.5: + doc/Makefile: + doc/inn.conf.5: + doc/inndf.8: + doc/innwatch.8: + doc/innwatch.ctl.5: + - incorporate inndf + + * config/config.scoreboard: config/config.scoreboard: + - incorporate inndf + + * backends/inndf.c, backends/Makefile: backends/Makefile: + backends/inndf.c: + - incorporate inndf + + * configure, MANIFEST, configure.in: MANIFEST: + configure.in: + configure: + - incorporate inndf + + Tue Sep 15 02:24:02 1998 Katsuhiro Kondou + + * expire/makehistory.c: expire/makehistory.c: + - From: Kjetil Torgrim Homme + - When makehistory invokes sort, it will not pass on the -T flag unless + you have given it on the command line to makehistory. I thought + pathtmp from inn.conf would be used as a default value. + + * doc/makehistory.8: doc/makehistory.8: + - When makehistory invokes sort, it will not pass on the -T flag unless + you have given it on the command line to makehistory. I thought + pathtmp from inn.conf would be used as a default value. + + Mon Sep 14 15:38:45 1998 Katsuhiro Kondou + + * samples/news.daily.in: samples/news.daily.in: + - TAGGEDHASH is DO, if --enable-tagged-hash is specified. + + * samples/news.daily.in: samples/news.daily.in: + - history.pag is not moved for tagged hash if EXPDIR is specified + + * doc/inn.conf.5: doc/inn.conf.5: + - 'status' was not explained. + - fixed some typo. + + Sun Sep 13 22:47:43 1998 Katsuhiro Kondou + + * innd/art.c: innd/art.c: + - From: Fluffy + - I've got HMAC/SHA-1 cancel locks working in the perl filter (innd + runs with -C). (Yes, perl is an icky place for this, but it's easier + to play with it on a running server that way. In C later, eh?) + + This addition lets it work. I'll clean up the perl bits and post a + pointer later. Meow. + + Sat Sep 12 14:08:27 1998 Katsuhiro Kondou + + * samples/checkgroups.pl.in: samples/checkgroups.pl.in: + - docheckgroups is installed into @LIBDIR@ + + * innd/ng.c: innd/ng.c: + - lowmark wasn't adjusted if storageapi is true and no overview index + exists. + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - From: STEVEN_GILLARD@HP-Australia-om1.om.hp.com + - Ah...so we want to make sure artoffset + artlength < cycbuff->len. + - The way things are currently does not protect us against this + condition. + + * storage/interface.c: storage/interface.c: + - didn't check patterns existense in storage.conf + + * samples/newgroup.pl.in, samples/controlchan.in, samples/ihave.pl.in, samples/rmgroup.pl.in, samples/checkgroups.pl.in: + samples/checkgroups.pl.in: + - temporary file was left + samples/controlchan.in: + - @progparams was not initialized + samples/ihave.pl.in: + - should use $inn::pathhost + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + - temporary file was left + + * nnrpd/article.c: nnrpd/article.c: + - From: "Igor Timkin" + - In the case of empty group CMDgetrange return random + value of rp->High. + + * innd/cc.c: innd/cc.c: + - From: Fluffy + - Per a discussion early this morning in news.admin.net-abuse.usenet. + This adds a perl callback to do something akin to grephistory. May + be useful if we need to reference stuff on the spool. Or not. =) + + * README.perl_hook, INSTALL: INSTALL: + - From: Tilman Schmidt + - I would like to propose a small addition to the INSTALL document of + INN 2.1 mentioning the necessity of setting up some mechanism for + getting locally posted articles out. (I hate to admit it, but I got + actually bitten by that, wondering for days why none of our postings + ever made it out onto the 'net.) + README.perl_hook: + - From: Fluffy + - Per a discussion early this morning in news.admin.net-abuse.usenet. + This adds a perl callback to do something akin to grephistory. May + be useful if we need to reference stuff on the spool. Or not. =) + + Wed Sep 9 04:42:12 1998 Katsuhiro Kondou + + * samples/newgroup.pl.in, samples/rmgroup.pl.in: + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + - pathdb/newsgroups was not updated + + Tue Sep 8 10:28:41 1998 Katsuhiro Kondou + + * samples/inncheck.in: samples/inncheck.in: + - reported from From: Florian La Roche + - newly added parameters in inn.conf were not recognized by inncheck + + * samples/controlchan.in: samples/controlchan.in: + - $inn::pgpverify was not parsed correctly. + + Mon Sep 7 23:23:57 1998 Katsuhiro Kondou + + * expire/expire.c: expire/expire.c: + - didn't care reservation and pause status for innd if an error happens + + * doc/ctlinnd.8: doc/ctlinnd.8: + - reported from Gabor Kiss + - ctlinnd(8) contains command "feedinfo" twice. + + * samples/parsecontrol.in, samples/checkgroups.pl.in, samples/controlchan.in, samples/docheckgroups.in, samples/inn.conf.in, samples/checkgroups.in: + samples/checkgroups.in: + samples/checkgroups.pl.in: + samples/controlchan.in: + samples/docheckgroups.in: + samples/parsecontrol.in: + - newsgroup patterns for checkgroups is now used for processing + - writelog didn't work for checkgroups + samples/inn.conf.in: + - check existense of pgp program for default 'pgpvefy' value + + * doc/control.ctl.5: doc/control.ctl.5: + - newsgroup patterns for checkgroups is now used for processing + + * configure, configure.in, aclocal.m4: aclocal.m4: + configure.in: + configure: + - '--enable-libtool=no' is default now + + Sun Sep 6 23:07:38 1998 Katsuhiro Kondou + + * samples/controlchan.in: samples/controlchan.in: + - controlchan didn't use sm to read article for storageapi + - controlchan now reads article directory for non-storageapi + + * samples/innshellvars.in: innshellvars.in: + - From: Richard Michael Todd + - In the recent patches to samples/innshellvars*, the line that sets + TMPDIR in innshellvars seems to have been deleted, apparently + accidentally (it isn't gone from the other innshellvars.* scripts). + Alas, things like news.daily depend on TMPDIR being set, so this + breaks things. + + * storage/trash/trash.c, storage/trash/trash.h: storage/trash/trash.c: + storage/trash/trash.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + * storage/timehash/timehash.c, storage/timehash/timehash.h: + storage/timehash/timehash.c: + storage/timehash/timehash.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + * storage/cnfs/cnfs.c, storage/cnfs/cnfs.h: storage/cnfs/cnfs.c: + storage/cnfs/cnfs.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + * storage/buildconfig.in, storage/interface.h: storage/buildconfig.in: + storage/interface.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + * innd/innd.h: innd/innd.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + * include/libinn.h, include/config.h.in: include/config.h.in: + include/libinn.h: + - From: Robert Kiessling + - inn does not compile out-of-the box with IRIX 6.2. Here is a patch for + the necessary changes. + + Sat Sep 5 15:16:45 1998 Katsuhiro Kondou + + * innd/cc.c: innd/cc.c: + - fixed some syntax error for some systems + - HIShavearticle() needs hash instead of messageid + + * innd/innd.c, innd/cc.c: innd/cc.c: + innd/innd.c: + - From: mooring@arduin.Tymnet.COM (Ed Mooring) + - I rounded up enough tuits to let perl call back into INN for the + features I outlined. + + * README.perl_hook: README.perl_hook: + - From: mooring@arduin.Tymnet.COM (Ed Mooring) + - I rounded up enough tuits to let perl call back into INN for the + features I outlined. + + * site/Makefile: site/Makefile: + - filter script for perl in MOST* are removed (they are still in REST*) + + * samples/parsecontrol.in, samples/scanlogs.in, samples/innshellvars.pl.in, samples/innshellvars.tcl.in, samples/innwatch.in, samples/Attic/innshellvars.csh.in, samples/inn.conf.in, samples/innshellvars.in, samples/control.ctl, samples/controlchan.in: + samples/control.ctl: + - 'checkgroups:*@*:example.*:drop' line is now commented out + samples/controlchan.in: + samples/inn.conf.in: + - add innwatchsleeptime, pgpverify, controlfailnotice and logcycles + samples/innshellvars.csh.in: + samples/innshellvars.in: + samples/innshellvars.pl.in: + samples/innshellvars.tcl.in: + - remove MAIL_BADCONTROLS, LOG_CYCLES and WANT_PGPVERIFY + samples/innwatch.in: + - SLEEP is replaced by INNWATCH_SLEEPTIME + samples/parsecontrol.in: + - MAIL_BADCONTROLS is now read from inn.conf + samples/scanlogs.in: + - CYCLES is replaced by LOG_CYCLES + + * doc/inn.conf.5: doc/inn.conf.5: + - add innwatchsleeptime, pgpverify, controlfailnotice and logcycles + + * config/config.scoreboard: config/config.scoreboard: + - remove MAIL_BADCONTROLS, LOG_CYCLES, INNWATCH_SLEEPTIME and + WANT_PGPVERIFY + + * configure, INSTALL, configure.in: INSTALL: + configure.in: + configure: + - remove --enable-pgp-verify from configure + + Fri Sep 4 10:21:18 1998 Katsuhiro Kondou + + * samples/controlbatch.in: samples/controlbatch.in: + - '#!/bin/sh' line was not substituted by configure + + * storage/Makefile: storage/Makefile: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - By default INNs shared libs are installed mode 550. Which means that + if UUCP execs rnews it fails with "library not found". + + * site/Makefile: site/Makefile: + - controlbatch is incorporated + + * samples/version.pl.in, samples/sendsys.pl.in, samples/senduuname.pl.in, samples/sendme.pl.in, samples/rmgroup.pl.in, samples/rc.news.in, samples/ihave.pl.in, samples/newgroup.pl.in, samples/controlchan.in, samples/controlbatch.in, samples/checkgroups.pl.in: + samples/checkgroups.pl.in: + samples/controlbatch.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/newgroup.pl.in: + samples/rmgroup.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: Fluffy + - update for controlchan + - controlbatch is incorporated + samples/rc.news.in: + - don't claim 'No .news.daily file; need to run news.daily?', if + installed for the 1st time + + * lib/Makefile: lib/Makefile: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - By default INNs shared libs are installed mode 550. Which means that + if UUCP execs rnews it fails with "library not found" + + * configure, MANIFEST, configure.in, INSTALL: INSTALL: + MANIFEST: + configure.in: + configure: + - From: Fluffy + - controlbatch is now incorporated + + Thu Sep 3 14:45:31 1998 Katsuhiro Kondou + + * lib/getconfig.c: lib/getconfig.c: + - From: James Fidell + - Looks like there's an error in getconfig.c for the sourceaddress + option. This should fix it : + + Wed Sep 2 15:27:17 1998 Katsuhiro Kondou + + * samples/inncheck.in, samples/inn.conf.in: samples/inn.conf.in: + samples/inncheck.in: + - From: Christophe Wolfhugel + - I have modified the patch and introduced + a new option in inn.conf : sourceaddress. + + * nnrpd/misc.c: nnrpd/misc.c: + - check backoff parameters before checking backoff_db + + * lib/getconfig.c, lib/remopen.c: lib/getconfig.c: + lib/remopen.c: + - From: Christophe Wolfhugel + - I have modified the patch and introduced + a new option in inn.conf : sourceaddress. + + * include/libinn.h, include/innconf.h: include/innconf.h: + include/libinn.h: + - From: Christophe Wolfhugel + - I have modified the patch and introduced + a new option in inn.conf : sourceaddress. + + * doc/inn.conf.5: doc/inn.conf.5: + - From: Christophe Wolfhugel + - I have modified the patch and introduced + a new option in inn.conf : sourceaddress. + + Tue Sep 1 23:19:30 1998 Katsuhiro Kondou + + * nnrpd/article.c: nnrpd/article.c: + - From: Florian La Roche + - My nnrpd loops in this newsgroup which does not have any articles in + it, but one line with overview data is still present + + * INSTALL: INSTALL: + - update for syslogging controlchan + + * samples/sendme.pl.in, samples/sendsys.pl.in, samples/senduuname.pl.in, samples/version.pl.in, samples/controlchan.in, samples/ihave.pl.in, samples/newgroup.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/newgroup.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: Fluffy + - update for controlchan family + + * expire/makehistory.c: expire/makehistory.c: + - From: George Lindholm + - The problem is that when makehistory sees a traditional articles + without a Xref: header, it adds one using the path of the article, + not the group name. + + * doc/control.ctl.5: doc/control.ctl.5: + - reloading control.ctl for controlchan was described incorrectly. + + Mon Aug 31 05:24:18 1998 Katsuhiro Kondou + + * samples/nnrp.access: samples/nnrp.access: + - *.foo.com line is commented out. + + * samples/controlchan.in: samples/controlchan.in: + - missing '^' and '$' in newsgroup patterns separated by '|' + + * innd/art.c: innd/art.c: + - DISPOSE()'ed statically allocated region. + + Sun Aug 30 23:03:25 1998 Katsuhiro Kondou + + * innd/Makefile: innd/Makefile: + - TCLLIB and TCLINC are now used. + + * Makefile.global.in: Makefile.global.in: + - TCLLIB and TCLINC was not defined + + * samples/newsfeeds.in: samples/newsfeeds.in: + - From: Fabien Tassin + - innflags/inn.conf vs FLAGS/rc.news + + * nnrpd/article.c: nnrpd/article.c: + - From: Richard Michael Todd + - Found the bug that caused the problem of xover always returning an + empty list that I complained about earlier. The problem is that in + the tagged hash case, in IsCancelledByIndex, HISgetent() is called + with flag=TRUE, which implies that the offset parameter it's getting + is valid. Unfortunately, it isn't, since the call to HISgetent() + that sets that offset exists only in the non-tagged-hash code branch. + + * samples/controlchan.in: samples/controlchan.in: + - missing trailing '\n' + + Sat Aug 29 01:55:07 1998 Katsuhiro Kondou + + * lib/conffile.c: lib/conffile.c: + - From: Yasushi Shinjo + - CONFfopen() didn't return *ret. + + Fri Aug 28 15:18:16 1998 Katsuhiro Kondou + + * doc/inn.conf.5: doc/inn.conf.5: + - remove '_' in 'backoff_*' parameters + + * nnrpd/misc.c: nnrpd/misc.c: + - use read() instaed of fgets(), if lseek() is used. + + Thu Aug 27 03:36:21 1998 Katsuhiro Kondou + + * nnrpd/article.c: nnrpd/article.c: + - 'article ' for traditional did not work (previous one was + incomplete) + + * expire/makehistory.c: expire/makehistory.c: + - From: STEVEN_GILLARD@HP-Australia-om1.om.hp.com + - The problem happens when using a TMPDIR string thats rather long - + makehistory sprintf's a sort command into a buffer thats too small to + hold it. + + Wed Aug 26 16:54:58 1998 Katsuhiro Kondou + + * nnrpd/misc.c, nnrpd/nnrpd.c, nnrpd/article.c: nnrpd/article.c: + nnrpd/nnrpd.c: + - From: "Scott Gifford" + - Here is a detailed description of the changes I made, followed by the + patch: + + First, CMDxover uses CMDgetrange to parse the article range. + CMDgetrange was looping through every single article in the group + once to get some overview information, and then again to set the + token information. This made the initial delay for XOVER on a large + group really really long, sometimes over a minute. I fixed this by + deferring both of these lookups until they need to be done. This + speeds things up by not bothering to look up articles unless they + are needed, and also defers the delay so that it doesn't cause + timeouts. + + I also found some severe problems in the ARTfind routine. If you + looked up the same article twice, the second one would miss the + ARTcache, and have to be searched for. Because CMDxover does an + ARTfind twice for every article, the cache was missing at least half + the time. I fixed this by having the cache code check ARTcache + where it is currently at before incrementing it. I also added some + code to quickly detect ARTfinds on missing articles, and not lose + ARTcache in the process. Finally, I added some code to do an early + check to see if they were ARTfinding the first article for this + group, becuase it is a fairly common thing, quick to check for, and + is the worst case for ARTfind's binary search. All in all, in my + tests, XOVERs of all the articles in a group will hit the ARTcache + every single time, and other XOVERs will only miss for the first one. + nnrpd/article.c: + nnrpd/misc.c: + - 'article ' for traditional did not work. + + Tue Aug 25 13:44:46 1998 Katsuhiro Kondou + + * samples/inn.conf.in: samples/inn.conf.in: + - From: "Igor Timkin" + - It's incorrect. getconfig.c (ReadInnConf function): + + * samples/controlchan.in: samples/controlchan.in: + - From: Fluffy + - For no particular reason, I was only checking to see if pgpverify + succeeded, and wasn't making sure the returned key actually matched + what was in control.ctl. Duh. + + - Logging of bogus control messages (e.g. Hippy) was a bit excessive. + + * innd/art.c: innd/art.c: + - From: Florian La Roche + - compare with '\0' instead of NULL + + * doc/inn.conf.5: doc/inn.conf.5: + - From: Sam Eaton + - So the manual page is wrong, and it takes the value given and then + turns it into a number of seconds. + + * samples/inn.conf.in: samples/inn.conf.in: + - From: James Fidell + - default linecountfuzz and artcutoff in inn.conf was incorrect + + Mon Aug 24 16:51:36 1998 Katsuhiro Kondou + + * nnrpd/article.c: nnrpd/article.c: + - 'article ' did not work for traditional spool in some case + + * innd/status.c: innd/status.c: + - From: Michael Schroeder + - inn.status should be in pathlog if HTML_STATUS is undefined. + + Sun Aug 23 13:36:10 1998 Katsuhiro Kondou + + * expire/expireindex.c: expire/expireindex.c: + - From: Richard Michael Todd + - It takes out the questonable business with setting i to Refresh->Used + and instead simply sets tmp to NULL if we're in the -o case and + overviewmmap is on, meaning that we don't try to munmap() random + parts of our address space later because tmp was never initialized. + This version seems to work okay with -o on both the mmap and non-mmap + cases. + + Sat Aug 22 14:35:07 1998 Katsuhiro Kondou + + * storage/interface.c: storage/interface.c: + - From: Richard Michael Todd + - If you have a first entry in the new-format storage.conf file that + doesn't completely specify all parameters (e.g. something like + method timehash { class: 0 } + that doesn't specify minsize and maxsize) the "sub" structure for: + that storage.conf entry gets uninitialized garbage for those: + parameters you didn't specify (leading to, say, a minsize of + 25432934 for that storage method, which is not exactly what I + wanted). The patch below fixes this by initializing the variables + after a 'method foo' is seen. (There *was* code to reset the + variables at the end of a 'method foo {...}'; this code is now + redundant and hence is deleted by this patch). + + * samples/inn.conf.in, samples/inncheck.in: samples/inncheck.in: + - From: "Igor Timkin" + - ',' were missed in each parameter + samples/inn.conf.in: + - From: "Igor Timkin" + - Add noreader + + Fri Aug 21 10:30:05 1998 Katsuhiro Kondou + + * samples/version.in, samples/version.pl.in: samples/version.in: + - use $VERSION instead of raw version + samples/version.pl.in: + - use $inn::version instead of raw version + + * frontends/innconfval.c: frontends/innconfval.c: + - add -v to show version + - add version if no args + + * doc/innconfval.1, doc/innd.8: doc/innconfval.1: + - add -v to show version + - add version if no args + doc/innd.8: + - describe usecontrolchan a bit more + + * INSTALL: INSTALL: + - update for usecontrolchan + + * lib/getconfig.c: lib/getconfig.c: + - preveous fix was not complete. (_CONF_ALLOWREADERS and + CONF_VAR_ALLOWREADERS are replaced with _CONF_READERSWHENSTOPPED and + CONF_VAR_READERSWHENSTOPPED) + + * innd/chan.c: innd/chan.c: + - reported From: Aidan Cully + - If a connection is above its MaxCnx, it's FD does _not_ get removed + from RCHANmask. The connecting site sends anything over, select + suddenly starts returning larger values. Then, in the iteration + over the FD_SETs from select, if a particular connection is above + the MaxCnx, we simply skip that channel. Obviously, the appropriate + way to fix this is to remove the FD from RCHANmask when it's + discovered that the channel is above its connection limit, and put + it back in if the limit changes. + + * doc/control.ctl.5, doc/innd.8: doc/control.ctl.5: + doc/innd.8: + - update for controlcan + + Thu Aug 20 23:53:44 1998 Katsuhiro Kondou + + * samples/inn.conf.in, samples/inncheck.in: samples/inn.conf.in: + - allowreaders is renamed to readerswhenstopped + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + samples/inncheck.in: + - update for new parameters in inn.conf + - allowreaders is renamed to readerswhenstopped + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + + * lib/getconfig.c: lib/getconfig.c: + - defined name convention was bit different + - allowreaders is renamed to readerswhenstopped + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + + * innd/innd.c, innd/rc.c, innd/cc.c: innd/cc.c + innd/innd.c + - allowreaders is renamed to readerswhenstopped + innd/rc.c + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + + * include/innconf.h, include/libinn.h: include/innconf.h + include/libinn.h + - defined name convention was bit different + - allowreaders is renamed to readerswhenstopped + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + + * doc/innd.8, doc/inn.conf.5: doc/inn.conf.5 + doc/innd.8 + - allowreaders is renamed to readerswhenstopped + - From: rune@ftech.net + - add noreader (originally spawnnnrpd) + + * innd/icd.c: innd/icd.c: + - ensure control.cancel exists in active if innconf->usecontrolchan + is true + + * site/Makefile: site/Makefile: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - At least the new "controlchan" and all the filters aren't installed + anymore. + + * lib/conffile.c: lib/conffile.c: + - From: rune@ftech.net + - I needed to add this to compile under linux with this mornings CVS + tree. + + * samples/ihave.pl.in: samples/ihave.pl.in: + - From: Fluffy + - If it's got a grephistory -s in it, that needs to be an -i. Otherwise + identical. + + * storage/interface.c, storage/interface.h: storage/interface.h: + - From: Aidan Cully + - will use storage.conf + + * site/Makefile: site/Makefile: + - update newly added scripts for controlchan + - From: Aidan Cully + - will use storage.conf + + * samples/senduuname.pl.in, samples/storage.conf, samples/version.pl.in, samples/rmgroup.pl.in, samples/sendme.pl.in, samples/sendsys.pl.in, samples/inn.conf.in, samples/newgroup.pl.in, samples/newsfeeds.in, samples/checkgroups.pl.in, samples/controlchan.in, samples/ihave.pl.in: + samples/checkgroups.pl.in: + samples/controlchan.in: + samples/ihave.pl.in: + samples/inn.conf.in: + samples/newgroup.pl.in: + samples/newsfeeds.in: + samples/rmgroup.pl.in: + samples/sendme.pl.in: + samples/sendsys.pl.in: + samples/senduuname.pl.in: + samples/version.pl.in: + - From: Fluffy + - Added a doifarg action to sendsys, version and senduuname, because + there just may be someone out there who doesn't want to entirely + disable those things. (It's documented but not in the shell stuff.) + + Wrote up some documentation, then went and rm'ed the wrong directory. + samples/storage.conf: + - From: Aidan Cully + - will use storage.conf + + * nnrpd/post.c: nnrpd/post.c: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * lib/getconfig.c, lib/Makefile, lib/conffile.c: lib/Makefile: + lib/conffile.c: + - From: Aidan Cully + - will use storage.conf + lib/getconfig.c: + - '--enable-controlchan' is gone and it is moved to inn.conf + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * innfeed/sysconfig.h: innfeed/sysconfig.h: + - avoid duplicate yacc symbol for UX4800 + + * innd/icd.c, innd/art.c: innd/art.c: + - '--enable-controlchan' is gone and it is moved to inn.conf + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + innd/icd.c: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * include/libinn.h, include/config.h.in, include/configdata.h, include/innconf.h, include/conffile.h, include/paths.h.in: + include/conffile.h: + include/paths.h.in: + - From: Aidan Cully + - will use storage.conf + include/config.h.in: + - '--enable-controlchan' is gone and it is moved to inn.conf + include/configdata.h: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + include/innconf.h: + include/libinn.h: + - '--enable-controlchan' is gone and it is moved to inn.conf + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * frontends/sys2nf.c, frontends/inews.c: frontends/inews.c: + frontends/sys2nf.c: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * doc/innd.8, doc/active.5, doc/inn.conf.5, doc/storage.ctl.5, doc/expire.ctl.5, doc/libstorage.3, doc/sm.8, doc/storage.conf.5, doc/Makefile, doc/cycbuff.conf.5: + doc/Makefile: + doc/cycbuff.conf.5: + doc/expire.ctl.5: + doc/libstorage.3: + doc/sm.8: + doc/storage.conf.5: + doc/storage.ctl.5: + - From: Aidan Cully + - will use storage.conf + doc/active.5: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + doc/inn.conf.5: + - '--enable-controlchan' is gone and it is moved to inn.conf + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + - From: Aidan Cully + - will use storage.conf + doc/innd.8: + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * contrib/Attic/cnfsstat.pl: contrib/cnfsstat.pl + - show status for cnfs + + * config/config.scoreboard: config/config.scoreboard + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + + * configure, MANIFEST, configure.in, INSTALL: INSTALL + - update for storage.conf + MANIFEST + - update newly added scripts for controlchan + - update for storage.conf + - update for cnfsstat.pl(contrib) + configure.in + configure + - '--enable-controlchan' is gone and it is moved to inn.conf + - '--enable-merge-to-groups' is gone and it is moved to inn.conf + - update newly added scripts for controlchan + + Wed Aug 19 06:50:54 1998 Katsuhiro Kondou + + * lib/endian.c: lib/endian.c: + - Some compiler recognize the code unwantedly. + To avoid this, the code is separated and call store() and + load_and_store() instead + + * expire/expireindex.c: expire/expireindex.c: + - From: Keith Lewis + - there was a bug if mmap is on and with '-a -o' + + * MANIFEST: MANIFEST: + - update for controlchan, newgroup.pl and rmgroup.pl + + Wed Aug 19 02:57:22 1998 Marc Fournier + + * site/Makefile: make sure the new files get installed + + * samples/controlchan.in: + move the control files to bin/control instead of bin/newcontrol ... + + * configure.in, configure: + make sure substitutions are done for the new files in samples + + * samples/rmgroup.pl.in, samples/Attic/newsfeeds, samples/newgroup.pl.in, samples/newsfeeds.in, samples/controlchan.in: + Include the new perl scripts, setting paths as appropriate + Add a sample entry to newsfeeds., as well as set appropriate paths for + the samples in there... + + Not installed by default yet + + * innd/art.c, include/config.h.in, configure.in, configure: + Add an --enable-controlchan option to configure that triggers an #ifdef + in innd/art.c for the controlchan code submitted by: Fluffy + + Still have to work in the controlchan work itself though... + + Tue Aug 18 08:15:15 1998 Katsuhiro Kondou + + * innd/nc.c: innd/nc.c: + - From: Richard Michael Todd + - I'm trying out the patch below, which turns off (temporarily) + reading from channels when the server is paused and the channel has + gotten an articles worth of data (i.e. it can't go any further with + that data until the server is unpaused.) + + Sun Aug 16 23:30:48 1998 Katsuhiro Kondou + + * backends/batcher.c: backends/batcher.c: + - reported from Stephan Austermuehle + - 'Token' was not set for traditional spool + + Sat Aug 15 11:15:24 1998 Katsuhiro Kondou + + * MANIFEST: MANIFEST: + - replace frontends/c7unbatch.sh with frontends/c7unbatch.sh.in + - add frontends/gunbatch.sh.in + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - From: "Forrest J. Cavalier III" + - When articlemmap is off, the code could DISPOSE() a stale pointer, + leading to malloc() arena corruption, crashes, memory leaks, + infinite loops, etc, especially when running makehistory -O or -I. + - From: Bjorn Danielsson + - bogus pointers are sometimes passed to munmap() in + CNFSmunmapbitfields() in storage/cnfs/cnfs.c, which may cause parts + of the malloc heap to become unmapped. + + * samples/sendbatch.in, samples/inn.conf.in, samples/nntpsend.ctl, samples/passwd.nntp: + samples/inn.conf.in: + - From: Russell Vincent + - Add new option 'nicenewnews' + - Fix backoff* variables - they don't have an underscore + samples/nntpsend.ctl: + samples/passwd.nntp: + - From: Florian La Roche + - I would comment out these example entries: + samples/sendbatch.in: + - From: Florian La Roche + - The following patch is needed on a Linux machine(bash) as it fails if + "$FREE" has nothing in it and the line reads + + * nnrpd/post.c, nnrpd/loadave.c, nnrpd/newnews.c: nnrpd/loadave.c: + - From: Florian La Roche + - It is much easier to use a system call for this instead of parsing + /proc/loadavg. + nnrpd/newnews.c: + - From: Russell Vincent + - Add new option 'nicenewnews' to force nnrpd to nice itself to this + value if the NEWNEWS command is used + nnrpd/post.c: + - From: Florian La Roche + - Note that it is a loop and "p++" is always done at the end of the + loop... + + * lib/getconfig.c: lib/getconfig.c: + - From: Russell Vincent + - Add new option 'nicenewnews' to force nnrpd to nice itself to this + value if the NEWNEWS command is used + + * innfeed/innlistener.c: innfeed/innlistener.c: + - From: Bjorn Danielsson + - the first article fed to a dynamically configured peer is lost. + + * innd/art.c: innd/art.c: + - 'H' flag for newsfeeds for traditional spool still had problem + + * include/innconf.h, include/libinn.h: include/innconf.h: + include/libinn.h: + - From: Russell Vincent + - Add new option 'nicenewnews' to force nnrpd to nice itself to this + value if the NEWNEWS command is used + + * frontends/inews.c, frontends/Attic/c7unbatch.sh, frontends/Makefile, frontends/c7unbatch.sh.in, frontends/gunbatch.sh.in: + frontends/c7unbatch.sh: + - c7unbatch.sh is created by configure with c7unbatch.sh.in + frontends/Makefile: + frontends/c7unbatch.sh.in: + frontends/gunbatch.sh.in: + - path for compress and gzip are set by confiugre + - From: Florian La Roche + - "gunzip" is still used by many sites for compressed gzip-batches. It + would be good to have "gunzip" for better compatibility. + frontends/inews.c: + - From: Florian La Roche + - Note that it is a loop and "p++" is always done at the end of the + loop... + + * doc/inn.conf.5: doc/inn.conf.5: + - From: Russell Vincent + - Document new option 'nicenewnews' + - Be consistent in references to nnrpd(8) + + * configure.in, configure, Attic/CHANGES: CHANGES: + - this file was dropped from MANIFEST + configure: + configure.in: + - add frontends/c7unbatch.sh.in and frontends/gunbatch.sh.in + for COMPRESS and GZIP substitution + + Wed Aug 12 23:50:42 1998 Katsuhiro Kondou + + * INSTALL: INSTALL: + - explain approximate amount of RAM needed for non-tagged hash + + * innd/ng.c: innd/ng.c: + - From: miquels@cistron.nl (Miquel van Smoorenburg) + - Since a few days my innd coredumped while starting up. It appears + that a function in ng.c reads one character past the mmap()ed active + file. It might also have to do with the fact that my active file is + an _exact_ multiple of the page size right now. + + I studied the code and I cannot see why it happens just _that_ it + happens. It might even be a bug in the libc implementation of + strchr. Anyway I've replaced the original code with something smaller + and simpler that does work .. and that never hurts, does it? + + * site/Makefile: site/Makefile: + - perl and tcl filter scripts are moved to REST + + - From: Florian La Roche + - nnrpd.track not installed + + Tue Aug 11 06:05:34 1998 Katsuhiro Kondou + + * innd/nc.c: innd/nc.c: + - reported by From: Barry Bierbauch + - sugested patch from gerglery@usa.net (Grigori Vulis) + - returned response was incorrect for ihave + + * innd/chan.c, innd/innd.h, innd/art.c: innd/art.c: + innd/chan.c: + innd/innd.h: + - reported From: John Line (as news server manager) + + - 'H' didn't append a new line for each article + - Xref header created from didn't include trailing line feed + - 'H' for storage api included '\r' + + * doc/newsfeeds.5: doc/newsfeeds.5: + - add a note for Bytes: header + + Sun Aug 9 14:03:10 1998 Katsuhiro Kondou + + * innd/art.c: innd/art.c: + - reported by Yong-Shen Tang + - Hi! when turning on verifycancel option in inn.conf , all cancel + messages, including valid or invalid, happen to be refused by innd. + I found that art.c:ARTcancelverify() doesn't remove the "Sender: " + nor "From: " from the head of 'local', so !EQ(local, p) always return + true here. My inn version is 2.1 . + + Fri Aug 7 14:17:15 1998 Katsuhiro Kondou + + * nnrpd/nnrpd.c: nnrpd/nnrpd.c: + - From: Russell Vincent + - Allow access patterns to be defined and used later in the + nnrp.access file. If large patterns are used repeatedly, + this reduces the size of the nnrp.access file and can + improve startup performance significantly. + - Add a line count, so that the line number of errors in + nnrp.access can be logged. + + * doc/nnrp.access.5: doc/nnrp.access.5: + - From: Russell Vincent + - Allow access patterns to be defined and used later in the + nnrp.access file. If large patterns are used repeatedly, + this reduces the size of the nnrp.access file and can + improve startup performance significantly. + - Add a line count, so that the line number of errors in + nnrp.access can be logged. + + Thu Aug 6 23:07:41 1998 Katsuhiro Kondou + + * storage/timehash/timehash.c: storage/timehash/timehash.c: + - From: Christian von Roques + - storage/timehash/timehash.c #includes without + #including first. Ultrix needs to be + #included before . I #included before + . + + * storage/Makefile: storage/Makefile: + - From: Christian von Roques + - storage/Makefile triggers a bug in Ultrix's /bin/sh: The result of an + if x; then y; fi; is false if x evaluates to false, which makes make + abort. One can tell make to ignore the return-status of the if, + insert an empty else-clause, or rewrite the statement. I changed the + if to: [ -d objs ] || mkdir objs; + + * lib/makedir.c: lib/makedir.c: + - From: Christian von Roques + - lib/makedir.c #includes before . Ultrix + requires, and Posix specififies that has to be #included + before . I just swapped the #includes. + + * doc/inncheck.8: doc/inncheck.8: + - From: Christian von Roques + - fixed typo + + * configure, configure.in: configure.in: + configure: + - From: Christian von Roques + - configure.in contains AC_HEADER_TIME in line 371 as well as in line + 343, I removed the one in line 371. + + * nnrpd/post.c: nnrpd/post.c: + - From: Andrew Gierth + - The actived patch returns the group info in a static area which is + overwritten on subsequent calls - so the group pointer saved by + ValidNewsgroups becomes invalid before being used for the mailing. + + * README.perl_hook: README.perl_hook: + - update for Andrew Gierth's patch + + * nnrpd/post.c, nnrpd/perl.c: nnrpd/perl.c: + nnrpd/post.c: + - This code was written by Andrew Gierth + - As ported to INN 2.0 by John Payne. + - This patch does several things: + + 1. Gives the Perl filter (filter_nnrpd.pl) access to message bodies, + in the $body variable. + + 2. Gives the Perl filter access to the poster's authinfo username, + in the $user variable. Obviously this has no effect unless you use + authinfo. + + 3. Adds a returncode DROP to the Perl interface. If the string + returned by the Perl subroutine begins with DROP, the post will be + discarded and success returned to the client. + + 4. Adds a returncode SPOOL to the Perl interface. If the string + returned by the Perl subroutine begins with SPOOL, success will be + returned to the client and the post will be saved to in.coming/spam + for manual inspection. + + Thus, doing something like this: + + return "DROP spam" if ($body =~ /http:..dirty\.spammer\.com/); + + will drop any post containing that URL while returning success to the + + sting client, making the spammer think he is being successful and + keeping him from changing ISPs and starting over somewhere else. + + return "SPOOL possible MMF" if ($hdr{"Subject"} =~ /Make Money Fast/); + + will spool "suspect" posts in in.coming/spam so you can look at them + and decide whether they should go out. They can be injected manually + with rnews. Spooled posts to moderated groups will be placed in + in.coming/spam/mod; you *cannot* feed these to rnews, they must be + mailed to the moderation address. This is somewhat inconvenient. + + return "posting access denied" if ($user eq "badguy"); + + will return failure for anything posted by "badguy", removing his + Usenet posting ability while still allowing him to read. (This + example requires authinfo). + + return "SPOOL suspect post from $user" if ($user = "maybebadguy"); + + will spool posts from "maybebadguy" for manual inspection, while + returning success to the posting client. They can be injected + manually with rnews after inspection (unless they are destined for + moderated newsgroups). (This example requires authinfo.) + + Wed Aug 5 06:02:31 1998 Katsuhiro Kondou + + * innd/art.c: innd/art.c: + - fixed compilation error + + * storage/timehash/timehash.c: storage/timehash/timehash.c: + - examine to see if madvise() works + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - examine to see if madvise() works + + * nnrpd/article.c: nnrpd/article.c: + - examine to see if madvise() works + + * lib/localopen.c, lib/dbz.c, lib/inndcomm.c: lib/dbz.c: + - examine to see if madvise() works + lib/inndcomm.c: + - From: Michael Statman + - has 'inconf' should be 'innconf' + lib/localopen.c: + - From: Michael Statman + - NNTPconnect() needs port number + + * innd/art.c: innd/art.c: + - set Path for ihave/sendme processing if logipaddr is true + + * include/config.h.in: include/config.h.in: + - examine to see if madvise() works + + * configure, configure.in: configure.in: + configure: + - examine to see if madvise() works + + Tue Aug 4 13:18:59 1998 Katsuhiro Kondou + + * doc/makehistory.8: doc/makehistory.8: + - makehistory knows symlink, since #if defined(HAVE_SYMLINK) + is used. + + * samples/Attic/innshellvars.csh.in: samples/innshellvars.csh.in: + - inn_pathtemp should be inn_pathtmp + + * samples/pgpverify.in: samples/pgpverify.in: + - From: Alexandre Oliva + - I've just noticed inn 2.1's pgpverify script doesn't take the PGP + pathname guessed by the configure script into account. Here's a patch + that fixes this problem. + + Mon Aug 3 06:17:12 1998 Katsuhiro Kondou + + * innd/rc.c: innd/rc.c: + - From: Richard Michael Todd + - In RCreadfile(), there is a main loop which maintains two variables, + *count and rp. *count keeps count of the number of peer structures + currently in the list, and rp points to the last one. Normally + these two variables get incremented in sync, but if a hostname + lookup fails, *count is updated (actually was incremented earlier), + but rp isn't (and shouldn't, as we have no valid peer data to add). + This leads to *count being larger than the number of peer structures + initialized, so when RCreadfile() or RCclose() is next called, the + code attempts to free garbage that was never initialized. The patch + below decrements *count if a hostname lookup fails. + + Sun Aug 2 23:57:52 1998 Katsuhiro Kondou + + * samples/checkgroups.in, samples/innshellvars.in: + samples/checkgroups.in: + - checkgroups referred to undefined parameter. + samples/innshellvars.in: + - PATHLIB is not defined at inn.conf + + * innfeed/connection.c: innfeed/connection.c: + - From: Christopher Masto + - I needed this feature, so I patched it in.. I just noticed that + someone else has already done this. Oh well. It doesn't seem to be + in the current tree, so here it is in case someone desperately needs + it. + + It's pretty much the same syntax as in inn.conf, but I didn't bother + supporting "any" and I didn't check the environment variable. It + should really do both, for consistency of behavior. + + * doc/innfeed.conf.5: doc/innfeed.conf.5: + - From: Christopher Masto + - From: Per Hedeland (he modified the + description) + - I needed this feature, so I patched it in.. I just noticed that + someone else has already done this. Oh well. It doesn't seem to be + in the current tree, so here it is in case someone desperately needs + it. + + It's pretty much the same syntax as in inn.conf, but I didn't bother + supporting "any" and I didn't check the environment variable. It + should really do both, for consistency of behavior. + + Fri Jul 31 06:23:10 1998 Katsuhiro Kondou + + * innfeed/sysconfig.h: innfeed/sysconfig.h: + - HAVE_MMAP is defined at config.h (to avoid duplicate definition) + + * lib/Makefile: lib/Makefile: + - making perl.o has some problem + + Thu Jul 30 23:45:11 1998 Katsuhiro Kondou + + * makedirs.sh.in: makedirs.sh.in: + - PATHMAN shoud be @MANDIR@ + + * lib/Makefile: lib/Makefile: + - use $(LIBCCWITHOUTLIBTOOL) for compiling perl.c and endian.c + + * innfeed/Makefile: innfeed/Makefile: + - $(LIBS) is placed at the end of line + + * configure, configure.in: configure.in: + configure: + - examine __inet_addr() and __inet_aton() for libbind + + * Makefile.global.in: Makefile.global.in: + - add LIBCCWITHOUTLIBTOOL for lib/Makefile + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - From: Florian La Roche + - should return FALSE instead of NULL + + * lib/reservedfd.c: lib/reservedfd.c: + - From: Florian La Roche + - refer '\0' instead of NULL + + * innfeed/startinnfeed.c: innfeed/startinnfeed.c: + - From: Florian La Roche + - main type is int + + Wed Jul 29 00:53:28 1998 Katsuhiro Kondou + + * storage/Makefile: storage/Makefile: + - use installit.sh to install libstorage instead of cp + + * lib/Makefile: lib/Makefile: + - use installit.sh to install libinn instead of cp + + * frontends/inews.c: frontends/inews.c: + - From: J Scott Berg + - There's a bug in inews which occurs when posting to moderated + newsgroups via a remote server. A copy of the active file from the + server is left in the tmp directory. A patch for inews.c is included + later in this message (it's identical to the patch I sent in for the + same problem in 1.7.2...) + + * doc/expire.8: doc/expire.8: + - From: Jon Harley + - The second diff is against doc/expire.8. As well as making it clear + which overview (unified or index) is being discussed, I have taken + the liberty of correcting a few grammar mistakes. Hope you don't mind. + + Sat Jul 25 06:45:22 1998 Katsuhiro Kondou + + * innd/chan.c: innd/chan.c: + - From: Aidan Cully + - cp->MaxCnx and cp->ActiveCnx are only initialized once, by a memset() + in CHANsetup. I think inn will start screwing up royally if it + closes a channel, then closes a remote NNTP channel because of too + many active connections, then opens a new channel using the remote + NNTP channel's old file descriptor.. INN will notice that MaxCnx is + not zero, and ActiveCnx is also too big (that's why the last got + closed down, anyway), and kill the new process without any reason + why. I _think_ this explains my problems with innfeed (posted to + inn-workers yesterday), but at the very least, this is one less + place to look and we should always initialize these variables. + + Fri Jul 24 13:43:06 1998 Katsuhiro Kondou + + * samples/nntpsend.in: samples/nntpsend.in: + - From: "Igor Timkin" + - Old nntpsend bug (1.5.1 have this error): + + * frontends/rnews.c: frontends/rnews.c: + - From: "Igor Timkin" + - rnews don't understand gzip batches: + + Fri Jul 24 13:38:29 1998 James Brister + + * README: Update for 2.1 + + * include/patchlevel.h: Adjust date. + + Fri Jul 24 02:03:40 1998 Katsuhiro Kondou + + * expire/expire.c: expire/expire.c: + - still has problem with '-d' ('go' even with this option) + + * doc/makehistory.8: doc/makehistory.8: + - correct description. + + Thu Jul 23 17:22:48 1998 James Brister + + * INSTALL: + Shifted the buffer-creation section around to make things hopefully a + little clearer. + + * configure, configure.in: Fixed a letter-case typo. + + * configure, configure.in: Fixed broken variable usage. + + * configure, configure.in: Fixed broken use of shell variable. + + Thu Jul 23 00:00:30 1998 Katsuhiro Kondou + + * storage/cnfs/cnfs-private.h, storage/cnfs/cnfs.c: + storage/cnfs/cnfs-private.h: + storage/cnfs/cnfs.c: + - From: Aidan Cully + - As promised on inn-workers.. This patch is against the 2.1 test + release James Brister posted yesterday. I'm not completely + comfortable with the config.scoreboard patch.. In particular the + +[IN1.7=@NO][WDF=autoconf][WOR=no] + line.. If someone more comfortable with the config.scoreboard file + took a look, it'd be cool, but it seems to work fine for me, so I'm + not particularly worried. + + Wed Jul 22 23:59:04 1998 Katsuhiro Kondou + + * include/config.h.in: include/config.h.in: + - From: Aidan Cully + - As promised on inn-workers.. This patch is against the 2.1 test + release James Brister posted yesterday. I'm not completely + comfortable with the config.scoreboard patch.. In particular the + +[IN1.7=@NO][WDF=autoconf][WOR=no] + line.. If someone more comfortable with the config.scoreboard file + took a look, it'd be cool, but it seems to work fine for me, so I'm + not particularly worried. + + * configure, configure.in: configure.in: + configure: + - From: Aidan Cully + - As promised on inn-workers.. This patch is against the 2.1 test + release James Brister posted yesterday. I'm not completely + comfortable with the config.scoreboard patch.. In particular the + +[IN1.7=@NO][WDF=autoconf][WOR=no] + line.. If someone more comfortable with the config.scoreboard file + took a look, it'd be cool, but it seems to work fine for me, so I'm + not particularly worried. + + * config/config.scoreboard: config/config.scoreboard: + - From: Aidan Cully + - As promised on inn-workers.. This patch is against the 2.1 test + release James Brister posted yesterday. I'm not completely + comfortable with the config.scoreboard patch.. In particular the + +[IN1.7=@NO][WDF=autoconf][WOR=no] + line.. If someone more comfortable with the config.scoreboard file + took a look, it'd be cool, but it seems to work fine for me, so I'm + not particularly worried. + + Wed Jul 22 20:39:55 1998 James Brister + + * INSTALL: Added a section about boot time. + + * configure.in, configure: + Check for Digital Unix and if it is then don't look for malloc.h + as the DU version is missing the function prototypes and this confuses + configure. + + * MANIFEST: Dropped CHANGES file. + + * CONTRIBUTORS: Added mki@primenet.com + + * nnrpd/article.c: + Fixed error in overview data retrieval when overviewmmap is defined + and traditional spool is used. (provided by mki@primenet.com) + + * CONTRIBUTORS: Fixed up Landon Curt Noll's entry. + + Tue Jul 21 23:39:10 1998 Katsuhiro Kondou + + * storage/cnfs/cnfs.c: storage/cnfs/cnfs.c: + - remove #ifdef XXX to have pagesize statically. + + Tue Jul 21 21:39:14 1998 James Brister + + * nnrpd/commands.c: + Added missing return statement. (provided by mki@primenet.com) + + Tue Jul 21 14:43:40 1998 Katsuhiro Kondou + + * innfeed/startinnfeed.c: innfeed/startinnfeed.c: + - From: Russell Vincent + - Use the configure generated NEWSUSER + + * doc/cycbuff.conf.5: doc/cycbuff.conf.5: + - symbolic buffer name should be limited to 7 characters + + * INSTALL: INSTALL: + - symbolic buffer name should be limited to 7 characters + + * expire/expire.c: expire/expire.c: + - still did not fix the previous problem + + * expire/expire.c: expire/expire.c: + - fixes mistake when applying previous patch + diff -Nacr inn-2.1/INSTALL inn-2.2/INSTALL *** inn-2.1/INSTALL Fri Jul 24 13:13:00 1998 --- inn-2.2/INSTALL Fri Jan 8 08:12:37 1999 *************** *** 22,34 **** Solaris 2.6.x SunOS 4.1.4 UX/4800 R11 and up Before You Begin ! + INN requires perl 5.004 or greater to run. If you don't have perl, INN ! will fail to build. For instructions on obtaining and installing perl, see http://language.perl.com/info/software.html. + If you want to enable support for authenticated control messages (this is NOT required) then you will need to install PGP. There are some questions involving PGP's license if you are running a commercial installation of --- 22,46 ---- Solaris 2.6.x SunOS 4.1.4 UX/4800 R11 and up + AIX 4.2 Before You Begin ! + INN requires Perl to build and to run several subsystems. Though ! some perl scripts are compatible with Perl 4, some features (such as ! script embedded in the server) mandate Perl 5. An audit has not yet ! been done on what the minimum version of Perl for all features is, so ! it is recommended that you have at least Perl version 5.004. For ! instructions on obtaining and installing Perl, see http://language.perl.com/info/software.html. + + The INN Makefiles use the syntax "include FILE", rather than the + syntax common on BSDish systems of ".include ". If your system + expects the BSDish syntax, you can address this in two ways: change + each Makefile's "include" lines, or install GNU Make from + ftp://ftp.gnu.ai.mit.edu. If you choose the latter route, make + sure that the "make" command in site/do-subst.sh points to GNU Make. + + If you want to enable support for authenticated control messages (this is NOT required) then you will need to install PGP. There are some questions involving PGP's license if you are running a commercial installation of *************** *** 58,69 **** INN supports three methods of storing articles on your system. Each method has specific advantages and disadvantages. These storage methods are: ! traditional - This is the storage method used by all previous versions of INN. ! Articles are stored as individual text files whose names are the ! same as the article number. The articles are divided up into ! directories based on the news group name. For example, article ! 12345 in news.software.nntp would be stored in the article spool ! under the path "news/software/nntp/12345". Advantages: solid time-tested code, compatible with all of the third-party INN add-ons available, gives you --- 70,81 ---- INN supports three methods of storing articles on your system. Each method has specific advantages and disadvantages. These storage methods are: ! traditional - This is the storage method used by all previous versions of ! INN. Articles are stored as individual text files whose names ! are the same as the article number. The articles are divided up ! into directories based on the news group name. For example, ! article 12345 in news.software.nntp would be stored in the ! article spool under the path "news/software/nntp/12345". Advantages: solid time-tested code, compatible with all of the third-party INN add-ons available, gives you *************** *** 145,160 **** The tagged hash format uses much less memory but is somewhat slower. This option is recommended if you have less than 256 MB of RAM on your news server. ! ! --enable-pgp-verify This enable support for PGP (Pretty Good Privacy) ! signature checking on control messages. This makes ! it nearly impossible for malicious individuals to ! post forged newsgroup creation or deletion messages ! for the major hierarchies (comp.*, rec.*, etc.) ! You will need to have PGP installed on your system ! for this to work, and there are issues with using ! PGP on commercial systems, so this option is off by ! default. --with-perl Enables support for Perl, allowing you to install filter scripts written in Perl. Highly recommended, --- 157,174 ---- The tagged hash format uses much less memory but is somewhat slower. This option is recommended if you have less than 256 MB of RAM on your news server. ! If your server disables tagged hash and expire takes ! many hours, you should check the amount of RAM to ! satisfy the following formula. If it doesn't ! satisfy, you should enable tagged hash and rebuild ! dbz files. ! ! n > (6 + extendeddbz ? 12 : 4) * tablesize ! ! n: amount of RAM ! extendeddbz: extendeddbz in inn.conf ! tablesize: value in 3rd field on the 1st line in ! history.dir --with-perl Enables support for Perl, allowing you to install filter scripts written in Perl. Highly recommended, *************** *** 174,180 **** --disable-static Do not create static libraries A suggested set of options, provided you have the necessary software ! installed, is "./configure --with-perl --enable-pgp-verify". If the configure program runs successfully, then you are ready to build the distribution. From the root of the INN source tree, type: --- 188,194 ---- --disable-static Do not create static libraries A suggested set of options, provided you have the necessary software ! installed, is "./configure --with-perl". If the configure program runs successfully, then you are ready to build the distribution. From the root of the INN source tree, type: *************** *** 300,308 **** times larger, but should increase performance for news readers when they retrieve article overview information. If you don't mind using 200-300 MB of extra space for ! your history database then you should set this to "yes". ! nntpdoverstats If set to "yes" then nnrpd will log statistics about how much time was spent during the various stages of reading article overview information. Not terribly useful unless you are trying to track down news reader --- 314,323 ---- times larger, but should increase performance for news readers when they retrieve article overview information. If you don't mind using 200-300 MB of extra space for ! your history database and memory then you should set ! this to "yes". ! nnrpdoverstats If set to "yes" then nnrpd will log statistics about how much time was spent during the various stages of reading article overview information. Not terribly useful unless you are trying to track down news reader *************** *** 320,325 **** --- 335,357 ---- and IRIX-6.5 are reported so far) it would be worse than ever. For those systems overviewmmap should be "no". + usecontrolchan All control messages except for the cancel will never + processed by external program fork'ed by innd. To + reduce excessive load when many control messages arrive + in a short time, this is useful and recommended. + Controlchan will log its error to syslog, if Sys::Syslog + is available. Otherwise it logs to errlog. To enale + Sys::Syslog, you need to do following: + + # cd /usr/include + # h2ph * + # cd /usr/include/sys + # h2ph * + + logipaddr Set false, if controlchan is used and ihave/sendme setup + is required. Or ihave and sendme cannot get correct + name, then the messages are incorrect. + 2. newsfeeds (REQUIRED) The newsfeeds file determines how incoming articles are redistributed to *************** *** 374,387 **** receive any distributions except those marked as "local" (any such articles are probably being leaked out by a misconfigured server). ! Next we'll set up special entries for the overchan, innfeed and (if you're ! not using cnfs or timehash) crosspost programs. There are already entries ! for these programs in the default newsfeeds file; you need only uncomment ! them and edit the pathnames to the programs to match your setup (there are ! two entries for overchan, one for use with the Storage Manager API and one ! for use without it; uncomment only the one matching your setup) . Assuming ! you installed INN under the default path of /usr/local/news then the ! appropriate feed entries would look like this: For traditional storage method: --- 406,420 ---- receive any distributions except those marked as "local" (any such articles are probably being leaked out by a misconfigured server). ! Next we'll set up special entries for the overchan, innfeed, controlchan(if ! you set 'usecontrolchan: true' in inn.conf) and (if you're not using cnfs or ! timehash) crosspost programs. There are already entries for these programs in ! the default newsfeeds file; you need only uncomment them and edit the ! pathnames to the programs to match your setup (there are two entries for ! overchan, one for use with the Storage Manager API and one for use without ! it; uncomment only the one matching your setup) . Assuming you installed INN ! under the default path of /usr/local/news then the appropriate feed entries ! would look like this: For traditional storage method: *************** *** 401,406 **** --- 434,445 ---- !*\ :Tc,Wnm*,S16384:/usr/local/news/bin/startinnfeed -y + If the server will not be supporting readers (a transit news server only), + it's not necessary to run overchan. If you do that, however, and you're + using CNFS or timehash, be sure to leave overview.ctl empty so that INN + doesn't generate overview information either. See the information about + overview.ctl below. + Finally, you need to add entries for any actual sites to which you will be feeding articles. They will all have the same general format: *************** *** 415,420 **** --- 454,467 ---- newsgroup pattern from your ME entry is sufficient; otherwise, set the newsgroup pattern appropriately. The last line should not be modified. + As for controlchan, this is useful and strongly recommended to setup. + Processing by controlchan can reduce excessive load if many control messages + arrive in a short time. To enable controlchan: + + controlchan!\ + :!*,control,control.*,!control.cancel\ + :Tc,Wnsm:/usr/local/news/bin/controlchan + 3. incoming.conf (REQUIRED) The incoming.conf file describes what machines are allowed to connect to *************** *** 484,502 **** of the cycbuffs that should be used to build this metacycbuff. Each cycbuff should only appear in -one- metacycbuff line. ! 5. storage.ctl (Required only if using the CNFS or timehash storage methods) ! The storage.ctl file maps newsgroups into storage classes, which determine where and how the article is stored. This file has a very simple format; each line defines a storage class for articles. The first matching storage class is used to store the article; if no storage class matches then INN will reject that article. ! A storage class is defined as a single line consisting of size fields: methodname:newsgroup pattern:storage class #:minsize:maxsize:options ! The first field, "methodname", is the name of the storage method used to store articles in this storage class. It should be set to "cnfs", "timehash", or the special storage method "trash" (which accepts the article but does not actually store it anywhere). Note that "traditional" is not a valid --- 531,558 ---- of the cycbuffs that should be used to build this metacycbuff. Each cycbuff should only appear in -one- metacycbuff line. ! 5. storage.conf (Required only if using the CNFS or timehash storage methods) ! The storage.conf file maps newsgroups into storage classes, which determine where and how the article is stored. This file has a very simple format; each line defines a storage class for articles. The first matching storage class is used to store the article; if no storage class matches then INN will reject that article. ! A storage class is defined as a grouped entry consisting of size, expires and ! other parameters: methodname:newsgroup pattern:storage class #:minsize:maxsize:options + + method { + newsgroups: + class: + size: [,] + expires: [,] + options: + } ! The grouped, "methodname", is the name of the storage method used to store articles in this storage class. It should be set to "cnfs", "timehash", or the special storage method "trash" (which accepts the article but does not actually store it anywhere). Note that "traditional" is not a valid *************** *** 504,524 **** storage, and if you are using traditional method then you should skip to the next section. ! The second field is a wildmat pattern in the same format used by the newsfeeds file, and determines what newsgroups are accepted by this storage class. ! The third field is a unique number identifying this storage class and should ! be between 0 and 255. It is used primarily to control article expiration. ! The fourth and fifth fields can be used to accept only articles in a certain size range into this storage class. A maxsize of zero means no upper limit (and of course a minsize of 0 would mean no lower limit, because an article is always great than zero bytes long.) ! ! The last field is the options field. Currently only CNFS uses this field; it ! should contain the name of the metacycbuff used to store articles in this ! storage class. For CNFS users, create one storage class for each metacycbuff that you have defined, listing what newsgroups are to be stored in that buffer. --- 560,586 ---- storage, and if you are using traditional method then you should skip to the next section. ! The first parameter is a wildmat pattern in the same format used by the newsfeeds file, and determines what newsgroups are accepted by this storage class. ! The second parameter is a unique number identifying this storage class and ! should be between 0 and 255. It is used primarily to control article ! expiration. ! The third parameter can be used to accept only articles in a certain size range into this storage class. A maxsize of zero means no upper limit (and of course a minsize of 0 would mean no lower limit, because an article is always great than zero bytes long.) ! ! The fourth parameter can be used to accept only articles in a certain ! Expire range into this storage class. A maxtime of zero means no upper limit ! (and a mintime of non-zero would mean article never falls in this class, if ! it includes Expires header.) ! ! The fifth parameter is the options parameter. Currently only CNFS uses this ! field; it should contain the name of the metacycbuff used to store articles ! in this storage class. For CNFS users, create one storage class for each metacycbuff that you have defined, listing what newsgroups are to be stored in that buffer. *************** *** 537,553 **** stored for each newsgroup. Overview is stored in one more more storage files identified by unique numbers between 0 and 254. Each line consists of the storage file number followed by a single colon and a wildmat pattern list ! of which newsgroups are to be stored in that file. As with storage.ctl, the first matching line is used. ! The exact way in which you distribute articles across multiple overview ! storage areas is not an exact science. As a start we suggest creating 27 ! storage areas; the first 26 will be for newsgroups "a*" through "z*", and the ! 27th will be for "*" (thus catching any groups that start with a non-letter, ! of which there are several). You can change the layout in the future by ! modifying this file and then waiting for the daily news expiration to run, ! at which time the overview data will be re-arranged for you during the ! expiration process. 7. expire.ctl (REQUIRED) --- 599,625 ---- stored for each newsgroup. Overview is stored in one more more storage files identified by unique numbers between 0 and 254. Each line consists of the storage file number followed by a single colon and a wildmat pattern list ! of which newsgroups are to be stored in that file. As with storage.conf, the first matching line is used. ! If your server will not be supporting any readers (if it's for news transit ! only), you can leave this file empty and not run an overchan process (see ! above under newsfeeds). As a result, no overview information will be ! generated and reading from the server will be impossible, but the server may ! run faster. If you choose to do this, you won't be able to set expire times ! on a newsgroup by newsgroup basis, and if you're using timehash you'll have ! to use a different syntax in expire.ctl. See the expire.ctl man page for ! details. ! ! The way in which you distribute articles across multiple overview storage ! areas is not an exact science; the goal is to spread access out across a ! number of smaller files rather than one large file. As a start we suggest ! creating 27 storage areas; the first 26 will be for newsgroups "a*" through ! "z*", and the 27th will be for "*" (thus catching any groups that start with ! a non-letter, of which there are several). You can change the layout in the ! future by modifying this file and then waiting for the daily news expiration ! to run, at which time the overview data will be re-arranged for you during ! the expiration process. 7. expire.ctl (REQUIRED) *************** *** 617,622 **** --- 689,700 ---- into your system crontab instead: 0 3 * * * su -c "/usr/local/news/bin/news.daily expireover lowmark" news + + Also, a cron job should be set up to transmit to your upstream site any + articles that have have been posted locally and queued for transmission, + for example: + + 1,11,21,31,41,51 * * * * /usr/local/news/bin/nntpsend The pathnames and user ID used above are the installation defaults; change them to match your installation if you used something other than the diff -Nacr inn-2.1/MANIFEST inn-2.2/MANIFEST *** inn-2.1/MANIFEST Fri Jul 24 13:13:00 1998 --- inn-2.2/MANIFEST Wed Dec 30 05:24:12 1998 *************** *** 3,8 **** --- 3,9 ---- .now_do 1 Notification file used by configure CONTRIBUTORS 1 Contributors info. COPYRIGHT 1 Legal mumbo-jumbo + ChangeLog 1 RCS logs HISTORY 1 Messages of historical significance INSTALL 1 Simple documentation for introducing inn MANIFEST 1 This shipping list *************** *** 11,16 **** --- 12,18 ---- MakeRnews 1 Make an rnews distribution kit Makefile 1 Top-level makefile Makefile.global.in 1 Template Makefile included by all Makefile + NEWS 1 Info about changes since last version README 1 Assorted notes README.perl_hook 1 Notes on Christophe Wolfhugel's perl hook. README.tcl_hook 1 Bob Halley's TCL hook notes. *************** *** 29,34 **** --- 31,37 ---- backends/crosspost.c 1 Crosspost link maker backends/cvtbatch.c 1 Add fields to simple batchfile backends/filechan.c 1 Split a funnel into separate files + backends/inndf.c 1 df used for innwatch backends/innxbatch.c 1 Send batches using XBATCH command to remote. backends/innxmit.c 1 Send articles to remote site backends/map.c 1 Site name to filename mapping routines *************** *** 54,75 **** contrib 1 External contributions (Directory) contrib/README.contrib 1 README file for the contrib contents. contrib/cleanoi 1 Script to clean overview index files contrib/expirectl 1 Generate expire.ctl from template contrib/findmissing.pl 1 locate articles not in history. contrib/fixhist 1 Script to clean history contrib/listoi.c 1 Display an overview.index file contrib/newsbot 1 Grep articles and trigger actions doc 1 Manpages (Directory) doc/Makefile 1 Makefile for documentation doc/active.5 1 Manpage for active config file ! doc/actived.8 1 Manpage for actived doc/actsync.8 1 Manpage for active file synchro. program. doc/archive.8 1 Manpage for archive doc/batcher.8 1 Manpage for batcher doc/buffchan.8 1 Manpage for buffchan backend doc/clientlib.3 1 Manpage for part of InterNetNews library doc/control-messages 1 tal's description of control messages doc/control.ctl.5 1 Manpage for control.ctl config file doc/convdate.1 1 Manpage for convdate doc/crosspost.8 1 Manpage for crosspost doc/ctlinnd.8 1 Manpage for ctlinnd frontend --- 57,83 ---- contrib 1 External contributions (Directory) contrib/README.contrib 1 README file for the contrib contents. contrib/cleanoi 1 Script to clean overview index files + contrib/count_overview.pl 1 Count overview entries contrib/expirectl 1 Generate expire.ctl from template contrib/findmissing.pl 1 locate articles not in history. contrib/fixhist 1 Script to clean history + contrib/format_overview.pl 1 Format output of count_overview.pl contrib/listoi.c 1 Display an overview.index file contrib/newsbot 1 Grep articles and trigger actions doc 1 Manpages (Directory) doc/Makefile 1 Makefile for documentation doc/active.5 1 Manpage for active config file ! doc/actived.8 1 Manpage for actived doc/actsync.8 1 Manpage for active file synchro. program. + doc/actsyncd.8 1 Manpage for active file synchro. program. doc/archive.8 1 Manpage for archive doc/batcher.8 1 Manpage for batcher doc/buffchan.8 1 Manpage for buffchan backend doc/clientlib.3 1 Manpage for part of InterNetNews library + doc/cnfsstat.8 1 Manpage for cnfsstat doc/control-messages 1 tal's description of control messages doc/control.ctl.5 1 Manpage for control.ctl config file + doc/controlchan.8 1 Manpage for controlchan doc/convdate.1 1 Manpage for convdate doc/crosspost.8 1 Manpage for crosspost doc/ctlinnd.8 1 Manpage for ctlinnd frontend *************** *** 94,99 **** --- 102,108 ---- doc/innconfval.1 1 Manpage for innconfval doc/innd.8 1 Manpage for innd server doc/inndcomm.3 1 Manpage for part of InterNetNews library + doc/inndf.8 1 Manpage for inndf doc/innfeed.1 1 Manpage for innfeed doc/innfeed.conf.5 1 Manpage for innfeed.conf config file doc/innlog.pl.8 1 Manpage for innlog.pl *************** *** 108,115 **** --- 117,127 ---- doc/libstorage.3 1 Manpage for storageAPI library routines doc/makeactive.8 1 Manpage for makeactive doc/makehistory.8 1 Manpage for makhistory + doc/mailpost.8 1 Manpage for mailpost + doc/mod-active.8 1 Manpage for mod-active doc/moderators.5 1 Manpage for moderators mail addresses file doc/motd.news.5 1 Manpage for motd.news config file + doc/news2mail.8 1 Manpage for news2mail doc/news-recovery.8 1 Manpage for recovery programs doc/news.daily.8 1 Manpage for news.daily doc/newsfeeds.5 1 Manpage for innd's newsfeeds file *************** *** 129,134 **** --- 141,147 ---- doc/passwd.nntp.5 1 Manpage for passwd.nntp config file doc/pgpverify.8 1 Manpage for pgpverify doc/prunehistory.8 1 Manpage for prunehistory + doc/pullnews.8 1 Manpage for pullnews doc/putman.sh 1 Install a manpage doc/qio.3 1 Manpage for part of InterNetNews library doc/rnews.1 1 Manpage for rnews frontend *************** *** 136,143 **** --- 149,158 ---- doc/send-uucp.8 1 Manpage for send-uucp doc/shlock.1 1 Manpage for shlock backend utility doc/shrinkfile.1 1 Manpage for shrinkfile + doc/simpleftp.1 1 Manpage for simpleftp doc/sm.8 1 Manpage for sm doc/startinnfeed.1 1 Manpage for startinnfeed + doc/storage.conf.5 1 Manpage for storage.conf config file doc/storage.ctl.5 1 Manpage for storage.ctl config file doc/strcasecmp.3 1 Manpage for strcasecmp library routine (BSD) doc/subst.1 1 Manpage for subst *************** *** 162,173 **** expire/reap.pch 1 Patch to reap to print files and Message-IDs frontends 1 Inews, rnews, ctlinnd (Directory) frontends/Makefile 1 Makefile for frontends ! frontends/c7unbatch.sh 1 Decode and uncompress input frontends/ctlinnd.c 1 Send control request to innd frontends/decode.c 1 Decode 7-bit data into binary file frontends/encode.c 1 Encode binary file into 7-bit data frontends/feedone.c 1 Test rig to feed a single NNTP article frontends/getlist.c 1 Get active or other file from NNTP server frontends/inews.c 1 Send article to local NNTP server frontends/innconfval.c 1 Get an INN configuration parameter frontends/rn.pch 1 Patch to RN to build with INN --- 177,189 ---- expire/reap.pch 1 Patch to reap to print files and Message-IDs frontends 1 Inews, rnews, ctlinnd (Directory) frontends/Makefile 1 Makefile for frontends ! frontends/c7unbatch.sh.in 1 Decode and uncompress input frontends/ctlinnd.c 1 Send control request to innd frontends/decode.c 1 Decode 7-bit data into binary file frontends/encode.c 1 Encode binary file into 7-bit data frontends/feedone.c 1 Test rig to feed a single NNTP article frontends/getlist.c 1 Get active or other file from NNTP server + frontends/gunbatch.sh.in 1 Decode and gunzip input frontends/inews.c 1 Send article to local NNTP server frontends/innconfval.c 1 Get an INN configuration parameter frontends/rn.pch 1 Patch to RN to build with INN *************** *** 177,182 **** --- 193,199 ---- iftrue.sh 1 Execute command if test(1) is true include 1 Header files (Directory) include/clibrary.h.in 1 C library declarations + include/conffile.h 1 Header file for reading *.conf files include/config.h.in 1 Template configuration data include/configdata.h 1 Configuration data, used by everyone include/dbz.h 1 Header file for DBZ *************** *** 218,224 **** innd/tcl.c 1 Bob Halley's tcl hook. innd/timer.c 1 Timer routines for innd innd/wip.c 1 Wip routines for innd - installit.sh 1 File/directory installation tool innfeed 1 Innfeed (Directory) innfeed/ChangeLog 1 History of changes innfeed/INSTALL 1 Simple documentation for introducing innfeed --- 235,240 ---- *************** *** 269,274 **** --- 285,291 ---- lib/clientactive.c 1 Client access to the active file lib/clientlib.c 1 Replacements for nntp1.5 "clientlib" routines. lib/closeonexec.c 1 Make a descriptor close-on-exec + lib/conffile.c 1 Reading *.conf files routines lib/dbz.c 1 DBZ database library lib/defdist.c 1 Determine default Distribution header lib/endian.c 1 Determine system's endian *************** *** 350,362 **** --- 367,384 ---- obsolete/hosts.nntp.nolimit 1 Sample hosts.nntp(5) file obsolete/innlog.awk 1 Summarize syslog log files obsolete/innlog.pl 1 Perl version of the syslog summary. + obsolete/innshellvars.csh.in 1 CSH Script to set config parameters obsolete/scanlogs-backend.pl 1 Summarize news log file obsolete/tally.unwanted 1 Summarize unwanted articles samples 1 Prototype InterNetNews files (Directory) samples/actsync.cfg.in 1 Config file for actsync samples/actsync.ign 1 Ignore file for actsync samples/checkgroups.in 1 Checkgroups control message handler + samples/checkgroups.pl.in 1 Checkgroups control message handler for controlchan + samples/cnfsstat.in 1 Show cycbuff status samples/control.ctl 1 Access control for control messages + samples/controlbatch.in 1 Batch program for controlchan + samples/controlchan.in 1 Channel program for control messages samples/cycbuff.conf 1 Sample cycbuff.conf(5) file samples/default.in 1 Default control message handler samples/distrib.pats 1 Default values for Distribution header *************** *** 367,372 **** --- 389,395 ---- samples/filter_innd.pl 1 Sample perl filter for innd samples/filter_nnrpd.pl 1 Sample perl filter for nnrpd samples/ihave.in 1 Ihave control message handler + samples/ihave.pl.in 1 Ihave control message handler for controlchan samples/incoming.conf 1 Sample incoming.conf(5) file samples/inn.conf.in 1 Sample inn.conf(5) file samples/inncheck.in 1 Perl script to syntax-check INN config files *************** *** 375,393 **** samples/innreport.conf.in 1 Sample innreport.conf file samples/innreport.in 1 Script to report inn statistics samples/innreport_inn.pm 1 Config file for innreport - samples/innshellvars.csh.in 1 Csh script to set config parameters. samples/innshellvars.in 1 Script to set config parameters samples/innshellvars.pl.in 1 Perl Script to set config parameters samples/innshellvars.tcl.in 1 TCL Script to set config parameters samples/innstat.in 1 Display INN status snapshot samples/innwatch.ctl.in 1 Sample innwatch.ctl(5) file samples/innwatch.in 1 Throttle innd based on load and disk space samples/moderators 1 Sample moderators(5) file samples/motd.news 1 Sample motd.news(5) file samples/newgroup.in 1 Newgroup control message handler samples/news.daily.in 1 Front-end script to run expire, etc. ! samples/newsfeeds 1 Sample newsfeeds(5) file samples/nnrp.access 1 Sample nnrp.access(5) file samples/nnrpd.track 1 Sample nnrpd.track(5) file samples/nntpsend.ctl 1 Sample control file for nntpsend samples/nntpsend.in 1 Invoke all innxmit's at once --- 398,421 ---- samples/innreport.conf.in 1 Sample innreport.conf file samples/innreport.in 1 Script to report inn statistics samples/innreport_inn.pm 1 Config file for innreport samples/innshellvars.in 1 Script to set config parameters samples/innshellvars.pl.in 1 Perl Script to set config parameters samples/innshellvars.tcl.in 1 TCL Script to set config parameters samples/innstat.in 1 Display INN status snapshot samples/innwatch.ctl.in 1 Sample innwatch.ctl(5) file samples/innwatch.in 1 Throttle innd based on load and disk space + samples/mailpost.in 1 Email to news gateway + samples/mod-active.in 1 Batch do ctlinnd newgroup/rmgroup/changegroup samples/moderators 1 Sample moderators(5) file samples/motd.news 1 Sample motd.news(5) file samples/newgroup.in 1 Newgroup control message handler + samples/newgroup.pl.in 1 Newgroup control message handler for controlchan + samples/news2mail.cf 1 news2mail config file + samples/news2mail.in 1 News to mail gateway samples/news.daily.in 1 Front-end script to run expire, etc. ! samples/newsfeeds.in 1 Sample newsfeeds(5) file samples/nnrp.access 1 Sample nnrp.access(5) file + samples/nnrpd_auth.pl.in 1 Sample nnrpd authorization script samples/nnrpd.track 1 Sample nnrpd.track(5) file samples/nntpsend.ctl 1 Sample control file for nntpsend samples/nntpsend.in 1 Invoke all innxmit's at once *************** *** 396,403 **** samples/parsecontrol.in 1 Initial parsing of control messages samples/passwd.nntp 1 Sample passwd.nntp(5) file samples/pgpverify.in 1 Sample pgpverify program. samples/rc.news.in 1 News boot script ! samples/rmgroup.in 1 Rmgoup control message handler samples/sample.control 1 Control message for testing PGP. samples/scanlogs.in 1 Summarize log files samples/scanspool.in 1 Scan spool directory for trash --- 424,433 ---- samples/parsecontrol.in 1 Initial parsing of control messages samples/passwd.nntp 1 Sample passwd.nntp(5) file samples/pgpverify.in 1 Sample pgpverify program. + samples/pullnews.in 1 sucking feeder samples/rc.news.in 1 News boot script ! samples/rmgroup.in 1 Rmgroup control message handler ! samples/rmgroup.pl.in 1 Rmgroup control message handler for controlchan samples/sample.control 1 Control message for testing PGP. samples/scanlogs.in 1 Summarize log files samples/scanspool.in 1 Scan spool directory for trash *************** *** 406,419 **** --- 436,455 ---- samples/send-uucp.in 1 Script to call batcher samples/sendbatch.in 1 B News-like script to send UUCP batches samples/sendme.in 1 Sendme control message handler + samples/sendme.pl.in 1 Sendme control message handler for controlchan samples/sendsys.in 1 Sendsys control message handler + samples/sendsys.pl.in 1 Sendsys control message handler for controlchan samples/senduuname.in 1 Senduuname control message handler + samples/senduuname.pl.in 1 Senduuname control message handler for controlchan samples/signcontrol.in 1 pgp control message signing program. + samples/simpleftp.in 1 Rudimentary perl ftp client samples/startup.tcl.in 1 tcl startup code. samples/startup_innd.pl 1 perl startup code for innd + samples/storage.conf 1 Sample storage.conf(5) file samples/storage.ctl 1 Sample storage.ctl(5) file samples/tally.control.in 1 Count newgroup/rmgroup messages samples/version.in 1 Version control message handler + samples/version.pl.in 1 Version control message handler for controlchan samples/writelog.in 1 Write a log entry or mail it site 1 Site-local files (Directory) site/Makefile 1 Makefile for site-local files *************** *** 422,428 **** storage 1 Storage api library routines (Directory) storage/Make.methods 1 Include file for Makefile storage/Makefile 1 Makefile for Storage api - storage/buildconfig 1 Script to create methods.[ch] storage/buildconfig.in 1 Template of buildconfig file storage/cnfs 1 Cnfs method (Directory) storage/cnfs/Makefile 1 Makefile for cnfs method --- 458,463 ---- diff -Nacr inn-2.1/Makefile inn-2.2/Makefile *** inn-2.1/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/Makefile Thu Jan 21 10:30:00 1999 *************** *** 1,11 **** ! ## $Revision: 1.18 $ include Makefile.global CFLAGS = $(GCFLAGS) RELEASE=2 ! PATCHLEVEL=0 VERSION=$(RELEASE).$(PATCHLEVEL) #TARDIR=inn --- 1,11 ---- ! ## $Revision: 1.18.2.3 $ include Makefile.global CFLAGS = $(GCFLAGS) RELEASE=2 ! PATCHLEVEL=2 VERSION=$(RELEASE).$(PATCHLEVEL) #TARDIR=inn *************** *** 61,76 **** common: @for D in $(DIRS) ; do \ echo "" ; \ ! echo "cd $$D ; $(MAKE) $(FLAGS) $(WHAT_TO_MAKE) ; cd .." ; \ ! cd $$D; $(MAKE) $(FLAGS) $(WHAT_TO_MAKE) || exit 1 ; cd .. ; \ done ## Software update -- install just the programs and documentation. update: @for D in $(PROGS) ; do \ echo "" ; \ ! echo "cd $$D ; $(MAKE) $(FLAGS) install ; cd .." ; \ ! cd $$D; $(MAKE) $(FLAGS) install || exit 1 ; cd .. ; \ done ## Build subst (for configuration). --- 61,76 ---- common: @for D in $(DIRS) ; do \ echo "" ; \ ! echo "cd $$D ; $(MAKE) $(FLAGS) DESTDIR=$(DESTDIR) $(WHAT_TO_MAKE) ; cd .." ; \ ! cd $$D; $(MAKE) $(FLAGS) DESTDIR=$(DESTDIR) $(WHAT_TO_MAKE) || exit 1 ; cd .. ; \ done ## Software update -- install just the programs and documentation. update: @for D in $(PROGS) ; do \ echo "" ; \ ! echo "cd $$D ; $(MAKE) $(FLAGS) DESTDIR=$(DESTDIR) install ; cd .." ; \ ! cd $$D; $(MAKE) $(FLAGS) DESTDIR=$(DESTDIR) install || exit 1 ; cd .. ; \ done ## Build subst (for configuration). *************** *** 84,114 **** chmod 444 Install.ms ## Additional cleanups. ! clobber realclean: clean @echo "" rm -f Install.ms inn*.tar.Z inn*.tar.gz Part0? MANIFEST.BAK rm -rf inews.* rnews.* nntplib.* rm -f tags */tags core */core a.out */a.out foo */foo rm -f CHANGES *~ rm -fr $(TARDIR) ! rm -f config.cache config.log libtool rm -f BUILD makedirs.sh config/config.data backends/actmerge.sh ! rm -f backends/actsyncd.sh backends/sendxbatches.sh include/clibrary.h ! rm -f include/config.h include/paths.h samples/actsync.cfg ! rm -f samples/checkgroups samples/default samples/docheckgroups ! rm -f samples/expirerm samples/ihave samples/inn.conf samples/inncheck ! rm -f samples/innmail samples/innreport samples/innreport.conf rm -f samples/innshellvars samples/innshellvars.csh rm -f samples/innshellvars.pl samples/innshellvars.tcl rm -f samples/innstat samples/innwatch samples/innwatch.ctl ! rm -f samples/news.daily samples/newgroup samples/nntpsend ! rm -f samples/parsecontrol samples/pgpverify samples/rc.news ! rm -f samples/rmgroup samples/scanlogs samples/scanspool ! rm -f samples/send-ihave samples/send-nntp samples/send-uucp ! rm -f samples/sendbatch samples/sendme samples/sendsys ! rm -f samples/senduuname samples/signcontrol samples/startup.tcl ! rm -f samples/tally.control samples/version samples/writelog ! rm -f storage/buildconfig syslog/syslog.conf @echo "" cd site ; make clobber ; cd .. rm -f Makefile.global --- 84,122 ---- chmod 444 Install.ms ## Additional cleanups. ! clobber realclean distclean: clean @echo "" rm -f Install.ms inn*.tar.Z inn*.tar.gz Part0? MANIFEST.BAK rm -rf inews.* rnews.* nntplib.* rm -f tags */tags core */core a.out */a.out foo */foo rm -f CHANGES *~ rm -fr $(TARDIR) ! rm -f config.cache config.log config.status libtool rm -f BUILD makedirs.sh config/config.data backends/actmerge.sh ! rm -f backends/actsyncd.sh backends/sendxbatches.sh ! rm -f frontends/c7unbatch.sh frontends/gunbatch.sh ! rm -f includes/autoconfig.h include/clibrary.h include/config.h ! rm -f include/paths.h innfeed/innfeed-convcfg innfeed/procbatch ! rm -f samples/actsync.cfg samples/checkgroups samples/checkgroups.pl ! rm -f samples/cnfsstat samples/controlbatch samples/controlchan ! rm -f samples/default samples/docheckgroups samples/expirerm ! rm -f samples/ihave samples/ihave.pl samples/inn.conf samples/inncheck ! rm -f samples/innmail samples/innreport samples/innreport.conf rm -f samples/innshellvars samples/innshellvars.csh rm -f samples/innshellvars.pl samples/innshellvars.tcl rm -f samples/innstat samples/innwatch samples/innwatch.ctl ! rm -f samples/mailpost samples/mod-active samples/news.daily ! rm -f samples/news2mail samples/newgroup samples/newgroup.pl ! rm -f samples/nnrpd_auth.pl samples/nntpsend samples/parsecontrol ! rm -f samples/pgpverify samples/pullnews samples/rc.news ! rm -f samples/rmgroup samples/rmgroup.pl samples/scanlogs ! rm -f samples/scanspool samples/send-ihave samples/send-nntp ! rm -f samples/send-uucp samples/sendbatch samples/sendme ! rm -f samples/sendme.pl samples/sendsys samples/sendsys.pl ! rm -f samples/senduuname samples/senduuname.pl samples/signcontrol ! rm -f samples/simpleftp samples/startup.tcl samples/tally.control ! rm -f samples/version samples/version.pl samples/writelog ! rm -f site/config storage/buildconfig syslog/syslog.conf @echo "" cd site ; make clobber ; cd .. rm -f Makefile.global diff -Nacr inn-2.1/Makefile.global.in inn-2.2/Makefile.global.in *** inn-2.1/Makefile.global.in Fri Jul 24 13:13:00 1998 --- inn-2.2/Makefile.global.in Tue Oct 13 12:23:08 1998 *************** *** 1,4 **** ! ## $Id: Makefile.global.in,v 1.20 1998/07/03 15:13:11 kondou Exp $ ## This file is meant to be the central Makefile that configure works with ## and that all other Makefiles include --- 1,4 ---- ! ## $Id: Makefile.global.in,v 1.23 1998/10/13 12:23:08 coneill Exp $ ## This file is meant to be the central Makefile that configure works with ## and that all other Makefiles include *************** *** 24,36 **** --- 24,42 ---- EXTOBJ = @EXTOBJ@ EXTLIB = @EXTLIB@ LIBCC = $(LIBTOOL) @CC@ + LIBCCWITHOUTLIBTOOL = @CC@ UPLIBCC = $(UPLIBTOOL) @CC@ OUTPUT_OPTION = GCFLAGS = -I../include @CPPFLAGS@ @CFLAGS@ + LFS_CFLAGS = @LFS_CFLAGS@ LDFLAGS = @LDFLAGS@ + LFS_LDFLAGS = @LFS_LDFLAGS@ LIBS = @LIBS@ + LFS_LIBS = @LFS_LDFLAGS@ PERLLIB = ../lib/perl.o @PERL_LIB@ PERLINC = @PERL_INC@ + TCLLIB = @TCL_LIB@ + TCLINC = @TCL_INC@ EXTRA_SRC = @EXTRA_SRC@ OWNER = -O @NEWSUSER@ -G @NEWSGRP@ diff -Nacr inn-2.1/NEWS inn-2.2/NEWS *** inn-2.1/NEWS Thu Jan 1 00:00:00 1970 --- inn-2.2/NEWS Tue Nov 3 14:02:26 1998 *************** *** 0 **** --- 1,27 ---- + + Here are the changes for the latest version of INN. + + Version 2.2: + + - New storage.conf file (replaces storage.ctl). + - New (optional) way of handling non-cancel control + messages (controlchan) that serializes them and + prevents server overload from control message storms + - Support for actsyncd to fetch active file with ftp; + configured by default to get the one at + + if you run actsyncd. Be sure to read the manual + page for actsync to configure an actsync.ign file + for your site, and test simpleftp if you do not configure + with wget or ncftp. Also see + . + - Some options to configure are now moved to inn.conf + (merge-to-groups and pgp-verify). + - inndf, a portable version of df(1) is supplied. + - New cnfsstat program to show stats of cnfs buffers. + - news2mail program for gateway'ing news into email is provided. + - mailpost program for gateway'ing email to news is provided. + - pullnews program for doing a sucking feed is provided (not meant + for large feeds) + - The innshellvars.csh.in script is obsolete (and lives in the + obsolete directory, for now). diff -Nacr inn-2.1/README inn-2.2/README *** inn-2.1/README Fri Jul 24 13:13:00 1998 --- inn-2.2/README Thu Jan 21 10:55:11 1999 *************** *** 1,19 **** ! Welcome to INN 2.1! ! This is the public release of version 2.1 of InterNet News (INN). This work ! is sponsored by the Internet Software Consortium. ! This release is a bug-fix to the previous version. Please see ! the INSTALL document for installation instructions. Reporting Bugs - We're gathering information on who uses INN. Please do the following - - uname -a | Mail -s "2.1 usage survey" inn-survey@isc.org - - We appreciate it. You won't get a reply. - We're interested in all bug reports. Not just on the programs, but on the documentation too. Please send *all* such reports to: --- 1,12 ---- ! Welcome to INN 2.2! ! This work is sponsored by the Internet Software Consortium. ! Please see the INSTALL document for installation instructions. ! See the NEWS file for what's changed from the previous release. Reporting Bugs We're interested in all bug reports. Not just on the programs, but on the documentation too. Please send *all* such reports to: *************** *** 27,72 **** (please do *not* send bug reports to this address) For general "how do I do this" questions you should post to ! news.software.nntp as there are a lot of experienced INN users there, and ! there isn't the time necessary to answer general questions Have fun! Who's Responsible / Who to Thank ! See the CONTRIBUTORS file for a long list of past constributors as well ! as people from the inn-workers mailing list who have dedicated a ! lot of time and effort to getting this new version together. They deserve ! a big round of applause. They've certainly got my thanks. Supporting the INN Effort ! Note that INN is supported by the Internet Software Consortium, and although ! it is free for use and redistribution and incorporation into vendor products ! and export and anything else you can think of, it costs money to produce. ! That money comes from ISP's, hardware and software vendors, companies who ! make extensive use of the software, and generally kind hearted folk such as ! yourself. ! ! The Internet Software Consortium has also commissioned a DHCP server ! implementation, handles the official support/release of BIND, and supports ! the Kerberos Version 5 effort at MIT. You can learn more about the ISC's ! goals and accomplishments from the web page at . ! ! Some History ! ! 1.4sec was the last release produced by Rich Salz, the original author of ! INN. 1.4sec came out in the middle of 1993. After that Rich was unable to ! dedicate the time necessary to maintain it (and I now fully understand why). ! Dave Barr unofficially took over and produced 4 releases with a lot of help ! from the user community. Dave's 4 releases contained a lot of bug fixes and ! some functionality additions. ! ! Rich Salz, at the beginning of 1996, handed the source pool over to me as ! part of the agreement that the ISC would take over maintenance and ! development of future INN releases. Starting with Rich's post 1.4 source ! pool, I merged in the changes that had occured through the four 'unoff' ! versions, and then added quite a few bug fixes, enhancements etc. James Brister inn@isc.org (INN related mail) --- 20,56 ---- (please do *not* send bug reports to this address) For general "how do I do this" questions you should post to ! news.software.nntp as there are a lot of experienced INN users there, ! and there isn't the time necessary to answer general questions. Have fun! Who's Responsible / Who to Thank ! See the CONTRIBUTORS file for a long list of past contributors as ! well as people from the inn-workers mailing list who have dedicated ! a lot of time and effort to getting this new version together. They ! deserve a big round of applause. They've certainly got our thanks. ! ! Last, but certainly not least, Rich Salz, the original author of INN ! deserves a lion's share of the credit for writing INN in the first ! place and making it the most popular news server software on the ! planet (no NNTP yet to the moon, but we plan to be there first).. Supporting the INN Effort ! Note that INN is supported by the Internet Software Consortium, ! and although it is free for use and redistribution and incorporation ! into vendor products and export and anything else you can think of, ! it costs money to produce. That money comes from ISP's, hardware and ! software vendors, companies who make extensive use of the software, ! and generally kind hearted folk such as yourself. ! ! The Internet Software Consortium has also commissioned a DHCP ! server implementation, handles the official support/release of BIND, ! and supports the Kerberos Version 5 effort at MIT. You can learn ! more about the ISC's goals and accomplishments from the web page at ! . James Brister inn@isc.org (INN related mail) diff -Nacr inn-2.1/README.perl_hook inn-2.2/README.perl_hook *** inn-2.1/README.perl_hook Fri Jul 24 13:13:00 1998 --- inn-2.2/README.perl_hook Mon Oct 19 00:08:16 1998 *************** *** 1,11 **** ! This is $Revision: 1.5 $ dated $Date: 1998/06/09 10:53:31 $. innd and nnrpd now support some amount of Perl filtering of articles ! received from another peer or from a newsreader. This code is based very ! heavily on work Christophe Wolfhugel did. He in turn was ! inspired by the existing TCL support. Send me () and not ! Christophe any bug reports, as I fiddled with the code, and am probably the ! cause of any problems. What you get with the Perl support is described in more detail below, but basically you can supply a perl subroutine that will be invoked on every --- 1,11 ---- ! This is $Revision: 1.9 $ dated $Date: 1998/10/19 00:08:16 $. innd and nnrpd now support some amount of Perl filtering of articles ! received from another peer or from a newsreader and some authentication. ! This code is based very heavily on work Christophe Wolfhugel ! did. He in turn was inspired by the existing TCL support. Send me ! () and not Christophe any bug reports, as I fiddled with the ! code, and am probably the cause of any problems. What you get with the Perl support is described in more detail below, but basically you can supply a perl subroutine that will be invoked on every *************** *** 86,91 **** --- 86,109 ---- value returned (typically a string) is used to log the reason why it was rejected. + There are four perl subs available from the perl subroutines called + from within INN: + + INN::havehist(messageid) # returns true if messageid is in the history db + + INN::newsgroup(newsgroup) # returns the status of the news group (the last + # field of the active file, or false if the + # isn't in your active file + + INN::cancel(messageid) # cancels messageid on your server + + INN::addhist(messageid, arrivaltime,articletime,expiretime,paths) + # adds messageid to the history database + # all the other fields are optional. + # the time fields default to the current + # time, and the paths field defaults to + # the empty string. + -------------------------------------------------- nnrpd: *************** *** 99,106 **** to be rejected and the reason sent back to the client will be the returned value of the ``filter_post'' function. If $modify_headers is set to a non-zero value, then all headers in the associative array ``%hdr'' are written ! back to the posted message. -------------------------------------------------- Some notes: --- 117,153 ---- to be rejected and the reason sent back to the client will be the returned value of the ``filter_post'' function. If $modify_headers is set to a non-zero value, then all headers in the associative array ``%hdr'' are written ! back to the posted message. Here are other items for filtering articles for ! nnrpd. + - can access to message bodies, in the $body variable. + - can access to the poster's authinfo username, in the $user variable. + Obviously this has no effect unless you use authinfo. + - check a returncode 'DROP' to the Perl interface. If the string returned + by the Perl subroutine begins with 'DROP', the post will be discarded + and success returned to the client. + - check a returncode 'SPOOL' to the Perl interface. If the string + returned by the Perl subroutine begins with 'SPOOL', success will be + returned to the client and the post will be saved to in.coming/spam + for manual inspection. + + If ``nnrpperlauth'' in inn.conf is set to ``true'', nnrpd authenticates + reader with perl instead of normal authentication with nnrp.access. For + perl authentication, nnrpd_auth.pl is used. This file is loaded when nnrpd + starts up. If it defines a sub named `authenticate', then that function will + be called during processing of a connect, auth request or disconnect. + Attributes about the connection are passed to the program in the %attributes + global variable. It should return an array with 4 elements: + + 1) NNTP response code. Should be one of the codes from %connectcodes or %auth + codes + 2) Reading Allowed. Should be a boolean value. + 3) Posting Allowed. Should be a boolean value. + 4) Wildmat expression that says what groups to provide access to. + + All four of these are required. If there is a problem with them then nnrpd + will die and syslog the exact reason. See samples/nnrpd_auth.pl.in for sample + authentication. -------------------------------------------------- Some notes: diff -Nacr inn-2.1/aclocal.m4 inn-2.2/aclocal.m4 *** inn-2.1/aclocal.m4 Fri Jul 24 13:13:00 1998 --- inn-2.2/aclocal.m4 Mon Sep 7 08:51:04 1998 *************** *** 31,47 **** AC_REQUIRE([AC_PROG_LN_S]) dnl Allow the --disable-libtool flag to stop using libtool ! LIBTOOL='$(SHELL) ../libtool' ! UPLIBTOOL='$(SHELL) ../../libtool' ! EXTOBJ='lo' ! EXTLIB='la' AC_ARG_ENABLE(libtool, ! [ --enable-libtool use libtool for lib generation [default=yes]], ! [if test "$enableval" = no; then ! LIBTOOL='' ! UPLIBTOOL='' ! EXTOBJ='o' ! EXTLIB='a' fi]) AC_SUBST(LIBTOOL) AC_SUBST(UPLIBTOOL) --- 31,47 ---- AC_REQUIRE([AC_PROG_LN_S]) dnl Allow the --disable-libtool flag to stop using libtool ! LIBTOOL='' ! UPLIBTOOL='' ! EXTOBJ='o' ! EXTLIB='a' AC_ARG_ENABLE(libtool, ! [ --enable-libtool use libtool for lib generation [default=no]], ! [if test "$enableval" = yes; then ! LIBTOOL='$(SHELL) ../libtool' ! UPLIBTOOL='$(SHELL) ../../libtool' ! EXTOBJ='lo' ! EXTLIB='la' fi]) AC_SUBST(LIBTOOL) AC_SUBST(UPLIBTOOL) diff -Nacr inn-2.1/backends/Makefile inn-2.2/backends/Makefile *** inn-2.1/backends/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/Makefile Thu Sep 17 06:10:48 1998 *************** *** 1,4 **** ! ## $Revision: 1.21 $ include ../Makefile.global --- 1,4 ---- ! ## $Revision: 1.22 $ include ../Makefile.global *************** *** 6,17 **** SOURCES = archive.c batcher.c buffchan.c cvtbatch.c filechan.c \ innxmit.c innxbatch.c nntpget.c overchan.c shlock.c \ ! shrinkfile.c crosspost.c actsync.c ALL = archive batcher buffchan cvtbatch filechan \ innxmit innxbatch nntpget overchan shlock \ shrinkfile crosspost actsync actsyncd actmerge \ ! sendxbatches all: $(ALL) --- 6,17 ---- SOURCES = archive.c batcher.c buffchan.c cvtbatch.c filechan.c \ innxmit.c innxbatch.c nntpget.c overchan.c shlock.c \ ! shrinkfile.c crosspost.c actsync.c inndf.c ALL = archive batcher buffchan cvtbatch filechan \ innxmit innxbatch nntpget overchan shlock \ shrinkfile crosspost actsync actsyncd actmerge \ ! sendxbatches inndf all: $(ALL) *************** *** 86,91 **** --- 86,94 ---- shrinkfile: $(P) shrinkfile.o $(LIBNEWS) $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ shrinkfile.o $(LIBNEWS) $(LIBS) + inndf: $(P) inndf.o + $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ inndf.o + $(LIBNEWS): (cd ../lib ; $(MAKE) ) *************** *** 161,163 **** --- 164,167 ---- shrinkfile.o: ../include/configdata.h shrinkfile.o: ../include/libinn.h shrinkfile.o: ../include/macros.h + inndf.o: ../include/config.h diff -Nacr inn-2.1/backends/actsync.c inn-2.2/backends/actsync.c *** inn-2.1/backends/actsync.c Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/actsync.c Tue Oct 13 23:17:48 1998 *************** *** 1,4 **** ! /* @(#) $Id: actsync.c,v 1.16 1998/05/22 07:56:57 kondou Exp $ */ /* @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsync.c,v */ /* * actsync - sync or merge two active files --- 1,4 ---- ! /* @(#) $Id: actsync.c,v 1.18 1998/10/13 23:17:48 coneill Exp $ */ /* @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsync.c,v */ /* * actsync - sync or merge two active files *************** *** 208,214 **** if ((munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE)) < 0) return FALSE; } else { ! while (fread(&packed, OVERINDEXPACKSIZE, 1, fi) == 1) { UnpackOverIndex(packed, &index); if (index.artnum < lowmark) lowmark = index.artnum; --- 208,214 ---- if ((munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE)) < 0) return FALSE; } else { ! while (fread(packed, OVERINDEXPACKSIZE, 1, fi) == 1) { UnpackOverIndex(packed, &index); if (index.artnum < lowmark) lowmark = index.artnum; *************** *** 238,244 **** * ignore if it it does not begin with [1-9] */ p = ep->d_name; ! if (!CTYPE(isdigit, *p) || *p == '0') { /* first char is not [1-9], ignore */ continue; } --- 238,244 ---- * ignore if it it does not begin with [1-9] */ p = ep->d_name; ! if (!CTYPE(isdigit, (int)*p) || *p == '0') { /* first char is not [1-9], ignore */ continue; } *************** *** 247,253 **** * ignore if contains a non-digit elsewhere in the name */ for (++p; *p; ++p) { ! if (!CTYPE(isdigit, *p)) { break; } } --- 247,253 ---- * ignore if contains a non-digit elsewhere in the name */ for (++p; *p; ++p) { ! if (!CTYPE(isdigit, (int)*p)) { break; } } *************** *** 1350,1356 **** /* * check for bad chars in the hi water mark */ ! for (p=cur->hi, i=0; *p && isascii(*p) && isdigit(*p); ++p, ++i) { } if (*p) { if (!QUIET(hostid)) { --- 1350,1356 ---- /* * check for bad chars in the hi water mark */ ! for (p=cur->hi, i=0; *p && isascii(*p) && isdigit((int)*p); ++p, ++i) { } if (*p) { if (!QUIET(hostid)) { *************** *** 1392,1398 **** /* * check for bad chars in the low water mark */ ! for (p=cur->low, i=0; *p && isascii(*p) && isdigit(*p); ++p, ++i) { } if (*p) { if (!QUIET(hostid)) { --- 1392,1398 ---- /* * check for bad chars in the low water mark */ ! for (p=cur->low, i=0; *p && isascii(*p) && isdigit((int)*p); ++p, ++i) { } if (*p) { if (!QUIET(hostid)) { *************** *** 1585,1593 **** return 1; } /* set non_num as needed */ ! if (isalpha(name[0])) { non_num = TRUE; ! } else if (isdigit(name[0])) { non_num = FALSE; } else { return 1; --- 1585,1593 ---- return 1; } /* set non_num as needed */ ! if (isalpha((int)name[0])) { non_num = TRUE; ! } else if ((int)isdigit((int)name[0])) { non_num = FALSE; } else { return 1; *************** *** 1603,1615 **** } /* alpha chars are ok */ ! if (isalpha(*p)) { non_num = TRUE; continue; } /* numeric chars are ok */ ! if (isdigit(*p)) { continue; } --- 1603,1615 ---- } /* alpha chars are ok */ ! if (isalpha((int)*p)) { non_num = TRUE; continue; } /* numeric chars are ok */ ! if (isdigit((int)*p)) { continue; } *************** *** 1639,1647 **** * last '.', or before the beginning if no previous '.' * has been seen. */ ! if ((!num_chk || non_num) && isascii(*(p+1)) && isalnum(*(p+1))) { ++p; /* '.' is ok, and so is the next char */ ! if (isdigit(*p)) { /* reset non_num as needed */ non_num = FALSE; } else { non_num = TRUE; --- 1639,1647 ---- * last '.', or before the beginning if no previous '.' * has been seen. */ ! if ((!num_chk || non_num) && isascii(*(p+1)) && isalnum((int)*(p+1))) { ++p; /* '.' is ok, and so is the next char */ ! if (isdigit((int)*p)) { /* reset non_num as needed */ non_num = FALSE; } else { non_num = TRUE; diff -Nacr inn-2.1/backends/actsyncd.sh.in inn-2.2/backends/actsyncd.sh.in *** inn-2.1/backends/actsyncd.sh.in Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/actsyncd.sh.in Sat Oct 17 01:07:27 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! # @(#) $Id: actsyncd.sh.in,v 1.2 1998/06/25 05:57:45 kondou Exp $ # @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsyncd.sh,v # # actsyncd - actsync daemon --- 1,5 ---- #!@_PATH_SH@ ! # @(#) $Id: actsyncd.sh.in,v 1.3 1998/10/17 01:07:27 tale Exp $ # @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsyncd.sh,v # # actsyncd - actsync daemon *************** *** 26,55 **** . @LIBDIR@/innshellvars # Our lock file ! LOCK=${LOCKS}/LOCK.actsyncd # where actsync is located ! ACTSYNC=${PATHBIN}/actsync ! # timeout for ctlinnd ! TIMEOUT=120 # exit value of actsync if unable to get an active file NOSYNC=127 - # where ctlinnd lives - CTLINND="${PATHBIN}/ctlinnd" - # by default we xexec instead of reloading - XEXEC= - export XEXEC # parse args # if [ $# -gt 1 ]; then ! if [ X"-x" = X"$1" ]; then ! XEXEC=true ! shift ! elif [ X"-r" = X"$1" ]; then ! # backward compatibility ! XEXEC= ! shift ! fi fi case $# in 1) cfg="$1"; DEBUG=; DEBUG_FMT=; ;; --- 26,43 ---- . @LIBDIR@/innshellvars # Our lock file ! LOCK="${LOCKS}/LOCK.actsyncd" # where actsync is located ! ACTSYNC="${PATHBIN}/actsync" # exit value of actsync if unable to get an active file NOSYNC=127 # parse args # if [ $# -gt 1 ]; then ! case $1 in ! -x|-r) shift ;; # no longer relevant ! esac fi case $# in 1) cfg="$1"; DEBUG=; DEBUG_FMT=; ;; *************** *** 65,89 **** # parse config_file # ! host="`sed -n -e 's/#.*//' -e 's/^host=[ ]*//p' $cfg | tail -1`" if [ -z "$host" ]; then echo "$0: no host specified in $cfg" 1>&2 exit 3 fi ! flags="`sed -n -e 's/#.*//' -e 's/^flags=[ ]*//p' $cfg | tail -1`" if [ -z "$flags" ]; then echo "$0: no flags specified in $cfg" 1>&2 exit 4 fi ! ign="`sed -n -e 's/#.*//' -e 's/^ignore_file=[ ]*//p' $cfg | tail -1`" if [ -z "$ign" ]; then echo "$0: no ignore file specified in $cfg" 1>&2 exit 5 fi ! spool="`sed -n -e 's/#.*//' -e 's/^spool=[ ]*//p' $cfg | tail -1`" if [ -z "$spool" ]; then ! echo "$0: no spool directory specified in $cfg" 1>&2 ! exit 6 fi if [ ! -s "$ign" ]; then echo "$0: ignore_file not found or empty: $ign" 1>&2 --- 53,79 ---- # parse config_file # ! host="`sed -n -e 's/^host=[ ]*//p' $cfg | tail -1`" if [ -z "$host" ]; then echo "$0: no host specified in $cfg" 1>&2 exit 3 fi ! flags="`sed -n -e 's/^flags=[ ]*//p' $cfg | tail -1`" if [ -z "$flags" ]; then echo "$0: no flags specified in $cfg" 1>&2 exit 4 fi ! ign="`sed -n -e 's/^ignore_file=[ ]*//p' $cfg | tail -1`" if [ -z "$ign" ]; then echo "$0: no ignore file specified in $cfg" 1>&2 exit 5 fi ! ftp="`sed -n -e 's/^ftppath=[ ]*//p' $cfg | tail -1`" ! spool="`sed -n -e 's/^spool=[ ]*//p' $cfg | tail -1`" if [ -z "$spool" ]; then ! spool=$SPOOL ! #echo "$0: no spool directory specified in $cfg" 1>&2 ! #exit 6 fi if [ ! -s "$ign" ]; then echo "$0: ignore_file not found or empty: $ign" 1>&2 *************** *** 94,110 **** # flags="$flags -S $spool" ! # force -o a1 mode (overrides any -o argument in the command line) # if [ -z "$DEBUG" ]; then # standard actsyncd output mode ! flags="$flags -o a1" ! # DEBUG processing, ig debug_level was given # else # force -v level as needed flags="$flags -v $DEBUG" --- 84,105 ---- # flags="$flags -S $spool" ! # force -o c mode (overrides any -o argument in the command line) # if [ -z "$DEBUG" ]; then # standard actsyncd output mode ! flags="$flags -o c" ! # DEBUG processing, if debug_level was given # else + if [ ! -z "$ftp" ]; then + echo "$0: cannot use DEBUG mode with ftp (yet)" >&2 + exit 88; + fi + # force -v level as needed flags="$flags -v $DEBUG" *************** *** 127,147 **** # Lock out others # ! trap 'rm -f ${LOCK}; exit 1' 0 1 2 3 15 ! shlock -p $$ -f ${LOCK} || { ! echo "$0: Locked by `cat ${LOCK}`" 1>&2 exit 9 } # setup # ! activenew="${PATHETC}/active.new.$$" ! out="${TMPDIR}/.sync.$$" ! trap "rm -f $activenew $out ${LOCK}; exit" 0 1 2 3 15 rm -f "$out" touch "$out" chmod 0644 "$out" # try to sync # # Try to sync off of the host. If unable to connect/sync then retry --- 122,149 ---- # Lock out others # ! shlock -p $$ -f "${LOCK}" || { ! echo "$0: Locked by `cat '${LOCK}'`" 1>&2 exit 9 } # setup # ! workdir="${TMPDIR}/actsyncd" ! ctlinndcmds="cc_commands" ! out="sync.msg" ! cleanup="$SED -e 's/^/ /' < $out; rm -rf '$workdir' '$LOCK'" ! trap "eval $cleanup; exit 123" 1 2 3 15 rm -f "$out" touch "$out" chmod 0644 "$out" + set -e + rm -rf "$workdir" + mkdir "$workdir" + cd "$workdir" + set +e + # try to sync # # Try to sync off of the host. If unable to connect/sync then retry *************** *** 150,281 **** echo "=-= `date` for $host" >>$out 2>&1 for loop in 1 2 3 4 5 6 7 8 9 10; do ! # pause the server ! # ! echo "=-= `date` for $host pause innd" >>$out 2>&1 ! ${CTLINND} pause "actsyncd" >>$out ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host cannot pause innd" >>$out ! sed -e 's/^/ /' < "$out" ! exit 10 fi - # form the new active file - # - echo "rm -f $activenew" >>$out - rm -f "$activenew" >>$out 2>&1 - echo "touch $activenew" >>$out - touch "$activenew" >>$out 2>&1 - echo "chmod 0644 $activenew" >>$out - chmod 0644 "$activenew" >>$out 2>&1 - echo "$ACTSYNC -i $ign $flags $host" >>$out - eval "$ACTSYNC -i $ign $flags $host >$activenew 2>>$out" - status=$? if [ "$status" -ne "$NOSYNC" ]; then # detect bad status # if [ "$status" -ne 0 ]; then echo "FATAL: `date` for $host exit $status" >>$out ! ${CTLINND} go "actsyncd" >>$out ! sed -e 's/^/ /' < "$out" exit "$status" fi ! # detect empty output ! # ! if [ ! -s "$activenew" ]; then ! echo "FATAL: `date` for $host empty or missing $activenew" >>$out ! ${CTLINND} go "actsyncd" >>$out ! sed -e 's/^/ /' < "$out" ! exit 11 ! fi ! # form active.times lines for new newsgroups ! # ! # determine seconds since the Epoch (1 Jan 1970 0:00:00 UTC) ! EP_FMT='X%S + \( X%M \* 60 \) + \( X%H \* 3600 \) + \( X%j \* 86400 \) + \( \( X%y - 70 \) \* 31536000 \) + \( \( \( X%y - 73 \) / 4 \) \* 86400 \)' ! NOW=`eval expr \`TZ=UTC date "+$EP_FMT" | sed -e 's/X00* /0 /' -e 's/X0*/0/g'\`` ! if [ -z "${NOW}" ]; then ! echo "FATAL: `date` for $host secs output is empty" >>$out ! ${CTLINND} go "actsyncd" >>$out ! sed -e 's/^/ /' < "$out" ! exit 12 ! fi ! echo "=-= `date` for $host, forming active.times" >>$out ! eval "$ACTSYNC -i $ign $flags -o c -v 0 -q 12 ${ACTIVE} $activenew 2>>$out" | \ ! grep '^ctlinnd newgroup ' | \ ! awk '{print $3, NOW, "actsyncd";}' NOW=$NOW - >> ${ACTIVETIMES} ! ! # move the active file into place ! # ! wc "${ACTIVE}.old" "${ACTIVE}" "$activenew" | sed -e 's/^ *//' >>$out ! echo "rm -f ${ACTIVE}.old" >>$out ! rm -f "${ACTIVE}.old" >>$out 2>&1 ! echo "ln ${ACTIVE} ${ACTIVE}.old" >>$out ! ln "${ACTIVE}" "${ACTIVE}.old" >>$out 2>&1 ! echo "mv -f $activenew ${ACTIVE}" >>$out ! mv -f "$activenew" "${ACTIVE}" >>$out 2>&1 ! ! # reload the new active or reexec the server if needed ! # ! if [ -z "$XEXEC" ]; then ! # reload the modified active file ! # ! echo "=-= `date` for $host, reload active" >>$out ! ${CTLINND} reload active actsyncd >>$out 2>&1 ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host cannot reload active" >>$out ! sed -e 's/^/ /' < "$out" ! exit 13 ! fi ! ! # active file has been updated successfully, resume server ! # ! echo "=-= `date` for $host, go innd" >>$out ! ${CTLINND} go "actsyncd" >>$out ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host cannot go innd" >>$out ! sed -e 's/^/ /' < "$out" ! exit 14 ! fi ! else ! # just re-exec the server and let the new server read new active ! # ! echo "=-= `date` for $host, xexec" >>$out ! ${CTLINND} xexec '' >>$out 2>&1 ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host cannot xexec, server dead" >>$out ! sed -e 's/^/ /' < "$out" ! exit 15 ! fi ! # see if the server has reloaded ! # ! sleep 30 ! ${CTLINND} mode >/dev/null 2>&1 ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host did not resume after xexec" >>$out ! sed -e 's/^/ /' < "$out" ! exit 16 ! fi ! fi # normal exit - all done # echo "=-= `date` for $host, end" >>$out ! sed -e 's/^/ /' < "$out" ! exit "$status" fi ! # failed to form the active file, resume server ! # echo "=-= `date` for $host failed to connect/sync, retrying" >>$out - ${CTLINND} go "actsyncd" >>$out - if [ $? -ne 0 ]; then - echo "FATAL: `date` for $host cannot go innd" >>$out - sed -e 's/^/ /' < "$out" - exit 17 - fi # wait 6 minutes # --- 152,227 ---- echo "=-= `date` for $host" >>$out 2>&1 for loop in 1 2 3 4 5 6 7 8 9 10; do ! # get the active file to compare against ! if [ -z "$ftp" ]; then ! echo "getlist -h $host" >>$out ! if getlist -h $host > active 2>>$out; then ! : ! else ! status=$NOSYNC ! fi ! else ! echo "$GETFTP ftp://$host/$ftp" >>$out ! $GETFTP ftp://$host/$ftp >>$out 2>&1 ! status=$? ! if [ "$status" -ne 0 ]; then ! status=$NOSYNC ! else ! case "$ftp" in ! # This isn't bulletproof. $COMPRESS might be compress, which ! # does not understand gzip. ! *.gz|*.Z) echo "$COMPRESS -d active" >>$out ! if $COMPRESS -d active >>$out 2>&1; then ! : ! else ! status=1 ! fi ;; ! esac ! fi fi if [ "$status" -ne "$NOSYNC" ]; then # detect bad status # if [ "$status" -ne 0 ]; then echo "FATAL: `date` for $host exit $status" >>$out ! eval $cleanup exit "$status" fi ! echo "$ACTSYNC -i $ign $flags ./active" >>$out ! eval "$ACTSYNC -i $ign $flags ./active >$ctlinndcmds 2>>$out" ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host actsync balked" >>$out ! eval $cleanup ! exit $? ! fi ! ! if [ ! -s $ctlinndcmds ]; then ! echo "No changes need to be made" >>$out ! else ! echo "=-= `date` for $host, updating active" >>$out ! echo "mod-active $ctlinndcmds" >>$out ! mod-active $ctlinndcmds >>$out 2>&1 ! ! if [ $? -ne 0 ]; then ! echo "FATAL: `date` for $host mod-active FAILED" >>$out ! eval $cleanup ! exit 1 ! fi ! fi # normal exit - all done # echo "=-= `date` for $host, end" >>$out ! eval $cleanup ! exit 0 fi ! # failed to get the remote active file echo "=-= `date` for $host failed to connect/sync, retrying" >>$out # wait 6 minutes # *************** *** 285,289 **** # give up # echo "FATAL: `date` for $host failed to connect/sync 10 times" >>$out 2>&1 ! sed -e 's/^/ /' < "$out" ! exit "$status" --- 231,235 ---- # give up # echo "FATAL: `date` for $host failed to connect/sync 10 times" >>$out 2>&1 ! eval $cleanup ! exit 1 diff -Nacr inn-2.1/backends/archive.c inn-2.2/backends/archive.c *** inn-2.1/backends/archive.c Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/archive.c Tue Jan 5 15:33:20 1999 *************** *** 1,4 **** ! /* $Revision: 1.10 $ ** ** Read batchfiles on standard input and archive them. */ --- 1,4 ---- ! /* $Revision: 1.10.4.3 $ ** ** Read batchfiles on standard input and archive them. */ *************** *** 232,237 **** --- 232,316 ---- /* + ** Copy an article from memory into a file. + */ + STATIC BOOL + CopyArt(ARTHANDLE *art, char *dest) + { + register FILE *out; + char *p,*q,*last; + ARTHANDLE article; + size_t i; + + /* Open the output file. */ + if ((out = fopen(dest, "w")) == NULL) { + /* Failed; make any missing directories and try again. */ + if ((p = strrchr(dest, '/')) != NULL) { + if (!MakeArchiveDirectory(dest)) { + (void)fprintf(stderr, "Can't mkdir for \"%s\", %s\n", + dest, strerror(errno)); + return FALSE; + } + out = fopen(dest, "w"); + } + if (p == NULL || out == NULL) { + (void)fprintf(stderr, "Can't open \"%s\" for writing, %s\n", + dest, strerror(errno)); + return FALSE; + } + } + + /* Copy the data. */ + article.data = NEW(char, art->len); + for (i=0, last=NULL, q=article.data, p=art->data; pdata+art->len;) { + if (&p[1] < art->data + art->len && p[0] == '\r' && p[1] == '\n') { + p += 2; + *q++ = '\n'; + i++; + if (&p[1] < art->data + art->len && p[0] == '.' && p[1] == '.') { + p += 2; + *q++ = '.'; + i++; + } + if (&p[2] < art->data + art->len && p[0] == '.' && p[1] == '\r' && p[2] == '\n') { + break; + } + } else { + *q++ = *p++; + i++; + } + } + *q++ = '\0'; + + /* Write the data. */ + if (fwrite(article.data, i, 1, out) != 1) { + (void)fprintf(stderr, "Can't write \"%s\", %s\n", + dest, strerror(errno)); + (void)fclose(out); + (void)unlink(dest); + return FALSE; + } + + /* Flush and close the output. */ + if (ferror(out) || fflush(out) == EOF) { + (void)fprintf(stderr, "Can't close \"%s\", %s\n", + dest, strerror(errno)); + (void)unlink(dest); + (void)fclose(out); + return FALSE; + } + if (fclose(out) == EOF) { + (void)fprintf(stderr, "Can't close \"%s\", %s\n", + dest, strerror(errno)); + (void)unlink(dest); + return FALSE; + } + + return TRUE; + } + + + /* ** Print a usage message and exit. */ STATIC NORETURN *************** *** 259,264 **** --- 338,346 ---- char buff[BUFSIZ]; char temp[BUFSIZ]; char dest[BUFSIZ]; + char *groups, *q; + ARTHANDLE *art; + TOKEN token; struct stat Sb; /* First thing, set up logging and our identity. */ *************** *** 333,338 **** --- 415,428 ---- Name = dest + strlen(dest); *Name++ = '/'; + /* If storageapi is being used, initialize... */ + if (innconf->storageapi) { + if (!SMinit()) { + (void)fprintf(stderr, "archive: Could not initialize the storage manager: %s", SMerrorstr); + exit(1); + } + } + /* Read input. */ while (fgets(buff, sizeof buff, stdin) != NULL) { if ((p = strchr(buff, '\n')) == NULL) { *************** *** 345,410 **** if (buff[0] == '\0' || buff[0] == COMMENT_CHAR) continue; ! /* Make sure we're only copying files. */ ! if (stat(buff, &Sb) < 0) { ! if (errno != ENOENT) ! (void)fprintf(stderr, "Can't stat \"%s\", %s\n", ! buff, strerror(errno)); ! continue; ! } ! if (!S_ISREG(Sb.st_mode)) { ! (void)fprintf(stderr, "\"%s\" is not a regular file\n", buff); ! continue; ! } ! /* Set up the destination name. */ ! (void)strcpy(Name, buff); ! if (Flat) { ! for (last = NULL, p = Name; *p; p++) ! if (*p == '/') { ! last = p; ! *p = '.'; } ! if (last) ! *last = '/'; } #if defined(HAVE_SYMLINK) ! if (Move) { ! if (!Copy(buff, dest)) ! continue; ! if (unlink(buff) < 0 && errno != ENOENT) ! (void)fprintf(stderr, "Can't remove \"%s\", %s\n", ! buff, strerror(errno)); ! if (symlink(dest, buff) < 0) ! (void)fprintf(stderr, "Can't symlink \"%s\" to \"%s\", %s\n", ! buff, dest, strerror(errno)); ! continue; ! } #endif /* defined(HAVE_SYMLINK) */ ! /* Try to link the file into the archive. */ ! if (link(buff, dest) < 0) { ! /* Make the archive directory. */ ! if (!MakeArchiveDirectory(dest)) { ! (void)fprintf(stderr, "Can't mkdir for \"%s\", %s\n", ! dest, strerror(errno)); ! continue; } ! /* Try to link again; if that fails, make a copy. */ ! if (link(buff, dest) < 0 && !Copy(buff, dest)) ! continue; } ! /* Write index. */ ! if (Index) { ! WriteIndex(dest, Name); ! if (ferror(stdout) || fflush(stdout) == EOF) ! (void)fprintf(stderr, "Can't write index for \"%s\", %s\n", ! Name, strerror(errno)); ! } } /* If we read all our input, try to remove the file, and we're done. */ --- 435,567 ---- if (buff[0] == '\0' || buff[0] == COMMENT_CHAR) continue; ! /* Check to see if this is a token... */ ! if (IsToken(buff)) { ! /* Get a copy of the article. */ ! token = TextToToken(buff); ! if ((art = SMretrieve(token, RETR_ALL)) == NULL) { ! (void)fprintf(stderr, "Could not retrieve %s\n", ! buff); ! continue; ! } ! ! /* Determine groups from the Xref header */ ! groups = (char *)HeaderFindMem(art->data, art->len, "Xref", 4); ! ! /* Skip over the newsserver name */ ! while (*groups!=' ' && *groups!='\r' && *groups!='\n') { ! groups++; ! } ! while (*groups==' ') { ! groups++; ! } ! ! /* Process newsgroup... */ ! if (*groups!='\r' && *groups!='\n' && *groups!='\0') { ! p = Name; ! while(*groups!=' ' && *groups!='\r' && *groups!='\n') { ! *p++ = *groups++; ! } ! *p='\0'; ! if ((p=strchr(Name, ':')) == NULL) { ! fprintf(stderr, "archive: bogus xref '%s'\n", Name); ! SMfreearticle(art); ! continue; ! } ! *p='/'; ! if (!Flat) { ! for (p=Name; *p; p++) { ! if (*p == '.') { ! *p = '/'; ! } ! } } ! ! if (!CopyArt(art, dest)) { ! fprintf(stderr, ! "archive: %s->%s failed\n", buff, dest); ! } ! ! /* Write index. */ ! if (Index) { ! WriteIndex(dest, Name); ! if (ferror(stdout) || fflush(stdout) == EOF) ! (void)fprintf(stderr, "Can't write index for \"%s\", %s\n", ! Name, strerror(errno)); ! } ! } ! ! /* Free up the article storage space */ ! SMfreearticle(art); } + else { + /* Make sure we're only copying files. */ + if (stat(buff, &Sb) < 0) { + if (errno != ENOENT) + (void)fprintf(stderr, "Can't stat \"%s\", %s\n", + buff, strerror(errno)); + continue; + } + if (!S_ISREG(Sb.st_mode)) { + (void)fprintf(stderr, "\"%s\" is not a regular file\n", buff); + continue; + } + + /* Set up the destination name. */ + (void)strcpy(Name, buff); + if (Flat) { + for (last = NULL, p = Name; *p; p++) + if (*p == '/') { + last = p; + *p = '.'; + } + if (last) + *last = '/'; + } #if defined(HAVE_SYMLINK) ! if (Move) { ! if (!Copy(buff, dest)) ! continue; ! if (unlink(buff) < 0 && errno != ENOENT) ! (void)fprintf(stderr, "Can't remove \"%s\", %s\n", ! buff, strerror(errno)); ! if (symlink(dest, buff) < 0) ! (void)fprintf(stderr, "Can't symlink \"%s\" to \"%s\", %s\n", ! buff, dest, strerror(errno)); ! continue; ! } #endif /* defined(HAVE_SYMLINK) */ ! /* Try to link the file into the archive. */ ! if (link(buff, dest) < 0) { ! /* Make the archive directory. */ ! if (!MakeArchiveDirectory(dest)) { ! (void)fprintf(stderr, "Can't mkdir for \"%s\", %s\n", ! dest, strerror(errno)); ! continue; ! } ! ! /* Try to link again; if that fails, make a copy. */ ! if (link(buff, dest) < 0 && !Copy(buff, dest)) ! continue; } ! /* Write index. */ ! if (Index) { ! WriteIndex(dest, Name); ! if (ferror(stdout) || fflush(stdout) == EOF) ! (void)fprintf(stderr, "Can't write index for \"%s\", %s\n", ! Name, strerror(errno)); ! } } + } ! /* close down the storage manager api */ ! if (innconf->storageapi) { ! SMshutdown(); } /* If we read all our input, try to remove the file, and we're done. */ diff -Nacr inn-2.1/backends/batcher.c inn-2.2/backends/batcher.c *** inn-2.1/backends/batcher.c Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/batcher.c Tue Oct 13 23:17:48 1998 *************** *** 1,4 **** ! /* $Revision: 1.7 $ ** ** Read batchfiles on standard input and spew out batches. */ --- 1,4 ---- ! /* $Revision: 1.9 $ ** ** Read batchfiles on standard input and spew out batches. */ *************** *** 349,355 **** if ((p = strchr(line, ' ')) != NULL) { *p++ = '\0'; /* Try to be forgiving of bad input. */ ! BytesInArt = CTYPE(isdigit, *p) ? atol(p) : -1; } else BytesInArt = -1; --- 349,355 ---- if ((p = strchr(line, ' ')) != NULL) { *p++ = '\0'; /* Try to be forgiving of bad input. */ ! BytesInArt = CTYPE(isdigit, (int)*p) ? atol(p) : -1; } else BytesInArt = -1; *************** *** 372,388 **** } BytesInArt = -1; Token = TRUE; ! } else if ((artfd = open(p, O_RDONLY)) < 0) { ! if (errno != ENOENT) ! (void)fprintf(stderr, SKIPPING, Host, p, strerror(errno)); ! if (AltSpool == NULL) ! continue; ! (void)sprintf(buff, "%s/%s", AltSpool, p); ! if ((artfd = open(buff, O_RDONLY)) < 0) { ! if (errno != ENOENT) ! (void)fprintf(stderr, SKIPPING, ! Host, buff, strerror(errno)); ! continue; } Token = FALSE; } --- 372,390 ---- } BytesInArt = -1; Token = TRUE; ! } else { ! if ((artfd = open(p, O_RDONLY)) < 0) { ! if (errno != ENOENT) ! (void)fprintf(stderr, SKIPPING, Host, p, strerror(errno)); ! if (AltSpool == NULL) ! continue; ! (void)sprintf(buff, "%s/%s", AltSpool, p); ! if ((artfd = open(buff, O_RDONLY)) < 0) { ! if (errno != ENOENT) ! (void)fprintf(stderr, SKIPPING, ! Host, buff, strerror(errno)); ! continue; ! } } Token = FALSE; } *************** *** 549,552 **** --- 551,555 ---- BATCHstatus = BATCHclose(F); RequeueAndExit(Cookie, (char *)NULL, 0L); /* NOTREACHED */ + return 0; } diff -Nacr inn-2.1/backends/inndf.c inn-2.2/backends/inndf.c *** inn-2.1/backends/inndf.c Thu Jan 1 00:00:00 1970 --- inn-2.2/backends/inndf.c Tue Oct 6 05:00:56 1998 *************** *** 0 **** --- 1,183 ---- + /* + + inndf [-i] + + Ian Dickinson + Wed Jul 26 10:11:38 BST 1995 (My birthday - 27 today!) + + $Id: inndf.c,v 1.4 1998/10/06 05:00:56 kondou Exp $ + + Replacement for 'df | awk' in innwatch.ctl + Reports free kilobytes (not disk blocks) or free inodes. + + Doesn't sync, forks less, less complicated, etc + This is non-ANSI C - K&R still lives + It should be easy to port if you have some sort of statfs() syscall + + Compile with -lserver (ie. /usr/lib/libserver.a) if you run Sun's + Online DiskSuite under SunOS 4.x. The wrapper functions there + make the system call transparent - they copy the f_spare values to + the correct spots, so f_blocks, f_bfree, f_bavail can exceed 2GB. + + Compile with -DHAVE_STATVFS for these systems: + System V Release 4.x + Solaris 2.x + HP-UX 10.x + OSF1 + + Compile with -DHAVE_STATFS for these systems: + SunOS 4.x/Solaris 1.x + HP-UX 9.x + Linux + NeXTstep 3.x + + Thanks to these folks for bug fixes and porting information: + Mahesh Ramachandran + Chuck Swiger + Sang-yong Suh + Swa Frantzen + Brad Dickey + Taso N. Devetzis + Wei-Yeh Lee + Jeff Garzik + + Here's the relevant portion of my innwatch.ctl: + + ## If load is OK, check space (and inodes) on various filesystems + ## =()@ ! lt ! @@ ! throttle ! No space (spool)>()= + !!! inndf /news/spool ! lt ! 18000 ! throttle ! No space (spool) + ## =()@ ! lt ! @@ ! throttle ! No space (overview)>()= + !!! inndf /news/lib/nov ! lt ! 1000 ! throttle ! No space (overview) + ## =()@ ! lt ! @@ ! throttle ! No space (newsq)>()= + !!! inndf /news/spool/out.going ! lt ! 11000 ! throttle ! No space (newsq) + ## =()@ ! lt ! @@ ! throttle ! No space (newslib)>()= + !!! inndf /news/lib ! lt ! 10000 ! throttle ! No space (newslib) + ## =()@ ! lt ! @@ ! throttle ! No space (spool inodes)>()= + !!! inndf -i /news/spool ! lt ! 1900 ! throttle ! No space (spool inodes) + + */ + + #include + #include + #ifdef HAVE_GETOPT_H + #include + #endif + #ifdef NeXT + /* NeXT puts optind's declaration in libc.h. */ + #include + #endif + #include + #include "config.h" + #include "configdata.h" + #include "clibrary.h" + + #ifdef HAVE_UNISTD_H + #include + #endif /* HAVE_UNISTD_H */ + + #ifdef HAVE_STATVFS + #include /* specific includes */ + #define STATFUNCT statvfs /* function call */ + #define STATSTRUC statvfs /* structure name */ + #define STATAVAIL f_bavail /* blocks available */ + #define STATMULTI f_frsize /* fragment size/block size */ + #define STATINODE f_favail /* inodes available */ + #define STATTYPES u_long /* type of f_bavail etc */ + #define STATFORMT "%lu" /* format string to match */ + #define STATFORMTPAD "%*lu" /* format string to match */ + #endif /* HAVE_STATVFS */ + + #ifdef HAVE_STATFS + #ifdef HAVE_SYS_VFS_H + #include + #endif /* HAVE_SYS_VFS_H */ + #ifdef HAVE_SYS_PARAM_H + #include + #endif /* HAVE_SYS_PARAM_H */ + #ifdef HAVE_SYS_MOUNT_H + #include + #endif /* HAVE_SYS_MOUNT_H */ + #define STATFUNCT statfs + #define STATSTRUC statfs + #define STATAVAIL f_bavail + #define STATMULTI f_bsize + #define STATINODE f_ffree; + #define STATTYPES long + #define STATFORMT "%ld" + #define STATFORMTPAD "%*ld" + #endif /* HAVE_STATFS */ + + #define KILOBYTES 1024L + + void + Printspace(char *path, BOOL inode, BOOL needpadding) + { + struct STATSTRUC buf; + STATTYPES value; + + if (STATFUNCT(path, &buf) != 0) { + value = 0L; /* if there's an error - free space is zero */ + } else { + if (!inode) { + /* this is often the same as just buf.f_bavail */ + /* but we want to cope with different underlying */ + /* block/fragment sizes, and avoid overflow */ + value = (STATTYPES) + (((double) buf.STATAVAIL * buf.STATMULTI) / + (STATTYPES) KILOBYTES); + } else { + value = buf.STATINODE; /* simple! */ + } + } + + if (needpadding) + (void) printf(STATFORMTPAD, 10, value); + else + (void) printf(STATFORMT, value); + } + + void + Usage(void) + { + (void)fprintf(stderr, "Usage: inndf [-i] director{y|ies}\n"); + exit(1); + } + + int + main(int argc, char **argv) + { + BOOL inode = FALSE; + int i; + + while ((i = getopt(argc, argv, "i")) != EOF) { + switch (i) { + default: + Usage(); + /* not reached */ + case 'i': + inode = TRUE; + break; + } + } + argc -= optind; + argv += optind; + /* This argument handling is gross */ + if (argc == 0) { + Usage(); + /* not reached */ + } + if (argc == 1) { + Printspace(argv[0], inode, FALSE); + printf("\n"); + } else { + for (i = 0 ; i < argc ; i++) { + printf("%-*s ", 40, argv[i]); + Printspace(argv[i], inode, TRUE); + if (inode) + printf(" inodes available\n"); + else + printf(" Kbytes available\n"); + } + } + exit(0); + } diff -Nacr inn-2.1/backends/innxmit.c inn-2.2/backends/innxmit.c *** inn-2.1/backends/innxmit.c Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/innxmit.c Fri Nov 27 07:14:30 1998 *************** *** 1,4 **** ! /* $Revision: 1.18 $ ** ** Transmit articles to remote site. ** Modified for NNTP streaming: 3Jan96 Jerry Aguirre --- 1,4 ---- ! /* $Revision: 1.20.2.1 $ ** ** Transmit articles to remote site. ** Modified for NNTP streaming: 3Jan96 Jerry Aguirre *************** *** 271,277 **** hash = 0; for (p = MessageID + 1; *p && (*p != '>'); p++) { hash <<= 1; ! if (isascii(*p) && isupper(*p)) { hash += tolower(*p); } else { hash += *p; --- 271,277 ---- hash = 0; for (p = MessageID + 1; *p && (*p != '>'); p++) { hash <<= 1; ! if (isascii((int)*p) && isupper((int)*p)) { hash += tolower(*p); } else { hash += *p; *************** *** 869,879 **** if (*p == '\0') /* Header is empty*/ break; ! if (strlen(p) >= buffsize) { if (buffsize) ! buff = RENEW(buff, char, strlen(p) + 1); else buff = NEW(char, strlen(p) + 1); } (void)strcpy(buff, p); --- 869,880 ---- if (*p == '\0') /* Header is empty*/ break; ! if (strlen(p) > buffsize) { if (buffsize) ! RENEW(buff, char, strlen(p) + 1); else buff = NEW(char, strlen(p) + 1); + buffsize = strlen(p); } (void)strcpy(buff, p); *************** *** 1544,1556 **** continue; } if (ContentEncoding ! && (caseEQ(ContentEncoding, "binary") ! || caseEQ(ContentEncoding, "8bit"))) if (ContentType == NULL || caseEQ(ContentType, "text")) MimeArticle = MTquotedprintable; ! else /* Shouldbe MTbase64, but not implemented yet. */ MimeArticle = MTnotmime; } if (GotInterrupt) Interrupted(Article, MessageID); --- 1545,1558 ---- continue; } if (ContentEncoding ! && (caseEQ(ContentEncoding, "binary") ! || caseEQ(ContentEncoding, "8bit"))) { if (ContentType == NULL || caseEQ(ContentType, "text")) MimeArticle = MTquotedprintable; ! } else { /* Shouldbe MTbase64, but not implemented yet. */ MimeArticle = MTnotmime; + } } if (GotInterrupt) Interrupted(Article, MessageID); *************** *** 1697,1700 **** --- 1699,1703 ---- BATCHtemp, strerror(errno)); ExitWithStats(0); /* NOTREACHED */ + return 0; } diff -Nacr inn-2.1/backends/nntpget.c inn-2.2/backends/nntpget.c *** inn-2.1/backends/nntpget.c Fri Jul 24 13:13:00 1998 --- inn-2.2/backends/nntpget.c Fri Jan 8 22:03:32 1999 *************** *** 1,4 **** ! /* $Revision: 1.11 $ ** Connect to a remote site, and get news from it to offer to our local ** server. Read list on stdin, or get it via NEWNEWS command. Writes ** list of articles still needed to stdout. --- 1,4 ---- ! /* $Revision: 1.11.4.1 $ ** Connect to a remote site, and get news from it to offer to our local ** server. Read list on stdin, or get it via NEWNEWS command. Writes ** list of articles still needed to stdout. *************** *** 253,260 **** exit(1); } gt = gmtime(&Sb.st_mtime); (void)sprintf(tbuff, "%02d%02d%02d %02d%02d%02d GMT", ! gt->tm_year, gt->tm_mon + 1, gt->tm_mday, gt->tm_hour, gt->tm_min, gt->tm_sec); Since = tbuff; break; --- 253,261 ---- exit(1); } gt = gmtime(&Sb.st_mtime); + /* Y2K: NNTP Spec currently allows only two digit years. */ (void)sprintf(tbuff, "%02d%02d%02d %02d%02d%02d GMT", ! gt->tm_year % 100, gt->tm_mon + 1, gt->tm_mday, gt->tm_hour, gt->tm_min, gt->tm_sec); Since = tbuff; break; diff -Nacr inn-2.1/config/config.scoreboard inn-2.2/config/config.scoreboard *** inn-2.1/config/config.scoreboard Fri Jul 24 13:13:00 1998 --- inn-2.2/config/config.scoreboard Thu Sep 17 06:33:30 1998 *************** *** 135,146 **** ||##[autoconf] ||#### =()@>()= ||ACT_STYLE @ac_cv_subst_act_style@ - [IN1.7=@6][WDF=confparam][WOR=yes][P=low] - ||## Do you want mail notifications of bad control messages. DO or DONT - ||## Setting it to do results in a lot of mail with the number of spammers - ||## out there. - ||#### =()@>()= - ||MAIL_BADCONTROLS DONT [IN1.7=@6][WDF=autoconf][WOR=no][P=high] ||## What type of pointer does mmap() manage? Normally ``caddr_t'' or ``void *'' ||## or ``char *'' --- 135,140 ---- *************** *** 201,210 **** ||#### =()@>()= ||BAD_DISTRIBS "*.*",NULL [IN1.7=@6][WDF=confparam][WOR=yes][P=low] - ||## File unknown "to.*" groups into the "to" newsgroup? Pick DO or DONT. - ||#### =()@>()= - ||MERGE_TO_GROUPS @DO_MERGE_TO_GROUPS@ - [IN1.7=@6][WDF=confparam][WOR=yes][P=low] ||## Have innd throttle itself after this many I/O errors. ||#### =()@>()= ||IO_ERROR_COUNT 50 --- 195,200 ---- *************** *** 272,281 **** ||## If you are short in RAM, say DO, else DONT. ||#### =()@>()= ||DBZ_TAGGED_HASH @DO_DBZ_TAGGED_HASH@ - [IN1.7=NO][WDF=autoconf][WOR=yes][P=high] - ||## Do you have shadow file? Pick DO or DONT - ||#### =()@>()= - ||HAVE_SHADOW DO [IN1.7=@8][comments] || ||## --- 262,267 ---- *************** *** 296,347 **** ||## The group owner of the rnews program. Usually uucp. ||#### =()@>()= ||RNEWS_GROUP uucp - [IN1.7=@11][WDF=confparam][WOR=yes] - ||## How many generates of log files to keep. - ||#### =()@>()= - ||LOG_CYCLES 3 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Load average (* 100) at which innd should be paused. - ||#### =()@>()= - ||INNWATCH_PAUSELOAD 1500 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Load average (* 100) at which innd should be throttled. - ||#### =()@>()= - ||INNWATCH_HILOAD 2000 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Load average (* 100) at which to restart innd (pause/throttle undone). - ||#### =()@>()= - ||INNWATCH_LOLOAD 1000 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Space, in df output units, at which to throttle innd on _PATH_SPOOL - ||## or _PATH_OVERVIEWDIR. - ||#### =()@>()= - ||INNWATCH_SPOOLSPACE 8000 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Space, in df output units, at which to throttle innd on _PATH_BATCHDIR. - ||#### =()@>()= - ||INNWATCH_BATCHSPACE 800 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Space, in df output units, at which to throttle innd on _PATH_NEWSLIB. - ||#### =()@>()= - ||INNWATCH_LIBSPACE 25000 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## Number of inodes at which to throttle innd on _PATH_SPOOL. - ||#### =()@>()= - ||INNWATCH_SPOOLNODES 200 - [IN1.7=@12][WDF=confparam][WOR=yes][P=low] - ||## How long to sleep between innwatch iterations. - ||#### =()@>()= - ||INNWATCH_SLEEPTIME 600 - [IN1.7=@12][WDF=autoconf][WOR=yes][P=moderate] - ||## Field number of INNWATCH_DF (with -i) output that gives free - ||## inodes (starting at 1). - ||#### =()@>()= - ||INNWATCH_INODES 7 - [IN1.7=@12][WDF=autoconf][WOR=yes][P=moderate] - ||## Field number of INNWATCH_DF output that gives the free block count. - ||##### =()@>()= - ||INNWATCH_BLOCKS 4 [IN1.7=@13][WDF=confparam][WOR=yes] ||## Do you want TCL support? Pick DO or DONT ||##[autoconf] --- 282,287 ---- *************** *** 359,371 **** ||#### =()@>()= ||TCL_LIB @TCL_LIB@ ||# TCL_LIB -ltcl -lm - [IN1.7=@14][WDF=confparam][WOR=yes] - ||## Do you want PGP verification of control messages? Pick DO or DONT - ||## If you change this then you need to fiddle with control.ctl. - ||## Setting it DONT is a really bad idea with all the miscreants out there... - ||##[autoconf] - ||#### =()@>()= - ||WANT_PGPVERIFY @DO_PGP@ [IN1.7=@17][WDF=confparam][WOR=no] ||## Do you want Perl support? Pick DO or DONT ||##[autoconf] --- 299,304 ---- diff -Nacr inn-2.1/config/files.list inn-2.2/config/files.list *** inn-2.1/config/files.list Fri Jul 24 13:13:00 1998 --- inn-2.2/config/files.list Thu Oct 22 15:39:47 1998 *************** *** 1,4 **** ! ;; $Id: files.list,v 1.23 1998/05/21 03:00:13 scrappy Exp $ ;; List of InterNetNews files that are fed to subst. ;; Lines beginning with a semi-colon are comment lines. ;; Files which are no longer config.data subst victims --- 1,4 ---- ! ;; $Id: files.list,v 1.23.4.1 1998/10/22 15:39:47 kondou Exp $ ;; List of InterNetNews files that are fed to subst. ;; Lines beginning with a semi-colon are comment lines. ;; Files which are no longer config.data subst victims *************** *** 13,19 **** ../samples/innreport.conf ../samples/innwatch.ctl ../samples/innshellvars - ../samples/innshellvars.csh ../samples/innshellvars.pl ../samples/innshellvars.tcl ../syslog/syslog.conf --- 13,18 ---- diff -Nacr inn-2.1/configure inn-2.2/configure *** inn-2.1/configure Fri Jul 24 13:13:00 1998 --- inn-2.2/configure Mon Jan 4 02:14:22 1999 *************** *** 15,39 **** ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help ! --enable-libtool use libtool for lib generation [default=yes]" ac_help="$ac_help --enable-shared build shared libraries [default=yes]" ac_help="$ac_help --enable-static build static libraries [default=yes]" ac_help="$ac_help - --enable-pgp-verify use pgp control verification" - ac_help="$ac_help --with-tcl TCL script support" ac_help="$ac_help --with-perl Perl script support" ac_help="$ac_help ! --with-db-dir=PATH News database files [PREFIX/db]" ac_help="$ac_help ! --with-run-dir=PATH News pid/runtime files [PREFIX/run]" ac_help="$ac_help ! --with-etc-dir=PATH News config files [PREFIX/etc]" ac_help="$ac_help ! --with-lib-dir=PATH News lib files [PREFIX/lib]" ac_help="$ac_help --with-spool-dir=PATH News storage [PREFIX/spool]" ac_help="$ac_help --- 15,39 ---- ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help ! --enable-libtool use libtool for lib generation [default=no]" ac_help="$ac_help --enable-shared build shared libraries [default=yes]" ac_help="$ac_help --enable-static build static libraries [default=yes]" ac_help="$ac_help --with-tcl TCL script support" ac_help="$ac_help --with-perl Perl script support" ac_help="$ac_help ! --with-largefiles Support for files greater than 2gb" ! ac_help="$ac_help ! --with-db-dir=PATH News database files [PREFIX/db]" ac_help="$ac_help ! --with-run-dir=PATH News pid/runtime files [PREFIX/run]" ac_help="$ac_help ! --with-etc-dir=PATH News config files [PREFIX/etc]" ac_help="$ac_help ! --with-lib-dir=PATH News lib files [PREFIX/lib]" ac_help="$ac_help --with-spool-dir=PATH News storage [PREFIX/spool]" ac_help="$ac_help *************** *** 41,59 **** ac_help="$ac_help --with-tmp-path=PATH Temporary files directory [PREFIX/tmp]" ac_help="$ac_help ! --with-news-user=USER News user id [news]" ac_help="$ac_help ! --with-news-group=GROUP News group id [news]" ac_help="$ac_help ! --with-news-master=USER News master [usenet]" ac_help="$ac_help --with-sendmail=PATH Specify sendmail" ac_help="$ac_help --with-log-compress=METHOD Log compression method (default gzip)" ac_help="$ac_help --enable-tagged-hash use tagged hash table for history" - ac_help="$ac_help - --enable-merge-to-groups merge to groups" # Initialize some variables set by options. # The variables have the same names as the options, with --- 41,57 ---- ac_help="$ac_help --with-tmp-path=PATH Temporary files directory [PREFIX/tmp]" ac_help="$ac_help ! --with-news-user=USER News user id [news]" ac_help="$ac_help ! --with-news-group=GROUP News group id [news]" ac_help="$ac_help ! --with-news-master=USER News master [usenet]" ac_help="$ac_help --with-sendmail=PATH Specify sendmail" ac_help="$ac_help --with-log-compress=METHOD Log compression method (default gzip)" ac_help="$ac_help --enable-tagged-hash use tagged hash table for history" # Initialize some variables set by options. # The variables have the same names as the options, with *************** *** 592,598 **** fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:596: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 590,596 ---- fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:594: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** *** 615,621 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:619: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 613,619 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:617: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 644,650 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:648: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 642,648 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:646: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 673,679 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:677: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 671,677 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:675: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 721,727 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 719,725 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:723: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** *** 731,741 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 729,739 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** *** 755,766 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:764: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 753,764 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:762: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 769,775 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 767,773 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** *** 784,790 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:788: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 782,788 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:786: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 824,830 **** if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:828: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. --- 822,828 ---- if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:826: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. *************** *** 842,851 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:846: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:849: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 840,849 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:844: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:847: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 881,887 **** test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:885: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 879,885 ---- test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:883: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 897,903 **** echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:901: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 895,901 ---- echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:899: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 934,940 **** echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:938: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 932,938 ---- echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:936: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 961,978 **** ! LIBTOOL='$(SHELL) ../libtool' ! UPLIBTOOL='$(SHELL) ../../libtool' ! EXTOBJ='lo' ! EXTLIB='la' # Check whether --enable-libtool or --disable-libtool was given. if test "${enable_libtool+set}" = set; then enableval="$enable_libtool" ! if test "$enableval" = no; then ! LIBTOOL='' ! UPLIBTOOL='' ! EXTOBJ='o' ! EXTLIB='a' fi fi --- 959,976 ---- ! LIBTOOL='' ! UPLIBTOOL='' ! EXTOBJ='o' ! EXTLIB='a' # Check whether --enable-libtool or --disable-libtool was given. if test "${enable_libtool+set}" = set; then enableval="$enable_libtool" ! if test "$enableval" = yes; then ! LIBTOOL='$(SHELL) ../libtool' ! UPLIBTOOL='$(SHELL) ../../libtool' ! EXTOBJ='lo' ! EXTLIB='la' fi fi *************** *** 1063,1078 **** test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix - # Check whether --enable-pgp-verify or --disable-pgp-verify was given. - if test "${enable_pgp_verify+set}" = set; then - enableval="$enable_pgp_verify" - DO_PGP=DO - else - DO_PGP=DONT - fi - - - # Check whether --with-tcl or --without-tcl was given. if test "${with_tcl+set}" = set; then withval="$with_tcl" --- 1061,1066 ---- *************** *** 1099,1104 **** --- 1087,1102 ---- + # Check whether --with-largefiles or --without-largefiles was given. + if test "${with_largefiles+set}" = set; then + withval="$with_largefiles" + DO_LFS=DO + else + DO_LFS=DONT + fi + + + # Check whether --with-db-dir or --without-db-dir was given. if test "${with_db_dir+set}" = set; then withval="$with_db_dir" *************** *** 1209,1215 **** echo $ac_n "checking for MANDIR""... $ac_c" 1>&6 ! echo "configure:1213: checking for MANDIR" >&5 if eval "test \"`echo '$''{'MANDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1207,1213 ---- echo $ac_n "checking for MANDIR""... $ac_c" 1>&6 ! echo "configure:1211: checking for MANDIR" >&5 if eval "test \"`echo '$''{'MANDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1227,1233 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1231: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1225,1231 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1229: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1256,1262 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1254,1260 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1304,1310 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1308: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 1302,1308 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1306: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** *** 1314,1324 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 1312,1322 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** *** 1338,1349 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1342: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1347: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1336,1347 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1340: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1345: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1352,1358 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 1350,1356 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** *** 1367,1373 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1371: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1365,1371 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1369: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1395,1401 **** fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1399: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1393,1399 ---- fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1397: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1416,1422 **** fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1420: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1414,1420 ---- fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1418: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1447,1453 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1451: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1445,1451 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1449: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1479,1485 **** # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1483: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1477,1483 ---- # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1481: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1512,1518 **** *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 ! echo "configure:1516: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1510,1516 ---- *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 ! echo "configure:1514: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1520,1526 **** ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 1529,1535 ---- yywrap() ; return 0; } EOF ! if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 1556,1562 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1560: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1554,1560 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1558: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1584,1590 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1588: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 1582,1588 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1586: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** *** 1599,1611 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : --- 1597,1609 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : *************** *** 1616,1628 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : --- 1614,1626 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : *************** *** 1645,1653 **** echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 ! echo "configure:1649: checking for AIX" >&5 cat > conftest.$ac_ext <&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 ! echo "configure:1647: checking for AIX" >&5 cat > conftest.$ac_ext <&6 ! echo "configure:1673: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then --- 1667,1673 ---- echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 ! echo "configure:1671: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then *************** *** 1690,1696 **** fi echo $ac_n "checking for Digital Unix""... $ac_c" 1>&6 ! echo "configure:1694: checking for Digital Unix" >&5 if test -f /osf_boot then echo "$ac_t""yes" 1>&6 --- 1688,1694 ---- fi echo $ac_n "checking for Digital Unix""... $ac_c" 1>&6 ! echo "configure:1692: checking for Digital Unix" >&5 if test -f /osf_boot then echo "$ac_t""yes" 1>&6 *************** *** 1720,1726 **** # Extract the first word of "ctags", so it can be a program name with args. set dummy ctags; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1724: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PATH_CTAGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1718,1724 ---- # Extract the first word of "ctags", so it can be a program name with args. set dummy ctags; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1722: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PATH_CTAGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1751,1757 **** echo $ac_n "checking for path to ctags""... $ac_c" 1>&6 ! echo "configure:1755: checking for path to ctags" >&5 if eval "test \"`echo '$''{'ac_cv_subst_ctags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1749,1755 ---- echo $ac_n "checking for path to ctags""... $ac_c" 1>&6 ! echo "configure:1753: checking for path to ctags" >&5 if eval "test \"`echo '$''{'ac_cv_subst_ctags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1773,1779 **** # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1777: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1771,1777 ---- # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1775: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1810,1816 **** # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1814: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1808,1814 ---- # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1847,1853 **** # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1851: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1845,1851 ---- # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1849: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1882,1930 **** - # Extract the first word of "df", so it can be a program name with args. - set dummy df; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1889: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path__PATH_DF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - case "$_PATH_DF" in - /*) - ac_cv_path__PATH_DF="$_PATH_DF" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path__PATH_DF="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; - esac - fi - _PATH_DF="$ac_cv_path__PATH_DF" - if test -n "$_PATH_DF"; then - echo "$ac_t""$_PATH_DF" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test "x${_PATH_DF}" = "x" - then - { echo "configure: error: df is a required program not found in path" 1>&2; exit 1; } - fi - - ac_cv_subst_innwatch_df=$ac_cv_path__PATH_DF - - # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1928: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_EGREP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1880,1889 ---- # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1887: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_EGREP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1961,1967 **** # Extract the first word of "sort", so it can be a program name with args. set dummy sort; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1965: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SORT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1920,1926 ---- # Extract the first word of "sort", so it can be a program name with args. set dummy sort; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1924: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SORT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1998,2004 **** # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2002: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1957,1963 ---- # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1961: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_SH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2032,2051 **** fi - echo $ac_n "checking for Perl version""... $ac_c" 1>&6 - echo "configure:2037: checking for Perl version" >&5 - $_PATH_PERL -e 'require 5.004' > /dev/null 2>&1 - if test $? -ne 0 ; then - { echo "configure: error: Perl 5.004 (or greater) is required" 1>&2; exit 1; } - else - perl_version=`$_PATH_PERL -e 'print $]'` - echo "$ac_t""$perl_version" 1>&6 - fi # Extract the first word of "pgpv", so it can be a program name with args. set dummy pgpv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2049: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PGP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1991,2002 ---- fi + pgpverify=true # Extract the first word of "pgpv", so it can be a program name with args. set dummy pgpv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2000: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PGP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2078,2084 **** # Extract the first word of "pgp", so it can be a program name with args. set dummy pgp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2082: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PGP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2029,2035 ---- # Extract the first word of "pgp", so it can be a program name with args. set dummy pgp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2033: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path__PATH_PGP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2107,2118 **** echo "$ac_t""no" 1>&6 fi fi # Extract the first word of "compress", so it can be a program name with args. set dummy compress; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2116: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2058,2153 ---- echo "$ac_t""no" 1>&6 fi + if test "x$_PATH_PGP" = xno-pgp-found-during-configure + then + pgpverify=false + fi + fi + + + for ac_prog in ncftp wget + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:2074: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GETFTP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$GETFTP" in + /*) + ac_cv_path_GETFTP="$GETFTP" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GETFTP="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; + esac + fi + GETFTP="$ac_cv_path_GETFTP" + if test -n "$GETFTP"; then + echo "$ac_t""$GETFTP" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + test -n "$GETFTP" && break + done + test -n "$GETFTP" || GETFTP="$prefix/bin/simpleftp" + + + if test "x$DO_LFS" = "xDO" + then + # Extract the first word of "getconf", so it can be a program name with args. + set dummy getconf; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:2112: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GETCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$GETCONF" in + /*) + ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GETCONF="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; + esac + fi + GETCONF="$ac_cv_path_GETCONF" + if test -n "$GETCONF"; then + echo "$ac_t""$GETCONF" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + LFS_CFLAGS=`$GETCONF LFS_CFLAGS` + LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS` + LFS_LIBS=`$GETCONF LFS_LIBS` + + + fi # Extract the first word of "compress", so it can be a program name with args. set dummy compress; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2151: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2146,2152 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2150: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2181,2187 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2185: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2208,2222 **** fi - # Check whether --enable-merge-to-groups or --disable-merge-to-groups was given. - if test "${enable_merge_to_groups+set}" = set; then - enableval="$enable_merge_to_groups" - DO_MERGE_TO_GROUPS=DO - else - DO_MERGE_TO_GROUPS=DONT - fi - - if test "${with_sendmail+set}" = set then echo using $SENDMAIL for sendmail --- 2243,2248 ---- *************** *** 2224,2230 **** # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2228: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2250,2256 ---- # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2254: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2259,2265 **** # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2263: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2285,2291 ---- # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2289: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2312,2319 **** EXTRA_SRC="" echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 ! echo "configure:2317: checking for setproctitle in -lutil" >&5 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2338,2392 ---- EXTRA_SRC="" + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 + echo "configure:2343: checking for crypt in -lcrypt" >&5 + ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + fi + echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 ! echo "configure:2390: checking for setproctitle in -lutil" >&5 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2321,2327 **** ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2405,2411 ---- setproctitle() ; return 0; } EOF ! if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2360,2366 **** fi echo $ac_n "checking for inet_addr in -l44bsd""... $ac_c" 1>&6 ! echo "configure:2364: checking for inet_addr in -l44bsd" >&5 ac_lib_var=`echo 44bsd'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2433,2439 ---- fi echo $ac_n "checking for inet_addr in -l44bsd""... $ac_c" 1>&6 ! echo "configure:2437: checking for inet_addr in -l44bsd" >&5 ac_lib_var=`echo 44bsd'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2368,2374 **** ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2452,2458 ---- inet_addr() ; return 0; } EOF ! if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2406,2413 **** echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 ! echo "configure:2411: checking for gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2479,2533 ---- echo "$ac_t""no" 1>&6 fi + echo $ac_n "checking for __inet_addr in -lbind""... $ac_c" 1>&6 + echo "configure:2484: checking for __inet_addr in -lbind" >&5 + ac_lib_var=`echo bind'_'__inet_addr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + fi + echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 ! echo "configure:2531: checking for gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2415,2421 **** ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2546,2552 ---- gethostbyname() ; return 0; } EOF ! if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2448,2454 **** fi echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 ! echo "configure:2452: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2568,2574 ---- fi echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 ! echo "configure:2572: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2456,2462 **** ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2587,2593 ---- inet_aton() ; return 0; } EOF ! if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2495,2501 **** if test x$ac_try_bind = x1 then echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6 ! echo "configure:2499: checking for inet_aton in -lbind" >&5 ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2615,2621 ---- if test x$ac_try_bind = x1 then echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6 ! echo "configure:2619: checking for inet_aton in -lbind" >&5 ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2503,2509 **** ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2634,2640 ---- inet_aton() ; return 0; } EOF ! if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2536,2546 **** if test x$ac_need_extra_inet_aton = x then ! EXTRA_SRC="inet_addr.c" fi fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ! echo "configure:2544: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2656,2709 ---- if test x$ac_need_extra_inet_aton = x then ! echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6 ! echo "configure:2661: checking for __inet_aton in -lbind" >&5 ! ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lbind $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_need_extra__inet_aton=1 ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test x$ac_need_extra__inet_aton = x ! then ! EXTRA_SRC="inet_addr.c" ! fi fi fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ! echo "configure:2707: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2548,2554 **** ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2722,2728 ---- gethostbyname() ; return 0; } EOF ! if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2587,2593 **** fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 ! echo "configure:2591: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2750,2756 ---- fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 ! echo "configure:2754: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2595,2601 **** ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2769,2775 ---- socket() ; return 0; } EOF ! if { (eval echo configure:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2634,2640 **** if test x$ac_try_nsl = x1 then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ! echo "configure:2638: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2797,2803 ---- if test x$ac_try_nsl = x1 then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ! echo "configure:2801: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2642,2648 **** ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2816,2822 ---- gethostbyname() ; return 0; } EOF ! if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2678,2685 **** LIBS="$LIBS -lnsl" fi fi echo $ac_n "checking for nlist in -lelf""... $ac_c" 1>&6 ! echo "configure:2683: checking for nlist in -lelf" >&5 ac_lib_var=`echo elf'_'nlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2841,2895 ---- LIBS="$LIBS -lnsl" fi fi + echo $ac_n "checking for getspnam in -lshadow""... $ac_c" 1>&6 + echo "configure:2846: checking for getspnam in -lshadow" >&5 + ac_lib_var=`echo shadow'_'getspnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lshadow $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo shadow | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + fi + echo $ac_n "checking for nlist in -lelf""... $ac_c" 1>&6 ! echo "configure:2893: checking for nlist in -lelf" >&5 ac_lib_var=`echo elf'_'nlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2687,2693 **** ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2908,2914 ---- nlist() ; return 0; } EOF ! if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2726,2732 **** fi echo $ac_n "checking for flock in -lbsd""... $ac_c" 1>&6 ! echo "configure:2730: checking for flock in -lbsd" >&5 ac_lib_var=`echo bsd'_'flock | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2936,2942 ---- fi echo $ac_n "checking for flock in -lbsd""... $ac_c" 1>&6 ! echo "configure:2940: checking for flock in -lbsd" >&5 ac_lib_var=`echo bsd'_'flock | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2734,2740 **** ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2955,2961 ---- flock() ; return 0; } EOF ! if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2773,2779 **** fi echo $ac_n "checking for regexec in -lregex""... $ac_c" 1>&6 ! echo "configure:2777: checking for regexec in -lregex" >&5 ac_lib_var=`echo regex'_'regexec | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2983,2989 ---- fi echo $ac_n "checking for regexec in -lregex""... $ac_c" 1>&6 ! echo "configure:2987: checking for regexec in -lregex" >&5 ac_lib_var=`echo regex'_'regexec | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2781,2787 **** ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 3002,3008 ---- regexec() ; return 0; } EOF ! if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2821,2829 **** if test x${DO_PERL} = xDO ; then echo $ac_n "checking for Perl configuration""... $ac_c" 1>&6 ! echo "configure:2825: checking for Perl configuration" >&5 perl_core_path=`$_PATH_PERL -e 'use Config; print $Config{archlib}'` ! perl_core_libs=`$_PATH_PERL -MExtUtils::Embed -e ldopts` for i in ${LIBS} ; do perl_core_libs=`echo ${perl_core_libs} | sed -e "s/${i}//"` done --- 3031,3039 ---- if test x${DO_PERL} = xDO ; then echo $ac_n "checking for Perl configuration""... $ac_c" 1>&6 ! echo "configure:3035: checking for Perl configuration" >&5 perl_core_path=`$_PATH_PERL -e 'use Config; print $Config{archlib}'` ! perl_core_libs=`$_PATH_PERL -MExtUtils::Embed -e ldopts | tail -1` for i in ${LIBS} ; do perl_core_libs=`echo ${perl_core_libs} | sed -e "s/${i}//"` done *************** *** 2842,2853 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:2846: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> --- 3052,3063 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:3056: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> *************** *** 2855,2861 **** DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:2859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else --- 3065,3071 ---- DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else *************** *** 2880,2886 **** # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:2884: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3090,3096 ---- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:3094: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2888,2894 **** ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 3109,3115 ---- opendir() ; return 0; } EOF ! if { (eval echo configure:3113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2921,2927 **** else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:2925: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3131,3137 ---- else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:3135: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2929,2935 **** ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 3150,3156 ---- opendir() ; return 0; } EOF ! if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 2963,2974 **** fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2967: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3173,3184 ---- fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:3177: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 2976,2982 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3186,3192 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 2993,2999 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 3203,3209 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 3011,3017 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 3221,3227 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 3032,3038 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 3242,3248 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** *** 3043,3049 **** exit (0); } EOF ! if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else --- 3253,3259 ---- exit (0); } EOF ! if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else *************** *** 3067,3078 **** fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:3071: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3277,3288 ---- fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:3281: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 3081,3087 **** struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else --- 3291,3297 ---- struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:3295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else *************** *** 3102,3113 **** fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:3106: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3312,3323 ---- fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:3316: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 3123,3129 **** s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else --- 3333,3339 ---- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else *************** *** 3147,3163 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3151: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3357,3373 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3361: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 3187,3203 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3191: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3397,3413 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3401: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 3227,3243 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3231: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3437,3453 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3441: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 3263,3283 **** fi done ! for ac_hdr in varargs.h dirent.h wait.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3271: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3473,3493 ---- fi done ! for ac_hdr in varargs.h dirent.h wait.h getopt.h sys/sysinfo.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3481: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 3313,3329 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3317: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 3523,3539 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3527: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 3352,3363 **** fi echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:3356: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3566: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else --- 3616,3622 ---- ; return 0; } EOF ! if { (eval echo configure:3620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else *************** *** 3427,3438 **** fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 ! echo "configure:3431: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3637,3648 ---- fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 ! echo "configure:3641: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 3440,3446 **** struct stat s; s.st_blksize; ; return 0; } EOF ! if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else --- 3650,3656 ---- struct stat s; s.st_blksize; ; return 0; } EOF ! if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else *************** *** 3461,3472 **** fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:3465: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3671,3682 ---- fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:3675: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 3474,3480 **** struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:3478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else --- 3684,3690 ---- struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else *************** *** 3495,3506 **** fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:3499: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 3705,3716 ---- fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:3709: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** *** 3528,3539 **** fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:3532: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF --- 3738,3749 ---- fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:3742: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF *************** *** 3562,3573 **** fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:3566: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 3772,3783 ---- fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:3776: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** *** 3595,3606 **** fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:3599: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 3805,3816 ---- fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:3809: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** *** 3628,3639 **** fi echo $ac_n "checking for atomical variable""... $ac_c" 1>&6 ! echo "configure:3632: checking for atomical variable" >&5 if eval "test \"`echo '$''{'ac_cv_type_atomic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SIGNAL_H --- 3838,3849 ---- fi echo $ac_n "checking for atomical variable""... $ac_c" 1>&6 ! echo "configure:3842: checking for atomical variable" >&5 if eval "test \"`echo '$''{'ac_cv_type_atomic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SIGNAL_H *************** *** 3643,3649 **** sig_atomic_t i ; return 0; } EOF ! if { (eval echo configure:3647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_atomic=sig_atomic_t else --- 3853,3859 ---- sig_atomic_t i ; return 0; } EOF ! if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_atomic=sig_atomic_t else *************** *** 3657,3709 **** echo "$ac_t""$ac_cv_type_atomic" 1>&6 - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 - echo "configure:3662: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include - #include - int main() { - struct tm *tp; - ; return 0; } - EOF - if { (eval echo configure:3676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no - fi - rm -f conftest* - fi - - echo "$ac_t""$ac_cv_header_time" 1>&6 - if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF - #define TIME_WITH_SYS_TIME 1 - EOF - - fi - echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 ! echo "configure:3698: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < int main() { struct tm t; t.tm_gmtoff = 0 ; return 0; } EOF ! if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TM_GMTOFF 1 --- 3867,3884 ---- echo "$ac_t""$ac_cv_type_atomic" 1>&6 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 ! echo "configure:3873: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < int main() { struct tm t; t.tm_gmtoff = 0 ; return 0; } EOF ! if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TM_GMTOFF 1 *************** *** 3718,3726 **** rm -f conftest* echo $ac_n "checking for union wait""... $ac_c" 1>&6 ! echo "configure:3722: checking for union wait" >&5 cat > conftest.$ac_ext < --- 3893,3901 ---- rm -f conftest* echo $ac_n "checking for union wait""... $ac_c" 1>&6 ! echo "configure:3897: checking for union wait" >&5 cat > conftest.$ac_ext < *************** *** 3731,3737 **** union wait w ; return 0; } EOF ! if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UNION_WAIT 1 --- 3906,3912 ---- union wait w ; return 0; } EOF ! if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UNION_WAIT 1 *************** *** 3747,3753 **** # Size of integers echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:3751: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3922,3928 ---- # Size of integers echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:3926: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 3755,3761 **** { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() --- 3930,3936 ---- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() *************** *** 3766,3772 **** exit(0); } EOF ! if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else --- 3941,3947 ---- exit(0); } EOF ! if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else *************** *** 3789,3795 **** ac_cv_subst_int32_t=int else echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:3793: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3964,3970 ---- ac_cv_subst_int32_t=int else echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:3968: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 3797,3803 **** { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() --- 3972,3978 ---- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() *************** *** 3808,3814 **** exit(0); } EOF ! if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else --- 3983,3989 ---- exit(0); } EOF ! if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else *************** *** 3831,3837 **** ac_cv_subst_int32_t=long else echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:3835: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4006,4012 ---- ac_cv_subst_int32_t=long else echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:4010: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 3839,3845 **** { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() --- 4014,4020 ---- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() *************** *** 3850,3856 **** exit(0); } EOF ! if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else --- 4025,4031 ---- exit(0); } EOF ! if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else *************** *** 3880,3892 **** if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 ! echo "configure:3884: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP --- 4055,4067 ---- if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 ! echo "configure:4059: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP *************** *** 3904,3910 **** if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA --- 4079,4085 ---- if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA *************** *** 3926,3932 **** fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 ! echo "configure:3930: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4101,4107 ---- fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 ! echo "configure:4105: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 3934,3940 **** ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else --- 4119,4125 ---- } EOF ! if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else *************** *** 3962,3968 **** test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 ! echo "configure:3966: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4137,4143 ---- test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 ! echo "configure:4141: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 3970,3976 **** { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ --- 4145,4151 ---- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ *************** *** 3984,3990 **** exit(0); /* Non-reversed systems segv here. */ } EOF ! if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setvbuf_reversed=yes else --- 4159,4165 ---- exit(0); /* Non-reversed systems segv here. */ } EOF ! if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setvbuf_reversed=yes else *************** *** 4008,4019 **** fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:4012: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 4183,4194 ---- fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:4187: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 4030,4036 **** int i; ; return 0; } EOF ! if { (eval echo configure:4034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else --- 4205,4211 ---- int i; ; return 0; } EOF ! if { (eval echo configure:4209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else *************** *** 4051,4067 **** ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 ! echo "configure:4055: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:4065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 4226,4242 ---- ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 ! echo "configure:4230: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 4086,4103 **** fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 ! echo "configure:4090: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 ! echo "configure:4096: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4265: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 ! echo "configure:4271: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else --- 4295,4301 ---- ; return 0; } EOF ! if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else *************** *** 4141,4147 **** else cat > conftest.$ac_ext < --- 4316,4322 ---- else cat > conftest.$ac_ext < *************** *** 4236,4242 **** } } EOF ! if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else --- 4411,4417 ---- } } EOF ! if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else *************** *** 4259,4270 **** fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 ! echo "configure:4263: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4438: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else --- 4462,4468 ---- ; return 0; } EOF ! if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else *************** *** 4311,4322 **** if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 ! echo "configure:4315: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4490: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else --- 4514,4520 ---- ; return 0; } EOF ! if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else *************** *** 4366,4377 **** for ac_func in fchmod getdtab gethostname getrlimit getrusage do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4370: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4545: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4569,4575 ---- ; return 0; } EOF ! if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4421,4432 **** for ac_func in gettimeofday memchr memcmp memcpy memmove memset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4425: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4600: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4624,4630 ---- ; return 0; } EOF ! if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4476,4487 **** for ac_func in mkdir mkfifo mktemp select setbuffer setproctitle do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4480: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4679,4685 ---- ; return 0; } EOF ! if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4531,4542 **** for ac_func in setsid socket strcasecmp strchr strcspn strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4535: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4710: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4734,4740 ---- ; return 0; } EOF ! if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4586,4597 **** for ac_func in strrchr strspn strstr symlink sysconf syslog ulimit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4590: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4765: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4789,4795 ---- ; return 0; } EOF ! if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4638,4652 **** fi done ! for ac_func in waitpid socketpair getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4645: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4820: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4844,4850 ---- ; return 0; } EOF ! if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4693,4710 **** fi done ! for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4703: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:4875: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func(); + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else + $ac_func(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <> confdefs.h <<\EOF + #define HAVE_STATVFS 1 + EOF ! else ! echo "$ac_t""no" 1>&6 ! for ac_func in statfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4930: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4954,4960 ---- ; return 0; } EOF ! if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 4750,4758 **** echo "$ac_t""no" 1>&6 fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:4756: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_shared'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4977,5117 ---- echo "$ac_t""no" 1>&6 fi done + for ac_hdr in sys/vfs.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:4985: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <> confdefs.h <<\EOF + #define HAVE_SYS_VFS_H 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + done + for ac_hdr in sys/param.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:5027: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:5037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <> confdefs.h <<\EOF + #define HAVE_SYS_PARAM_H 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + done + for ac_hdr in sys/mount.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:5069: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:5079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <> confdefs.h <<\EOF + #define HAVE_SYS_MOUNT_H 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + done + + fi + done + + + echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:5115: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_shared'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 4760,4766 **** ac_cv_func_mmap_shared=no else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_shared=yes else --- 5219,5225 ---- } EOF ! if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_shared=yes else *************** *** 4880,4889 **** #define HAVE_MMAP 1 EOF fi echo $ac_n "checking whether msync is needed""... $ac_c" 1>&6 ! echo "configure:4887: checking whether msync is needed" >&5 if eval "test \"`echo '$''{'ac_cv_func_need_msync'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 5239,5306 ---- #define HAVE_MMAP 1 EOF + for ac_func in madvise + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 + echo "configure:5246: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else + $ac_func(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:5274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <> confdefs.h <<\EOF + #define HAVE_MADVISE 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + done + fi echo $ac_n "checking whether msync is needed""... $ac_c" 1>&6 ! echo "configure:5304: checking whether msync is needed" >&5 if eval "test \"`echo '$''{'ac_cv_func_need_msync'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 4891,4897 **** ac_cv_func_need_msync=no else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_need_msync=yes else --- 5420,5426 ---- } EOF ! if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_need_msync=yes else *************** *** 5021,5032 **** if test $ac_cv_lib_regex_regexec = no; then echo $ac_n "checking for regexec""... $ac_c" 1>&6 ! echo "configure:5025: checking for regexec" >&5 if eval "test \"`echo '$''{'ac_cv_func_regexec'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5442: checking for regexec" >&5 if eval "test \"`echo '$''{'ac_cv_func_regexec'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_regexec=yes" else --- 5466,5472 ---- ; return 0; } EOF ! if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_regexec=yes" else *************** *** 5073,5081 **** echo $ac_n "checking for msync args""... $ac_c" 1>&6 ! echo "configure:5077: checking for msync args" >&5 cat > conftest.$ac_ext < #include --- 5490,5498 ---- echo $ac_n "checking for msync args""... $ac_c" 1>&6 ! echo "configure:5494: checking for msync args" >&5 cat > conftest.$ac_ext < #include *************** *** 5083,5089 **** char *p; int psize; msync(p,psize,MS_ASYNC); ; return 0; } EOF ! if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_MSYNC_3_ARG 1 --- 5500,5506 ---- char *p; int psize; msync(p,psize,MS_ASYNC); ; return 0; } EOF ! if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_MSYNC_3_ARG 1 *************** *** 5098,5109 **** rm -f conftest* echo $ac_n "checking for return type of abort""... $ac_c" 1>&6 ! echo "configure:5102: checking for return type of abort" >&5 if eval "test \"`echo '$''{'ac_cv_type_abort'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5515,5526 ---- rm -f conftest* echo $ac_n "checking for return type of abort""... $ac_c" 1>&6 ! echo "configure:5519: checking for return type of abort" >&5 if eval "test \"`echo '$''{'ac_cv_type_abort'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5112,5118 **** int a;a=abort() ; return 0; } EOF ! if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_abort=int else --- 5529,5535 ---- int a;a=abort() ; return 0; } EOF ! if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_abort=int else *************** *** 5127,5138 **** echo "$ac_t""$ac_cv_type_abort" 1>&6 echo $ac_n "checking for return type of alarm""... $ac_c" 1>&6 ! echo "configure:5131: checking for return type of alarm" >&5 if eval "test \"`echo '$''{'ac_cv_type_alarm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5544,5555 ---- echo "$ac_t""$ac_cv_type_abort" 1>&6 echo $ac_n "checking for return type of alarm""... $ac_c" 1>&6 ! echo "configure:5548: checking for return type of alarm" >&5 if eval "test \"`echo '$''{'ac_cv_type_alarm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5141,5147 **** unsigned int alarm() ; return 0; } EOF ! if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_alarm="unsigned int" else --- 5558,5564 ---- unsigned int alarm() ; return 0; } EOF ! if { (eval echo configure:5562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_alarm="unsigned int" else *************** *** 5156,5167 **** echo "$ac_t""$ac_cv_type_alarm" 1>&6 echo $ac_n "checking for return type of sleep""... $ac_c" 1>&6 ! echo "configure:5160: checking for return type of sleep" >&5 if eval "test \"`echo '$''{'ac_cv_type_sleep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5573,5584 ---- echo "$ac_t""$ac_cv_type_alarm" 1>&6 echo $ac_n "checking for return type of sleep""... $ac_c" 1>&6 ! echo "configure:5577: checking for return type of sleep" >&5 if eval "test \"`echo '$''{'ac_cv_type_sleep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5170,5176 **** unsigned int sleep() ; return 0; } EOF ! if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_sleep="unsigned int" else --- 5587,5593 ---- unsigned int sleep() ; return 0; } EOF ! if { (eval echo configure:5591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_sleep="unsigned int" else *************** *** 5185,5196 **** echo "$ac_t""$ac_cv_type_sleep" 1>&6 echo $ac_n "checking for return type of qsort""... $ac_c" 1>&6 ! echo "configure:5189: checking for return type of qsort" >&5 if eval "test \"`echo '$''{'ac_cv_type_qsort'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5602,5613 ---- echo "$ac_t""$ac_cv_type_sleep" 1>&6 echo $ac_n "checking for return type of qsort""... $ac_c" 1>&6 ! echo "configure:5606: checking for return type of qsort" >&5 if eval "test \"`echo '$''{'ac_cv_type_qsort'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5199,5205 **** int a;a=qsort(0,0,0,0) ; return 0; } EOF ! if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_qsort=int else --- 5616,5622 ---- int a;a=qsort(0,0,0,0) ; return 0; } EOF ! if { (eval echo configure:5620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_qsort=int else *************** *** 5214,5225 **** echo "$ac_t""$ac_cv_type_qsort" 1>&6 echo $ac_n "checking for return type of free""... $ac_c" 1>&6 ! echo "configure:5218: checking for return type of free" >&5 if eval "test \"`echo '$''{'ac_cv_type_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5631,5642 ---- echo "$ac_t""$ac_cv_type_qsort" 1>&6 echo $ac_n "checking for return type of free""... $ac_c" 1>&6 ! echo "configure:5635: checking for return type of free" >&5 if eval "test \"`echo '$''{'ac_cv_type_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5236,5242 **** int a;a=free(0) ; return 0; } EOF ! if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_free=int else --- 5653,5659 ---- int a;a=free(0) ; return 0; } EOF ! if { (eval echo configure:5657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_free=int else *************** *** 5251,5262 **** echo "$ac_t""$ac_cv_type_free" 1>&6 echo $ac_n "checking for return type of exit""... $ac_c" 1>&6 ! echo "configure:5255: checking for return type of exit" >&5 if eval "test \"`echo '$''{'ac_cv_type_exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5668,5679 ---- echo "$ac_t""$ac_cv_type_free" 1>&6 echo $ac_n "checking for return type of exit""... $ac_c" 1>&6 ! echo "configure:5672: checking for return type of exit" >&5 if eval "test \"`echo '$''{'ac_cv_type_exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5265,5271 **** int a;a=exit(0) ; return 0; } EOF ! if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_exit=int else --- 5682,5688 ---- int a;a=exit(0) ; return 0; } EOF ! if { (eval echo configure:5686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_exit=int else *************** *** 5280,5291 **** echo "$ac_t""$ac_cv_type_exit" 1>&6 echo $ac_n "checking for return type of _exit""... $ac_c" 1>&6 ! echo "configure:5284: checking for return type of _exit" >&5 if eval "test \"`echo '$''{'ac_cv_type__exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5697,5708 ---- echo "$ac_t""$ac_cv_type_exit" 1>&6 echo $ac_n "checking for return type of _exit""... $ac_c" 1>&6 ! echo "configure:5701: checking for return type of _exit" >&5 if eval "test \"`echo '$''{'ac_cv_type__exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5294,5300 **** int a;a=_exit(0) ; return 0; } EOF ! if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type__exit=int else --- 5711,5717 ---- int a;a=_exit(0) ; return 0; } EOF ! if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type__exit=int else *************** *** 5312,5323 **** for ac_func in flock lockf fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5316: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5733: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5757,5763 ---- ; return 0; } EOF ! if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 5366,5374 **** echo $ac_n "checking for AF_UNIX""... $ac_c" 1>&6 ! echo "configure:5370: checking for AF_UNIX" >&5 cat > conftest.$ac_ext < #ifdef AF_UNIX --- 5783,5791 ---- echo $ac_n "checking for AF_UNIX""... $ac_c" 1>&6 ! echo "configure:5787: checking for AF_UNIX" >&5 cat > conftest.$ac_ext < #ifdef AF_UNIX *************** *** 5390,5400 **** echo $ac_n "checking for close on exec style""... $ac_c" 1>&6 ! echo "configure:5394: checking for close on exec style" >&5 CLX_STYLE=pre_test if test $ac_cv_header_fcntl_h = yes; then cat > conftest.$ac_ext < #ifdef FD_CLOEXEC --- 5807,5817 ---- echo $ac_n "checking for close on exec style""... $ac_c" 1>&6 ! echo "configure:5811: checking for close on exec style" >&5 CLX_STYLE=pre_test if test $ac_cv_header_fcntl_h = yes; then cat > conftest.$ac_ext < #ifdef FD_CLOEXEC *************** *** 5427,5433 **** CLX_STYLE=pre_test if test $ac_cv_header_sys_filio_h = yes; then cat > conftest.$ac_ext < #ifdef FIOCLEX --- 5844,5850 ---- CLX_STYLE=pre_test if test $ac_cv_header_sys_filio_h = yes; then cat > conftest.$ac_ext < #ifdef FIOCLEX *************** *** 5459,5469 **** echo $ac_n "checking for nbio style""... $ac_c" 1>&6 ! echo "configure:5463: checking for nbio style" >&5 NBIO_STYLE=pre_test if test $ac_cv_header_fcntl_h = yes; then cat > conftest.$ac_ext < #ifdef O_NONBLOCK --- 5876,5886 ---- echo $ac_n "checking for nbio style""... $ac_c" 1>&6 ! echo "configure:5880: checking for nbio style" >&5 NBIO_STYLE=pre_test if test $ac_cv_header_fcntl_h = yes; then cat > conftest.$ac_ext < #ifdef O_NONBLOCK *************** *** 5491,5497 **** NBIO_STYLE=pre_test if test $ac_cv_header_sys_filio_h = yes; then cat > conftest.$ac_ext < #ifdef FIONBIO --- 5908,5914 ---- NBIO_STYLE=pre_test if test $ac_cv_header_sys_filio_h = yes; then cat > conftest.$ac_ext < #ifdef FIONBIO *************** *** 5524,5532 **** echo $ac_n "checking log level for news""... $ac_c" 1>&6 ! echo "configure:5528: checking log level for news" >&5 cat > conftest.$ac_ext < #ifdef LOG_NEWS --- 5941,5949 ---- echo $ac_n "checking log level for news""... $ac_c" 1>&6 ! echo "configure:5945: checking log level for news" >&5 cat > conftest.$ac_ext < #ifdef LOG_NEWS *************** *** 5549,5560 **** echo $ac_n "checking generic pointer""... $ac_c" 1>&6 ! echo "configure:5553: checking generic pointer" >&5 if eval "test \"`echo '$''{'ac_cv_type_generic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5966,5977 ---- echo $ac_n "checking generic pointer""... $ac_c" 1>&6 ! echo "configure:5970: checking generic pointer" >&5 if eval "test \"`echo '$''{'ac_cv_type_generic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5569,5575 **** void *a; a = malloc(sizeof(a)) ; return 0; } EOF ! if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_generic=void else --- 5986,5992 ---- void *a; a = malloc(sizeof(a)) ; return 0; } EOF ! if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_generic=void else *************** *** 5825,5831 **** - grep "^ ||" config/config.scoreboard | sed 's/ ||//g' >config/config.data.in trap '' 1 2 15 --- 6242,6247 ---- *************** *** 5934,5939 **** --- 6350,6357 ---- backends/actmerge.sh backends/actsyncd.sh backends/sendxbatches.sh + frontends/c7unbatch.sh + frontends/gunbatch.sh include/clibrary.h include/config.h include/paths.h *************** *** 5941,5969 **** innfeed/procbatch samples/actsync.cfg samples/checkgroups samples/default samples/docheckgroups samples/expirerm samples/ihave samples/inn.conf samples/inncheck samples/innmail samples/innreport samples/innreport.conf samples/innshellvars - samples/innshellvars.csh samples/innshellvars.pl samples/innshellvars.tcl samples/innstat samples/innwatch samples/innwatch.ctl samples/news.daily samples/newgroup samples/nntpsend samples/parsecontrol samples/pgpverify samples/rc.news samples/rmgroup samples/scanlogs samples/scanspool samples/send-ihave --- 6359,6399 ---- innfeed/procbatch samples/actsync.cfg samples/checkgroups + samples/checkgroups.pl + samples/cnfsstat + samples/controlbatch + samples/controlchan samples/default samples/docheckgroups samples/expirerm samples/ihave + samples/ihave.pl samples/inn.conf samples/inncheck samples/innmail samples/innreport samples/innreport.conf samples/innshellvars samples/innshellvars.pl samples/innshellvars.tcl samples/innstat samples/innwatch samples/innwatch.ctl + samples/mailpost + samples/mod-active + samples/news2mail samples/news.daily samples/newgroup + samples/newgroup.pl + samples/newsfeeds + samples/nnrpd_auth.pl samples/nntpsend samples/parsecontrol samples/pgpverify + samples/pullnews samples/rc.news samples/rmgroup + samples/rmgroup.pl samples/scanlogs samples/scanspool samples/send-ihave *************** *** 5971,5986 **** samples/send-uucp samples/sendbatch samples/sendme samples/sendsys samples/senduuname samples/signcontrol samples/startup.tcl samples/tally.control samples/version samples/writelog storage/buildconfig syslog/syslog.conf ! include/config.h:include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then --- 6630,6650 ---- samples/send-uucp samples/sendbatch samples/sendme + samples/sendme.pl samples/sendsys + samples/sendsys.pl samples/senduuname + samples/senduuname.pl samples/signcontrol + samples/simpleftp samples/startup.tcl samples/tally.control samples/version + samples/version.pl samples/writelog storage/buildconfig syslog/syslog.conf ! "} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then *************** *** 6353,6358 **** --- 6810,6816 ---- EOF cat >> $CONFIG_STATUS <<\EOF + chmod +x storage/buildconfig exit 0 EOF *************** *** 6361,6365 **** test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - chmod +x storage/buildconfig cat .now_do --- 6819,6822 ---- diff -Nacr inn-2.1/configure.in inn-2.2/configure.in *** inn-2.1/configure.in Fri Jul 24 13:13:00 1998 --- inn-2.2/configure.in Mon Jan 4 02:14:23 1999 *************** *** 14,25 **** dnl Parse the arguments - AC_ARG_ENABLE(pgp-verify, - [ --enable-pgp-verify use pgp control verification], - DO_PGP=DO, - DO_PGP=DONT) - AC_SUBST(DO_PGP) - AC_ARG_WITH(tcl, [ --with-tcl TCL script support], DO_TCL=DO --- 14,19 ---- *************** *** 37,62 **** DO_PERL=DONT) AC_SUBST(DO_PERL) AC_ARG_WITH(db-dir, ! [ --with-db-dir=PATH News database files [PREFIX/db]], DBDIR=$with_db_dir, DBDIR=$prefix/db) AC_SUBST(DBDIR) AC_ARG_WITH(run-dir, ! [ --with-run-dir=PATH News pid/runtime files [PREFIX/run]], RUNDIR=$with_run_dir, RUNDIR=$prefix/run) AC_SUBST(RUNDIR) AC_ARG_WITH(etc-dir, ! [ --with-etc-dir=PATH News config files [PREFIX/etc]], ETCDIR=$with_etc_dir, ETCDIR=$prefix/etc) AC_SUBST(ETCDIR) AC_ARG_WITH(lib-dir, ! [ --with-lib-dir=PATH News lib files [PREFIX/lib]], LIBDIR=$with_lib_dir, LIBDIR=$prefix/lib) AC_SUBST(LIBDIR) --- 31,62 ---- DO_PERL=DONT) AC_SUBST(DO_PERL) + AC_ARG_WITH(largefiles, + [ --with-largefiles Support for files greater than 2gb], + DO_LFS=DO, + DO_LFS=DONT) + AC_SUBST(DO_LFS) + AC_ARG_WITH(db-dir, ! [ --with-db-dir=PATH News database files [PREFIX/db]], DBDIR=$with_db_dir, DBDIR=$prefix/db) AC_SUBST(DBDIR) AC_ARG_WITH(run-dir, ! [ --with-run-dir=PATH News pid/runtime files [PREFIX/run]], RUNDIR=$with_run_dir, RUNDIR=$prefix/run) AC_SUBST(RUNDIR) AC_ARG_WITH(etc-dir, ! [ --with-etc-dir=PATH News config files [PREFIX/etc]], ETCDIR=$with_etc_dir, ETCDIR=$prefix/etc) AC_SUBST(ETCDIR) AC_ARG_WITH(lib-dir, ! [ --with-lib-dir=PATH News lib files [PREFIX/lib]], LIBDIR=$with_lib_dir, LIBDIR=$prefix/lib) AC_SUBST(LIBDIR) *************** *** 80,98 **** AC_SUBST(TMPPATH) AC_ARG_WITH(news-user, ! [ --with-news-user=USER News user id [news]], NEWSUSER=$with_news_user, NEWSUSER=news) AC_SUBST(NEWSUSER) AC_ARG_WITH(news-group, ! [ --with-news-group=GROUP News group id [news]], NEWSGRP=$with_news_group, NEWSGRP=news) AC_SUBST(NEWSGRP) AC_ARG_WITH(news-master, ! [ --with-news-master=USER News master [usenet]], NEWSMASTER=$with_news_master, NEWSMASTER=usenet) AC_SUBST(NEWSMASTER) --- 80,98 ---- AC_SUBST(TMPPATH) AC_ARG_WITH(news-user, ! [ --with-news-user=USER News user id [news]], NEWSUSER=$with_news_user, NEWSUSER=news) AC_SUBST(NEWSUSER) AC_ARG_WITH(news-group, ! [ --with-news-group=GROUP News group id [news]], NEWSGRP=$with_news_group, NEWSGRP=news) AC_SUBST(NEWSGRP) AC_ARG_WITH(news-master, ! [ --with-news-master=USER News master [usenet]], NEWSMASTER=$with_news_master, NEWSMASTER=usenet) AC_SUBST(NEWSMASTER) *************** *** 183,209 **** AC_ENSURE_PATH_PROG(_PATH_PERL,perl) AC_ENSURE_PATH_PROG(_PATH_SED,sed) - AC_ENSURE_PATH_PROG(_PATH_DF,df) - ac_cv_subst_innwatch_df=$ac_cv_path__PATH_DF - AC_ENSURE_PATH_PROG(_PATH_EGREP,egrep) AC_ENSURE_PATH_PROG(_PATH_SORT,sort) AC_ENSURE_PATH_PROG(_PATH_SH,sh) ! AC_MSG_CHECKING(for Perl version) ! $_PATH_PERL -e 'require 5.004' > /dev/null 2>&1 ! if test $? -ne 0 ; then ! AC_MSG_ERROR(Perl 5.004 (or greater) is required) ! else ! perl_version=`$_PATH_PERL -e 'print $]'` ! AC_MSG_RESULT($perl_version) ! fi dnl Look for PGP 5.0's pgpv, or pgp if pgpv is not found AC_PATH_PROG(_PATH_PGP,pgpv) if test "x$_PATH_PGP" = x then AC_PATH_PROG(_PATH_PGP,pgp,no-pgp-found-during-configure) fi AC_PATH_PROG(COMPRESS,compress,no-compress-found-during-configure) --- 183,232 ---- AC_ENSURE_PATH_PROG(_PATH_PERL,perl) AC_ENSURE_PATH_PROG(_PATH_SED,sed) AC_ENSURE_PATH_PROG(_PATH_EGREP,egrep) AC_ENSURE_PATH_PROG(_PATH_SORT,sort) AC_ENSURE_PATH_PROG(_PATH_SH,sh) ! dnl # perl5.004 is not required for building, but this code is ! dnl # left here in case it, or something similar, needs to be ! dnl # enabled later. For example, we should probably check the ! dnl # perl version for the purposes of embedded perl. ! dnl AC_MSG_CHECKING(for Perl version) ! dnl $_PATH_PERL -e 'require 5.004' > /dev/null 2>&1 ! dnl if test $? -ne 0 ; then ! dnl AC_MSG_ERROR(Perl 5.004 (or greater) is required) ! dnl else ! dnl perl_version=`$_PATH_PERL -e 'print $]'` ! dnl AC_MSG_RESULT($perl_version) ! dnl fi dnl Look for PGP 5.0's pgpv, or pgp if pgpv is not found + pgpverify=true AC_PATH_PROG(_PATH_PGP,pgpv) if test "x$_PATH_PGP" = x then AC_PATH_PROG(_PATH_PGP,pgp,no-pgp-found-during-configure) + if test "x$_PATH_PGP" = xno-pgp-found-during-configure + then + pgpverify=false + fi + fi + AC_SUBST(pgpverify) + + dnl Look for a program that takes an ftp URL as a command line argument + dnl and retrieves the file to the current directory. + dnl Shame we can't also use lynx -source; it only writes to stdout + AC_PATH_PROGS(GETFTP,ncftp wget,$prefix/bin/simpleftp) + + if test "x$DO_LFS" = "xDO" + then + AC_PATH_PROG(GETCONF, getconf) + LFS_CFLAGS=`$GETCONF LFS_CFLAGS` + LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS` + LFS_LIBS=`$GETCONF LFS_LIBS` + AC_SUBST(LFS_CFLAGS) + AC_SUBST(LFS_LDFLAGS) + AC_SUBST(LFS_LFS_LIBS) fi AC_PATH_PROG(COMPRESS,compress,no-compress-found-during-configure) *************** *** 226,234 **** dnl AC_ARG_ENABLE(tagged-hash,[ --enable-tagged-hash use tagged hash table for history], DO_DBZ_TAGGED_HASH=DO, DO_DBZ_TAGGED_HASH=DONT) AC_SUBST(DO_DBZ_TAGGED_HASH) - dnl - AC_ARG_ENABLE(merge-to-groups,[ --enable-merge-to-groups merge to groups], DO_MERGE_TO_GROUPS=DO, DO_MERGE_TO_GROUPS=DONT) - AC_SUBST(DO_MERGE_TO_GROUPS) dnl Automatic check for Mail is frequently wrong. Use innmail to have dnl a single interface. dnl AC_ENSURE_PATH_PROG(ac_cv_subst_path_mail,Mail) --- 249,254 ---- *************** *** 278,286 **** dnl Checks for libraries. EXTRA_SRC="" ! dnl Removed (only in auth_progs): AC_CHECK_LIB(crypt, crypt) AC_CHECK_LIB(util, setproctitle) AC_CHECK_LIB(44bsd, inet_addr) AC_CHECK_LIB(resolv, gethostbyname, ac_need_libresolv=1, ac_try_bind=1) AC_CHECK_LIB(resolv, inet_aton, ac_need_libresolv=1, ac_try_bind=1) if test x$ac_need_libresolv = x1 --- 298,307 ---- dnl Checks for libraries. EXTRA_SRC="" ! AC_CHECK_LIB(crypt, crypt) AC_CHECK_LIB(util, setproctitle) AC_CHECK_LIB(44bsd, inet_addr) + AC_CHECK_LIB(bind, __inet_addr) AC_CHECK_LIB(resolv, gethostbyname, ac_need_libresolv=1, ac_try_bind=1) AC_CHECK_LIB(resolv, inet_aton, ac_need_libresolv=1, ac_try_bind=1) if test x$ac_need_libresolv = x1 *************** *** 292,298 **** AC_CHECK_LIB(bind, inet_aton, ac_need_extra_inet_aton=1) if test x$ac_need_extra_inet_aton = x then ! EXTRA_SRC="inet_addr.c" fi fi AC_CHECK_LIB(nsl, gethostbyname) --- 313,323 ---- AC_CHECK_LIB(bind, inet_aton, ac_need_extra_inet_aton=1) if test x$ac_need_extra_inet_aton = x then ! AC_CHECK_LIB(bind, __inet_aton, ac_need_extra__inet_aton=1) ! if test x$ac_need_extra__inet_aton = x ! then ! EXTRA_SRC="inet_addr.c" ! fi fi fi AC_CHECK_LIB(nsl, gethostbyname) *************** *** 310,315 **** --- 335,341 ---- LIBS="$LIBS -lnsl" fi fi + AC_CHECK_LIB(shadow, getspnam) AC_CHECK_LIB(elf, nlist) dnl AIX needs flock from libbsd AC_CHECK_LIB(bsd,flock) *************** *** 318,324 **** if test x${DO_PERL} = xDO ; then AC_MSG_CHECKING(for Perl configuration) perl_core_path=`$_PATH_PERL -e 'use Config; print $Config{archlib}'` ! perl_core_libs=`$_PATH_PERL -MExtUtils::Embed -e ldopts` for i in ${LIBS} ; do perl_core_libs=`echo ${perl_core_libs} | sed -e "s/${i}//"` done --- 344,350 ---- if test x${DO_PERL} = xDO ; then AC_MSG_CHECKING(for Perl configuration) perl_core_path=`$_PATH_PERL -e 'use Config; print $Config{archlib}'` ! perl_core_libs=`$_PATH_PERL -MExtUtils::Embed -e ldopts | tail -1` for i in ${LIBS} ; do perl_core_libs=`echo ${perl_core_libs} | sed -e "s/${i}//"` done *************** *** 340,346 **** AC_CHECK_HEADERS(fcntl.h limits.h memory.h sgtty.h stdarg.h) AC_CHECK_HEADERS(stdlib.h string.h sys/file.h sys/filio.h sys/ioctl.h) AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/time.h syslog.h unistd.h) ! AC_CHECK_HEADERS(varargs.h dirent.h wait.h) # Digital Unix malloc.h looks pretty broken (no function declarations). if test X${DECUNIX} = Xyes --- 366,372 ---- AC_CHECK_HEADERS(fcntl.h limits.h memory.h sgtty.h stdarg.h) AC_CHECK_HEADERS(stdlib.h string.h sys/file.h sys/filio.h sys/ioctl.h) AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/time.h syslog.h unistd.h) ! AC_CHECK_HEADERS(varargs.h dirent.h wait.h getopt.h sys/sysinfo.h) # Digital Unix malloc.h looks pretty broken (no function declarations). if test X${DECUNIX} = Xyes *************** *** 363,369 **** #include #endif],[sig_atomic_t i],ac_cv_type_atomic=sig_atomic_t,ac_cv_type_atomic=int)) AC_SUBST(ac_cv_type_atomic) - AC_HEADER_TIME AC_MSG_CHECKING(for tm_gmtoff in struct tm) AC_TRY_LINK([#include ], --- 389,394 ---- *************** *** 414,426 **** AC_CHECK_FUNCS(mkdir mkfifo mktemp select setbuffer setproctitle) AC_CHECK_FUNCS(setsid socket strcasecmp strchr strcspn strerror) AC_CHECK_FUNCS(strrchr strspn strstr symlink sysconf syslog ulimit) ! AC_CHECK_FUNCS(waitpid socketpair getpagesize) dnl This portion is similar to what AC_FUNC_MMAP does, only dnl it tests shared, non-fixed mmaps. - AC_CHECK_FUNCS(getpagesize) AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_shared, [AC_TRY_RUN([ /* test shared mmap */ --- 439,451 ---- AC_CHECK_FUNCS(mkdir mkfifo mktemp select setbuffer setproctitle) AC_CHECK_FUNCS(setsid socket strcasecmp strchr strcspn strerror) AC_CHECK_FUNCS(strrchr strspn strstr symlink sysconf syslog ulimit) ! AC_CHECK_FUNCS(waitpid socketpair getpagesize getspnam) ! AC_CHECK_FUNCS(statvfs, [AC_DEFINE(HAVE_STATVFS)], [AC_CHECK_FUNCS(statfs) AC_CHECK_HEADERS(sys/vfs.h, AC_DEFINE(HAVE_SYS_VFS_H)) AC_CHECK_HEADERS(sys/param.h, AC_DEFINE(HAVE_SYS_PARAM_H)) AC_CHECK_HEADERS(sys/mount.h, AC_DEFINE(HAVE_SYS_MOUNT_H))]) dnl This portion is similar to what AC_FUNC_MMAP does, only dnl it tests shared, non-fixed mmaps. AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_shared, [AC_TRY_RUN([ /* test shared mmap */ *************** *** 522,527 **** --- 547,553 ---- ac_cv_func_mmap_shared=no)]) if test $ac_cv_func_mmap_shared = yes; then AC_DEFINE(HAVE_MMAP) + AC_CHECK_FUNCS(madvise, AC_DEFINE(HAVE_MADVISE)) fi AC_CACHE_CHECK(whether msync is needed, ac_cv_func_need_msync, *************** *** 966,972 **** MISSING_SRC="${MISSING_SRC}strrchr.c " MISSING_OBJ="${MISSING_OBJ}strrchr.o " fi - AC_SUBST(ac_cv_subst_innwatch_df) AC_SUBST(MISSING_MAN) AC_SUBST(MISSING_SRC) AC_SUBST(MISSING_OBJ) --- 992,997 ---- *************** *** 981,986 **** --- 1006,1013 ---- backends/actmerge.sh backends/actsyncd.sh backends/sendxbatches.sh + frontends/c7unbatch.sh + frontends/gunbatch.sh include/clibrary.h include/config.h include/paths.h *************** *** 988,1016 **** innfeed/procbatch samples/actsync.cfg samples/checkgroups samples/default samples/docheckgroups samples/expirerm samples/ihave samples/inn.conf samples/inncheck samples/innmail samples/innreport samples/innreport.conf samples/innshellvars - samples/innshellvars.csh samples/innshellvars.pl samples/innshellvars.tcl samples/innstat samples/innwatch samples/innwatch.ctl samples/news.daily samples/newgroup samples/nntpsend samples/parsecontrol samples/pgpverify samples/rc.news samples/rmgroup samples/scanlogs samples/scanspool samples/send-ihave --- 1015,1055 ---- innfeed/procbatch samples/actsync.cfg samples/checkgroups + samples/checkgroups.pl + samples/cnfsstat + samples/controlbatch + samples/controlchan samples/default samples/docheckgroups samples/expirerm samples/ihave + samples/ihave.pl samples/inn.conf samples/inncheck samples/innmail samples/innreport samples/innreport.conf samples/innshellvars samples/innshellvars.pl samples/innshellvars.tcl samples/innstat samples/innwatch samples/innwatch.ctl + samples/mailpost + samples/mod-active + samples/news2mail samples/news.daily samples/newgroup + samples/newgroup.pl + samples/newsfeeds + samples/nnrpd_auth.pl samples/nntpsend samples/parsecontrol samples/pgpverify + samples/pullnews samples/rc.news samples/rmgroup + samples/rmgroup.pl samples/scanlogs samples/scanspool samples/send-ihave *************** *** 1018,1033 **** samples/send-uucp samples/sendbatch samples/sendme samples/sendsys samples/senduuname samples/signcontrol samples/startup.tcl samples/tally.control samples/version samples/writelog storage/buildconfig syslog/syslog.conf ) - chmod +x storage/buildconfig cat .now_do --- 1057,1078 ---- samples/send-uucp samples/sendbatch samples/sendme + samples/sendme.pl samples/sendsys + samples/sendsys.pl samples/senduuname + samples/senduuname.pl samples/signcontrol + samples/simpleftp samples/startup.tcl samples/tally.control samples/version + samples/version.pl samples/writelog storage/buildconfig syslog/syslog.conf + , + chmod +x storage/buildconfig ) cat .now_do diff -Nacr inn-2.1/contrib/count_overview.pl inn-2.2/contrib/count_overview.pl *** inn-2.1/contrib/count_overview.pl Thu Jan 1 00:00:00 1970 --- inn-2.2/contrib/count_overview.pl Wed Sep 23 06:19:42 1998 *************** *** 0 **** --- 1,27 ---- + #!/usr/local/bin/perl + # + # count_overview.pl: Count the groups in a bunch of xref records. + + while (<>) { + + chop; + @xreflist = split(/\t/); # split apart record + + $_ = $xreflist[$#xreflist]; # xref is last. + + @xreflist = reverse(split(/ /)); #break part xref line. + + pop @xreflist; # get rid xref header + pop @xreflist; + + while ($current = pop @xreflist) { + ($current) = split(/:/,$current); #get newsgroup name + $groups{$current}++; #tally + } + + } + + # display accumulated groups and counts. + foreach $current (sort keys %groups) { + printf "%-50s\t%5d\n", $current, $groups{$current}; + } diff -Nacr inn-2.1/contrib/fixhist inn-2.2/contrib/fixhist *** inn-2.1/contrib/fixhist Fri Jul 24 13:13:00 1998 --- inn-2.2/contrib/fixhist Wed Dec 16 06:00:09 1998 *************** *** 47,53 **** } if ($msgid !~ /^<[^<> ]*>$/) { if ($msgid =~ /^\[[0-9A-F]{32}\]$/) { ! if ($arts ne "" && $arts !~ /^\@[0-9A-F]{56}\@$/) { &tossit(); # malformed msg-ids next; } --- 47,54 ---- } if ($msgid !~ /^<[^<> ]*>$/) { if ($msgid =~ /^\[[0-9A-F]{32}\]$/) { ! if ($arts ne "" && ($arts !~ /^\@[0-9A-F]{56}\@$/) && ! ($arts !~ /[^\/]*\/[0-9]*/)) { &tossit(); # malformed msg-ids next; } *************** *** 56,62 **** next; } } else { ! if ($arts ne "" && ($arts !~ /[^\/]*\/.*/)) { &tossit(); # malformed articles list next; } --- 57,63 ---- next; } } else { ! if ($arts ne "" && ($arts !~ /[^\/]*\/[0-9]*/)) { &tossit(); # malformed articles list next; } *************** *** 73,78 **** --- 74,80 ---- } print "$_\n"; $count++; + $0 = "history line $./$count" if $. % 50000 == 0; } print STDERR "Done. Now run:\nmakehistory -r -s $count -f history.n\n"; diff -Nacr inn-2.1/contrib/format_overview.pl inn-2.2/contrib/format_overview.pl *** inn-2.1/contrib/format_overview.pl Thu Jan 1 00:00:00 1970 --- inn-2.2/contrib/format_overview.pl Wed Sep 23 06:19:43 1998 *************** *** 0 **** --- 1,12 ---- + #!/usr/local/bin/perl + + # format_overview.pl: just adds the leading numbers we need on + # the script. + + $counter = 0; + + while (<>) { + + printf "%s:%s", ++$counter, $_; + + } diff -Nacr inn-2.1/doc/Makefile inn-2.2/doc/Makefile *** inn-2.1/doc/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/Makefile Tue Nov 3 14:02:13 1998 *************** *** 1,4 **** ! ## $Revision: 1.31 $ include ../Makefile.global CFLAGS = $(GCFLAGS) --- 1,4 ---- ! ## $Revision: 1.35.2.1 $ include ../Makefile.global CFLAGS = $(GCFLAGS) *************** *** 23,37 **** SEC5 = active.5 control.ctl.5 distrib.pats.5 expire.ctl.5 history.5 \ inn.conf.5 innwatch.ctl.5 moderators.5 newsfeeds.5 nnrpd.track.5 \ newslog.5 nnrp.access.5 nntpsend.ctl.5 overview.fmt.5 passwd.nntp.5 \ ! innfeed.conf.5 motd.news.5 overview.ctl.5 storage.ctl.5 cycbuff.conf.5 \ ! incoming.conf.5 ! SEC8 = actsync.8 archive.8 batcher.8 buffchan.8 crosspost.8 ctlinnd.8 \ cvtbatch.8 expire.8 expireover.8 expirerm.8 fastrm.8 filechan.8 \ inncheck.8 innd.8 innreport.8 innstat.8 innwatch.8 innxbatch.8 \ innxmit.8 makeactive.8 makehistory.8 news-recovery.8 news.daily.8 \ newslog.8 newsrequeue.8 nnrpd.8 nntpsend.8 overchan.8 \ pgpverify.8 prunehistory.8 scanlogs.8 actived.8 send-uucp.8 \ ! tally.control.8 tally.unwanted.8 writelog.8 expireindex.8 sm.8 INSTALLED_SEC1 = $D$(MAN1)/convdate.1 $D$(MAN1)/getlist.1 \ $D$(MAN1)/grephistory.1 $D$(MAN1)/inews.1 \ --- 23,39 ---- SEC5 = active.5 control.ctl.5 distrib.pats.5 expire.ctl.5 history.5 \ inn.conf.5 innwatch.ctl.5 moderators.5 newsfeeds.5 nnrpd.track.5 \ newslog.5 nnrp.access.5 nntpsend.ctl.5 overview.fmt.5 passwd.nntp.5 \ ! innfeed.conf.5 motd.news.5 overview.ctl.5 storage.ctl.5 storage.conf.5 \ ! cycbuff.conf.5 incoming.conf.5 ! SEC8 = actsync.8 actsyncd.8 archive.8 \ ! batcher.8 buffchan.8 crosspost.8 ctlinnd.8 \ cvtbatch.8 expire.8 expireover.8 expirerm.8 fastrm.8 filechan.8 \ inncheck.8 innd.8 innreport.8 innstat.8 innwatch.8 innxbatch.8 \ innxmit.8 makeactive.8 makehistory.8 news-recovery.8 news.daily.8 \ newslog.8 newsrequeue.8 nnrpd.8 nntpsend.8 overchan.8 \ pgpverify.8 prunehistory.8 scanlogs.8 actived.8 send-uucp.8 \ ! tally.control.8 tally.unwanted.8 writelog.8 expireindex.8 sm.8 inndf.8 \ ! cnfsstat.8 controlchan.8 news2mail.8 pullnews.8 mailpost.8 INSTALLED_SEC1 = $D$(MAN1)/convdate.1 $D$(MAN1)/getlist.1 \ $D$(MAN1)/grephistory.1 $D$(MAN1)/inews.1 \ *************** *** 57,66 **** $D$(MAN5)/nntpsend.ctl.5 $D$(MAN5)/overview.fmt.5 \ $D$(MAN5)/passwd.nntp.5 $D$(MAN5)/innfeed.conf.5 \ $D$(MAN5)/motd.news.5 $D$(MAN5)/overview.ctl.5 \ ! $D$(MAN5)/storage.ctl.5 $D$(MAN5)/cycbuff.conf.5 \ ! $D$(MAN5)/incoming.conf.5 ! INSTALLED_SEC8 = $D$(MAN8)/actsync.8 $D$(MAN8)/archive.8 \ $D$(MAN8)/batcher.8 $D$(MAN8)/buffchan.8 \ $D$(MAN8)/crosspost.8 $D$(MAN8)/ctlinnd.8 \ $D$(MAN8)/cvtbatch.8 $D$(MAN8)/expire.8 \ --- 59,69 ---- $D$(MAN5)/nntpsend.ctl.5 $D$(MAN5)/overview.fmt.5 \ $D$(MAN5)/passwd.nntp.5 $D$(MAN5)/innfeed.conf.5 \ $D$(MAN5)/motd.news.5 $D$(MAN5)/overview.ctl.5 \ ! $D$(MAN5)/storage.ctl.5 $D$(MAN5)/storage.conf.5 \ ! $D$(MAN5)/cycbuff.conf.5 $D$(MAN5)/incoming.conf.5 ! INSTALLED_SEC8 = $D$(MAN8)/actsync.8 $D$(MAN8)/actsyncd.8 \ ! $D$(MAN8)/archive.8 \ $D$(MAN8)/batcher.8 $D$(MAN8)/buffchan.8 \ $D$(MAN8)/crosspost.8 $D$(MAN8)/ctlinnd.8 \ $D$(MAN8)/cvtbatch.8 $D$(MAN8)/expire.8 \ *************** *** 78,84 **** $D$(MAN8)/scanlogs.8 $D$(MAN8)/tally.control.8 \ $D$(MAN8)/tally.unwanted.8 $D$(MAN8)/writelog.8 \ $D$(MAN8)/expireindex.8 $D$(MAN8)/sm.8 \ ! $D$(MAN8)/actived.8 $D$(MAN8)/send-uucp.8 ALL = $(SEC1) $(SEC3) $(SEC5) $(SEC8) --- 81,90 ---- $D$(MAN8)/scanlogs.8 $D$(MAN8)/tally.control.8 \ $D$(MAN8)/tally.unwanted.8 $D$(MAN8)/writelog.8 \ $D$(MAN8)/expireindex.8 $D$(MAN8)/sm.8 \ ! $D$(MAN8)/actived.8 $D$(MAN8)/send-uucp.8 \ ! $D$(MAN8)/inndf.8 $D$(MAN8)/cnfsstat.8 \ ! $D$(MAN8)/controlchan.8 $D$(MAN8)/news2mail.8 \ ! $D$(MAN8)/pullnews.8 $D$(MAN8)/mailpost.8 ALL = $(SEC1) $(SEC3) $(SEC5) $(SEC8) *************** *** 150,158 **** --- 156,166 ---- $D$(MAN5)/motd.news.5: motd.news.5 ; $(COPY) $? $@ $D$(MAN5)/overview.ctl.5: overview.ctl.5 ; $(COPY) $? $@ $D$(MAN5)/storage.ctl.5: storage.ctl.5 ; $(COPY) $? $@ + $D$(MAN5)/storage.conf.5: storage.conf.5 ; $(COPY) $? $@ $D$(MAN5)/cycbuff.conf.5: cycbuff.conf.5 ; $(COPY) $? $@ $D$(MAN5)/incoming.conf.5: incoming.conf.5 ; $(COPY) $? $@ $D$(MAN8)/actsync.8: actsync.8 ; $(COPY) $? $@ + $D$(MAN8)/actsyncd.8: actsyncd.8 ; $(COPY) $? $@ $D$(MAN8)/archive.8: archive.8 ; $(COPY) $? $@ $D$(MAN8)/batcher.8: batcher.8 ; $(COPY) $? $@ $D$(MAN8)/buffchan.8: buffchan.8 ; $(COPY) $? $@ *************** *** 190,195 **** --- 198,209 ---- $D$(MAN8)/sm.8: sm.8 ; $(COPY) $? $@ $D$(MAN8)/actived.8: actived.8 ; $(COPY) $? $@ $D$(MAN8)/send-uucp.8: send-uucp.8 ; $(COPY) $? $@ + $D$(MAN8)/inndf.8: inndf.8 ; $(COPY) $? $@ + $D$(MAN8)/cnfsstat.8: cnfsstat.8 ; $(COPY) $? $@ + $D$(MAN8)/controlchan.8: controlchan.8 ; $(COPY) $? $@ + $D$(MAN8)/news2mail.8: news2mail.8 ; $(COPY) $? $@ + $D$(MAN8)/pullnews.8: pullnews.8 ; $(COPY) $? $@ + $D$(MAN8)/mailpost.8: mailpost.8 ; $(COPY) $? $@ ## Dependencies. Default list, below, is probably good enough. depend: Makefile $(SOURCES) diff -Nacr inn-2.1/doc/active.5 inn-2.2/doc/active.5 *** inn-2.1/doc/active.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/active.5 Thu Aug 20 04:24:33 1998 *************** *** 1,4 **** ! .\" $Revision: 1.7 $ .TH ACTIVE 5 .SH NAME active, active.times \- list of active Usenet newsgroups --- 1,4 ---- ! .\" $Revision: 1.8 $ .TH ACTIVE 5 .SH NAME active, active.times \- list of active Usenet newsgroups *************** *** 29,36 **** .PP The first field is the name of the newsgroup. If ! .I ! is ``DO'', newsgroups that start with the three characters ``to.'' are treated specially; see .IR innd (8). --- 29,36 ---- .PP The first field is the name of the newsgroup. If ! .I ! is ``true'', newsgroups that start with the three characters ``to.'' are treated specially; see .IR innd (8). *************** *** 110,115 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: active.5,v 1.7 1998/04/09 15:16:01 mibsoft Exp $ .SH "SEE ALSO" ctlinnd(8), inn.conf(5), innd(8). --- 110,115 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: active.5,v 1.8 1998/08/20 04:24:33 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), inn.conf(5), innd(8). diff -Nacr inn-2.1/doc/actsync.8 inn-2.2/doc/actsync.8 *** inn-2.1/doc/actsync.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/actsync.8 Tue Nov 3 14:34:22 1998 *************** *** 6,12 **** .\" Permission to use and modify is hereby granted so long as this .\" notice remains. Use at your own risk. No warranty is implied. .\" ! .\" @(#) $Id: actsync.8,v 1.9 1998/05/21 23:58:04 kondou Exp $ .\" @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsync.8,v .\" .TH ACTSYNC 8 --- 6,12 ---- .\" Permission to use and modify is hereby granted so long as this .\" notice remains. Use at your own risk. No warranty is implied. .\" ! .\" @(#) $Id: actsync.8,v 1.9.4.2 1998/11/03 14:34:22 tale Exp $ .\" @(#) Under RCS control in /usr/local/news/src/inn/local/RCS/actsync.8,v .\" .TH ACTSYNC 8 *************** *** 80,86 **** format. The .IR getlist (1) ! utility may be used to obtain copy a remote system's active file. Newsgroup information from a file may be treated as if it was obtained from a host. In this man page --- 80,89 ---- format. The .IR getlist (1) ! utility may be used to obtain copy a remote system's active file ! via its NNTP server, or an FTP client program can get retrieve such a ! file from an FTP archive (such as ! ftp://ftp.isc.org/pub/usenet/CONFIG/active; see more about this below). Newsgroup information from a file may be treated as if it was obtained from a host. In this man page *************** *** 111,118 **** If .IR host1 , is not specified, it assumed to be the default local ! .B NNTP ! server as specified by the .B NNTPSERVER environment variable, or by the .B server --- 114,120 ---- If .IR host1 , is not specified, it assumed to be the default local ! NNTP server as specified by the .B NNTPSERVER environment variable, or by the .B server *************** *** 148,164 **** argument. The .I actsync.cfg ! file is required to have 4 lines: .sp 1 .in +0.5i .nf \fBhost=\fP\fIhost2\fP ! \fBspool=\fP\fI\fP \fBignore_file=\fP\fIignore_file\fP \fBflags=\fP\fIactsyncd\fP (8) options .fi .in -0.5i .sp 1 The keyword must start at the beginning of the line, and there may be no whitespace before the .B ``='' --- 150,169 ---- argument. The .I actsync.cfg ! file understands the following options: .sp 1 .in +0.5i .nf \fBhost=\fP\fIhost2\fP ! \fBftppath=\fP\fI/remote/path/to/active/file\fP ! \fBspool=\fP\fI\fP \fBignore_file=\fP\fIignore_file\fP \fBflags=\fP\fIactsyncd\fP (8) options .fi .in -0.5i .sp 1 + The \fBhost\fP, \fBignore_file\fP and \fBflags\fP lines are mandatory. + .sp 1 The keyword must start at the beginning of the line, and there may be no whitespace before the .B ``='' *************** *** 170,175 **** --- 175,184 ---- All other lines may produce undefined results. .sp 1 The \fBhost\fP config file line refers to the \fIhost2\fP value to sync off of. + the \fBftppath\fP directive causes the machine named in the \fBhost\fP + line to accessed as an ftp server, retrieving the file named. If + the filename ends in \fB.gz\fP or \fB.Z\fP, then it will automatically + be uncompressed after retrieval. The \fBspool\fP config file lines determines where top the news spool tree is to be found. The \fBignore_file\fP config file line names the ignore file to be *************** *** 184,189 **** --- 193,204 ---- should not be given in the \fBflags=\fP line because they are automatically taken care of by .IR actsyncd (8). + .sp 1 + INN is shipped with default values of \fIftp.isc.org\fP for \fBhost\fP + and \fI/pub/usenet/CONFIG/active\fP for \fBftppath\fP. You can read + about the policies used for maintaining that active file at + \fIftp://ftp.isc.org/pub/usenet/CONFIG/README\fP. Consider + sychronizing from this file on a daily basis by using \fIcron\fP. .SH OPTIONS The options to .IR actsync (8) *************** *** 1098,1112 **** You should avoid using the \fRx\fP output format until you are sure it will do what you want. .PP ! A number of .IR innd (8) ! servers will corrupt the active file when ! lots of newgroups and rmgroups are performed. This is not a .IR actsync (8) bug, it is a server bug. Using the pause, actsync, reload and go method ! noted above is much more likely to avoid this problem. .SH BUGS If a newsgroup appears multiple times, .IR actsync (8) --- 1113,1127 ---- You should avoid using the \fRx\fP output format until you are sure it will do what you want. .PP ! Be aware that .IR innd (8) ! servers older than version 1.5 may corrupt the active file when ! multiple rmgroups are performed if the server is paused or throttled. This is not a .IR actsync (8) bug, it is a server bug. Using the pause, actsync, reload and go method ! noted above avoids this problem of older servers. .SH BUGS If a newsgroup appears multiple times, .IR actsync (8) *************** *** 1122,1127 **** --- 1137,1146 ---- .SH "SEE ALSO" .IR active (5), .br + .IR simpleftp (1), + .br + .IR mod-active (8), + .br .IR ctlinnd (8), .br .IR getlist (8), *************** *** 1129,1131 **** --- 1148,1151 ---- .IR inn.conf (5). .SH HISTORY Written by Landon Curt Noll for InterNetNews. + Updated to support ftp fetching by David Lawrence . diff -Nacr inn-2.1/doc/actsyncd.8 inn-2.2/doc/actsyncd.8 *** inn-2.1/doc/actsyncd.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/actsyncd.8 Tue Nov 3 14:02:14 1998 *************** *** 0 **** --- 1,7 ---- + .TH ACTSYNCD 8 + .SH NAME + actsyncd \- run actsync to synchronize newsgroups + .SH SYNOPSIS + Please see the actsync(8) manual page. + .SH "SEE ALSO" + actsync(8) diff -Nacr inn-2.1/doc/cnfsstat.8 inn-2.2/doc/cnfsstat.8 *** inn-2.1/doc/cnfsstat.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/cnfsstat.8 Fri Oct 2 01:46:20 1998 *************** *** 0 **** --- 1,87 ---- + .\" $Revision: 1.2 $ + .TH CNFSSTAT 8 + .SH NAME + cnfsstat \- show snapshot of CNFS + .SH SYNOPSIS + .B cnfsstat + [ + .B \-a + ] + [ + .B \-c CLASS + ] + [ + .B \-h + ] + [ + .B \-l + [ + seconds + ] + ] + [ + .B \-m BUFFER + ] + [ + .B \-p + ] + [ + .B \-s + ] + .SH DESCRIPTION + .I Cnfsstat + reads + .I /cycbuff.conf + and + .I /storage.conf + to read which cycbuff is available and read specified cycbuffs and + shows the usage of them. + .PP + .I Cnfsstat + can be invoked from + .IR rc.news (8), + if is ``true'', and the result is written + to + .IR syslog (3). + .SH OPTIONS + .TP + .B \-a + .I Cnfsstat + prints also the age of the oldest article in the cycbuff. + .TP + .B \-c CLASS + .I Cnfsstat + prints for the specified class. + .TP + .B \-h + .I Cnfsstat + prints the usage. + .TP + .B \-l [ seconds ] + .I Cnfsstat + never exits unless there is no error, and prints the snapshot every + .IR seconds . + The default interval is 600 seconds. + .TP + .B \-m + .I Cnfsstat + prints out information suitable for mrtg. + .TP + .B \-p + .I Cnfsstat + prints out an mrtg config file. + .TP + .B \-s + .I Cnfsstat + prints the result to + .IR syslog (3). + .SH HISTORY + Written by Katsuhiro Kondou for InterNetNews. + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: cnfsstat.8,v 1.2 1998/10/02 01:46:20 kondou Exp $ + .SH "SEE ALSO" + cycbuff.conf(5), + inn.conf(5), + storage.conf(5). diff -Nacr inn-2.1/doc/control.ctl.5 inn-2.2/doc/control.ctl.5 *** inn-2.1/doc/control.ctl.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/control.ctl.5 Wed Dec 9 15:40:29 1998 *************** *** 1,4 **** ! .\" $Revision: 1.6 $ .TH CONTROL.CTL 5 .SH NAME control.ctl \- specify handling of Usenet control messages --- 1,4 ---- ! .\" $Revision: 1.9.2.1 $ .TH CONTROL.CTL 5 .SH NAME control.ctl \- specify handling of Usenet control messages *************** *** 7,13 **** .I /control.ctl is used to determine what action is taken when a control message is received. ! It is read by the .I parsecontrol script, which is called by all the control scripts. (For an explanation of how the control scripts are invoked, see --- 7,27 ---- .I /control.ctl is used to determine what action is taken when a control message is received. ! If ! .I ! is ``true'', it is read by the ! .I controlchan ! script, which can be invoked as channel program by ! .IR innd (8). ! When ! .I control.ctl ! is modified, ! .I ! .I controlchan ! notices this automatically and reload it. ! If ! .I ! is ``false'', it is read by the .I parsecontrol script, which is called by all the control scripts. (For an explanation of how the control scripts are invoked, see *************** *** 36,41 **** --- 50,58 ---- If the control message is ``newgroup'' or ``rmgroup'' then the third field specifies the shell-style pattern that must match the group being created or removed. + If the control message is ``checkgroups'' then the third field specifies the + shell-style pattern that is used to determine which newsgroups are processed + for checking. If the control message is of a different type, then this field is ignored. .PP *************** *** 46,55 **** .B doit The action requested by the control message should be performed. In most cases the control script will also send mail to ! .I ! (typically ! .\" =()<@@ .)>()= ! usenet .) .TP .B doifarg If the control message has an argument, this is treated as a ``doit'' action. --- 63,69 ---- .B doit The action requested by the control message should be performed. In most cases the control script will also send mail to ! .IR . .TP .B doifarg If the control message has an argument, this is treated as a ``doit'' action. *************** *** 128,134 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: control.ctl.5,v 1.6 1998/04/09 15:16:03 mibsoft Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), --- 142,148 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: control.ctl.5,v 1.9.2.1 1998/12/09 15:40:29 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), diff -Nacr inn-2.1/doc/controlchan.8 inn-2.2/doc/controlchan.8 *** inn-2.1/doc/controlchan.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/controlchan.8 Mon Sep 28 00:28:37 1998 *************** *** 0 **** --- 1,49 ---- + .\" $Revision: 1.1 $ + .TH CONTROLCHAN 8 + .SH NAME + controlchan \- channel\-fed control message handler + .SH SYNOPSIS + .B controlchan + .SH DESCRIPTION + .I Controlchan + removes the responsibility for handling control messages + (except cancels) from + .IR innd (8) + and instead processes them from a channel or file feed. + To reduce load, + .I controlchan + keeps a copy of + .IR control.ctl (5) + in memory and checks permissions (including any required PGP headers) before any + scripts are called. Also, the default ("bad message") case is handled + internally. The "drop" case is handled with far less fuss. + .PP + Normally, + .I controlchan + is configured in + .IR newsfeeds (5) + and invoked from + .IR innd (8). + And you need to set to ``true''. + .I Controlchan + reports all log message through + .IR syslog (3), + if possible. To enable syslogging, you will need to have run ``h2ph'' on your + system include files at some point (this is required to + make Sys::Syslog work). If you have not done so, do this: + .sp 1 + .nf + .in +0.5i + cd /usr/include + h2ph * sys/* + .in -0.5i + .fi + .SH HISTORY + Written by Katsuhiro Kondou for InterNetNews. + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: controlchan.8,v 1.1 1998/09/28 00:28:37 kondou Exp $ + .SH "SEE ALSO" + control.ctl(5), + inn.conf(5). diff -Nacr inn-2.1/doc/ctlinnd.8 inn-2.2/doc/ctlinnd.8 *** inn-2.1/doc/ctlinnd.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/ctlinnd.8 Mon Sep 7 14:36:21 1998 *************** *** 1,4 **** ! .\" $Revision: 1.11 $ .TH CTLINND 8 .SH NAME ctlinnd \- control the InterNetNews daemon --- 1,4 ---- ! .\" $Revision: 1.12 $ .TH CTLINND 8 .SH NAME ctlinnd \- control the InterNetNews daemon *************** *** 163,176 **** .I site is an empty string. .TP - .BI feedinfo " site" - Print detailed information about the state of the - feed to - .I site - or more brief status of all feeds if - .I site - is an empty string. - .TP .BI flush " site" Flush the buffer for the specified site. The actions taken depend on the type of feed the site receives; see --- 163,168 ---- *************** *** 588,594 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: ctlinnd.8,v 1.11 1998/07/14 01:24:50 kondou Exp $ .SH "SEE ALSO" active(5), expire(8), --- 580,586 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: ctlinnd.8,v 1.12 1998/09/07 14:36:21 kondou Exp $ .SH "SEE ALSO" active(5), expire(8), diff -Nacr inn-2.1/doc/cycbuff.conf.5 inn-2.2/doc/cycbuff.conf.5 *** inn-2.1/doc/cycbuff.conf.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/cycbuff.conf.5 Tue Jan 5 15:21:10 1999 *************** *** 1,4 **** ! .\" $Revision: 1.6 $ .TH CYCBUFF.CONF 5 .SH NAME cycbuff.conf \- configuration file for CNFS method --- 1,4 ---- ! .\" $Revision: 1.8.2.2 $ .TH CYCBUFF.CONF 5 .SH NAME cycbuff.conf \- configuration file for CNFS method *************** *** 7,18 **** .I /cycbuff.conf is required if CNFS (Cyclic News File System) method is used. CNFS is one of storage method which can be defined at ! .IR storage.ctl (5). .PP The file consists of a series of lines; blank lines and lines beginning with a number sign (``#'') are ignored. ! There are three kinds of configuration line; ``cycbuffupdate'', ``cycbuff'' ! and ``metacycbuff.'' The order of lines in this file is not important among the same kind of configuration line. But all ``cycbuff'' lines should be presented before any ``metacycbuff'' lines. --- 7,18 ---- .I /cycbuff.conf is required if CNFS (Cyclic News File System) method is used. CNFS is one of storage method which can be defined at ! .IR storage.conf (5). .PP The file consists of a series of lines; blank lines and lines beginning with a number sign (``#'') are ignored. ! There are three kinds of configuration line; ``cycbuffupdate'', ! ``refreshinterval'', ``cycbuff'' and ``metacycbuff.'' The order of lines in this file is not important among the same kind of configuration line. But all ``cycbuff'' lines should be presented before any ``metacycbuff'' lines. *************** *** 28,33 **** --- 28,47 ---- \&``Update'' is how many article-stores between cycbuff header updates. This line can be omitted and the default value is ``25.'' .PP + \&``Refreshinterval'' line is formatted as: + .PP + .RS + .nf + refreshinterval:interval + .fi + .RE + .PP + \&``Inerval'' is what interval (seconds) between rereading cycbuff header if + cycbuff is preopend. (This is the case + .IR nnrpd (8) + runs as daemon.) + This line can be omitted and the default value is ``30.'' + .PP \&``Cycbuff'' line is formatted as: .PP .RS *************** *** 55,68 **** .PP \&``Meta_cyclic_buffer_name'' is the symbolic name of meta-cyclic buffer. This name is referred at ``options'' field at ``cnfs'' lines in ! .IR storage.ctl (5). \&``Buffer_names'' is comma separated list of buffer names of ``cycbuff.'' These buffer names should be defined at ``metacycbuff'' lines. If ``buffer_names'' has more than one buffer names, CNFS method stores articles into each ``cycbuff'' in order cyclically. .PP Also it is necessary to set up ``options'' field at ``cnfs'' lines in ! .IR storage.ctl (5) to use CNFS method. That field should be one of ``meta_cyclic_buffer_name'' defined at \&``metacycbuff'' lines. --- 69,82 ---- .PP \&``Meta_cyclic_buffer_name'' is the symbolic name of meta-cyclic buffer. This name is referred at ``options'' field at ``cnfs'' lines in ! .IR storage.conf (5). \&``Buffer_names'' is comma separated list of buffer names of ``cycbuff.'' These buffer names should be defined at ``metacycbuff'' lines. If ``buffer_names'' has more than one buffer names, CNFS method stores articles into each ``cycbuff'' in order cyclically. .PP Also it is necessary to set up ``options'' field at ``cnfs'' lines in ! .IR storage.conf (5) to use CNFS method. That field should be one of ``meta_cyclic_buffer_name'' defined at \&``metacycbuff'' lines. *************** *** 73,79 **** .BR 1. " Create a big file on top of a standard filesystem." The use "dd" to create the ``cycbuff'' files, such as "dd if=/dev/zero of=/path/to/cycbuff bs=32k count=N" ! where N is the final size of the RAWPART divided by 32768. .TP .BR 2. " Use block disk devices directly." If your operating system will allow you to --- 87,93 ---- .BR 1. " Create a big file on top of a standard filesystem." The use "dd" to create the ``cycbuff'' files, such as "dd if=/dev/zero of=/path/to/cycbuff bs=32k count=N" ! where N is the buffer_size divided by 32. .TP .BR 2. " Use block disk devices directly." If your operating system will allow you to *************** *** 121,127 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: cycbuff.conf.5,v 1.6 1998/07/21 08:02:41 kondou Exp $ .SH "SEE ALSO" inn.conf(5), ! storage.ctl(5). --- 135,141 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: cycbuff.conf.5,v 1.8.2.2 1999/01/05 15:21:10 kondou Exp $ .SH "SEE ALSO" inn.conf(5), ! storage.conf(5). diff -Nacr inn-2.1/doc/expire.8 inn-2.2/doc/expire.8 *** inn-2.1/doc/expire.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/expire.8 Wed Sep 23 06:21:09 1998 *************** *** 1,4 **** ! .\" $Revision: 1.14 $ .TH EXPIRE 8 .SH NAME expire \- Usenet article and history expiration program --- 1,4 ---- ! .\" $Revision: 1.16 $ .TH EXPIRE 8 .SH NAME expire \- Usenet article and history expiration program *************** *** 87,102 **** .IR inn.conf (5) and set up .IR overview.ctl (5), ! it also purges old overview data. And if the article is stored by storage api and the storage method ! has self expire functionality, ! control file is ignored for that article by default. In this case, .I expire probes the article to see if it still exists. If it does not exist, .I expire ! purges relevant entries (history and overview). To disable this, use the ``\fI\-N\fP'' flag. .SH OPTIONS .TP --- 87,102 ---- .IR inn.conf (5) and set up .IR overview.ctl (5), ! it also purges old unified overview data. And if the article is stored by storage api and the storage method ! has self expire functionality, the ! control file is ignored except remember line for that article by default. In this case, .I expire probes the article to see if it still exists. If it does not exist, .I expire ! purges the relevant entries (history and unified overview). To disable this, use the ``\fI\-N\fP'' flag. .SH OPTIONS .TP *************** *** 105,125 **** class base. If the ``\fI\-c\fP'' flag is used, articles are expired by normal way (newsgroup base). ! Note that if overview of an article is not stored, the article is expired by storage class base. .TP .B \-D ! If the ``\fI\-D\fP'' flag is used, then the new overview files are created in the specified directory, .IR dir . This is useful when the filesystem does not have sufficient space to ! hold both the old and new overview files. When this flag is used, .I expire leaves the server paused and creates a zero-length file named after the ! new overview file, with an extension of ``.done'' to indicate that it has successfully completed the expiration. ! The calling script should install the new overview file and un-pause the server. .TP .B \-d If the ``\fI\-d\fP'' flag is used, then the new history file and database is --- 105,125 ---- class base. If the ``\fI\-c\fP'' flag is used, articles are expired by normal way (newsgroup base). ! Note that if the unified overview entry of an article is not stored, the article is expired by storage class base. .TP .B \-D ! If the ``\fI\-D\fP'' flag is used, then the new unified overview files are created in the specified directory, .IR dir . This is useful when the filesystem does not have sufficient space to ! hold both the old and new unified overview files. When this flag is used, .I expire leaves the server paused and creates a zero-length file named after the ! new unified overview file, with an extension of ``.done'' to indicate that it has successfully completed the expiration. ! The calling script should install the new unified overview files and un-pause the server. .TP .B \-d If the ``\fI\-d\fP'' flag is used, then the new history file and database is *************** *** 192,202 **** .TP .B \-N If the article is stored by storage api and the storage method ! has self expire functionality, control file is ignored for that article by default. If the ``\fB\-N\fP'' flag is used, .I expire ! still uses control file in this case. .TP .B \-n If --- 192,202 ---- .TP .B \-N If the article is stored by storage api and the storage method ! has self expire functionality, then the control file is ignored for that article by default. If the ``\fB\-N\fP'' flag is used, .I expire ! still uses the control file in this case. .TP .B \-n If *************** *** 263,269 **** .IR history . .TP .B \-u ! If the ``\fB\-u\fP'' flag is used, then expired articles names are appended to the specified .IR file . This files can be used as a input for --- 263,269 ---- .IR history . .TP .B \-u ! If the ``\fB\-u\fP'' flag is used, then expired article's names are appended to the specified .IR file . This files can be used as a input for *************** *** 324,330 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: expire.8,v 1.14 1998/06/21 05:54:25 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), dbz(3), --- 324,330 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: expire.8,v 1.16 1998/09/23 06:21:09 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), dbz(3), diff -Nacr inn-2.1/doc/expire.ctl.5 inn-2.2/doc/expire.ctl.5 *** inn-2.1/doc/expire.ctl.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/expire.ctl.5 Mon Jan 4 07:41:42 1999 *************** *** 1,4 **** ! .\" $Revision: 1.9 $ .TH EXPIRE.CTL 5 .SH NAME expire.ctl \- control file for Usenet article expiration --- 1,4 ---- ! .\" $Revision: 1.10.2.1 $ .TH EXPIRE.CTL 5 .SH NAME expire.ctl \- control file for Usenet article expiration *************** *** 8,34 **** is the default control file for the .IR expire (8) program, which reads it at start-up. Blank lines and lines beginning with a number sign (``#'') are ignored. All other lines should be in one of two formats. .PP ! The first format specifies how long to keep a record of fully-expired ! articles. ! This is useful when a newsfeed intermittently offers older news that ! is not kept around very long. ! (The case of very old news is handled by the ``\fB\-c\fP'' flag of ! .IR innd (8).) ! There should only be one line in this format, which looks like this: .RS /remember/:days .RE ! Where .I days ! is a floating-point number that specifies the upper limit to remember ! a Message-ID, even if the article has already expired. ! (It does not affect article expirations.) .PP ! Most of the lines in the file will consist of five colon-separated fields, ! as follows: .RS .nf pattern:modflag:keep:default:purge --- 8,55 ---- is the default control file for the .IR expire (8) program, which reads it at start-up. + It serves two purposes: it defines how long history entries for expired or + rejected articles are retained, and it determines how long articles not + stored in a self-expiring storage method are retained. + If all of the storage methods used by the server are self-expiring (such + as CNFS), only the /remember/ setting described below is necessary or + used. + .PP Blank lines and lines beginning with a number sign (``#'') are ignored. All other lines should be in one of two formats. .PP ! The first format specifies how long to keep history entries for articles ! that aren't present in the news spool. ! These are articles which have either already expired out of all newsgroups ! or which the server rejected (and ``remembertrash'' was set to true in ! .IR inn.conf (5)). ! There should only be one line in this format, which looks like: .RS /remember/:days .RE ! where .I days ! is a floating-point number that specifies the minimum number of days a ! history record of a given message ID is retained, regardless of whether ! the article has expired. ! (History entries are always retained at least until an article fully ! expires.) ! .PP ! The reason to retain a record of an old articles is to handle the case ! where a peer offers old articles that were previously accepted and then ! expired. ! Without a setting like this, the server would accept the article again and ! readers would see duplicate articles. ! Articles older than a certain number of days won't be accepted by the ! server at all (see the ``\fB-c\fP'' flag of ! .IR innd (8)), ! and this setting should probably match that time period (14 days by ! default) to ensure the server never accepts duplicates. ! .PP ! This setting does not affect article expirations. .PP ! Most of the lines in this file will be in the second format, five ! colon-separated fields as follows: .RS .nf pattern:modflag:keep:default:purge *************** *** 40,49 **** .IR wildmat (3)-style patterns, separated by commas. This field specifies the newsgroups to which the line is applied. ! Note that the file is interpreted in order, so that the last line that ! matches will be used. ! This means that general patterns (like a single asterisk to set the defaults) ! should appear before specific group specifications. .PP The .I modflag --- 61,70 ---- .IR wildmat (3)-style patterns, separated by commas. This field specifies the newsgroups to which the line is applied. ! Note that the file is interpreted in order and the last line that ! matches will be used, so general patterns (like a single asterisk to set ! the defaults) should appear at the beginning of the file, before more ! specific settings. .PP The .I modflag *************** *** 57,62 **** --- 78,87 ---- X Removes the article from all groups that it appears in .fi .RE + (The X flag is special; normally articles are not completely deleted until + they expire out of every group they were posted to, but if an article is + expired by a line with an X, it is deleted out of all newsgroups it was + posted to immediately.) .PP The next three fields are used to determine how long an article should be kept. *************** *** 71,91 **** \(em specify the boundaries within which an Expires header will be honored. They are ignored if an article has no Expires header. ! The fields are specified in the file as ``lower-bound default upper-bound,'' ! and they are explained in this order. ! Since most articles do not have explicit expiration dates, however, ! the second field tends to be the most important one. .PP The .I keep field specifies how many days an article should be kept before it will be removed. ! No article in the newsgroup will be removed if it has been filed for less then .I keep days, regardless of any expiration date. ! If this field is the word ``never'' then an article can have been kept ! for enough days so it will never be expired. .PP The .I default --- 96,128 ---- \(em specify the boundaries within which an Expires header will be honored. They are ignored if an article has no Expires header. ! (In other words, if an article has an Expires header, and the time at ! which the header says it should expire is sooner than the ! .I default ! field, the Expires header is be honored instead. ! Similarly, if the Expires header specifies a time longer than the ! .I default ! field, it is honored instead. ! But articles are expired no faster than the time set with ! .I keep ! and kept no longer than the time specified with ! .I purge ! regardless of Expires headers). ! One should think of the fields as ``lower-bound default upper-bound.'' ! Since most articles do not have explicit expiration dates, ! the second field tends to be the most important and most commonly applied ! one. .PP The .I keep field specifies how many days an article should be kept before it will be removed. ! No article in the matching newsgroups will be removed if it has been filed for less then .I keep days, regardless of any expiration date. ! If this field is the word ``never,'' no article in the matching newsgroups ! will ever be expired. .PP The .I default *************** *** 106,115 **** .I purge is the word ``never'' then the article will never be deleted. .PP ! If you have turned on the storage manager with the 'storageapi' in .IR inn.conf (5) ! option, and you don't use ``\-c'' option with expire or overview data ! for the article is not created, then you will need to use a slightly different format for specifying expiration times for storage classes: .RS --- 143,152 ---- .I purge is the word ``never'' then the article will never be deleted. .PP ! If you have turned on the storage manager with the ``storageapi'' in .IR inn.conf (5) ! option and you don't the use ``\fB-c\fP'' option with expire, or if ! overview data for the article is not created, then you will need to use a slightly different format for specifying expiration times for storage classes: .RS *************** *** 120,126 **** Where .I classnum is the number that you specified in ! .IR storage.ctl (5). The rest of the fields are identical to the 5 field format. If the line for --- 157,163 ---- Where .I classnum is the number that you specified in ! .IR storage.conf (5). The rest of the fields are identical to the 5 field format. If the line for *************** *** 140,146 **** .I default to whatever value you wish, and .I purge ! to never. To ignore any Expires header, set all three fields to the same value. .PP There must be exactly one line with a --- 177,185 ---- .I default to whatever value you wish, and .I purge ! to never (or alternately set ! .I purge ! to some large number, like 365 days for a maximum article life of a year). To ignore any Expires header, set all three fields to the same value. .PP There must be exactly one line with a *************** *** 150,158 **** of ``A'' \(em this matches all groups and is used to set the expiration default. It should be the first expiration line. ! .PP ! For example, ! .RS .nf ## How long to keep expired history /remember/:5 --- 189,195 ---- of ``A'' \(em this matches all groups and is used to set the expiration default. It should be the first expiration line. ! .SH EXAMPLES .nf ## How long to keep expired history /remember/:5 *************** *** 163,177 **** ## Keep local stuff for a long time foo.*:A:30:30:30 .fi - .RE .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: expire.ctl.5,v 1.9 1998/04/24 11:57:05 scrappy Exp $ .SH "SEE ALSO" expire(8), inn.conf(5), ! storage.ctl(5), wildmat(3). --- 200,213 ---- ## Keep local stuff for a long time foo.*:A:30:30:30 .fi .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: expire.ctl.5,v 1.10.2.1 1999/01/04 07:41:42 kondou Exp $ .SH "SEE ALSO" expire(8), inn.conf(5), ! storage.conf(5), wildmat(3). diff -Nacr inn-2.1/doc/incoming.conf.5 inn-2.2/doc/incoming.conf.5 *** inn-2.1/doc/incoming.conf.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/incoming.conf.5 Mon Jan 4 07:41:42 1999 *************** *** 1,4 **** ! .\" $Revision: 1.8 $ .TH INCOMING.CONF 5 .SH NAME incoming.conf \- names and addresses that feed us news --- 1,4 ---- ! .\" $Revision: 1.8.2.1 $ .TH INCOMING.CONF 5 .SH NAME incoming.conf \- names and addresses that feed us news *************** *** 87,95 **** max-connections: 15 # Another peer. The ``max-connections'' value from the ! # ``fast-sites'' group scope is used. peer data.ramona.vix.com { - hostname: data.ramona.vix.com } peer bb.home.vix.com { --- 87,95 ---- max-connections: 15 # Another peer. The ``max-connections'' value from the ! # ``fast-sites'' group scope is used. The ``hostname'' value ! # defaults to the peer's name. peer data.ramona.vix.com { } peer bb.home.vix.com { *************** *** 115,123 **** Height keys are allowed: .TP .BI hostname: ! This key is mandatory in a peer block. The value is a string representing ! a list of hostnames separated by a comma. A hostname is the host's FQDN, ! or the dotted quad ip-address of the peer. .TP .BI streaming: This key requires a boolean value. It defines whether streaming commands --- 115,124 ---- Height keys are allowed: .TP .BI hostname: ! This key requires a string value. It is a list of hostnames separated by a ! comma. A hostname is the host's FQDN, or the dotted quad ip-address of the ! peer. If this key is not present in a peer block, the hostname defaults to ! the label of the peer. .TP .BI streaming: This key requires a boolean value. It defines whether streaming commands *************** *** 157,163 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: incoming.conf.5,v 1.8 1998/07/02 02:16:01 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), --- 158,164 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: incoming.conf.5,v 1.8.2.1 1999/01/04 07:41:42 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), diff -Nacr inn-2.1/doc/inn.conf.5 inn-2.2/doc/inn.conf.5 *** inn-2.1/doc/inn.conf.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/inn.conf.5 Wed Jan 6 10:28:38 1999 *************** *** 1,4 **** ! .\" $Revision: 1.49 $ .TH INN.CONF 5 .SH NAME inn.conf \- configuration data for InterNetNews programs --- 1,4 ---- ! .\" $Revision: 1.61.2.6 $ .TH INN.CONF 5 .SH NAME inn.conf \- configuration data for InterNetNews programs *************** *** 30,35 **** --- 30,37 ---- as when hiding a cluster of hosts behind a single electronic mail hostname. If the same parameter is specified more than twice, the first one is used for that parameter. + The term ``default'' means the case that the parameter is not defined in + inn.conf. Some parameters take boolean value. The value can be one of ``true'', ``yes'' or ``on'' to turn on, and can be one of ``false'', ``no'' or ``off'' to turn off. The case of those value is not significant. *************** *** 104,110 **** If this is true then all articles will be stored through storage api and all articles are assumed to be stored through storage api. This is boolean value and the default is ``false''. ! To use storage api, you need to edit storage.ctl to determine which method will be used. If storage api is used, any overview database will be stored as unified overview which is needed if nnrpd will be used. --- 106,112 ---- If this is true then all articles will be stored through storage api and all articles are assumed to be stored through storage api. This is boolean value and the default is ``false''. ! To use storage api, you need to edit storage.conf to determine which method will be used. If storage api is used, any overview database will be stored as unified overview which is needed if nnrpd will be used. *************** *** 116,122 **** How many times to attempt a .IR fork (2) before giving up. ! The default value is . .TP .I maxartsize The maximum size article (in bytes) that will be accepted by the --- 118,124 ---- How many times to attempt a .IR fork (2) before giving up. ! The default value is 10. .TP .I maxartsize The maximum size article (in bytes) that will be accepted by the *************** *** 130,135 **** --- 132,148 ---- value. The default value is ``4''. .TP + .I nicenewnews + If set to anything greater than ``0'', all + .IR nnrpd (8) + processes that use + the ``NEWNEWS'' command will + .IR nice (1) + themselves to this value. This gives other nnrpd processes a higher + priority. The default value is ``0'', which means + that no change is made from the ``nicekids'' value. Note that this + value will be ignored if it is set to a value lower than ``nicekids''. + .TP .I mta This specifies the message transfer agent (mta) to be used when mailing moderated postings and for use for innmail. The article, with headers and *************** *** 163,169 **** Set this to ``false'' if you don't want to record rejected articles in history. This might cause duplicate articles to be offered to you, so be careful with it. ! This is boolean value and the default is ``false''. .TP .I linecountfuzz If this number is set to any number other than ``0'', the article --- 176,182 ---- Set this to ``false'' if you don't want to record rejected articles in history. This might cause duplicate articles to be offered to you, so be careful with it. ! This is boolean value and the default is ``true''. .TP .I linecountfuzz If this number is set to any number other than ``0'', the article *************** *** 245,250 **** --- 258,275 ---- is ``false''. This is boolean value and the default is ``true''. .TP + .I usecontrolchan + Should use channel for control messages except cancel. + You need to set up controlchan in newsfeeds and ensure ``control.cancel'' + exists in active, if this is set to ``true''. + This is boolean value and the default is ``false''. + .TP + .I mergetogroups + Should merge ``to.*'' groups into ``to''. + You need to ensure ``to'' + exists in active, if this is set to ``true''. + This is boolean value and the default is ``false''. + .TP .I keywords Should keywords be generated in the overview databases. Must be a boolean value. *************** *** 281,287 **** .TP .I activedenable If set to ``true'' then ! .I nnrpd processes access the active file through a separate process, using UDP requests. The actived process will be started automatically on innd startup. This saves a significant amount of memory and processing --- 306,312 ---- .TP .I activedenable If set to ``true'' then ! .IR nnrpd (8) processes access the active file through a separate process, using UDP requests. The actived process will be started automatically on innd startup. This saves a significant amount of memory and processing *************** *** 295,300 **** --- 320,331 ---- .I activedport The UDP port on which to send actived requests and responses. .TP + .I noreader + If set to ``false'' innd will fork a copy of nnrpd for all connections from + hosts not mentioned in incoming.conf. You probably want to set this to ``true'' + if you run a transit only server, or serve nnrpd from inetd or daemon mode. + This is a boolean value and the default is ``false''. + .TP .I pathnews The news user home directory and sometimes the root of the news hierarchy. *************** *** 340,347 **** .TP .I pathtmp Where the various programs place their tempfiles. For security reasons ! this is not the same as the system temporary files directory. ! The default value is ``''. .TP .I pathspool The root of the news spool hierarchy. This isn't actually used at --- 371,381 ---- .TP .I pathtmp Where the various programs place their tempfiles. For security reasons ! this is not the same as the system temporary files directory. It should (or ! perhaps 'must') be on the same partition as the incoming spool directory) (so ! rename(2) can work). ! The default value is ! .IR ``''. .TP .I pathspool The root of the news spool hierarchy. This isn't actually used at *************** *** 375,393 **** The default value is ``/uniover''. .PP The following parameters are used only by ! .I nnrpd to control high-volume posters via an exponential backoff algorithm. These parameters are read at ! .I nnrpd run time. .PP Exponential posting backoff works as follows. News clients are indexed by IP number (or username, see ! .I backoff_auth below). Each time that a specific IP number posts a message, the time of posting is stored (along with the previous sleep time, see below). After a configurable number of posts in a configurable period of time, ! .I nnrpd will activate posting backoff, and begin to sleep for increasing periods of time before actually posting anything. Posts will still get through, but at an increasingly reduced rate. --- 409,427 ---- The default value is ``/uniover''. .PP The following parameters are used only by ! .IR nnrpd (8) to control high-volume posters via an exponential backoff algorithm. These parameters are read at ! .IR nnrpd (8) run time. .PP Exponential posting backoff works as follows. News clients are indexed by IP number (or username, see ! .I backoffauth below). Each time that a specific IP number posts a message, the time of posting is stored (along with the previous sleep time, see below). After a configurable number of posts in a configurable period of time, ! .IR nnrpd (8) will activate posting backoff, and begin to sleep for increasing periods of time before actually posting anything. Posts will still get through, but at an increasingly reduced rate. *************** *** 397,460 **** been activated. .PP If this difference is less than ! .I backoff_postfast , the new sleep time will be 1 + (previous sleep time * ! .I backoff_k ). .PP If this difference is less than ! .I backoff_postslow, but greater than ! .I backoff_postfast, then the new sleep time will equal the previous sleep time. .PP If this difference is greater than ! .I backoff_postslow then the new sleep time is zero and the number of postings for this IP number is reset to zero. .PP Here are the parameters that control exponential posting backoff: .TP ! .I backoff_k An integer value representing the amount to multiply the previous sleep time by. A value of 2 works to double the sleep time for each excessive post. The default value is ``1''. .TP ! .I backoff_postfast Postings from the same IP which arrive in less than this amount of time (in seconds) will trigger increasing sleeptime in the backoff algorithm. The default value is ``0''. .TP ! .I backoff_postslow Postings from the same IP which arrive in greater than this amount of time (in seconds) will reset the backoff algorithm. Another way to look at this constant is to compute 86400/ ! .I backoff_postslow which will give you the maximum number of articles per day that you will allow users to post. The default value is ``1''. .TP ! .I backoff_trigger This many postings are allowed before the backoff algorithm is triggered. The default value is ``10000''. .TP ! .I backoff_db Pathname to a directory (must be writable by news) that is to contain the backoff database. There is no default for this parameter, you must provide an existing and writable pathname value or users will not be able to post. The default value is unset. .TP ! .I backoff_auth This is a boolean value. If on, posting backoffs are indexed on a per user basis instead of a per IP basis. You must be using authentication in ! .I nnrpd ! for the on value of this constant to have any meaning. This is boolean value and the default is ``false''. .TP .I readertrack --- 431,494 ---- been activated. .PP If this difference is less than ! .I backoffpostfast , the new sleep time will be 1 + (previous sleep time * ! .I backoffk ). .PP If this difference is less than ! .I backoffpostslow, but greater than ! .I backoffpostfast, then the new sleep time will equal the previous sleep time. .PP If this difference is greater than ! .I backoffpostslow then the new sleep time is zero and the number of postings for this IP number is reset to zero. .PP Here are the parameters that control exponential posting backoff: .TP ! .I backoffk An integer value representing the amount to multiply the previous sleep time by. A value of 2 works to double the sleep time for each excessive post. The default value is ``1''. .TP ! .I backoffpostfast Postings from the same IP which arrive in less than this amount of time (in seconds) will trigger increasing sleeptime in the backoff algorithm. The default value is ``0''. .TP ! .I backoffpostslow Postings from the same IP which arrive in greater than this amount of time (in seconds) will reset the backoff algorithm. Another way to look at this constant is to compute 86400/ ! .I backoffpostslow which will give you the maximum number of articles per day that you will allow users to post. The default value is ``1''. .TP ! .I backofftrigger This many postings are allowed before the backoff algorithm is triggered. The default value is ``10000''. .TP ! .I backoffdb Pathname to a directory (must be writable by news) that is to contain the backoff database. There is no default for this parameter, you must provide an existing and writable pathname value or users will not be able to post. The default value is unset. .TP ! .I backoffauth This is a boolean value. If on, posting backoffs are indexed on a per user basis instead of a per IP basis. You must be using authentication in ! .IR nnrpd (8) ! for the ``true'' value of this parameter to have any meaning. This is boolean value and the default is ``false''. .TP .I readertrack *************** *** 472,477 **** --- 506,520 ---- to moderated newsgroups, whereby those headers are added by the client and honoured by the mailer when mailed to the moderator. This is boolean value and the default is ``false''. + .TP + .I nnrpperlauth + This enables + .IR nnrpd (8) + to authenticate reader with external perl hook. + If this is enabled, normal authentication with + .IR nnrp.access (5) + will not be used. + This is boolean value and the default is ``false''. .PP The following parameters are used only by .I innd. *************** *** 483,493 **** The default value is unset. .TP .I hiscachesize ! If this is set to a non-zero number then history file lookups are cached. ! This number is the amount of memory to dedicate to the lookup cache in kilobytes. It is generally useful to have memory allocated to history ! cache if dbz mmaping is turned on. ! The default value is ``0''. .TP .I xrefslave If this is true, innd will use the information in the Xref: --- 526,539 ---- The default value is unset. .TP .I hiscachesize ! If this is set to a non-zero number then a hash of recently received ! Message-ID's is kept in this memory to save on history lookups. ! The cache is only used for incoming newsfeeds, so a high value isn't ! necessarily useful unless you have incoming feeds that are badly delayed. ! The value is the amount of memory to dedicate to the lookup cache in kilobytes. It is generally useful to have memory allocated to history ! cache if dbz mmaping is turned on. A useful value is around '256', assuming ! you have more than one incoming newsfeed. The default value is ``0''. .TP .I xrefslave If this is true, innd will use the information in the Xref: *************** *** 498,504 **** .TP .I nnrpdposthost If this is specified, ! .I nnrpd and .I rnews pass articles to the specified host. --- 544,550 ---- .TP .I nnrpdposthost If this is specified, ! .IR nnrpd (8) and .I rnews pass articles to the specified host. *************** *** 507,512 **** --- 553,563 ---- is ``true''. The default value is unset. .TP + .I nnrpdpostport + The port to connect to when + .I nnrpdposthost + is used. The default value is ``119''. + .TP .I wireformat If this is true then innd will write articles in wire format. Wire format articles are stored with a \\r\\n at the end of each line and with periods *************** *** 524,529 **** --- 575,583 ---- the history file, else it will write just the first. This can be useful on servers without readers that don't run crosspost and don't link crossposts. + If the server does link crossposts, via either innd itself or a crosspost + feed, this should be set to ``true'' or articles will not be expired + properly. If .I storageapi is ``true'', *************** *** 531,538 **** is discarded. This is boolean value and the default is ``true''. .TP .I timer ! If this is '0' or 'false', then performance monitoring will be disabled by default. Otherwise, it would be how often to report performance statistics, in seconds. If turned on statistics will be logged to syslog. The default value is ``0''. --- 585,598 ---- is discarded. This is boolean value and the default is ``true''. .TP + .I status + If this is '0' or 'false', then status monitoring will be disabled by + default. Otherwise, it would be how often to report status + statistics, in seconds. If turned on statistics will be logged to syslog. + The default value is ``0''. + .TP .I timer ! If this is ``0'' or ``false'', then performance monitoring will be disabled by default. Otherwise, it would be how often to report performance statistics, in seconds. If turned on statistics will be logged to syslog. The default value is ``0''. *************** *** 542,550 **** innd closes the channel. The default value is ``3600''. .TP ! .I allowreaders ! Allow readers to connect even when the server is paused or throttled. ! This is boolean value and the default is ``false''. .TP .I allownewnews Allow use of the ``NEWNEWS'' command by clients. Allowing this can be --- 602,611 ---- innd closes the channel. The default value is ``3600''. .TP ! .I readerswhenstopped ! If this is ``false'', ! readers are allowed to connect even when the server is paused or throttled. ! This is boolean value and the default is ``true''. .TP .I allownewnews Allow use of the ``NEWNEWS'' command by clients. Allowing this can be *************** *** 564,571 **** The default value is ``50''. .TP .I artcutoff ! Articles older than this number of seconds are dropped. ! The default value is ``1209600''(14 days). .TP .I nntplinklog Should we put nntplink info (filename) into the log. --- 625,632 ---- The default value is ``50''. .TP .I artcutoff ! Articles older than this number of days are dropped. ! The default value is 14 days. .TP .I nntplinklog Should we put nntplink info (filename) into the log. *************** *** 602,607 **** --- 663,676 ---- overrides this. The default value is unset. .TP + .I sourceaddress + Which local IP address to bind for outgoing NNTP sockets (used by + .I innxmit + among possibly others). Must be in dotted-quad format (nnn.nnn.nnn.nnn) + If set to ``all'' or not set at all, the operating system which choose + the source IP address for outgoing NNTP connections. + The default value is unset. + .TP .I port Which TCP port .I innd *************** *** 609,615 **** The default value is ``119'' - the standard nntp port. .PP The following parameters are used only by ! .I nnrpd ( or perhaps .I inews ) when accepting postings from clients: --- 678,684 ---- The default value is ``119'' - the standard nntp port. .PP The following parameters are used only by ! .IR nnrpd (8) ( or perhaps .I inews ) when accepting postings from clients: *************** *** 625,631 **** .TP .I mimeversion If this parameter is present, then ! .I nnrpd will add the necessary MIME (Multipurpose Internet Mail Extensions) headers to all any articles that do not have a Mime-Version header. This parameter specifies the MIME version, and should normally be ``1.0''. --- 694,700 ---- .TP .I mimeversion If this parameter is present, then ! .IR nnrpd (8) will add the necessary MIME (Multipurpose Internet Mail Extensions) headers to all any articles that do not have a Mime-Version header. This parameter specifies the MIME version, and should normally be ``1.0''. *************** *** 642,654 **** The default value is ``7bit.'' .TP .I spoolfirst ! If this is true then nnrpd will spool new articles with out attempting to send them to innd first. If this is false then nnrpd will spool new articles only after receiving an error trying to send them to innd. Setting this to true can be useful if you want nnrpd to respond to the client as fast as possible, however, nnrpd will not report articles that are not accepted by innd to the client if they ! are spool. This is boolean value and the default is ``false''. .TP .I complaints --- 711,724 ---- The default value is ``7bit.'' .TP .I spoolfirst ! If this is true then nnrpd will spool new articles without attempting to send them to innd first. If this is false then nnrpd will spool new articles only after receiving an error trying to send them to innd. Setting this to true can be useful if you want nnrpd to respond to the client as fast as possible, however, nnrpd will not report articles that are not accepted by innd to the client if they ! are spool. And the posted article is never handed to innd by nnrpd, if this ! is true. ``rnews -U'' should be used to pass that article to innd. This is boolean value and the default is ``false''. .TP .I complaints *************** *** 686,691 **** --- 756,859 ---- If set to ``false'' then do not start .IR innwatch (8). This is boolean value and the default is ``true''. + .TP + .I innwatchsleeptime + How long (in seconds) an innwatch will be sleep before it checks. + The default value is ``600''. + .TP + .I pgpverify + If set to ``true'' then enables pgp verification for handling control + messages except cancel. + This is boolean value and the default is ``false''. + .TP + .I controlfailnotice + If set to ``true'' and + .I usecontrolchan + is set to ``false'', then if there is a problem processing control message, + it is reported to the administrator through mail. If set to ``false'' or + .I usecontrolchan + is set to ``true'', nothing is reported. + This is boolean value and the default is ``false''. + .TP + .I logcycles + How many logs does + .IR news.daily (8) + ( + .IR scanlogs (8) + ) keep before it overwrites. + The default value is ``3''. + .TP + .I innwatchpauseload + Load average (* 100) at which innd should be paused by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``1500''. + .TP + .I innwatchhiload + Load average (* 100) at which innd should be throttled by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``2000''. + .TP + .I innwatchloload + Load average (* 100) at which to restart innd (pause/throttle undone) by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``1000''. + .TP + .I innwatchspoolspace + Space, in + .IR inndf (8) + output units, at which to throttle innd on + .I patharticles + and + .I pathoverview + by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``8000''. + .TP + .I innwatchbatchspace + Space, in + .IR inndf (8) + output units, at which to throttle innd on + .I pathoutgoing + by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``800''. + .TP + .I innwatchlibspace + Space, in + .IR inndf (8) + output units, at which to throttle innd on + .I pathdb + by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``25000''. + .TP + .I innwatchspoolnodes + Space, in + .IR inndf (8) + output units, at which to throttle innd on + .I patharticles + by + .IR innwatch (8) + with default + .IR innwatch.ctl (5). + The default value is ``200''. + .TP + .I docnfsstat + If set to ``true'' then start + .IR cnfsstat . + This is boolean value and the default is ``false''. .PP Note that this file can be identical on all machines in an organization. .SH EXAMPLE *************** *** 708,713 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inn.conf.5,v 1.49 1998/07/09 23:15:10 kondou Exp $ .SH "SEE ALSO" ! history(5), libinn(3), moderators(5), makehistory(8), newsrequeue(8), nnrpd(8). --- 876,882 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inn.conf.5,v 1.61.2.6 1999/01/06 10:28:38 kondou Exp $ .SH "SEE ALSO" ! history(5), libinn(3), moderators(5), makehistory(8), news.daily(8), ! newsrequeue(8), nnrpd(8), rnews(8), scanlogs(8). diff -Nacr inn-2.1/doc/inncheck.8 inn-2.2/doc/inncheck.8 *** inn-2.1/doc/inncheck.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/inncheck.8 Thu Aug 6 23:05:11 1998 *************** *** 35,41 **** thinks may be wrong, and it is up to the operator to fix the problem. .PP The set of files checked may be restricted by using \fBfile\fP or ! \fBfile=value\fP arguments. For example, putting \fBincomig.conf\fP causes only the .IR incoming.conf (5) file to be checked. Using \fBincoming.conf=/tmp/incoming.conf\fP on the --- 35,41 ---- thinks may be wrong, and it is up to the operator to fix the problem. .PP The set of files checked may be restricted by using \fBfile\fP or ! \fBfile=value\fP arguments. For example, putting \fBincoming.conf\fP causes only the .IR incoming.conf (5) file to be checked. Using \fBincoming.conf=/tmp/incoming.conf\fP on the *************** *** 153,159 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inncheck.8,v 1.3 1998/07/18 01:36:30 kondou Exp $ .SH "SEE ALSO" active(5), expire.ctl(5), --- 153,159 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inncheck.8,v 1.4 1998/08/06 23:05:11 kondou Exp $ .SH "SEE ALSO" active(5), expire.ctl(5), diff -Nacr inn-2.1/doc/innconfval.1 inn-2.2/doc/innconfval.1 *** inn-2.1/doc/innconfval.1 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innconfval.1 Fri Aug 21 10:26:26 1998 *************** *** 1,4 **** ! .\" $Revision: 1.2 $ .TH INNCONFVAL 1 .SH NAME innconfval \- get an InterNetNews configuration parameter --- 1,4 ---- ! .\" $Revision: 1.3 $ .TH INNCONFVAL 1 .SH NAME innconfval \- get an InterNetNews configuration parameter *************** *** 23,28 **** --- 23,31 ---- .B \-t ] [ + .B \-v + ] + [ .I parameter... ] .SH DESCRIPTION *************** *** 30,36 **** prints the values of the parameters specified on the command line. Values are retrieved from the .IR inn.conf (5) ! file and are described there. If no parameters are specified, all the values are printed on separate lines. This is most useful with the other options for setting up assignment of variables. .SH OPTIONS --- 33,46 ---- prints the values of the parameters specified on the command line. Values are retrieved from the .IR inn.conf (5) ! file and are described there except for ``version''. ! \&``Version'' cannot be set at ! .IR inn.conf (5) ! and retrieved from ! .I INNVersion() ! in ! .IR libinn (3). ! If no parameters are specified, all the values are printed on separate lines. This is most useful with the other options for setting up assignment of variables. .SH OPTIONS *************** *** 60,71 **** .TP .B \-t Print values as tcl assignment commands .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innconfval.1,v 1.2 1998/03/20 18:19:03 mibsoft Exp $ .SH "SEE ALSO" libinn(3), inn.conf(5). --- 70,84 ---- .TP .B \-t Print values as tcl assignment commands + .TP + .B \-v + Print inn version .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innconfval.1,v 1.3 1998/08/21 10:26:26 kondou Exp $ .SH "SEE ALSO" libinn(3), inn.conf(5). diff -Nacr inn-2.1/doc/innd.8 inn-2.2/doc/innd.8 *** inn-2.1/doc/innd.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innd.8 Wed Dec 9 15:40:30 1998 *************** *** 1,4 **** ! .\" $Revision: 1.17 $ .TH INND 8 .SH NAME innd, inndstart \- InterNetNews daemon --- 1,4 ---- ! .\" $Revision: 1.21.2.1 $ .TH INND 8 .SH NAME innd, inndstart \- InterNetNews daemon *************** *** 87,94 **** It then opens the NNTP port to receive articles from remote sites (see the ``\fB\-p\fP'' option), If ! .I ! is ``DO'', a Unix-domain stream socket to receive articles from local processes such as .IR nnrpd (8) --- 87,94 ---- It then opens the NNTP port to receive articles from remote sites (see the ``\fB\-p\fP'' option), If ! .I ! is defined, a Unix-domain stream socket to receive articles from local processes such as .IR nnrpd (8) *************** *** 97,104 **** and a Unix-domain datagram socket for use by .IR ctlinnd (8). If ! .I ! is ``DONT'', named pipes are used instead. .IR Ctlinnd (8) is used to direct the server to perform certain actions. It also opens the --- 97,104 ---- and a Unix-domain datagram socket for use by .IR ctlinnd (8). If ! .I ! is not defined, named pipes are used instead. .IR Ctlinnd (8) is used to direct the server to perform certain actions. It also opens the *************** *** 241,247 **** of ``\fBn\fP'' will allow newsreading even when the server is not running. The default is to allow reading, but can also be changed with the ! ``allowreaders'' option in .IR inn.conf (5) .TP .B \-o --- 241,247 ---- of ``\fBn\fP'' will allow newsreading even when the server is not running. The default is to allow reading, but can also be changed with the ! ``readerswhenstopped'' option in .IR inn.conf (5) .TP .B \-o *************** *** 312,318 **** Except for the cancel message, these messages are implemented by external programs in the .I ! directory. (Cancel messages update the history database, so they must be handled internally; the cost of syncing, locking, then unlocking would be too high given the number of cancel messages that are received.) --- 312,320 ---- Except for the cancel message, these messages are implemented by external programs in the .I ! directory, if ! .I ! is ``false''. (Cancel messages update the history database, so they must be handled internally; the cost of syncing, locking, then unlocking would be too high given the number of cancel messages that are received.) *************** *** 335,340 **** --- 337,354 ---- The fourth parameter is the host that sent the article, as specified on the Path line. .PP + If + .I + is ``true'', all control messages except for the cancel will never processed + by external program fork'ed by innd. Instead they can be processed by + .I controlchan + script which is invoked as channel program by innd, and you need to setup + .IR newsfeeds (5) + to use this script. + Processing by + .I controlchan + can reduce excessive load if many control messages arrive in a short time. + .PP The distribution of control message is also different from those of standard articles. .PP *************** *** 360,367 **** patterns would cause them to receive articles posted in that group. .PP If ! .I ! is ``DO'', if an article is posted to a newsgroup that starts with the three letters ``to.'' it will get special treatment if the newsgroup does not exist in the .I active --- 374,381 ---- patterns would cause them to receive articles posted in that group. .PP If ! .I ! is ``true'', if an article is posted to a newsgroup that starts with the three letters ``to.'' it will get special treatment if the newsgroup does not exist in the .I active *************** *** 513,519 **** .RE Where ``%s'', above, is replaced by more specific information. .PP ! Note that if an article is accepted, and is set to ``yes'' and none of the newsgroups are valid, it will be logged with two lines, a ``j'' line and a minus sign line. .PP --- 527,533 ---- .RE Where ``%s'', above, is replaced by more specific information. .PP ! Note that if an article is accepted, and is set to ``yes'' and none of the newsgroups are valid, it will be logged with two lines, a ``j'' line and a minus sign line. .PP *************** *** 550,556 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innd.8,v 1.17 1998/07/18 01:36:30 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), --- 564,570 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innd.8,v 1.21.2.1 1998/12/09 15:40:30 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), diff -Nacr inn-2.1/doc/inndcomm.3 inn-2.2/doc/inndcomm.3 *** inn-2.1/doc/inndcomm.3 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/inndcomm.3 Wed Dec 9 15:40:30 1998 *************** *** 1,4 **** ! .\" $Revision: 1.3 $ .TH INNDCOMM 3 .SH NAME inndcomm \- INND communication part of InterNetNews library --- 1,4 ---- ! .\" $Revision: 1.3.4.1 $ .TH INNDCOMM 3 .SH NAME inndcomm \- INND communication part of InterNetNews library *************** *** 57,64 **** .I ICCopen creates a Unix-domain datagram socket and binds it to the server's control socket, if ! .I ! is ``DO''. Otherwise it creates a named pipe for communicating with the server. It returns \-1 on failure or zero on success. This routine must be called before any other routine. --- 57,64 ---- .I ICCopen creates a Unix-domain datagram socket and binds it to the server's control socket, if ! .I ! is defined. Otherwise it creates a named pipe for communicating with the server. It returns \-1 on failure or zero on success. This routine must be called before any other routine. *************** *** 135,141 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inndcomm.3,v 1.3 1998/04/09 15:16:08 mibsoft Exp $ .SH "SEE ALSO" ctlinnd(8), innd(8), --- 135,141 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: inndcomm.3,v 1.3.4.1 1998/12/09 15:40:30 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), innd(8), diff -Nacr inn-2.1/doc/inndf.8 inn-2.2/doc/inndf.8 *** inn-2.1/doc/inndf.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/inndf.8 Thu Sep 17 06:12:28 1998 *************** *** 0 **** --- 1,45 ---- + .\" $Id: inndf.8,v 1.1 1998/09/17 06:12:28 kondou Exp $ + .TH INNDF 8 + .SH NAME + inndf \- Replacement for 'df | awk' in innwatch.ctl + .SH SYNOPSIS + .B inndf + [ + .B \-i + ] + .I filesystem(s) + .SH DESCRIPTION + .I inndf + is a replacement for 'df | awk' in + .IR innwatch.ctl (5) + or used in + .IR innstat (8). + .I inndf + reports free Kilobytes (not disk blocks) or free inodes. + Kilobytes in this case means 1024 bytes. + .PP + If the ``\-i'' flag is used, then the number of free inodes are reported + instead of the number of free Kilobytes. + .PP + If arguments are multiply specified, the output includes multiple lines + which shows each specified argument and the value. This is used by + .IR innstat (8). + .PP + .I inndf + doesn't sync, forks less, is less complicated, etc. + .PP + Portability issues are handled in the source, so read it. + .SH HISTORY + Inndf was written by Ian Dickinson . + The initial manual page was written by Swa Frantzen . + Thanks also to the following folks for ports, patches and comments: + Mahesh Ramachandran , + Chuck Swiger , + Sang-yong Suh , + Brad Dickey , + Taso N. Devetzis , + Wei-Yeh Lee , + Jeff Garzik , + and to all the other folks I met and worked with during my 10 years as a newsadmin. + .SH "SEE ALSO" + innwatch.ctl(5). diff -Nacr inn-2.1/doc/innfeed.conf.5 inn-2.2/doc/innfeed.conf.5 *** inn-2.1/doc/innfeed.conf.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innfeed.conf.5 Sun Aug 2 23:54:50 1998 *************** *** 4,10 **** .\" Start Date: Sun, 21 Jan 1996 00:47:37 +1100 .\" Project: INN -- innfeed .\" File: innfeed.conf.5 ! .\" RCSId: $Id: innfeed.conf.5,v 1.4 1998/05/21 10:12:54 kondou Exp $ .\" Description: Man page for innfeed.conf(5) .\" .TH innfeed.conf 5 --- 4,10 ---- .\" Start Date: Sun, 21 Jan 1996 00:47:37 +1100 .\" Project: INN -- innfeed .\" File: innfeed.conf.5 ! .\" RCSId: $Id: innfeed.conf.5,v 1.5 1998/08/02 23:54:50 kondou Exp $ .\" Description: Man page for innfeed.conf(5) .\" .TH innfeed.conf 5 *************** *** 287,292 **** --- 287,299 ---- descriptors free for stdio. Certain systems, Sun's in particular, require this. SunOS 4.1.x usually requires a value of 128 and Solaris requires a value of 256. The default if this is not specified, is 0. + .TP + .B bindaddress + Which interface IP address innfeed should bind the local end of its + connections to. + Must be in dotted-quad format (nnn.nnn.nnn.nnn). + If not set, innfeed defaults to letting the kernel choose this address. + The default value is unset. .\".................................................. .SH "GLOBAL PEER DEFAULTS" .PP *************** *** 632,637 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innfeed.conf.5,v 1.4 1998/05/21 10:12:54 kondou Exp $ .SH SEE ALSO innfeed(1), newsfeeds(5) --- 639,644 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innfeed.conf.5,v 1.5 1998/08/02 23:54:50 kondou Exp $ .SH SEE ALSO innfeed(1), newsfeeds(5) diff -Nacr inn-2.1/doc/innwatch.8 inn-2.2/doc/innwatch.8 *** inn-2.1/doc/innwatch.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innwatch.8 Thu Sep 17 06:12:28 1998 *************** *** 14,23 **** is normally started by .IR rc.news . It periodically \(em every ! .I ! (typically ! .\" =()<.I @@ )>()= ! .I 600 ) seconds \(em examines the load average, and the number of free blocks and inodes on the spool partition, as described by its control file, --- 14,20 ---- is normally started by .IR rc.news . It periodically \(em every ! .I seconds \(em examines the load average, and the number of free blocks and inodes on the spool partition, as described by its control file, *************** *** 52,58 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innwatch.8,v 1.5 1998/04/09 15:16:08 mibsoft Exp $ .SH "SEE ALSO" ctlinnd(8), inn.conf(5), --- 49,55 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innwatch.8,v 1.6 1998/09/17 06:12:28 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), inn.conf(5), diff -Nacr inn-2.1/doc/innwatch.ctl.5 inn-2.2/doc/innwatch.ctl.5 *** inn-2.1/doc/innwatch.ctl.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innwatch.ctl.5 Thu Sep 17 06:12:28 1998 *************** *** 1,4 **** ! .\" $Revision: 1.6 $ .TH INNWATCH.CTL 5 .SH NAME innwatch.ctl \- control Usenet supervision by innwatch --- 1,4 ---- ! .\" $Revision: 1.7 $ .TH INNWATCH.CTL 5 .SH NAME innwatch.ctl \- control Usenet supervision by innwatch *************** *** 143,157 **** .SH EXAMPLES .RS .nf ! @@@df .|awk 'NR==2 {print $4}'@lt@10000@throttle@No space ! @@@df -i .|awk 'NR==2 {print $4}'@lt@1000@throttle@No space (inodes) .fi .RE .PP The first line causes the server to be throttled if the free space drops below 10000 units (using whatever units ! .I df uses), and restarted again when free space increases above the threshold. .PP The second line does the same for inodes. --- 143,157 ---- .SH EXAMPLES .RS .nf ! @@@inndf .@lt@10000@throttle@No space ! @@@inndf -i .@lt@1000@throttle@No space (inodes) .fi .RE .PP The first line causes the server to be throttled if the free space drops below 10000 units (using whatever units ! .IR inndf (8) uses), and restarted again when free space increases above the threshold. .PP The second line does the same for inodes. *************** *** 206,212 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innwatch.ctl.5,v 1.6 1998/04/09 15:16:09 mibsoft Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), --- 206,212 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: innwatch.ctl.5,v 1.7 1998/09/17 06:12:28 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), diff -Nacr inn-2.1/doc/innxbatch.8 inn-2.2/doc/innxbatch.8 *** inn-2.1/doc/innxbatch.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/innxbatch.8 Wed Dec 9 15:40:30 1998 *************** *** 73,83 **** nase\e :*\e :Tc,Wnb\e ! .ds R$ :\*(R$/batcher \e ! .ds R$ <_PATH_COMPRESS in config.data> .ds P$ ! -p "(\*(R$ > \*(P$/nase.\e$\e$)" \e nase.do.main .fi --- 73,84 ---- nase\e :*\e :Tc,Wnb\e ! .ds R$ :\*(R$/batcher \e ! .ds R$ <$ac_cv_path_COMPRESS in config.cache> .ds P$ ! -p "(\*(R$ >\e ! \*(P$/nase.\e$\e$)" \e nase.do.main .fi diff -Nacr inn-2.1/doc/libinn.3 inn-2.2/doc/libinn.3 *** inn-2.1/doc/libinn.3 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/libinn.3 Wed Dec 9 15:40:31 1998 *************** *** 1,4 **** ! .\" $Revision: 1.5 $ .TH LIBINN 3 .SH NAME libinn \- InterNetNews library routines --- 1,4 ---- ! .\" $Revision: 1.5.4.1 $ .TH LIBINN 3 .SH NAME libinn \- InterNetNews library routines *************** *** 361,368 **** and the ``usec'' field will be set to zero. The ``tzone'' field will be filled in with the current offset from GMT. If ! .I ! is ``DO'', this is done by calling .IR localtime (3) and taking the value of the ``tm_gmtoff'' field, negating it, and dividing it by 60. --- 361,368 ---- and the ``usec'' field will be set to zero. The ``tzone'' field will be filled in with the current offset from GMT. If ! .I ! is defined, this is done by calling .IR localtime (3) and taking the value of the ``tm_gmtoff'' field, negating it, and dividing it by 60. *************** *** 379,386 **** .PP .I NNTPlocalopen when ! .I ! is ``DO'', opens a connection to the private port of an InterNetNews server running on the local host. It returns \-1 on failure, or zero on success. --- 379,386 ---- .PP .I NNTPlocalopen when ! .I ! is defined, opens a connection to the private port of an InterNetNews server running on the local host. It returns \-1 on failure, or zero on success. *************** *** 395,402 **** filled in with the text of the server's reply. This routine is not for general use. When ! .I ! is ``DONT'', this is a stub routine, for compatibility with systems that have Unix-domain stream sockets. It always returns \-1. --- 395,402 ---- filled in with the text of the server's reply. This routine is not for general use. When ! .I ! is not defined, this is a stub routine, for compatibility with systems that have Unix-domain stream sockets. It always returns \-1. *************** *** 529,535 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: libinn.3,v 1.5 1998/05/20 14:54:57 scrappy Exp $ .SH "SEE ALSO" active(5), dbz(3z), --- 529,535 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: libinn.3,v 1.5.4.1 1998/12/09 15:40:31 kondou Exp $ .SH "SEE ALSO" active(5), dbz(3z), diff -Nacr inn-2.1/doc/libstorage.3 inn-2.2/doc/libstorage.3 *** inn-2.1/doc/libstorage.3 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/libstorage.3 Thu Aug 20 04:24:32 1998 *************** *** 1,4 **** ! .\" $Revision: 1.7 $ .TH LIBSTORAGE 3 .SH NAME libstorage \- InterNetNews Storage API library routines --- 1,4 ---- ! .\" $Revision: 1.8 $ .TH LIBSTORAGE 3 .SH NAME libstorage \- InterNetNews Storage API library routines *************** *** 146,152 **** if article is not stored whichever error occures or simply does not match .IR wildmat (3) in ! .IR storage.ctl (5). .I SMstore fails if .I SM_RDWR --- 146,152 ---- if article is not stored whichever error occures or simply does not match .IR wildmat (3) in ! .IR storage.conf (5). .I SMstore fails if .I SM_RDWR *************** *** 341,349 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: libstorage.3,v 1.7 1998/05/20 01:37:38 kondou Exp $ .SH "SEE ALSO" expire(8), inn.conf(5), overview.ctl(5), ! storage.ctl(5). --- 341,349 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: libstorage.3,v 1.8 1998/08/20 04:24:32 kondou Exp $ .SH "SEE ALSO" expire(8), inn.conf(5), overview.ctl(5), ! storage.conf(5). diff -Nacr inn-2.1/doc/mailpost.8 inn-2.2/doc/mailpost.8 *** inn-2.1/doc/mailpost.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/mailpost.8 Wed Dec 9 15:40:31 1998 *************** *** 0 **** --- 1,88 ---- + .\" -*- nroff -*- + .TH MAILPOST 1 + .SH NAME + mailpost \- feed an email message into a news group + .SH SYNOPSIS + .I mailpost + [ + .BI \-r " addr" + ] + [ + .BI \-f " addr" + ] + [ + .BI \-a " addr" + ] + [ + .BI \-d " distribution" + ] + [ + .BI \-m " mailing-list" + ] + [ + .BI \-b " database" + ] + newsgroups + .SH DESCRIPTION + The + .I mailpost + program reads a properly formatted email message from stdin and feeds it to + inews for posting to a news server. Before feeding the article to inews it + checks that the article has not been seen before, and it changes some headers + (cleans some address headers up and puts ``X-'' in front of unknown headers). + .PP + If the article has been seen before + .RI ( mailpost + records the message-id of all articles is handles), the the article will be + silently dropped. Other errors will cause the article to be mailed to the + newsmaster. + .PP + Normally mailpost is run by sendmail via an alias entry: + .PP + .RS + .nf + .ds R$ /bin + local-mail-wreck-bikes: "|\*(R$/mailpost + -d local local.mail.rec.bicycles.racing" + .fi + .RE + .SH OPTIONS + .TP + .B \-r + If the ``\fB\-r\fP'' flag is used the program will use the given address + as the Path header, if no other value can be determined. + .TP + .B \-f + The ``\fB\-f\fP'' flag is a synonym for the ``\fB\-r\fP'' flag. + .TP + .B \-a + If the ``\fB\-a\fP'' flag is used the value given is added to the article + as an Approved header. + .TP + .B \-d + If the ``\fB\-d\fP'' flag is used the value given is added to the article + as a Distribution header. + .TP + .B \m + If the ``\fB\-m\fP'' flag is used the value given is added to the articles in a + Mailing-List header, if a Mailing-List header doesn't already exist. + .TP + .B \-b + IF the ``\fB\-b\fP'' flag is used, then it defines the location of the database + used to store the message ids of articles sent on. This is to prevent articles + looping around if a news to mail gateway sends them back here. This option may + be required if the mailpost process doesn't have write access to the news tmp + directory (the value of \fpathtmp\fP in \fBinn.conf(5)\fP. + .SH HISTORY + Written by Paul Vixie long ago and then hacked up by James Brister for INN + integration. + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: mailpost.8,v 1.1.2.1 1998/12/09 15:40:31 kondou Exp $ + .SH FILES + /mailpost-msgid.db database file + .SH BUGS + Is lacking in configurability. + .SH "SEE ALSO" + active(5), inn.conf(5), nnrpd(8), wildmat(3). diff -Nacr inn-2.1/doc/makehistory.8 inn-2.2/doc/makehistory.8 *** inn-2.1/doc/makehistory.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/makehistory.8 Tue Sep 15 02:23:18 1998 *************** *** 1,4 **** ! .\" $Revision: 1.19 $ .TH MAKEHISTORY 8 .SH NAME makehistory \- tools to recover Usenet history database. --- 1,4 ---- ! .\" $Revision: 1.21 $ .TH MAKEHISTORY 8 .SH NAME makehistory \- tools to recover Usenet history database. *************** *** 268,273 **** --- 268,279 ---- If used, this flag and its value will be passed on to the .IR sort (1) command that is invoked during the build. + The default temporary directory for + .I sort + used by + .I makehistory + is + .IR . .TP .B \-t If the ``\fB\-t\fP'' flag is used, then *************** *** 373,397 **** ctlinnd go '' .fi .RE - .SH BUGS AND LIMITATIONS - .PP - .I Makehistory - does not handle symbolic links. - If the news spool area is split across multiple partitions, the following - commands should probably be run before the database is regenerated: - .RS - .nf - cd - find . -type l -name '[1-9][0-9]*' -print | xargs -t rm - .fi - .RE - Make sure to run the command on all the appropriate partitions! .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: makehistory.8,v 1.19 1998/07/24 01:58:03 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), --- 379,390 ---- ctlinnd go '' .fi .RE .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: makehistory.8,v 1.21 1998/09/15 02:23:18 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), diff -Nacr inn-2.1/doc/mod-active.8 inn-2.2/doc/mod-active.8 *** inn-2.1/doc/mod-active.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/mod-active.8 Wed Oct 28 16:10:35 1998 *************** *** 0 **** --- 1,83 ---- + .\" $Revision: 1.1.2.1 $ + .TH MOD-ACTIVE 8 + .SH NAME + mod-active \- batch processing of ctlinnd newgroup/rmgroup/changegroup + .SH SYNOPSIS + .B mod-active + [ + .I ctlinnd_command_file + ] + .SH DESCRIPTION + .B mod-active + is a + .B perl + script that updates the + .I active + file based on its input lines of ctlinnd newgroup, rmgroup and + changegroup commands. It pauses the server briefly while the existing + active file is read and rewritten, which not only keeps + .B innd + from updating the active file but also locks against other instances + of + .B mod-active. + .PP + The input to + .B mod-active + can come either from one or more files named on the command line, or + from the standard input. Typically its input is the output from the + .B docheckgroups + or + .B actsync + commands. Every line which contains the string "ctlinnd newgroup", + "ctlinnd rmgroup" or "ctlinnd changegroup", optionally preceded by + whitespace and/or the path to + .B ctlinnd, + is noted for the update. Redundant commands, such as a newgroup + directive for a group that already exists, are silently ignored. All + other lines in the input are also silently ignored. + .PP + After the new + .I active + file has been generated, the existing one is renamed to + .I active.old + and the new one is moved into place. The script then displays the + differences between the two files. + .PP + Any groups that were added to the + .I active + file are also added to the + .I active.times + file with the string "checkgroups-update". + .SH BUGS + Though + .B innd + is paused while + .B mod-active + works, it is not inconceivable that there could be a conflict if + something else tries to update the active file during the relatively + short time that mod-active is working. The two most realistic ways I + can think of for this to happen are either by an administrator + concurrently doing a manual ctlinnd command, or by + .B innd + receiving a control message, then + .B mod-active + pausing the server, then the control message handler script that + .B innd + forked running its own + .B ctlinnd + command while + .B mod-active + is working. + I've been using + .B mod-active + regularly for several years, though, and never had either problem. + .SH HISTORY + Written by David C Lawrence . + .de R$ + This is revision \\$3, dated \\$4. + .. + .SH "SEE ALSO" + .IR active (5), + .IR actsync (8), + .IR ctlinnd (8), + .IR innd (8). diff -Nacr inn-2.1/doc/news.daily.8 inn-2.2/doc/news.daily.8 *** inn-2.1/doc/news.daily.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/news.daily.8 Wed Dec 9 15:40:31 1998 *************** *** 20,29 **** By default, .I news.daily performs all of its functions and mails the output to the news administrator, ! .I ! (typically ! .\" =()<.IR @@ .)>()= ! .IR usenet .) By specifying ``keywords'' on the command line, it is possible to modify the functions performed, as well as change the arguments given to .IR expire (8) --- 20,26 ---- By default, .I news.daily performs all of its functions and mails the output to the news administrator, ! .IR . By specifying ``keywords'' on the command line, it is possible to modify the functions performed, as well as change the arguments given to .IR expire (8) *************** *** 210,216 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: news.daily.8,v 1.7 1998/05/29 05:38:15 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), --- 207,213 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: news.daily.8,v 1.7.4.1 1998/12/09 15:40:31 kondou Exp $ .SH "SEE ALSO" active(5), ctlinnd(8), diff -Nacr inn-2.1/doc/news2mail.8 inn-2.2/doc/news2mail.8 *** inn-2.1/doc/news2mail.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/news2mail.8 Wed Dec 9 15:40:32 1998 *************** *** 0 **** --- 1,73 ---- + .\" -*- nroff -*- + .\" $Revision: 1.1.2.1 $ + .TH NEWS2MAIL 8 + .SH NAME + news2mail \- a channel script to gateway news into email. + .SH SYNOPSIS + .I news2mail + .SH DESCRIPTION + .I news2mail + runs as a channel process underneath innd. It is set up as channel feed in + newsfeeds, with different mailing lists as funnel entries pointing to it (see + below). + .PP + .I news2mail + uses a config file + .PP + .RS + .I /news2mail.cf + .RE + .PP + to map mailing list names to email addresses. + .PP + .I news2mail + causes sendmail to queue the messages for later delivery (to avoid DOS attacks + by mass postings). You must run 'sendmail -q' periodically to get the queue + processed. + .SH CONFIG FILE + The config file format is simple: comments (start with ``#'') and blank lines + are ignored. All other lines have two fields on them. The first is the list + name and is what innd uses (i.e. the site field of the entry in the newsfeeds + file). The second field is the actual email address to send the article to. In + the email message, the ``To'' header will have the mailing list name (i.e. the + first field) + .PP + .RS + .nf + # list-name address + big-red-ants@ucsd.edu big-red-ants-digest@ucsd.edu + news-software@ucsd.edu news-software-digest@ucsd.edu + .fi + .RE + .PP + a set of newsfeeds entries for these lists would be: + .PP + .RS + .nf + .ds R$ /bin + n2m!:!*:Tc,Ac,Wn*:\*(R$/news2mail + + big-red-ants@ucsd.edu:rec.pets.redants.*:Tm:n2m! + + news-software@ucsd.edu:news.software.nntp:Tm:n2m! + .fi + .RE + .PP + .I news2mail + strips most article headers from the article before mailing. It leaves: From, Subject + Date, Organization and Message-ID in there. It add a To header with the mailing + list name in it. + .SH HISTORY + news2mail was written by Brian Kantor. This man pagewas written by James + Brister + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: news2mail.8,v 1.1.2.1 1998/12/09 15:40:32 kondou Exp $ + .SH "SEE ALSO" + ctlinnd(8), + inn.conf(5), + innd(8), + newsfeeds(5), + shlock(1). + diff -Nacr inn-2.1/doc/newsfeeds.5 inn-2.2/doc/newsfeeds.5 *** inn-2.1/doc/newsfeeds.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/newsfeeds.5 Wed Dec 9 15:40:32 1998 *************** *** 1,4 **** ! .\" $Revision: 1.19 $ .TH NEWSFEEDS 5 .SH NAME newsfeeds \- determine where Usenet articles get sent --- 1,4 ---- ! .\" $Revision: 1.20.2.2 $ .TH NEWSFEEDS 5 .SH NAME newsfeeds \- determine where Usenet articles get sent *************** *** 257,269 **** The nice priority that this channel or program feed should receive. This should be a positive number between 0 and 20, and is the priority that the new process will run with. This can be used to raise the ! priority to normal if you are using the INND_NICE_KIDS config.data variable. .TP .BI O Originator If this is used then articles sent to this feed must contain a X-Trace header and the first field in the header must match the parameter used with ! this flag. One use of this is to restrict the feed to locally generated ! posts. .I .TP .BI S size --- 257,272 ---- The nice priority that this channel or program feed should receive. This should be a positive number between 0 and 20, and is the priority that the new process will run with. This can be used to raise the ! priority to normal if you are using the nicekids inn.conf variable. .TP .BI O Originator If this is used then articles sent to this feed must contain a X-Trace header and the first field in the header must match the parameter used with ! this flag. ! .I Originator ! can be a ! .IR wildmat (3)-style ! pattern. One use of this is to restrict the feed to locally generated posts. .I .TP .BI S size *************** *** 335,341 **** If ``H'' is present, then the all the article's headers are written followed by a blank line. An Xref header (even if one does not appear in the filed article) ! and a Bytes header, specifying the article's size, will also be part of the headers. If used, this should be the only item in the list; if preceded by other items, however, a newline will be written before the headers. --- 338,345 ---- If ``H'' is present, then the all the article's headers are written followed by a blank line. An Xref header (even if one does not appear in the filed article) ! and a Bytes header, specifying the article's size (see ``b'' description ! below for clarifying size meaning), will also be part of the headers. If used, this should be the only item in the list; if preceded by other items, however, a newline will be written before the headers. *************** *** 598,604 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: newsfeeds.5,v 1.19 1998/07/07 08:47:06 kondou Exp $ .SH "SEE ALSO" active(5), buffchan(8), --- 602,608 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: newsfeeds.5,v 1.20.2.2 1998/12/09 15:40:32 kondou Exp $ .SH "SEE ALSO" active(5), buffchan(8), diff -Nacr inn-2.1/doc/nnrp.access.5 inn-2.2/doc/nnrp.access.5 *** inn-2.1/doc/nnrp.access.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/nnrp.access.5 Wed Dec 9 15:40:32 1998 *************** *** 1,10 **** ! .\" $Revision: 1.11 $ .TH NNRP.ACCESS 5 .SH NAME nnrp.access \- access file for NNTP news readers. .SH DESCRIPTION The file ! .I /nnrp.access specifies the access control for those NNTP sites that are not handled by the main InterNetNews daemon .IR innd (8). --- 1,10 ---- ! .\" $Revision: 1.13.2.2 $ .TH NNRP.ACCESS 5 .SH NAME nnrp.access \- access file for NNTP news readers. .SH DESCRIPTION The file ! .I /nnrp.access specifies the access control for those NNTP sites that are not handled by the main InterNetNews daemon .IR innd (8). *************** *** 62,78 **** .I password that the client must use to authenticate themselves before the server will accept any articles. ! Note that no authentication (other then a matching entry in this file) ! is required for newsreading. If they are empty, then no password is required. Whitespace in these fields will result in the client being unable to properly authenticate themselves and may be used to disable access. ! If is ``DO'' and ! the third field is ``+'', then .IR nnrpd (8) uses .IR crypt (3) ! to authenticate passed username and password. .PP The fifth field is a set of patterns identifying the newsgroups that the client is allowed to access. --- 62,86 ---- .I password that the client must use to authenticate themselves before the server will accept any articles. ! Note that authentication ! is required for newsreading, unless both are empty. ! In this case, the connection is never closed until it is timed out or the ! client explicitly issues ``QUIT''. If they are empty, then no password is required. Whitespace in these fields will result in the client being unable to properly authenticate themselves and may be used to disable access. ! If the third field is ``+'', then .IR nnrpd (8) uses .IR crypt (3) ! to authenticate passed username and password. This might not work on ! systems that use a shadow password file, since nnrpd normally doesn't ! have the permissions to read that file. If nnrpd is started in standalone ! mode, it tries to adjust its permissions so that it can read the shadow ! file. See also the ! .I \-g ! option in the manual page for ! .IR nnrpd (8). .PP The fifth field is a set of patterns identifying the newsgroups that the client is allowed to access. *************** *** 81,86 **** --- 89,111 ---- file except for ``@''. The default, however, denies access to all groups. .PP + There is another line format, which can be used to pre-define an access + list. + .RS + .nf + %DEFINEn:pattern + .fi + .RE + .PP + The %DEFINE is literal and is followed by a number to define that + particular pattern. You can then use ``%n'' (replacing ``n'' with + the number you used in the %DEFINE) as a complete + replacement for the ``pattern'' option in subsequent lines (i.e: you + cannot use it along with normal patterns). This can be used to reduce + the size of the access file when large access patterns are used and + hence speed up scanning the file. By default, only 10 patterns can + be used. + .PP The access file is normally used to provide host-level access control for reading and posting articles. There are times, however, when this is not sufficient and user-level access *************** *** 102,107 **** --- 127,136 ---- *.foo.com:Read Post:::* ## A related workstation can't access FOO newsgroups. lenox.foo.net:RP:martha:hiatt:*,!foo.* + ## Define a list to be used twice + %DEFINE0:!*,bar.*,foo.*,comp.*,news.*,rec.*,soc.*,alt.*,!alt.binaries.* + bar1.foo.net:RP:::%0 + bar2.foo.net:R:::%0 .fi .RE .PP *************** *** 111,117 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: nnrp.access.5,v 1.11 1998/05/20 01:37:39 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), --- 140,146 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: nnrp.access.5,v 1.13.2.2 1998/12/09 15:40:32 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8), diff -Nacr inn-2.1/doc/nnrpd.8 inn-2.2/doc/nnrpd.8 *** inn-2.1/doc/nnrpd.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/nnrpd.8 Sun Nov 15 22:43:23 1998 *************** *** 1,4 **** ! .\" $Revision: 1.10 $ .TH NNRPD 8 .SH NAME nnrpd \- NNTP server for on-campus hosts --- 1,4 ---- ! .\" $Revision: 1.11.2.1 $ .TH NNRPD 8 .SH NAME nnrpd \- NNTP server for on-campus hosts *************** *** 11,17 **** .BI \-D ] [ ! .BI \-l ] [ .BI \-o --- 11,17 ---- .BI \-D ] [ ! .BI \-g " shadowgroup" ] [ .BI \-o *************** *** 75,86 **** .IR inn.conf (5). .SH OPTIONS .TP - .B \-l - This option enables the nnrpd tracking option which allows more detailed - logging of articles read and posted by a reader. See the - .I nnrpd.track (8) - man page for more details. - .TP .B \-r If the ``\-r'' flag is used, then .I nnrpd --- 75,80 ---- *************** *** 151,156 **** --- 145,160 ---- .IR port when started as a standalone daemon using the ``\-D'' flag. .TP + .B \-g + The ``\-g'' parameter instructs + .I nnrpd + to try to add the named group as a supplementary group on shadow systems. + This only works when + .I nnrpd + is running in standalone mode since this call only works when + .I nnrpd + is started as root. + .TP .B \-b The ``\-b'' parameter instructs .I nnrpd *************** *** 268,273 **** --- 272,284 ---- .I 111 followed by the GMT date and time on the server in the form YYYYMMDDhhmmss. + .SH SHADOW PASSWORD SYSTEMS + On systems that have a shadow password file, + .I nnrpd + tries to add the group ``shadow'' as a supplementary group if it is + running in standalone mode. On many systems, members of that group have + read permission for the shadow password file. The ``-g'' option can + be used to change the group that nnrpd tries to become a member of. .SH HISTORY Written by Rich $alz for InterNetNews. Overview support added by Rob Robertston and *************** *** 276,281 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: nnrpd.8,v 1.10 1998/05/20 01:37:39 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), innd(8), inn.conf(5), nnrp.access(5), signal(2), wildmat(3). --- 287,292 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: nnrpd.8,v 1.11.2.1 1998/11/15 22:43:23 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), innd(8), inn.conf(5), nnrp.access(5), signal(2), wildmat(3). diff -Nacr inn-2.1/doc/overview.ctl.5 inn-2.2/doc/overview.ctl.5 *** inn-2.1/doc/overview.ctl.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/overview.ctl.5 Mon Jan 4 07:41:43 1999 *************** *** 1,4 **** ! .\" $Revision: 1.4 $ .TH OVERVIEW.CTL 5 .SH NAME overview.ctl \- configuration file for unified overview --- 1,4 ---- ! .\" $Revision: 1.4.4.1 $ .TH OVERVIEW.CTL 5 .SH NAME overview.ctl \- configuration file for unified overview *************** *** 8,13 **** --- 8,16 ---- is required if the new storage API is used on machines running .IR nnrpd (8). Optional on feed-only machines. + If the file does not exist or is empty, no overview information will be + written by + .IR innd (8). .PP The traditional overview database was written by an external program .IR overchan (8), *************** *** 72,78 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: overview.ctl.5,v 1.4 1998/04/09 15:16:14 mibsoft Exp $ .SH "SEE ALSO" ctlinnd(8), expire(8), --- 75,81 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: overview.ctl.5,v 1.4.4.1 1999/01/04 07:41:43 kondou Exp $ .SH "SEE ALSO" ctlinnd(8), expire(8), diff -Nacr inn-2.1/doc/pullnews.8 inn-2.2/doc/pullnews.8 *** inn-2.1/doc/pullnews.8 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/pullnews.8 Wed Oct 21 07:01:48 1998 *************** *** 0 **** --- 1,113 ---- + .\" -*- nroff -*- + .\" $Revision: 1.1 $ + .TH PULLNEWS 8 + .SH NAME + pullnews \- a perl script for pulling news from one news machine and feeding it + to another. + .SH SYNOPSIS + .I pullnews + [ + .BI \-c " config" + ] + [ + .BI \-s " downstream-server" + ] + [ + .B \-q + ] + [ remote-server ... ] + .SH DESCRIPTION + .PP + .I pullnews + is run as a regular user process. It reads a config file in the users + home directory (normally called + .IR .pullnews ) + and connects to the upstream servers + defined in there as a reader client. You may specifiy hostnames on the command + line to limit the set of remote hosts it connects to, but each host must be + listed in the + .I .pullnews + file. + .PP + For each server it connects to it pulls + over articles and feeds them to the downstream (local) server via the IHAVE + (feeder) NNTP command. This means the computer + .I pullnews + is run on must have + feeding access to the downstream news host. + .PP + .I pullnews + is designed for very small sites and is not meant for reverse-feeding large + feeds. + .PP + You must have Graham Barr's Net::NNTP perl module installed on your + system. This is part of the libnet bundle and can be found on CPAN or from + Graham's site http://www.connect.net/gbarr/ + .SH OPTIONS + .TP + .B \-c + Normally the config file is stored in $HOME/.pullnews for the user running the + .I pullnews + program. The ``\fB\-c\fP'' flag lets you change that. + .TP + .B \-s + Normally + .I pullnews + will feed the articles it retrieves to the news server running on + ``\fBlocalhost\fP''. The ``\fB\-s\fP'' flag lets you change that. + .TP + .B \-q + The ``\fB\-q\fP'' flag can be used to make things run more quietly. + .SH "CONFIG FILE" + .PP + The config file for + .I pullnews + is a series of sets of lines describing the upstream hosts to connect to and + the newsgroups to get articles from. A host line has no leading white space and + just has the name of the host to connect to. Group lines com after a host line + and have leading white space followed by the group name. + .PP + .I pullnews + will update the config file to include the time the group was last checked and + the highest numbered article successfully retrieved and transfered to the + downstream server. + .PP + A sample configuration file might look like: + .RS + .nf + # Format group date high + data.pa.vix.com + rec.bicycles.racing 908086612 783 + rec.humor.funny 908086613 18 + comp.programming.threads + nnrp.vix.com + comp.std.lisp + .fi + .RE + .PP + The group entries for the two rec.* groups have been updated by an earlier run + by + .IR pullnews . + .SH HISTORY + pullnews was written by James Brister for INN. + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: pullnews.8,v 1.1 1998/10/21 07:01:48 brister Exp $ + .SH BUGS + .I pullnews + is very simple and is lacking in more sophisticated features (like killing + articles based on user-defined conditions) that better pull feeder most + certainly have. It also doesn't keep or log much detail on articles transferred. + .PP + Due to a limitation in the Net::NNTP perl module, one of the functions in there + is redefined inside the + .I pullnews + source. A future release of the libnet packages will fix that. + .SH "SEE ALSO" + ctlinnd(8), + inn.conf(5), + innd(8), + newsfeeds(5), + shlock(1). + diff -Nacr inn-2.1/doc/qio.3 inn-2.2/doc/qio.3 *** inn-2.1/doc/qio.3 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/qio.3 Wed Dec 9 15:40:33 1998 *************** *** 1,4 **** ! .\" $Revision: 1.5 $ .TH QIO 3 .SH NAME qio \- quick I/O part of InterNetNews library --- 1,4 ---- ! .\" $Revision: 1.5.4.1 $ .TH QIO 3 .SH NAME qio \- quick I/O part of InterNetNews library *************** *** 67,79 **** calls .IR SMretrieve . If ! .I ! is ``DO'', .I QIOopen will call .IR stat (2) ! and use the returned block size; if that fails (or HAVE_ST_BLKSIZE is DONT) ! it will use QIO_BUFFER. It returns NULL on error, or a pointer to a handle to be used in other calls. .I QIOfdopen performs the same function except that --- 67,80 ---- calls .IR SMretrieve . If ! .I ! is defined, .I QIOopen will call .IR stat (2) ! and use the returned block size; if that fails (or ! .I ! is not defined) it will use QIO_BUFFER. It returns NULL on error, or a pointer to a handle to be used in other calls. .I QIOfdopen performs the same function except that *************** *** 155,158 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: qio.3,v 1.5 1998/04/18 04:06:33 scrappy Exp $ --- 156,159 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: qio.3,v 1.5.4.1 1998/12/09 15:40:33 kondou Exp $ diff -Nacr inn-2.1/doc/rnews.1 inn-2.2/doc/rnews.1 *** inn-2.1/doc/rnews.1 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/rnews.1 Sat Nov 7 02:58:37 1998 *************** *** 1,4 **** ! .\" $Revision: 1.7 $ .TH RNEWS 1 .SH NAME rnews \- receive news from a UUCP connection --- 1,4 ---- ! .\" $Revision: 1.8.2.1 $ .TH RNEWS 1 .SH NAME rnews \- receive news from a UUCP connection *************** *** 8,13 **** --- 8,19 ---- .BI \-h " host" ] [ + .BI \-r " remote" + ] + [ + .BI \-P " port" + ] + [ .B \-v ] [ *************** *** 22,28 **** .SH DESCRIPTION .I Rnews reads messages typically queued by a UUCP newsfeed and ! sends them to the local InterNetNews server. The message is read from the specified input file, or standard input if no input is named. .PP --- 28,39 ---- .SH DESCRIPTION .I Rnews reads messages typically queued by a UUCP newsfeed and ! sends them to the local InterNetNews server (either ``localhost'', or the ! value defined by the variable ! .I nnrpdposthost ! in the file ! .IR inn.conf ). ! .PP The message is read from the specified input file, or standard input if no input is named. .PP *************** *** 90,95 **** --- 101,114 ---- re-spooling is done and rnews exits with status value ``9'' to indicate this. .TP + .B \-r + If the ``\fB\-r\fP'' flag is used, then the articles will be sent to the + named remote host instead of the default host. + .TP + .B \-P + If the ``\fB\-P\fP'' flag is used, then the articles will be sent to the + specified port on the remote host. + .TP .B \-v If the ``\fB\-v\fP'' flag is used, it will print a notice of all errors on the standard error, naming the input file (if known) and printing the first *************** *** 118,124 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: rnews.1,v 1.7 1998/05/20 01:37:40 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8). --- 137,143 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: rnews.1,v 1.8.2.1 1998/11/07 02:58:37 kondou Exp $ .SH "SEE ALSO" inn.conf(5), innd(8). diff -Nacr inn-2.1/doc/simpleftp.1 inn-2.2/doc/simpleftp.1 *** inn-2.1/doc/simpleftp.1 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/simpleftp.1 Wed Oct 28 16:10:35 1998 *************** *** 0 **** --- 1,41 ---- + .\" $Revision: 1.1.2.1 $ + .TH SIMPLEFTP 1 + .SH NAME + simpleftp \- rudimentary ftp client + .SH SYNOPSIS + .B simpleftp + .I ftp://... + [ ... ] + .SH DESCRIPTION + .B simpleftp + is a + .B perl + script that provides basic support for fetching files with FTP in a + batch oriented fashion. It takes one or more ftp URLS on the command + line. The file(s) will be retrieved from the remote server and placed + in the current directory with the same basename as on the remote; + i.e., ftp://ftp.isc.org/pub/usenet/CONFIG/active.gz is stored as + active.gz in the current directory. + .SH BUGS + .B simpleftp + is an extremely poor substitute for more complete programs like the + freely available + .B wget + or + .B ncftp + utilities. It was written only to provide elementary support in INN + for non-interactive fetching of the files in + ftp://ftp.isc.org/pub/usenet/CONFIG/ without requiring administrators + to install yet another package. Its shortcomings as a general purpose + program are too numerous to mention, but one that stands out is that + .B simpleftp + does not understand the complete syntax of URLs, only the hostname and + pathname parts -- it will not understand username, password, port or + parameter strings. + .SH HISTORY + Tossed off by David C Lawrence for InterNetNews. + .de R$ + This is revision \\$3, dated \\$4. + .. + .SH "SEE ALSO" + .IR actsync (8). diff -Nacr inn-2.1/doc/sm.8 inn-2.2/doc/sm.8 *** inn-2.1/doc/sm.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/sm.8 Thu Aug 20 04:24:32 1998 *************** *** 1,4 **** ! .\" $Revision: 1.4 $ .TH SM 8 .SH NAME sm \- command line interface to the storage manager --- 1,4 ---- ! .\" $Revision: 1.5 $ .TH SM 8 .SH NAME sm \- command line interface to the storage manager *************** *** 58,61 **** This is revision \\$3, dated \\$4. .. .SH "SEE ALSO" ! history(5), overview.ctl(8), storage.ctl(5). --- 58,61 ---- This is revision \\$3, dated \\$4. .. .SH "SEE ALSO" ! history(5), overview.ctl(8), storage.conf(5). diff -Nacr inn-2.1/doc/storage.conf.5 inn-2.2/doc/storage.conf.5 *** inn-2.1/doc/storage.conf.5 Thu Jan 1 00:00:00 1970 --- inn-2.2/doc/storage.conf.5 Thu Aug 20 04:24:32 1998 *************** *** 0 **** --- 1,114 ---- + .\" $Revision: 1.1 $ + .TH STORAGE.CONF 5 + .SH NAME + storage.conf \- configuration file for storage manager + .SH DESCRIPTION + The file + .I /storage.conf + is required if storage API is used. + Storage API is turned on if ``storageapi: true'' in + .IR inn.conf (5). + .PP + The file consists of a series of storage method entries; + blank lines and lines beginning with a number sign (``#'') are ignored. + If spaces or tabs are included in the value, that value must be quoted + with ``"''. + The order of entries in this file is important. + .PP + Each entry is formatted as: + .PP + .RS + .nf + method { + newsgroups: + class: + size: [,] + expires: [,] + options: + } + .fi + .RE + .PP + The ``methodname'' is the name of storage method. + Currently, ``timehash'', ``cnfs'' and ``trash'' are available for its name. + See STORAGE METHODS section for thier method. + \&``Wildmat'' refers to a newsgroup pattern that will be parsed with + .IR wildmat (3). + Matching newsgroup is against newsgroup name in ``Xref'' header, if + \&``storeonxref'' in inn.conf is ``true.'' + Otherwise, it is against newsgroup name in ``Newsgroups'' header. + \&``!'' and ``@'' are allowed at the start of the wildmat and + refer to pattern exclusions. See + .IR newsfeeds (5) + for a description of their use. The ``wildmat'' is matched in order. + There is no default ``wildmat'' pattern, so specified ``wildmat'' + is only used for matching. + \&``Storage_class'' is an identifier among all entries. + \&``Storage_class'' is also referred at + .IR expire.ctl (5). + \&``Minsize'' and ``maxsize'' is the range in which article is stored. + If ``maxsize'' is ``0'', article upper size is unlimited. + \&``options'' is method specific option which is needed only for some + method. See STORAGE METHODS sectoin for a description of its use. + \&``Mintime'' and ``maxtime'' are the times into the future the `Expires:' + header for the article indicates that it should be expired, and are + formatted 0d0h0m0s, for days, hours, minutes and seconds into the future. + If ``mintime'' is non-zero, the storage method will not match an article + without an 'Expires:' header. If ``maxtime'' is ``0s'', there is no upper + bound on the expire time for the article to fall in this entry. + Note that ``expires'' parameter never controls expire time. This is + used just for determining storage class based on ``Expires:'' header. + .PP + If a newsgroup matches wildmat pattern and the range, the article is stored + in that ``storage_class.'' + Note that the file is interpreted in order and first match line + is used to store an article. + .PP + If a newsgroup does not match any wildmat pattern nor the range in all entries, + the article is not stored and + .IR innd (8) + rejects it. + .SH STORAGE METHODS + .TP + .B cnfs + \&``Cnfs'' method stores articles in preconfigured files cyclically. + So, if storing position reaches at the end of the file, + the position is moved to the beginning of the file and + old articles are overwritten to write new articles. + This method is assumed to have self expire functionality. + There is a configuration file, + .IR cycbuff.conf , + for this method and ``options'' field is needed. + See + .IR cycbuff.conf (5) + for description of thier use. + .TP + .B timehash + \&``Timehash'' method stores each article into each file whose path name + is based on article's arrival time. The path name is created as + .IR /time-xx/bb/cc/yyyy-aadd . + Where ``xx'' is hexa decimal value of ``storage_class.'' + Where ``yyyy'' is hexa decimal value of sequence number. + Where ``bb'', ``cc'' and ``aadd'' are hexa decimal value of splitted + arrival time and 0xaabbccdd is the actual time. + There is no configuration file for this method. + .TP + .B trash + \&``Trash'' method stores no article and this can be used simply to + trash the article but the article is accepted without any problem. + For this reason, any article stored through this method never can be + retrieved and this method is assumed to have self expire functionality. + There is no configuration file for this method. + .SH HISTORY + Written by Katsuhiro Kondou for InterNetNews. + .de R$ + This is revision \\$3, dated \\$4. + .. + .R$ $Id: storage.conf.5,v 1.1 1998/08/20 04:24:32 kondou Exp $ + .SH "SEE ALSO" + cycbuff.conf(5), + expire.ctl(5), + inn.conf(5), + innd(8), + newsfeeds(5), + wildmat(3). diff -Nacr inn-2.1/doc/storage.ctl.5 inn-2.2/doc/storage.ctl.5 *** inn-2.1/doc/storage.ctl.5 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/storage.ctl.5 Thu Aug 20 04:24:33 1998 *************** *** 1,95 **** ! .\" $Revision: 1.11 $ .TH STORAGE.CTL 5 .SH NAME storage.ctl \- configuration file for storage manager .SH DESCRIPTION The file .I /storage.ctl ! is required if storage API is used. ! Storage API is turned on if ``storageapi: true'' in ! .IR inn.conf (5). ! .PP ! The file consists of a series of lines; ! blank lines and lines beginning with a number sign (``#'') are ignored. ! The order of lines in this file is important. ! .PP ! Each line is formatted as: ! .PP ! .RS ! .nf ! methodname:wildmat:storage_class:minsize:maxsize[:options] ! .fi ! .RE ! .PP ! The ``methodname'' is the name of storage method. ! Currently, ``timehash'', ``cnfs'' and ``trash'' are available for its name. ! See STORAGE METHODS section for thier method. ! \&``Wildmat'' refers to a newsgroup pattern that will be parsed with ! .IR wildmat (3). ! Matching newsgroup is against newsgroup name in ``Xref'' header, if ! \&``storeonxref'' in inn.conf is ``true.'' ! Otherwise, it is against newsgroup name in ``Newsgroups'' header. ! \&``!'' and ``@'' are allowed at the start of the wildmat and ! refer to pattern exclusions. See ! .IR newsfeeds (5) ! for a description of their use. The ``wildmat'' is matched in order. ! There is no default ``wildmat'' pattern, so specified ``wildmat'' ! is only used for matching. ! \&``Storage_class'' is an identifier among all entries. ! \&``Storage_class'' is also referred at ! .IR expire.ctl (5). ! \&``Minsize'' and ``maxsize'' is the range in which article is stored. ! If ``maxsize'' is ``0'', article upper size is unlimited. ! \&``options'' is method specific option which is needed only for some ! method. See STORAGE METHODS sectoin for a description of its use. ! .PP ! If a newsgroup matches wildmat pattern and the range, the article is stored ! in that ``storage_class.'' ! Note that the file is interpreted in order and first match line ! is used to store an article. ! .PP ! If a newsgroup does not match any wildmat pattern nor the range in all entries, ! the article is not stored and ! .IR innd (8) ! rejects it. ! .SH STORAGE METHODS ! .TP ! .B cnfs ! \&``Cnfs'' method stores articles in preconfigured files cyclically. ! So, if storing position reaches at the end of the file, ! the position is moved to the beginning of the file and ! old articles are overwritten to write new articles. ! This method is assumed to have self expire functionality. ! There is a configuration file, ! .IR cycbuff.conf , ! for this method and ``options'' field is needed. See ! .IR cycbuff.conf (5) ! for description of thier use. ! .TP ! .B timehash ! \&``Timehash'' method stores each article into each file whose path name ! is based on article's arrival time. The path name is created as ! .IR /time-xx/bb/cc/yyyy-aadd . ! Where ``xx'' is hexa decimal value of ``storage_class.'' ! Where ``yyyy'' is hexa decimal value of sequence number. ! Where ``bb'', ``cc'' and ``aadd'' are hexa decimal value of splitted ! arrival time and 0xaabbccdd is the actual time. ! There is no configuration file for this method. ! .TP ! .B trash ! \&``Trash'' method stores no article and this can be used simply to ! trash the article but the article is accepted without any problem. ! For this reason, any article stored through this method never can be ! retrieved and this method is assumed to have self expire functionality. ! There is no configuration file for this method. ! .SH HISTORY ! Written by Katsuhiro Kondou for InterNetNews. ! .de R$ ! This is revision \\$3, dated \\$4. ! .. ! .R$ $Id: storage.ctl.5,v 1.11 1998/06/09 23:02:49 kondou Exp $ .SH "SEE ALSO" cycbuff.conf(5), expire.ctl(5), inn.conf(5), --- 1,17 ---- ! .\" $Revision: 1.12 $ .TH STORAGE.CTL 5 .SH NAME storage.ctl \- configuration file for storage manager .SH DESCRIPTION The file .I /storage.ctl ! is obsolete, and has been replaced by ! .I /storage.conf. See ! .IR storage.conf (5) ! for a description of the new format. .SH "SEE ALSO" + storage.conf(5), cycbuff.conf(5), expire.ctl(5), inn.conf(5), diff -Nacr inn-2.1/doc/writelog.8 inn-2.2/doc/writelog.8 *** inn-2.1/doc/writelog.8 Fri Jul 24 13:13:00 1998 --- inn-2.2/doc/writelog.8 Wed Dec 9 15:40:33 1998 *************** *** 15,23 **** parameter specifies the name of the log file where the entry should be written. If it is the word ``mail'' then the entry is mailed to the news administrator, ! .I ! .\" =()<(typically @@ .)>()= ! (typically usenet .) The data that is written or sent consists of the .I text given on the command line, followed by standard input indented by --- 15,21 ---- parameter specifies the name of the log file where the entry should be written. If it is the word ``mail'' then the entry is mailed to the news administrator, ! .IR . The data that is written or sent consists of the .I text given on the command line, followed by standard input indented by *************** *** 30,36 **** .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: writelog.8,v 1.3 1998/02/20 17:19:21 mibsoft Exp $ .SH "SEE ALSO" innd(8), innstat(8), --- 28,34 ---- .de R$ This is revision \\$3, dated \\$4. .. ! .R$ $Id: writelog.8,v 1.3.4.1 1998/12/09 15:40:33 kondou Exp $ .SH "SEE ALSO" innd(8), innstat(8), diff -Nacr inn-2.1/expire/convdate.c inn-2.2/expire/convdate.c *** inn-2.1/expire/convdate.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/convdate.c Tue Oct 13 14:07:33 1998 *************** *** 1,4 **** ! /* $Revision: 1.1.1.1 $ ** ** Convert date strings and numbers to numbers and strings. */ --- 1,4 ---- ! /* $Revision: 1.2 $ ** ** Convert date strings and numbers to numbers and strings. */ *************** *** 25,31 **** register char *p; { for (; *p; p++) ! if (!CTYPE(isdigit, *p)) return FALSE; return TRUE; } --- 25,31 ---- register char *p; { for (; *p; p++) ! if (!CTYPE(isdigit, (int)*p)) return FALSE; return TRUE; } diff -Nacr inn-2.1/expire/expire.c inn-2.2/expire/expire.c *** inn-2.1/expire/expire.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/expire.c Tue Oct 13 14:07:33 1998 *************** *** 1,4 **** ! /* $Revision: 1.54 $ ** ** Expire news articles. */ --- 1,4 ---- ! /* $Revision: 1.56 $ ** ** Expire news articles. */ *************** *** 115,120 **** --- 115,121 ---- STATIC BOOL OVERmmap; + STATIC NORETURN CleanupAndExit(BOOL Server, BOOL Paused, int x); #if ! defined (atof) /* NEXT defines aotf as a macro */ extern double atof(); #endif *************** *** 249,255 **** /* ** Open a file or give up. */ ! STATIC FILE *EXPfopen(BOOL Remove, STRING Name, char *Mode) { FILE *F; --- 250,256 ---- /* ** Open a file or give up. */ ! STATIC FILE *EXPfopen(BOOL Remove, STRING Name, char *Mode, BOOL Needclean, BOOL Server, BOOL Paused) { FILE *F; *************** *** 259,265 **** if ((F = fopen(Name, Mode)) == NULL) { (void)fprintf(stderr, "Can't open %s in %s mode, %s\n", Name, Mode, strerror(errno)); ! exit(1); } return F; } --- 260,269 ---- if ((F = fopen(Name, Mode)) == NULL) { (void)fprintf(stderr, "Can't open %s in %s mode, %s\n", Name, Mode, strerror(errno)); ! if (Needclean) ! CleanupAndExit(Server, Paused, 1); ! else ! exit(1); } return F; } *************** *** 334,340 **** break; SawDot = TRUE; } ! else if (!CTYPE(isdigit, *p)) break; if (*p) { (void)fprintf(stderr, "Line %d, bad `%c' character in %s field\n", --- 338,344 ---- break; SawDot = TRUE; } ! else if (!CTYPE(isdigit, (int)*p)) break; if (*p) { (void)fprintf(stderr, "Line %d, bad `%c' character in %s field\n", *************** *** 417,423 **** else p = buff + strlen(buff); while (--p >= buff) { ! if (isspace(*p)) *p = '\0'; else break; --- 421,427 ---- else p = buff + strlen(buff); while (--p >= buff) { ! if (isspace((int)*p)) *p = '\0'; else break; *************** *** 702,708 **** ** An article can be removed. Either print a note, or actually remove it. ** Also fill in the article size. */ ! STATIC void EXPremove(char *p, long *size, BOOL index) { char save, *q; struct stat Sb; --- 706,712 ---- ** An article can be removed. Either print a note, or actually remove it. ** Also fill in the article size. */ ! STATIC void EXPremove(char *p, OFFSET_T *size, BOOL index) { char save, *q; struct stat Sb; *************** *** 807,813 **** STATIC BOOL EXPdoline(FILE *out, char *line, int length, char **arts, enum KRP *krps) { static char IGNORING[] = "Ignoring bad line, \"%.20s...\"\n"; ! static long Offset; static BUFFER New; char *p; char *q; --- 811,817 ---- STATIC BOOL EXPdoline(FILE *out, char *line, int length, char **arts, enum KRP *krps) { static char IGNORING[] = "Ignoring bad line, \"%.20s...\"\n"; ! static OFFSET_T Offset; static BUFFER New; char *p; char *q; *************** *** 819,826 **** time_t Expires; time_t Posted; time_t when; ! long where; ! long size; BOOL poisoned; BOOL keeper; BOOL remove; --- 823,830 ---- time_t Expires; time_t Posted; time_t when; ! OFFSET_T where; ! OFFSET_T size; BOOL poisoned; BOOL keeper; BOOL remove; *************** *** 1385,1391 **** /* ** Clean up link with the server and exit. */ ! STATIC NORETURN CleanupAndExit(BOOL Server,BOOL Paused, int x) { FILE *F; --- 1389,1395 ---- /* ** Clean up link with the server and exit. */ ! STATIC NORETURN CleanupAndExit(BOOL Server, BOOL Paused, int x) { FILE *F; *************** *** 1455,1461 **** /* Append statistics to a summary file */ if (EXPgraph) { ! F = EXPfopen(FALSE, EXPgraph, "a"); if (StorageAPI) { (void)fprintf(F, "%ld %ld %ld %ld %ld %ld %ld %ld\n", (long)Now, EXPprocessed, EXPstillhere, EXPallgone, --- 1459,1465 ---- /* Append statistics to a summary file */ if (EXPgraph) { ! F = EXPfopen(FALSE, EXPgraph, "a", FALSE, FALSE, FALSE); if (StorageAPI) { (void)fprintf(F, "%ld %ld %ld %ld %ld %ld %ld %ld\n", (long)Now, EXPprocessed, EXPstillhere, EXPallgone, *************** *** 1612,1618 **** EXPtracing = TRUE; break; case 'u': ! EXPunlinkindex = EXPfopen(TRUE, optarg, "a"); break; case 'v': EXPverbose = atoi(optarg); --- 1616,1622 ---- EXPtracing = TRUE; break; case 'u': ! EXPunlinkindex = EXPfopen(TRUE, optarg, "a", FALSE, FALSE, FALSE); break; case 'v': EXPverbose = atoi(optarg); *************** *** 1624,1636 **** Writing = FALSE; break; case 'z': ! EXPunlinkfile = EXPfopen(TRUE, optarg, "a"); UnlinkFile = TRUE; break; case 'Z': if (EXPverbose > 3) printf("Opening lowmark file %s\n", optarg); ! EXPlowmarkfile = EXPfopen(TRUE, optarg, "a"); LowmarkFile = TRUE; break; } --- 1628,1640 ---- Writing = FALSE; break; case 'z': ! EXPunlinkfile = EXPfopen(TRUE, optarg, "a", FALSE, FALSE, FALSE); UnlinkFile = TRUE; break; case 'Z': if (EXPverbose > 3) printf("Opening lowmark file %s\n", optarg); ! EXPlowmarkfile = EXPfopen(TRUE, optarg, "a", FALSE, FALSE, FALSE); LowmarkFile = TRUE; break; } *************** *** 1654,1662 **** /* Parse the control file. */ if (av[0]) ! F = EQ(av[0], "-") ? stdin : EXPfopen(FALSE, av[0], "r"); else ! F = EXPfopen(FALSE, cpcatpath(innconf->pathetc, _PATH_EXPIRECTL), "r"); if (!EXPreadfile(F)) { (void)fclose(F); (void)fprintf(stderr, "Format error in expire.ctl\n"); --- 1658,1666 ---- /* Parse the control file. */ if (av[0]) ! F = EQ(av[0], "-") ? stdin : EXPfopen(FALSE, av[0], "r", FALSE, FALSE, FALSE); else ! F = EXPfopen(FALSE, cpcatpath(innconf->pathetc, _PATH_EXPIRECTL), "r", FALSE, FALSE, FALSE); if (!EXPreadfile(F)) { (void)fclose(F); (void)fprintf(stderr, "Format error in expire.ctl\n"); *************** *** 1718,1732 **** /* Open new history files, relative to news lib. */ if (chdir(EXPhistdir) < 0) { (void)fprintf(stderr, CANTCD, EXPhistdir, strerror(errno)); ! exit(1); } ! out = EXPfopen(TRUE, NHistory, "w"); ! (void)fclose(EXPfopen(TRUE, NHistorydir, "w")); #ifdef DO_TAGGED_HASH ! (void)fclose(EXPfopen(TRUE, NHistorypag, "w")); #else ! (void)fclose(EXPfopen(TRUE, NHistoryindex, "w")); ! (void)fclose(EXPfopen(TRUE, NHistoryhash, "w")); #endif if (EXPverbose > 3) #ifdef DO_TAGGED_HASH --- 1722,1736 ---- /* Open new history files, relative to news lib. */ if (chdir(EXPhistdir) < 0) { (void)fprintf(stderr, CANTCD, EXPhistdir, strerror(errno)); ! CleanupAndExit(Server, FALSE, 1); } ! out = EXPfopen(TRUE, NHistory, "w", TRUE, Server, FALSE); ! (void)fclose(EXPfopen(TRUE, NHistorydir, "w", TRUE, Server, FALSE)); #ifdef DO_TAGGED_HASH ! (void)fclose(EXPfopen(TRUE, NHistorypag, "w", TRUE, Server, FALSE)); #else ! (void)fclose(EXPfopen(TRUE, NHistoryindex, "w", TRUE, Server, FALSE)); ! (void)fclose(EXPfopen(TRUE, NHistoryhash, "w", TRUE, Server, FALSE)); #endif if (EXPverbose > 3) #ifdef DO_TAGGED_HASH *************** *** 1748,1782 **** if (!dbzfresh(NHistory, dbzsize(0L), 0)) { (void)fprintf(stderr, "Can't create database, %s\n", strerror(errno)); ! exit(1); } } else if (!dbzagain(NHistory, HistoryDB)) { (void)fprintf(stderr, "Can't dbzagain, %s\n", strerror(errno)); ! exit(1); } } if (innconf->storageapi) { if (chdir(innconf->pathoverview) < 0) { (void)fprintf(stderr, CANTCD, SPOOL, strerror(errno)); ! exit(1); } } else { if (chdir(SPOOL) < 0) { (void)fprintf(stderr, CANTCD, SPOOL, strerror(errno)); ! exit(1); } } val = TRUE; if (!SMsetup(SM_RDWR, (void *)&val) || !SMsetup(SM_PREOPEN, (void *)&val)) { fprintf(stderr, "Can't setup storage manager\n"); ! exit(1); } if (innconf->storageapi && !SMinit()) { fprintf(stderr, "Can't initialize storage manager: %s\n", SMerrorstr); ! exit(1); } /* Main processing loop. */ --- 1752,1786 ---- if (!dbzfresh(NHistory, dbzsize(0L), 0)) { (void)fprintf(stderr, "Can't create database, %s\n", strerror(errno)); ! CleanupAndExit(Server, FALSE, 1); } } else if (!dbzagain(NHistory, HistoryDB)) { (void)fprintf(stderr, "Can't dbzagain, %s\n", strerror(errno)); ! CleanupAndExit(Server, FALSE, 1); } } if (innconf->storageapi) { if (chdir(innconf->pathoverview) < 0) { (void)fprintf(stderr, CANTCD, SPOOL, strerror(errno)); ! CleanupAndExit(Server, FALSE, 1); } } else { if (chdir(SPOOL) < 0) { (void)fprintf(stderr, CANTCD, SPOOL, strerror(errno)); ! CleanupAndExit(Server, FALSE, 1); } } val = TRUE; if (!SMsetup(SM_RDWR, (void *)&val) || !SMsetup(SM_PREOPEN, (void *)&val)) { fprintf(stderr, "Can't setup storage manager\n"); ! CleanupAndExit(Server, FALSE, 1); } if (innconf->storageapi && !SMinit()) { fprintf(stderr, "Can't initialize storage manager: %s\n", SMerrorstr); ! CleanupAndExit(Server, FALSE, 1); } /* Main processing loop. */ *************** *** 1788,1826 **** val = FALSE; if (!OVERsetup(OVER_MMAP, (void *)&val)) { fprintf(stderr, "Can't setup unified overview mmap\n"); ! exit(1); } val = TRUE; if (!OVERsetup(OVER_BUFFERED, (void *)&val)) { fprintf(stderr, "Can't setup unified overview buffered\n"); ! exit(1); } if (!OVERsetup(OVER_PREOPEN, (void *)&val)) { fprintf(stderr, "Can't setup unified overview preopen\n"); ! exit(1); } if (!OVERsetup(OVER_MODE, "r")) { fprintf(stderr, "Can't setup unified overview mode\n"); ! exit(1); } if (!OVERsetup(OVER_NEWMODE, "w")) { ! fprintf(stderr, "Can't setup unified overview mode to be created\n"); ! exit(1); } if (OverPath) if (!OVERsetup(OVER_NEWDIR, (void *)OverPath)) { fprintf(stderr, "Can't setup unified overview path\n"); ! exit(1); } if (StorageAPI) { if (!OVERinit()) { fprintf(stderr, "Can't initialize unified overview\n"); ! exit(1); } if (Writing && !OVERnewinit()) { fprintf(stderr, "Can't initialize new unified overview\n"); ! exit(1); } } arts = NEW(char*, nGroups); --- 1792,1830 ---- val = FALSE; if (!OVERsetup(OVER_MMAP, (void *)&val)) { fprintf(stderr, "Can't setup unified overview mmap\n"); ! CleanupAndExit(Server, FALSE, 1); } val = TRUE; if (!OVERsetup(OVER_BUFFERED, (void *)&val)) { fprintf(stderr, "Can't setup unified overview buffered\n"); ! CleanupAndExit(Server, FALSE, 1); } if (!OVERsetup(OVER_PREOPEN, (void *)&val)) { fprintf(stderr, "Can't setup unified overview preopen\n"); ! CleanupAndExit(Server, FALSE, 1); } if (!OVERsetup(OVER_MODE, "r")) { fprintf(stderr, "Can't setup unified overview mode\n"); ! CleanupAndExit(Server, FALSE, 1); } if (!OVERsetup(OVER_NEWMODE, "w")) { ! fprintf(stderr, "Can't setup unified overview mode to be created\n"); ! CleanupAndExit(Server, FALSE, 1); } if (OverPath) if (!OVERsetup(OVER_NEWDIR, (void *)OverPath)) { fprintf(stderr, "Can't setup unified overview path\n"); ! CleanupAndExit(Server, FALSE, 1); } if (StorageAPI) { if (!OVERinit()) { fprintf(stderr, "Can't initialize unified overview\n"); ! CleanupAndExit(Server, FALSE, 1); } if (Writing && !OVERnewinit()) { fprintf(stderr, "Can't initialize new unified overview\n"); ! CleanupAndExit(Server, FALSE, 1); } } arts = NEW(char*, nGroups); *************** *** 1916,1926 **** /* If user used the -d flag, mark we're done and exit. */ if (HistoryPath != NULL) { (void)sprintf(buff, "%s.done", NHistory); ! (void)fclose(EXPfopen(FALSE, buff, "w")); if (StorageAPI && Writing) { if (OverPath) { (void)sprintf(buff, "%s/overview.done", OverPath); ! (void)fclose(EXPfopen(FALSE, buff, "w")); } else { if (!OVERreplace()) { (void)fprintf(stderr, "Can't replace overview data, %s\n", --- 1920,1930 ---- /* If user used the -d flag, mark we're done and exit. */ if (HistoryPath != NULL) { (void)sprintf(buff, "%s.done", NHistory); ! (void)fclose(EXPfopen(FALSE, buff, "w", TRUE, Server, FALSE)); if (StorageAPI && Writing) { if (OverPath) { (void)sprintf(buff, "%s/overview.done", OverPath); ! (void)fclose(EXPfopen(FALSE, buff, "w", TRUE, Server, FALSE)); } else { if (!OVERreplace()) { (void)fprintf(stderr, "Can't replace overview data, %s\n", *************** *** 1948,1955 **** if (StorageAPI && Writing) { if (OverPath) { (void)sprintf(buff, "%s/overview.done", OverPath); ! (void)fclose(EXPfopen(FALSE, buff, "w")); ! CleanupAndExit(Server, FALSE, 0); } else { if (!OVERreplace()) { (void)fprintf(stderr, "Can't replace overview data, %s\n", --- 1952,1959 ---- if (StorageAPI && Writing) { if (OverPath) { (void)sprintf(buff, "%s/overview.done", OverPath); ! (void)fclose(EXPfopen(FALSE, buff, "w", TRUE, Server, Paused)); ! CleanupAndExit(Server, Paused, 0); } else { if (!OVERreplace()) { (void)fprintf(stderr, "Can't replace overview data, %s\n", diff -Nacr inn-2.1/expire/expireindex.c inn-2.2/expire/expireindex.c *** inn-2.1/expire/expireindex.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/expireindex.c Tue Oct 13 23:17:49 1998 *************** *** 1,4 **** ! /* $Revision: 1.11 $ ** Expire overview index. */ #include --- 1,4 ---- ! /* $Revision: 1.16 $ ** Expire overview index. */ #include *************** *** 23,38 **** /* - ** Information about a line in the overview file. - */ - typedef struct _LINE { - ARTNUM Article; - char *Start; - int Length; - int Offset; - } LINE; - - /* ** A list of articles; re-uses space. */ typedef struct _LIST { --- 23,28 ---- *************** *** 78,85 **** STATIC BOOL Append; STATIC BOOL Lowmark; STATIC BOOL Overwrite; - STATIC ARTOVERFIELD *ARTfields; - STATIC int ARTfieldsize; STATIC BOOL OVERmmap; STATIC char (*OVERindex)[][OVERINDEXPACKSIZE]; STATIC int OVERicount; --- 68,73 ---- *************** *** 168,183 **** /* ** Sorting predicate to put newsgroup names into numeric order. */ STATIC int ARTcompare(CPOINTER p1, CPOINTER p2) { ! return ((ARTLIST *)p1)->ArtNum - ((ARTLIST *)p2)->ArtNum; } STATIC void WriteIndex(int fd) { int i, count; - OVERINDEX index; for (i = 0, count = 0; i < OVERicount; i++) { if (ARTnumbers[i].ArtNum != 0) { --- 156,179 ---- /* ** Sorting predicate to put newsgroup names into numeric order. + ** Eh??? ...put newsgroup into numeric order. ??? + ** on a 64 bit m/c this might be incorrect, but I fail to see + ** how it could actually fail... but anyway. clutching at straws */ STATIC int ARTcompare(CPOINTER p1, CPOINTER p2) { ! /* return ((ARTLIST *)p1)->ArtNum - ((ARTLIST *)p2)->ArtNum; */ ! unsigned long a, b; ! a = ((ARTLIST *)p1)->ArtNum; ! b = ((ARTLIST *)p2)->ArtNum; ! if ( a < b ) return -1; ! if ( a == b ) return 0; ! return 1; } STATIC void WriteIndex(int fd) { int i, count; for (i = 0, count = 0; i < OVERicount; i++) { if (ARTnumbers[i].ArtNum != 0) { *************** *** 232,240 **** */ STATIC void RefreshLines(char *group, LIST *Refresh) { - static int LineSize; ARTLIST *an; - LINE *end; char *p; ARTNUM *ap; int i; --- 228,234 ---- *************** *** 249,260 **** ARTsize = 0; if (Verbose) { for (ap = Refresh->Articles, i = Refresh->Used; --i >= 0; ap++) (void)printf("- %s/%ld\n", group, *ap); ! if (DoNothing) ! return; ! } /* Lock the group. */ (void)sprintf(ilockfile, "%s/.LCK%s.index", group, innconf->overviewname); --- 243,259 ---- ARTsize = 0; + /* + * The man page doesn't say anything about -n requiring -v ??? + */ + if (Verbose) { for (ap = Refresh->Articles, i = Refresh->Used; --i >= 0; ap++) (void)printf("- %s/%ld\n", group, *ap); ! /* if (DoNothing) ! * return; ! */ } ! if (DoNothing) return; /* Lock the group. */ (void)sprintf(ilockfile, "%s/.LCK%s.index", group, innconf->overviewname); *************** *** 308,328 **** icount = 0; else icount = Sb.st_size / OVERINDEXPACKSIZE; ! if (OVERmmap) { ! if (icount != 0 && (tmp = (char (*)[][OVERINDEXPACKSIZE])mmap((MMAP_PTR)0, icount * OVERINDEXPACKSIZE, ! PROT_READ, MAP__ARG, ifd, 0)) == (char (*)[][OVERINDEXPACKSIZE])-1) { ! (void)fprintf(stderr, "cant mmap index %s, %s\n", ifile, strerror(errno)); ! UnlockGroup(ilfd, ilockfile); ! (void)close(ifd); ! return; ! } } else { ! tmp = (char (*)[][OVERINDEXPACKSIZE])NEW(char, icount * OVERINDEXPACKSIZE); ! if (read(ifd, tmp, icount * OVERINDEXPACKSIZE) != (icount * OVERINDEXPACKSIZE)) { ! (void)fprintf(stderr, "cant read index %s, %s\n", ifile, strerror(errno)); ! UnlockGroup(ilfd, ilockfile); ! (void)close(ifd); ! return; } } if (OVERindex) { --- 307,332 ---- icount = 0; else icount = Sb.st_size / OVERINDEXPACKSIZE; ! ! if (icount == 0) { ! /* set tmp to NULL so that we don't munmap() random stuff later. */ ! tmp = (char (*)[][OVERINDEXPACKSIZE])NULL; } else { ! if (OVERmmap) { ! if ((tmp = (char (*)[][OVERINDEXPACKSIZE])mmap((MMAP_PTR)0, icount * OVERINDEXPACKSIZE, PROT_READ, MAP__ARG, ifd, 0)) == (char (*)[][OVERINDEXPACKSIZE])-1) { ! (void)fprintf(stderr, "cant mmap index %s, %s\n", ifile, strerror(errno)); ! UnlockGroup(ilfd, ilockfile); ! (void)close(ifd); ! return; ! } ! } else { ! tmp = (char (*)[][OVERINDEXPACKSIZE])NEW(char, icount * OVERINDEXPACKSIZE); ! if (read(ifd, tmp, icount * OVERINDEXPACKSIZE) != (icount * OVERINDEXPACKSIZE)) { ! (void)fprintf( stderr, "cant read index %s, %s\n", ifile, strerror(errno)); ! UnlockGroup(ilfd, ilockfile); ! (void)close(ifd); ! return; ! } } } if (OVERindex) { *************** *** 458,464 **** *q++ = '\0'; if (List.Used == 0) { (void)strcpy(group, p); ! List.Used = 0; } else if (!EQ(p, group)) { LISTsort(&List); --- 462,468 ---- *q++ = '\0'; if (List.Used == 0) { (void)strcpy(group, p); ! List.Used = 0; /* this would seem redundant :-) */ } else if (!EQ(p, group)) { LISTsort(&List); *************** *** 632,638 **** } ac -= optind; av += optind; ! if (Append && Lowmark || Lowmark && SortedInput) Usage(); /* Setup. */ --- 636,642 ---- } ac -= optind; av += optind; ! if ((Append && Lowmark) || (Lowmark && SortedInput)) Usage(); /* Setup. */ diff -Nacr inn-2.1/expire/expireover.c inn-2.2/expire/expireover.c *** inn-2.1/expire/expireover.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/expireover.c Tue Oct 13 14:07:34 1998 *************** *** 1,4 **** ! /* $Revision: 1.15 $ ** ** Expire overview database. */ --- 1,4 ---- ! /* $Revision: 1.16 $ ** ** Expire overview database. */ *************** *** 934,940 **** /* Get all articles. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, p[0]) || strspn(p, "0123456789") != strlen(p)) continue; LISTappend(List, atol(p)); } --- 934,940 ---- /* Get all articles. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, (int)p[0]) || strspn(p, "0123456789") != strlen(p)) continue; LISTappend(List, atol(p)); } *************** *** 1047,1053 **** LIST *Missing; int processed; int overentries; - int oidxentries; /* Open file. */ if (EQ(Name, "-")) --- 1047,1052 ---- diff -Nacr inn-2.1/expire/fastrm.c inn-2.2/expire/fastrm.c *** inn-2.1/expire/fastrm.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/fastrm.c Tue Oct 13 14:07:34 1998 *************** *** 636,642 **** continue; case 'u': dotdot = 1; ! if (!isdigit(p[1])) continue; dotdot = atoi(p + 1); if (dotdot >= strlen(DotDot)/(SIZE_T)3) --- 636,642 ---- continue; case 'u': dotdot = 1; ! if (!isdigit((int)p[1])) continue; dotdot = atoi(p + 1); if (dotdot >= strlen(DotDot)/(SIZE_T)3) *************** *** 644,656 **** break; case 's': sortdirs = 5; ! if (!isdigit(p[1])) continue; sortdirs = atoi(p + 1); break; case 'c': cdval = 1; ! if (!isdigit(p[1])) continue; cdval = atoi(p + 1); break; --- 644,656 ---- break; case 's': sortdirs = 5; ! if (!isdigit((int)p[1])) continue; sortdirs = atoi(p + 1); break; case 'c': cdval = 1; ! if (!isdigit((int)p[1])) continue; cdval = atoi(p + 1); break; diff -Nacr inn-2.1/expire/makeactive.c inn-2.2/expire/makeactive.c *** inn-2.1/expire/makeactive.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/makeactive.c Tue Oct 13 14:07:34 1998 *************** *** 1,4 **** ! /* $Revision: 1.7 $ ** ** Build an active file from either an old copy or by calling find ** to get the directory names. --- 1,4 ---- ! /* $Revision: 1.9 $ ** ** Build an active file from either an old copy or by calling find ** to get the directory names. *************** *** 70,76 **** } (void)munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE); } else { ! while (fread(&packed, OVERINDEXPACKSIZE, 1, fi) == 1) { UnpackOverIndex(packed, &index); if (index.artnum < *lomark) *lomark = index.artnum; --- 70,76 ---- } (void)munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE); } else { ! while (fread(packed, OVERINDEXPACKSIZE, 1, fi) == 1) { UnpackOverIndex(packed, &index); if (index.artnum < *lomark) *lomark = index.artnum; *************** *** 93,105 **** DIRENTRY *ep; long j; char *p; - FILE *fi; - struct stat sb; - char (*mapped)[][OVERINDEXPACKSIZE]; - int count; - int i; - OVERINDEX index; - char packed[OVERINDEXPACKSIZE]; /* Turn group name into directory name. */ for (p = name; *p; p++) --- 93,98 ---- *************** *** 123,129 **** /* Scan through all entries in the directory. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, p[0]) || strspn(p, "0123456789") != strlen(p) || (j = atol(p)) == 0) continue; if (lomark == 0 || j < lomark) --- 116,122 ---- /* Scan through all entries in the directory. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, (int)p[0]) || strspn(p, "0123456789") != strlen(p) || (j = atol(p)) == 0) continue; if (lomark == 0 || j < lomark) diff -Nacr inn-2.1/expire/makehistory.c inn-2.2/expire/makehistory.c *** inn-2.1/expire/makehistory.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/makehistory.c Tue Oct 13 14:07:35 1998 *************** *** 1,4 **** ! /* $Revision: 1.47 $ ** ** Rebuild the history database. ** --- 1,4 ---- ! /* $Revision: 1.51 $ ** ** Rebuild the history database. ** *************** *** 83,89 **** ARTOVERFIELD *fp; int i; char buff[SMBUF]; - int missing = 0; if (Overview) { /* Open file, count lines. */ --- 83,88 ---- *************** *** 253,265 **** /* ** Rebuild the DBZ file from the text file. */ ! STATIC void Rebuild(long size, BOOL IgnoreOld, BOOL Overwrite) { QIOSTATE *qp; char *p, *q; char *save; ! long count; ! long where; HASH key; char temp[SMBUF]; dbzoptions opt; --- 252,264 ---- /* ** Rebuild the DBZ file from the text file. */ ! STATIC void Rebuild(OFFSET_T size, BOOL IgnoreOld, BOOL Overwrite) { QIOSTATE *qp; char *p, *q; char *save; ! OFFSET_T count; ! OFFSET_T where; HASH key; char temp[SMBUF]; dbzoptions opt; *************** *** 510,518 **** if (!FoundXref) { /* assumes not crossposted */ sprintf(path, "%s %s %s\r\n\r\n", XREF, pathhost, art); ! if ((p = strrchr(path, '/')) != (char *)NULL) *p = ':'; ! else { QIOclose(qp); return FALSE; } --- 509,521 ---- if (!FoundXref) { /* assumes not crossposted */ sprintf(path, "%s %s %s\r\n\r\n", XREF, pathhost, art); ! if ((p = strrchr(path, '/')) != (char *)NULL) { *p = ':'; ! for (p = path; *p; p++) ! if (*p == '/') ! *p = '.'; ! ! } else { QIOclose(qp); return FALSE; } *************** *** 1239,1245 **** /* Read all entries in the directory. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, *p) || strspn(p, "0123456789") != strlen(p)) continue; strcpy(q, p); --- 1242,1248 ---- /* Read all entries in the directory. */ while ((ep = readdir(dp)) != NULL) { p = ep->d_name; ! if (!CTYPE(isdigit, (int)*p) || strspn(p, "0123456789") != strlen(p)) continue; strcpy(q, p); *************** *** 1396,1403 **** } ! int ! main(int ac, char *av[]) { QIOSTATE *qp; FILE *out; --- 1399,1405 ---- } ! int main(int ac, char *av[]) { QIOSTATE *qp; FILE *out; *************** *** 1406,1412 **** char *q; long count; BUFFER B; ! long size; int i; BOOL JustRebuild; BOOL DoRebuild; --- 1408,1414 ---- char *q; long count; BUFFER B; ! OFFSET_T size; int i; BOOL JustRebuild; BOOL DoRebuild; *************** *** 1429,1435 **** char *tv[2]; STRING tmpdir; STRING OverPath; - char *Tflag; char *mode; char *oldtemp; ARTHANDLE *art = (ARTHANDLE *)NULL; --- 1431,1436 ---- *************** *** 1460,1466 **** Translate = NO_TRANS; Tradspooldir = innconf->patharticles; OldHistory = HISTORY; - Tflag = ""; mode = "w"; size = 0; oldtemp = NULL; --- 1461,1466 ---- *************** *** 1526,1533 **** break; case 'T': tmpdir = optarg; - Tflag = NEW(char, 3 + strlen(optarg) + 1); - (void)sprintf(Tflag, "-T %s", optarg); break; case 't': switch(*optarg) { --- 1526,1531 ---- *************** *** 1752,1761 **** /* Make a temporary file, sort the text file into it. */ (void)sprintf(temp, "%s/histXXXXXX", tmpdir); (void)mktemp(temp); ! i = 50 + strlen(TempTextFile ? TempTextFile : TextFile) + strlen(temp); p = NEW(char, i); ! (void)sprintf(p, "exec sort %s -t'%c' +1n -o %s %s", ! Tflag, HIS_FIELDSEP, temp, TempTextFile ? TempTextFile : TextFile); i = system(p) >> 8; if (i != 0) { --- 1750,1759 ---- /* Make a temporary file, sort the text file into it. */ (void)sprintf(temp, "%s/histXXXXXX", tmpdir); (void)mktemp(temp); ! i = 50 + strlen(TempTextFile ? TempTextFile : TextFile) + strlen(temp) + 3 + strlen(tmpdir); p = NEW(char, i); ! (void)sprintf(p, "exec sort -T %s -t'%c' +1n -o %s %s", ! tmpdir, HIS_FIELDSEP, temp, TempTextFile ? TempTextFile : TextFile); i = system(p) >> 8; if (i != 0) { diff -Nacr inn-2.1/expire/newsrequeue.c inn-2.2/expire/newsrequeue.c *** inn-2.1/expire/newsrequeue.c Fri Jul 24 13:13:00 1998 --- inn-2.2/expire/newsrequeue.c Tue Oct 13 14:07:35 1998 *************** *** 1,4 **** ! /* $Revision: 1.16 $ ** ** Expire news articles. */ --- 1,4 ---- ! /* $Revision: 1.17 $ ** ** Expire news articles. */ *************** *** 344,350 **** break; } if (*p == '\\' && p[1] == '\n') ! while (*++p && CTYPE(isspace, *p)) continue; else *to++ = *p++; --- 344,350 ---- break; } if (*p == '\\' && p[1] == '\n') ! while (*++p && CTYPE(isspace, (int)*p)) continue; else *to++ = *p++; diff -Nacr inn-2.1/frontends/Makefile inn-2.2/frontends/Makefile *** inn-2.1/frontends/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/Makefile Sat Aug 15 05:30:32 1998 *************** *** 1,4 **** ! ## $Revision: 1.29 $ include ../Makefile.global CFLAGS = $(GCFLAGS) --- 1,4 ---- ! ## $Revision: 1.30 $ include ../Makefile.global CFLAGS = $(GCFLAGS) *************** *** 15,20 **** --- 15,21 ---- install: $D$(PATHBIN)/inews $D$(PATHBIN)/rnews \ $D$(PATHBIN)/ctlinnd $D$(PATHBIN)/getlist \ $D$(PATHBIN)/innconfval $D$(RNEWSPROGS)/c7unbatch \ + $D$(RNEWSPROGS)/gunbatch \ $D$(RNEWSPROGS)/decode $D$(RNEWSPROGS)/encode \ $D$(PATHBIN)/sm *************** *** 75,80 **** --- 76,83 ---- $D$(PATHBIN)/innconfval: innconfval $(LIBTOOL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ $D$(RNEWSPROGS)/c7unbatch: c7unbatch.sh + $(LIBTOOL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ + $D$(RNEWSPROGS)/gunbatch: gunbatch.sh $(LIBTOOL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ $D$(RNEWSPROGS)/decode: decode $(LIBTOOL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ diff -Nacr inn-2.1/frontends/c7unbatch.sh inn-2.2/frontends/c7unbatch.sh *** inn-2.1/frontends/c7unbatch.sh Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/c7unbatch.sh Thu Jan 1 00:00:00 1970 *************** *** 1,2 **** - #! /bin/sh - decode | /usr/ucb/compress -d --- 0 ---- diff -Nacr inn-2.1/frontends/c7unbatch.sh.in inn-2.2/frontends/c7unbatch.sh.in *** inn-2.1/frontends/c7unbatch.sh.in Thu Jan 1 00:00:00 1970 --- inn-2.2/frontends/c7unbatch.sh.in Sat Aug 15 05:30:32 1998 *************** *** 0 **** --- 1,2 ---- + #! /bin/sh + decode | @COMPRESS@ -d diff -Nacr inn-2.1/frontends/gunbatch.sh.in inn-2.2/frontends/gunbatch.sh.in *** inn-2.1/frontends/gunbatch.sh.in Thu Jan 1 00:00:00 1970 --- inn-2.2/frontends/gunbatch.sh.in Sat Aug 15 05:30:32 1998 *************** *** 0 **** --- 1,2 ---- + #! /bin/sh + exec @GZIP@ -d -c diff -Nacr inn-2.1/frontends/inews.c inn-2.2/frontends/inews.c *** inn-2.1/frontends/inews.c Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/inews.c Thu Aug 20 04:25:15 1998 *************** *** 1,4 **** ! /* $Revision: 1.12 $ ** ** Send an article (prepared by someone on the local site) to the ** master news server. --- 1,4 ---- ! /* $Revision: 1.15 $ ** ** Send an article (prepared by someone on the local site) to the ** master news server. *************** *** 853,859 **** i--; break; } ! if ((p = strchr(p + 1, '\n')) == NULL) break; } if ((i * 2 > lines) && (lines > 40)) { --- 853,859 ---- i--; break; } ! if ((p = strchr(p, '\n')) == NULL) break; } if ((i * 2 > lines) && (lines > 40)) { *************** *** 966,975 **** h = DDstart(FromServer, ToServer); do { ! #if defined(DO_MERGE_TO_GROUPS) ! if (p[0] == 't' && p[1] == 'o' && p[2] == '.') p = "to"; - #endif /* defined(DO_MERGE_TO_GROUPS) */ i = strlen(p); (void)fseek(F, (OFFSET_T)0, SEEK_SET); while (fgets(buff, sizeof buff, F) != NULL) --- 966,973 ---- h = DDstart(FromServer, ToServer); do { ! if (innconf->mergetogroups && p[0] == 't' && p[1] == 'o' && p[2] == '.') p = "to"; i = strlen(p); (void)fseek(F, (OFFSET_T)0, SEEK_SET); while (fgets(buff, sizeof buff, F) != NULL) *************** *** 995,1000 **** --- 993,999 ---- "%s is moderated -- article would be mailed\n", group); else { + CAclose(); mailed = MailArticle(group, article); tmpPtr = DDend(h) ; DISPOSE(tmpPtr); diff -Nacr inn-2.1/frontends/innconfval.c inn-2.2/frontends/innconfval.c *** inn-2.1/frontends/innconfval.c Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/innconfval.c Fri Aug 21 10:28:14 1998 *************** *** 1,4 **** ! /* $Revision: 1.12 $ ** ** Get a config value from INN. */ --- 1,4 ---- ! /* $Revision: 1.13 $ ** ** Get a config value from INN. */ *************** *** 14,19 **** --- 14,21 ---- /* Global and initialized; to work around SunOS -Bstatic bug, sigh. */ STATIC char ConfigBuff[SMBUF] = ""; int format = 0; + STATIC char *ver = FALSE; + STATIC BOOL version = FALSE; int isnum(char *v) { *************** *** 95,119 **** } (void)fclose(F); } exit(0); } int ! main(ac, av) ! int ac; ! char *av[]; { ! register char *p; ! register char *val; ! register BOOL File; ! register int i; /* First thing, set up logging and our identity. */ openlog("innconfval", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG); /* Parse JCL. */ File = FALSE; ! while ((i = getopt(ac, av, "fcpsti:")) != EOF) switch (i) { default: (void)fprintf(stderr, "Usage error.\n"); --- 97,120 ---- } (void)fclose(F); } + printit(strdup("version"), ver); exit(0); } int ! main(int ac, char **av) { ! char *p; ! char *val; ! BOOL File; ! int i; /* First thing, set up logging and our identity. */ openlog("innconfval", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG); /* Parse JCL. */ File = FALSE; ! while ((i = getopt(ac, av, "fcpsti:v")) != EOF) switch (i) { default: (void)fprintf(stderr, "Usage error.\n"); *************** *** 137,146 **** --- 138,155 ---- case 'i': innconffile = optarg; break; + case 'v': + version = TRUE; + break; } ac -= optind; av += optind; + ver = INNVersion(); + if (version) { + printit(strdup("version"), ver); + exit(0); + } if (!*av) wholeconfig(); /* Doesn't return */ /* Loop over parameters, each a config value. */ diff -Nacr inn-2.1/frontends/rnews.c inn-2.2/frontends/rnews.c *** inn-2.1/frontends/rnews.c Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/rnews.c Tue Jan 19 03:14:10 1999 *************** *** 1,4 **** ! /* $Revision: 1.15 $ ** ** A front-end for InterNetNews. ** Read UUCP batches and offer them up NNTP-style. Because we may end --- 1,4 ---- ! /* $Revision: 1.16.2.3 $ ** ** A front-end for InterNetNews. ** Read UUCP batches and offer them up NNTP-style. Because we may end *************** *** 35,40 **** --- 35,41 ---- STATIC char *InputFile = "stdin"; STATIC char *UUCPHost; STATIC char *PATHBADNEWS = NULL; + STATIC char *remoteServer; STATIC FILE *FromServer; STATIC FILE *ToServer; STATIC char UNPACK[] = "gzip"; *************** *** 823,836 **** #endif if (ReadInnConf() < 0) exit(1); UUCPHost = getenv(_ENV_UUCPHOST); ! PATHBADNEWS = cpcatpath(innconf->pathincoming, _PATH_BADNEWS); ! (void)umask(NEWSUMASK); /* Parse JCL. */ fd = STDIN; mode = '\0'; ! while ((i = getopt(ac, av, "h:P:NUv")) != EOF) switch (i) { default: Usage(); --- 824,838 ---- #endif if (ReadInnConf() < 0) exit(1); UUCPHost = getenv(_ENV_UUCPHOST); ! PATHBADNEWS = COPY(cpcatpath(innconf->pathincoming, _PATH_BADNEWS)); ! port = innconf->nnrpdpostport; ! (void)umask(NEWSUMASK); /* Parse JCL. */ fd = STDIN; mode = '\0'; ! while ((i = getopt(ac, av, "h:P:NUvr:")) != EOF) switch (i) { default: Usage(); *************** *** 848,853 **** --- 850,858 ---- case 'v': Verbose = TRUE; break; + case 'r': + remoteServer = optarg; + break; } ac -= optind; av += optind; *************** *** 872,880 **** } /* Open the link to the server. */ ! if (innconf->nnrpdposthost != NULL) { ! if (!OpenRemote(innconf->nnrpdposthost, port, buff)) ! CantConnect(buff, mode, fd); } else { #if defined(DO_RNEWSLOCALCONNECT) --- 877,889 ---- } /* Open the link to the server. */ ! if (remoteServer != NULL) { ! if (!OpenRemote(remoteServer,port,buff)) ! CantConnect(buff,mode,fd); ! } else if (innconf->nnrpdposthost != NULL) { ! if (!OpenRemote(innconf->nnrpdposthost, ! (port != NNTP_PORT) ? port : innconf->nnrpdpostport, buff)) ! CantConnect(buff, mode, fd); } else { #if defined(DO_RNEWSLOCALCONNECT) *************** *** 882,893 **** /* If server rejected us, no point in continuing. */ if (buff[0]) CantConnect(buff, mode, fd); ! if (!OpenRemote((char *)NULL, port, buff)) ! CantConnect(buff, mode, fd); } #else ! if (!OpenRemote((char *)NULL, port, buff)) ! CantConnect(buff, mode, fd); #endif /* defined(DO_RNEWSLOCALCONNECT) */ } CloseOnExec((int)fileno(FromServer), TRUE); --- 891,904 ---- /* If server rejected us, no point in continuing. */ if (buff[0]) CantConnect(buff, mode, fd); ! if (!OpenRemote((char *)NULL, ! (port != NNTP_PORT) ? port : innconf->port, buff)) ! CantConnect(buff, mode, fd); } #else ! if (!OpenRemote((char *)NULL, ! (port != NNTP_PORT) ? port : innconf->port, buff)) ! CantConnect(buff, mode, fd); #endif /* defined(DO_RNEWSLOCALCONNECT) */ } CloseOnExec((int)fileno(FromServer), TRUE); diff -Nacr inn-2.1/frontends/sys2nf.c inn-2.2/frontends/sys2nf.c *** inn-2.1/frontends/sys2nf.c Fri Jul 24 13:13:00 1998 --- inn-2.2/frontends/sys2nf.c Thu Aug 20 04:25:16 1998 *************** *** 1,4 **** ! /* $Revision: 1.1.1.1 $ ** ** Read a C news "sys" file and split it up into a set of INN ** newsfeeds entries. Also works with B news. --- 1,4 ---- ! /* $Revision: 1.2 $ ** ** Read a C news "sys" file and split it up into a set of INN ** newsfeeds entries. Also works with B news. *************** *** 172,181 **** ) continue; ! #if defined(DO_MERGE_TO_GROUPS) ! if (EQ(s, "!to") || EQn(s, "to.", 3)) ! continue; ! #endif /* defined(DO_MERGE_TO_GROUPS) */ (void)putc(',', F); len++; --- 172,180 ---- ) continue; ! if (innconf->mergetogroups) ! if (EQ(s, "!to") || EQn(s, "to.", 3)) ! continue; (void)putc(',', F); len++; *************** *** 247,252 **** --- 246,252 ---- char *sys; int i; + if (ReadInnConf() < 0) exit(1); /* Set defaults. */ act = "/usr/local/lib/newslib/active"; sys = "sys"; diff -Nacr inn-2.1/include/conffile.h inn-2.2/include/conffile.h *** inn-2.1/include/conffile.h Thu Jan 1 00:00:00 1970 --- inn-2.2/include/conffile.h Thu Aug 20 04:26:18 1998 *************** *** 0 **** --- 1,24 ---- + /* $Revision: 1.1 $ + ** + ** Data structures, functions and cetera used for config file parsing. + */ + + typedef struct { + FILE *f; + char *buf; + int sbuf; + int lineno; + } CONFFILE; + + typedef struct { + int type; + #define CONFstring -1 + char *name; + } CONFTOKEN; + + extern char CONFerror[]; + + extern CONFFILE *CONFfopen(char*); + extern void CONFfclose(CONFFILE*); + + extern CONFTOKEN *CONFgettoken(CONFTOKEN*, CONFFILE*); diff -Nacr inn-2.1/include/config.h.in inn-2.2/include/config.h.in *** inn-2.1/include/config.h.in Fri Jul 24 13:13:00 1998 --- inn-2.2/include/config.h.in Fri Oct 23 14:38:46 1998 *************** *** 1,4 **** ! /* $Revision: 1.23 $ ** ** Here be configuration data used by various InterNetNews programs. ** The numbers refer to sections in the config.dist file. --- 1,4 ---- ! /* $Revision: 1.30.2.1 $ ** ** Here be configuration data used by various InterNetNews programs. ** The numbers refer to sections in the config.dist file. *************** *** 10,15 **** --- 10,18 ---- /* Change to fork() if your vfork() is broken */ #define FORK() vfork() + /* Define vfork to be fork if vfork is not available or broken */ + #undef vfork + /* Define if you have ANSI C headers */ #undef STDC_HEADERS *************** *** 68,76 **** --- 71,85 ---- /* Define if you have */ #undef HAVE_LIMITS_H + /* Define if you have */ + #undef HAVE_GETOPT_H + /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP + /* Define if you have a working `madvise' system call. */ + #undef HAVE_MADVISE + /* Define if you have setbuffer() */ #undef HAVE_SETBUFFER *************** *** 97,102 **** --- 106,132 ---- /* Define if you have getpagesize() */ #undef HAVE_GETPAGESIZE + + /* Define if you have statvfs() */ + #undef HAVE_STATVFS + + /* Define if you have statfs() */ + #undef HAVE_STATFS + + /* Define if you have sys/vfs.h */ + #undef HAVE_SYS_VFS_H + + /* Define if you have sys/param.h */ + #undef HAVE_SYS_PARAM_H + + /* Define if you have sys/mount.h */ + #undef HAVE_SYS_MOUNT_H + + /* Define if you have getspnam() */ + #undef HAVE_GETSPNAM + + /* Define if you have sys/sysinfo.h */ + #undef HAVE_SYS_SYSINFO_H /* if I understand how configure does this, if 'const' isn't valid, * it will remove the 'const' declarations from the typedef's below diff -Nacr inn-2.1/include/configdata.h inn-2.2/include/configdata.h *** inn-2.1/include/configdata.h Fri Jul 24 13:13:00 1998 --- inn-2.2/include/configdata.h Tue Oct 13 23:17:50 1998 *************** *** 1,4 **** ! /* $Revision: 1.34 $ ** ** Here be configuration data used by various InterNetNews programs. ** The numbers refer to sections in the config.dist file. --- 1,4 ---- ! /* $Revision: 1.37 $ ** ** Here be configuration data used by various InterNetNews programs. ** The numbers refer to sections in the config.dist file. *************** *** 94,102 **** /* Null-terminated set of illegal distribution patterns. */ /* =()<#define BAD_DISTRIBS @@>()= */ #define BAD_DISTRIBS "*.*",NULL - /* File unknown "to.*" groups into the "to" newsgroup? */ - /* =()<#define @@_MERGE_TO_GROUPS>()= */ - #define DONT_MERGE_TO_GROUPS /* Have innd throttle itself after this many I/O errors. */ /* =()<#define IO_ERROR_COUNT @@>()= */ #define IO_ERROR_COUNT 50 --- 94,99 ---- *************** *** 142,150 **** /* How your DBZ be compiled? Use tagged-hash or splitted tables */ /* =()<#define @@_TAGGED_HASH>()= */ #define DONT_TAGGED_HASH - /* Do you have shadow file? */ - /* =()<#define @@_HAVE_SHADOW @@>()= */ - #define DO_HAVE_SHADOW DO /* Function that returns no value, and a pointer to it. */ --- 139,144 ---- *************** *** 245,251 **** */ /* =()<#define @@_PERL>()= */ ! #define DONT_PERL /* --- 239,245 ---- */ /* =()<#define @@_PERL>()= */ ! #define DO_PERL /* *************** *** 253,258 **** */ /* =()<#define @@_KEYWORDS>()= */ ! #define DONT_KEYWORDS #endif /* ! defined (__configdata_h__) */ --- 247,252 ---- */ /* =()<#define @@_KEYWORDS>()= */ ! #define DO_KEYWORDS #endif /* ! defined (__configdata_h__) */ diff -Nacr inn-2.1/include/dbz.h inn-2.2/include/dbz.h *** inn-2.1/include/dbz.h Fri Jul 24 13:13:00 1998 --- inn-2.2/include/dbz.h Tue Oct 13 23:17:50 1998 *************** *** 43,72 **** #define PACKED __attribute__ ((packed)) #else #if !defined(PACKED) ! #define PACKED /* THIS IS STUPID */ #endif #endif ! #if defined(__SUNPRO_C) || defined(_nec_ews) || defined(sgi) || defined(sun) || defined(_HPUX_SOURCE) ! #if !defined(lint) && defined(__SUNPRO_C) #pragma pack(1) ! #endif /* nor lint, nor sgi, nor _nec_ews */ ! typedef struct { ! char hash[DBZ_INTERNAL_HASH_SIZE]; ! } erec; ! typedef struct { ! OFFSET_T offset; ! } idxrec; ! typedef struct { ! OFFSET_T offset[2]; ! unsigned char overindex; ! unsigned char reserved; ! unsigned short overlen; ! } idxrecext; ! #if !defined(lint) && defined(__SUNPRO_C) ! #pragma pack() ! #endif /* nor lint, nor sgi, nor _nec_ews */ ! #else typedef struct { char hash[DBZ_INTERNAL_HASH_SIZE]; } PACKED erec; --- 43,55 ---- #define PACKED __attribute__ ((packed)) #else #if !defined(PACKED) ! #define PACKED #endif #endif ! #if !defined(lint) && (defined(__SUNPRO_C) || defined(_nec_ews)) #pragma pack(1) ! #endif /* nor lint, nor __SUNPRO_C, nor sgi, nor _nec_ews */ typedef struct { char hash[DBZ_INTERNAL_HASH_SIZE]; } PACKED erec; *************** *** 79,92 **** unsigned char reserved; unsigned short overlen; } PACKED idxrecext; ! #endif /* standard dbm functions */ extern BOOL dbzinit(const char *name); extern BOOL dbzclose(void); /* new stuff for dbz */ ! extern BOOL dbzfresh(const char *name, const long size, const int fillpercent); extern BOOL dbzagain(const char *name, const char *oldname); extern BOOL dbzexists(const HASH key); #ifdef DO_TAGGED_HASH --- 62,77 ---- unsigned char reserved; unsigned short overlen; } PACKED idxrecext; ! #if !defined(lint) && (defined(__SUNPRO_C) || defined(_nec_ews)) ! #pragma pack() ! #endif /* nor lint, nor__SUNPRO_C, nor _nec_ews */ /* standard dbm functions */ extern BOOL dbzinit(const char *name); extern BOOL dbzclose(void); /* new stuff for dbz */ ! extern BOOL dbzfresh(const char *name, const OFFSET_T size, const int fillpercent); extern BOOL dbzagain(const char *name, const char *oldname); extern BOOL dbzexists(const HASH key); #ifdef DO_TAGGED_HASH *************** *** 97,103 **** extern DBZSTORE_RESULT dbzstore(const HASH key, void *ivalue); #endif extern BOOL dbzsync(void); ! extern long dbzsize(const long contents); extern BOOL dbzdebug(const int value); extern void dbzsetoptions(const dbzoptions options); extern void dbzgetoptions(dbzoptions *options); --- 82,88 ---- extern DBZSTORE_RESULT dbzstore(const HASH key, void *ivalue); #endif extern BOOL dbzsync(void); ! extern long dbzsize(const OFFSET_T contents); extern BOOL dbzdebug(const int value); extern void dbzsetoptions(const dbzoptions options); extern void dbzgetoptions(dbzoptions *options); diff -Nacr inn-2.1/include/innconf.h inn-2.2/include/innconf.h *** inn-2.1/include/innconf.h Fri Jul 24 13:13:00 1998 --- inn-2.2/include/innconf.h Sat Nov 7 03:00:24 1998 *************** *** 2,8 **** These are the definitions used for inn.conf variables and used primarily in lib/getconfig.c ! $Header: /proj/cvs/isc/inn/inn/include/innconf.h,v 1.9 1998/06/26 00:44:16 kondou Exp $ */ /* --- 2,8 ---- These are the definitions used for inn.conf variables and used primarily in lib/getconfig.c ! $Header: /proj/cvs/isc/inn/inn/include/innconf.h,v 1.14.2.2 1998/11/07 03:00:24 kondou Exp $ */ /* *************** *** 123,131 **** #define _CONF_CLIENTTIMEOUT "clienttimeout" #define CONF_VAR_CLIENTTIMEOUT 33 { _CONF_CLIENTTIMEOUT, "", 2, 1 }, ! #define _CONF_ALLOWREADERS "allowreaders" ! #define CONF_VAR_ALLOWREADERS 34 ! { _CONF_ALLOWREADERS, "", 2, 1 }, #define _CONF_ALLOWNEWNEWS "allownewnews" #define CONF_VAR_ALLOWNEWNEWS 35 { _CONF_ALLOWNEWNEWS, "", 2, 1 }, --- 123,131 ---- #define _CONF_CLIENTTIMEOUT "clienttimeout" #define CONF_VAR_CLIENTTIMEOUT 33 { _CONF_CLIENTTIMEOUT, "", 2, 1 }, ! #define _CONF_READERSWHENSTOPPED "readerswhenstopped" ! #define CONF_VAR_READERSWHENSTOPPED 34 ! { _CONF_READERSWHENSTOPPED, "", 2, 1 }, #define _CONF_ALLOWNEWNEWS "allownewnews" #define CONF_VAR_ALLOWNEWNEWS 35 { _CONF_ALLOWNEWNEWS, "", 2, 1 }, *************** *** 300,305 **** #define _CONF_STOREMSGID "storemsgid" #define CONF_VAR_STOREMSGID 92 { _CONF_STOREMSGID, "", 2, 1 }, }; ! #define MAX_CONF_VAR 93 --- 300,326 ---- #define _CONF_STOREMSGID "storemsgid" #define CONF_VAR_STOREMSGID 92 { _CONF_STOREMSGID, "", 2, 1 }, + #define _CONF_NICENEWNEWS "nicenewnews" + #define CONF_VAR_NICENEWNEWS 93 + { _CONF_NICENEWNEWS, "", 2, 1 }, + #define _CONF_USECONTROLCHAN "usecontrolchan" + #define CONF_VAR_USECONTROLCHAN 94 + { _CONF_USECONTROLCHAN, "", 2, 1 }, + #define _CONF_MERGETOGROUPS "mergetogroups" + #define CONF_VAR_MERGETOGROUPS 95 + { _CONF_MERGETOGROUPS, "", 2, 1 }, + #define _CONF_NOREADER "noreader" + #define CONF_VAR_NOREADER 96 + { _CONF_NOREADER, "", 2, 1 }, + #define _CONF_SOURCEADDRESS "sourceaddress" + #define CONF_VAR_SOURCEADDRESS 97 + { _CONF_SOURCEADDRESS, "", 1, 1 }, + #define _CONF_NNRPPERLAUTH "nnrpperlauth" + #define CONF_VAR_NNRPPERLAUTH 98 + { _CONF_NNRPPERLAUTH, "", 2, 1 }, + #define _CONF_NNRPDPOSTPORT "nnrpdpostport" + #define CONF_VAR_NNRPDPOSTPORT 99 + { _CONF_NNRPDPOSTPORT, "", 2, 1 } }; ! #define MAX_CONF_VAR 100 diff -Nacr inn-2.1/include/libinn.h inn-2.2/include/libinn.h *** inn-2.1/include/libinn.h Fri Jul 24 13:13:00 1998 --- inn-2.2/include/libinn.h Sat Nov 7 03:00:25 1998 *************** *** 1,4 **** ! /* $Revision: 1.41 $ ** ** Here be declarations of functions in the InterNetNews library. */ --- 1,4 ---- ! /* $Revision: 1.47.2.1 $ ** ** Here be declarations of functions in the InterNetNews library. */ *************** *** 104,110 **** int linecountfuzz; /* Check linecount and adjust of out by more */ int peertimeout; /* How long peers can be inactive */ int clienttimeout; /* How long nnrpd can be inactive */ ! int allowreaders; /* Allow nnrpd when server is paused */ int allownewnews; /* Allow use of the 'NEWNEWS' command */ long localmaxartsize; /* Max article size of local postings */ int logartsize; /* Log article sizes */ --- 104,110 ---- int linecountfuzz; /* Check linecount and adjust of out by more */ int peertimeout; /* How long peers can be inactive */ int clienttimeout; /* How long nnrpd can be inactive */ ! int readerswhenstopped; /* Allow nnrpd when server is paused */ int allownewnews; /* Allow use of the 'NEWNEWS' command */ long localmaxartsize; /* Max article size of local postings */ int logartsize; /* Log article sizes */ *************** *** 120,125 **** --- 120,126 ---- int blockbackoff; /* Multiplier for sleep in EWOULDBLOCK writes */ int icdsynccount; /* How many article-writes between active and history updates */ char *bindaddress; /* Which interface IP to bind to */ + char *sourceaddress; /* Source IP for outgoing NNTP connections */ int port; /* Which port INND should listen on */ int readertrack; /* Enable/Disable the reader tracking system */ int strippostcc; /* Strip To:, Cc: and Bcc: lines from posts */ *************** *** 128,133 **** --- 129,135 ---- int keylimit; /* max allocated space for keywords. */ int keyartlimit; /* Max size of an article for keyword generation */ int keymaxwords; /* Max count of interesting workd */ + int nnrpperlauth; /* Use perl for nnrpd authentication */ char *pathnews; char *pathbin; *************** *** 148,153 **** --- 150,156 ---- int logsitename; /* log site names? */ char *pathhttp; char *nnrpdposthost; + int nnrpdpostport; int extendeddbz; int nnrpdoverstats; int storeonxref; /* Should SMstore() see Xref to detemine class */ *************** *** 164,169 **** --- 167,176 ---- long activedupdate; int activedport; int storemsgid; + int nicenewnews; /* If NEWNEWS command is used, set nice */ + int usecontrolchan; + int mergetogroups; + int noreader; }; extern struct conf_vars *innconf; extern char *innconffile; *************** *** 193,199 **** typedef struct { char hash[16]; } HASH; ! HASH Hash(const void *value, size_t len); /* Return the hash of a case mapped message-id */ HASH HashMessageID(const char *MessageID); BOOL HashEmpty(const HASH hash); --- 200,206 ---- typedef struct { char hash[16]; } HASH; ! HASH Hash(const void *value, const size_t len); /* Return the hash of a case mapped message-id */ HASH HashMessageID(const char *MessageID); BOOL HashEmpty(const HASH hash); diff -Nacr inn-2.1/include/patchlevel.h inn-2.2/include/patchlevel.h *** inn-2.1/include/patchlevel.h Fri Jul 24 13:13:00 1998 --- inn-2.2/include/patchlevel.h Thu Jan 21 10:30:16 1999 *************** *** 1,5 **** /* ! * $Revision: 1.6 $ */ --- 1,5 ---- /* ! * $Revision: 1.6.2.3 $ */ *************** *** 13,22 **** ** Try to avoid changing these. */ #define RELEASE "2" ! #define PATCHLEVEL "1" ! #define DATE "24-Jul-1998" #define RELEASE_C 2 ! #define PATCHLEVEL_C 1 #define SUB_PATCHLEVEL_C 0 --- 13,22 ---- ** Try to avoid changing these. */ #define RELEASE "2" ! #define PATCHLEVEL "2" ! #define DATE "21-Jan-1999" #define RELEASE_C 2 ! #define PATCHLEVEL_C 2 #define SUB_PATCHLEVEL_C 0 diff -Nacr inn-2.1/include/paths.h.in inn-2.2/include/paths.h.in *** inn-2.1/include/paths.h.in Fri Jul 24 13:13:00 1998 --- inn-2.2/include/paths.h.in Tue Oct 13 12:18:45 1998 *************** *** 1,4 **** ! /* $Id: paths.h.in,v 1.23 1998/06/03 00:24:01 kondou Exp $ ** ** Here be #define's for filenames, socket names, environment variables, ** and so on. The numbers refer to sections in the config.dist file. --- 1,4 ---- ! /* $Id: paths.h.in,v 1.25 1998/10/13 12:18:45 coneill Exp $ ** ** Here be #define's for filenames, socket names, environment variables, ** and so on. The numbers refer to sections in the config.dist file. *************** *** 23,28 **** --- 23,29 ---- #define _PATH_PERL_STARTUP_INND "startup_innd.pl" #define _PATH_PERL_FILTER_INND "filter_innd.pl" #define _PATH_PERL_FILTER_NNRPD "filter_nnrpd.pl" + #define _PATH_PERL_AUTH "nnrpd_auth.pl" /* Default prefix path is pathrun */ #define _PATH_NNTPCONNECT "nntpin" *************** *** 53,59 **** #define _PATH_EXPIRECTL "expire.ctl" #define _PATH_SCHEMA "overview.fmt" #define _PATH_MOTD "motd.news" ! #define _PATH_STORAGECTL "storage.ctl" #define _PATH_OVERVIEWCTL "overview.ctl" /* Default prefix path is pathspool */ --- 54,60 ---- #define _PATH_EXPIRECTL "expire.ctl" #define _PATH_SCHEMA "overview.fmt" #define _PATH_MOTD "motd.news" ! #define _PATH_STORAGECTL "storage.conf" #define _PATH_OVERVIEWCTL "overview.ctl" /* Default prefix path is pathspool */ diff -Nacr inn-2.1/innd/Makefile inn-2.2/innd/Makefile *** inn-2.1/innd/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/Makefile Sun Aug 30 23:03:25 1998 *************** *** 1,13 **** ! ## $Revision: 1.32 $ include ../Makefile.global ! ## =()@>()= ! TCLINC = ! ! CFLAGS = $(GCFLAGS) $(PERLINC) ! ! ## =()@>()= ! TCL_LIB = SOURCES = \ art.c cc.c chan.c his.c icd.c innd.c lc.c nc.c newsfeeds.c ng.c \ --- 1,7 ---- ! ## $Revision: 1.33 $ include ../Makefile.global ! CFLAGS = $(GCFLAGS) $(PERLINC) $(TCLINC) SOURCES = \ art.c cc.c chan.c his.c icd.c innd.c lc.c nc.c newsfeeds.c ng.c \ *************** *** 50,56 **** $(CTAGS) $(SOURCES) ../lib/*.c innd.h ../include/*.h innd: $(P) $(OBJECTS) $(LIBNEWS) ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBNEWS) $(TCL_LIB) $(PERLLIB) $(LIBS) inndstart: $(P) inndstart.o $(LIBNEWS) $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ inndstart.o $(LIBNEWS) $(LIBS) --- 44,50 ---- $(CTAGS) $(SOURCES) ../lib/*.c innd.h ../include/*.h innd: $(P) $(OBJECTS) $(LIBNEWS) ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBNEWS) $(TCLLIB) $(PERLLIB) $(LIBS) inndstart: $(P) inndstart.o $(LIBNEWS) $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ inndstart.o $(LIBNEWS) $(LIBS) diff -Nacr inn-2.1/innd/art.c inn-2.2/innd/art.c *** inn-2.1/innd/art.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/art.c Mon Jan 11 01:38:47 1999 *************** *** 1,4 **** ! /* $Id: art.c,v 1.80 1998/07/14 00:01:29 kondou Exp $ ** ** Article-processing. */ --- 1,4 ---- ! /* $Id: art.c,v 1.90.2.4 1999/01/11 01:38:47 kondou Exp $ ** ** Article-processing. */ *************** *** 138,143 **** --- 138,144 ---- { "X-Newsposter", HTstd }, { "X-Cancelled-By", HTstd }, { "X-Canceled-By", HTstd }, + { "Cancel-Key", HTstd }, }; ARTHEADER *ARTheadersENDOF = ENDOF(ARTheaders); *************** *** 488,493 **** --- 489,495 ---- p += 6; memcpy(p, HDR(_xref), ARTheaders[_xref].Length); end = p += ARTheaders[_xref].Length; + end += 2; /* include trailing "\r\n" for Headers generation */ memcpy(p, "\r\n\r\n", 4); p += 4; ARTheaders[_xref].Found = 1; *************** *** 538,543 **** --- 540,546 ---- /* Add the data. */ BUFFset(&Headers, bytesbuff, strlen(bytesbuff)); BUFFappend(&Headers, artbuff, end - artbuff); + BUFFtrimcr(&Headers); Data->Headers = &Headers; DISPOSE(artbuff); *************** *** 726,735 **** RENEW(Headers.Data, char, Headers.Size + 1); } /* Add the data. */ BUFFset(&Headers, bytesbuff, strlen(bytesbuff)); ! for (vp = iov; vp < end; vp++) BUFFappend(&Headers, vp->iov_base, vp->iov_len); Data->Headers = &Headers; return 0; --- 729,741 ---- RENEW(Headers.Data, char, Headers.Size + 1); } + /* end includes eol for xref and null line, just shorten for eol */ + end->iov_len -= innconf->wireformat ? 2 : 1; /* Add the data. */ BUFFset(&Headers, bytesbuff, strlen(bytesbuff)); ! for (vp = iov; vp <= end; vp++) BUFFappend(&Headers, vp->iov_base, vp->iov_len); + BUFFtrimcr(&Headers); Data->Headers = &Headers; return 0; *************** *** 971,983 **** in++; /* Try to set this now, so we can report it in errors. */ p = HDR(_message_id); ! if (*p) { Data->MessageID = p; ! Data->MessageIDLength = strlen(p); ! if (error == NULL && !ARTidok(p)) ! error = "Bad \"Message-ID\" header"; ! } if (error) return error; --- 977,989 ---- in++; /* Try to set this now, so we can report it in errors. */ + Data->MessageID = NULL; p = HDR(_message_id); ! if (*p && ARTidok(p)) Data->MessageID = p; ! Data->MessageIDLength = Data->MessageID ? strlen(Data->MessageID) : 0; ! if (error == NULL && Data->MessageID == NULL) ! error = "Bad \"Message-ID\" header"; if (error) return error; *************** *** 1170,1181 **** /* Get the author header. */ if ((p = strchr(files, ' ')) != NULL) *p = '\0'; ! if ((local = (char *)HeaderFindDisk(files, "Sender", 6)) == NULL ! && (local = (char *)HeaderFindDisk(files, "From", 4)) == NULL) { return NULL; } if (p) *p = ' '; HeaderCleanFrom(local); --- 1176,1195 ---- /* Get the author header. */ if ((p = strchr(files, ' ')) != NULL) *p = '\0'; ! if ((local = (char *)HeaderFindDisk(files, "Sender:", 7)) == NULL ! && (local = (char *)HeaderFindDisk(files, "From:", 5)) == NULL) { return NULL; } if (p) *p = ' '; + if (*local == 'S') { + local += 7; + } else { + local += 5; + } + for (local++; *local == ' '; local++); + if (*local == '\0') + return NULL; HeaderCleanFrom(local); *************** *** 1189,1195 **** ARTlog(Data, ART_REJECT, buff); } DISPOSE(p); - DISPOSE(local); return files; } --- 1203,1208 ---- *************** *** 1277,1289 **** ** are passed out to an external program in a specific directory that ** has the same name as the first word of the control message. */ ! STATIC void ARTcontrol(ARTDATA *Data, HASH hash, char *Control) { char *p; char buff[SMBUF]; char *av[6]; struct stat Sb; char c; /* See if it's a cancel message. */ c = *Control; --- 1290,1304 ---- ** are passed out to an external program in a specific directory that ** has the same name as the first word of the control message. */ ! STATIC void ARTcontrol(ARTDATA *Data, HASH hash, char *Control, CHANNEL *cp) { char *p; char buff[SMBUF]; char *av[6]; struct stat Sb; char c; + char **hops; + int hopcount; /* See if it's a cancel message. */ c = *Control; *************** *** 1340,1361 **** } } ! /* Build the command vector and execute it. */ ! av[0] = buff; ! av[1] = COPY(Data->Poster); ! av[2] = COPY(Data->Replyto); ! av[3] = Data->Name; ! av[4] = (char *)Data->Feedsite; ! av[5] = NULL; ! HeaderCleanFrom(av[1]); ! HeaderCleanFrom(av[2]); ! if (Spawn(innconf->nicekids, STDIN, (int)fileno(Errlog), (int)fileno(Errlog), av) < 0) ! /* We know the strrchr below can't fail. */ ! syslog(L_ERROR, "%s cant spawn %s for %s %m", ! LogName, MaxLength(av[0], strrchr(av[0], '/')), Data->Name); ! DISPOSE(av[1]); ! DISPOSE(av[2]); } --- 1355,1383 ---- } } ! if (!(innconf->usecontrolchan)) { ! /* Build the command vector and execute it. */ ! av[0] = buff; ! av[1] = COPY(Data->Poster); ! av[2] = COPY(Data->Replyto); ! av[3] = Data->Name; ! if (innconf->logipaddr) { ! hops = ARTparsepath(HDR(_path), &hopcount); ! av[4] = hops && hops[0] ? hops[0] : CHANname(cp); ! } else { ! av[4] = (char *)Data->Feedsite; ! } ! av[5] = NULL; ! HeaderCleanFrom(av[1]); ! HeaderCleanFrom(av[2]); ! if (Spawn(innconf->nicekids, STDIN, (int)fileno(Errlog), (int)fileno(Errlog), av) < 0) ! /* We know the strrchr below can't fail. */ ! syslog(L_ERROR, "%s cant spawn %s for %s %m", ! LogName, MaxLength(av[0], strrchr(av[0], '/')), Data->Name); ! DISPOSE(av[1]); ! DISPOSE(av[2]); ! } } *************** *** 2096,2102 **** int hopcount; char **distributions; STRING error; - int error_code = 0; char ControlWord[SMBUF]; int ControlHeader; int oerrno; --- 2118,2123 ---- *************** *** 2108,2118 **** /* Preliminary clean-ups. */ article = &cp->In; ! if ((error = ARTclean(article, &Data)) != NULL) { ! sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, error); ! return buff; ! } ! Data.MessageID = HDR(_message_id); /* Fill in other Data fields. */ Data.Poster = HDR(_sender); --- 2129,2135 ---- /* Preliminary clean-ups. */ article = &cp->In; ! error = ARTclean(article, &Data); /* Fill in other Data fields. */ Data.Poster = HDR(_sender); *************** *** 2122,2127 **** --- 2139,2149 ---- if (*Data.Replyto == '\0') Data.Replyto = HDR(_from); hops = ARTparsepath(HDR(_path), &hopcount); + if (error != NULL && + (Data.MessageID == NULL || hops == 0 || hops[0]=='\0')) { + sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, error); + return buff; + } AddAlias = FALSE; if (Pathalias.Data != NULL && !ListHas(hops, innconf->pathalias)) AddAlias = TRUE; *************** *** 2145,2172 **** return buff; } - /* And now check the path for unwanted sites -- Andy */ - for( j = 0 ; ME.Exclusions && ME.Exclusions[j] ; j++ ) { - if( ListHas(hops, ME.Exclusions[j]) ) { - sprintf(ControlWord, "Unwanted site %s in path", ME.Exclusions[j]); - error = ControlWord; - error_code = REJECT_SITE; - break; - } - } - - /* Now see if we got an error in the article. */ if (error != NULL) { ! (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, error); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ! ARTreject(error_code, cp, buff, article); return buff; } #if defined(DO_PERL) pathForPerl = HeaderFindMem(article->Data, article->Used, "Path", 4) ; TMRstart(TMR_PERL); --- 2167,2197 ---- return buff; } if (error != NULL) { ! sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, error); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ! ARTreject(REJECT_OTHER, cp, buff, article); return buff; } + /* And now check the path for unwanted sites -- Andy */ + for( j = 0 ; ME.Exclusions && ME.Exclusions[j] ; j++ ) { + if( ListHas(hops, ME.Exclusions[j]) ) { + (void)sprintf(buff, "%d Unwanted site %s in path", + NNTP_REJECTIT_VAL, ME.Exclusions[j]); + ARTlog(&Data, ART_REJECT, buff); + if (innconf->remembertrash && (Mode == OMrunning) && + !HISremember(hash)) + syslog(L_ERROR, "%s cant write history %s %m", + LogName, Data.MessageID); + ARTreject(REJECT_SITE, cp, buff, article); + return buff; + } + } + #if defined(DO_PERL) pathForPerl = HeaderFindMem(article->Data, article->Used, "Path", 4) ; TMRstart(TMR_PERL); *************** *** 2174,2183 **** TMRstop(TMR_PERL); if (perlrc != NULL) { (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, perlrc); ! syslog(L_NOTICE, "rejecting[perl] %s %s", HDR(_message_id), buff); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ARTreject(REJECT_FILTER, cp, buff, article); --- 2199,2208 ---- TMRstop(TMR_PERL); if (perlrc != NULL) { (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, perlrc); ! syslog(L_NOTICE, "rejecting[perl] %s %s", Data.MessageID, buff); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ARTreject(REJECT_FILTER, cp, buff, article); *************** *** 2216,2226 **** if (strcmp(TCLInterpreter->result, "accept") != 0) { (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, TCLInterpreter->result); ! syslog(L_NOTICE, "rejecting[tcl] %s %s", HDR(_message_id), ! buff); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ARTreject(REJECT_FILTER, cp, buff, article); --- 2241,2250 ---- if (strcmp(TCLInterpreter->result, "accept") != 0) { (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, TCLInterpreter->result); ! syslog(L_NOTICE, "rejecting[tcl] %s %s", Data.MessageID, buff); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); ARTreject(REJECT_FILTER, cp, buff, article); *************** *** 2261,2268 **** NNTP_REJECTIT_VAL, MaxLength(distributions[0], distributions[0])); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); DISPOSE(distributions); --- 2285,2292 ---- NNTP_REJECTIT_VAL, MaxLength(distributions[0], distributions[0])); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); DISPOSE(distributions); *************** *** 2341,2358 **** NonExist = TRUE; ARTpoisongroup(*groups); ! #if defined(DO_MERGE_TO_GROUPS) ! /* Try to collapse all "to" newsgroups. */ ! if (*p != 't' || *++p != 'o' || *++p != '.' || *++p == '\0') continue; - ngp = NGfind("to"); - ToGroup = TRUE; - if ((sp = SITEfind(p)) != NULL) { - SITEmark(sp, ngp); } - #else - continue; - #endif /* defined(DO_MERGE_TO_GROUPS) */ } ngp->PostCount = 0; --- 2365,2382 ---- NonExist = TRUE; ARTpoisongroup(*groups); ! if (innconf->mergetogroups) { ! /* Try to collapse all "to" newsgroups. */ ! if (*p != 't' || *++p != 'o' || *++p != '.' || *++p == '\0') ! continue; ! ngp = NGfind("to"); ! ToGroup = TRUE; ! if ((sp = SITEfind(p)) != NULL) { ! SITEmark(sp, ngp); ! } ! } else { continue; } } ngp->PostCount = 0; *************** *** 2365,2372 **** (void)sprintf(buff, "%d Unapproved for \"%s\"", NNTP_REJECTIT_VAL, ngp->Name); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) --- 2389,2396 ---- (void)sprintf(buff, "%d Unapproved for \"%s\"", NNTP_REJECTIT_VAL, ngp->Name); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) *************** *** 2452,2459 **** MaxLength(HDR(_newsgroups), HDR(_newsgroups))); ARTlog(&Data, ART_REJECT, buff); if (!innconf->wanttrash) { ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) --- 2476,2483 ---- MaxLength(HDR(_newsgroups), HDR(_newsgroups))); ARTlog(&Data, ART_REJECT, buff); if (!innconf->wanttrash) { ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) *************** *** 2467,2474 **** * DO_WANT_TRASH, then you want all trash except that which * you explicitly excluded in your active file. */ if (!GroupMissing) { ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) --- 2491,2498 ---- * DO_WANT_TRASH, then you want all trash except that which * you explicitly excluded in your active file. */ if (!GroupMissing) { ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) *************** *** 2543,2549 **** syslog(L_ERROR, "%s cant store article", LogName); sprintf(buff, "%d cant store article", NNTP_RESENDIT_VAL); ARTlog(&Data, ART_REJECT, buff); ! if (Data.MessageID && (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) --- 2567,2573 ---- syslog(L_ERROR, "%s cant store article", LogName); sprintf(buff, "%d cant store article", NNTP_RESENDIT_VAL); ARTlog(&Data, ART_REJECT, buff); ! if ((Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) *************** *** 2584,2591 **** (void)sprintf(buff, "%d cant write article %s, %s", NNTP_RESENDIT_VAL, Data.Name, strerror(i)); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && Data.MessageID && ! (Mode == OMrunning) && !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) --- 2608,2615 ---- (void)sprintf(buff, "%d cant write article %s, %s", NNTP_RESENDIT_VAL, Data.Name, strerror(i)); ARTlog(&Data, ART_REJECT, buff); ! if (innconf->remembertrash && (Mode == OMrunning) && ! !HISremember(hash)) syslog(L_ERROR, "%s cant write history %s %m", LogName, Data.MessageID); if (distributions) *************** *** 2597,2602 **** --- 2621,2629 ---- TMRstop(TMR_ARTWRITE); p += strlen(strcpy(p, Data.Name)); Data.NameLength = strlen(Data.Name); + if (!innconf->writelinks) + /* need just one file for feeder */ + break; } else { TMRstart(TMR_ARTLINK); /* Link to the main article. */ *************** *** 2645,2653 **** ARTreject(REJECT_OTHER, cp, buff, article); return buff; } - /* If we just flushed the active (above), now flush history. */ - if (ICDactivedirty == 0) - HISsync(); /* We wrote the history, so modify it and save it for output. */ if (innconf->storageapi) { --- 2672,2677 ---- *************** *** 2691,2697 **** if (Accepted) { if (ControlHeader >= 0) { TMRstart(TMR_ARTCTRL); ! ARTcontrol(&Data, hash, HDR(ControlHeader)); TMRstop(TMR_ARTCTRL); } p = HDR(_supersedes); --- 2715,2721 ---- if (Accepted) { if (ControlHeader >= 0) { TMRstart(TMR_ARTCTRL); ! ARTcontrol(&Data, hash, HDR(ControlHeader), cp); TMRstop(TMR_ARTCTRL); } p = HDR(_supersedes); diff -Nacr inn-2.1/innd/cc.c inn-2.2/innd/cc.c *** inn-2.1/innd/cc.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/cc.c Thu Oct 8 22:28:29 1998 *************** *** 1,4 **** ! /* $Id: cc.c,v 1.42 1998/06/18 15:45:15 kondou Exp $ ** ** Routines for the control channel. Create a Unix-domain datagram socket ** that processes on the local server send messages to. The control --- 1,4 ---- ! /* $Id: cc.c,v 1.47 1998/10/08 22:28:29 kondou Exp $ ** ** Routines for the control channel. Create a Unix-domain datagram socket ** that processes on the local server send messages to. The control *************** *** 16,21 **** --- 16,22 ---- #include "clibrary.h" #include "innd.h" #include "inndcomm.h" + #include "qio.h" #if defined(HAVE_UNIX_DOMAIN_SOCKETS) #include #endif *************** *** 71,76 **** --- 72,78 ---- #endif /* defined(DO_PERL) */ STATIC STRING CClowmark(); + STATIC char *CCpath = NULL; STATIC char **CCargv; STATIC char CCnosite[] = "1 No such site"; *************** *** 81,86 **** --- 83,89 ---- STATIC char CCbigreason[] = "1 Reason too long"; STATIC char CCnotrunning[] = "1 Must be running"; STATIC BUFFER CCreply; + STATIC BUFFER CCperlbuff; STATIC CHANNEL *CCchan; STATIC int CCwriter; STATIC CCDISPATCH CCcommands[] = { *************** *** 746,752 **** Mode = OMrunning; ThrottledbyIOError = FALSE; ! if (NNRPReason && innconf->allowreaders) { av[0] = YES; av[1] = p; (void)CCreaders(av); --- 749,755 ---- Mode = OMrunning; ThrottledbyIOError = FALSE; ! if (NNRPReason && innconf->readerswhenstopped) { av[0] = YES; av[1] = p; (void)CCreaders(av); *************** *** 896,902 **** /* Newsreaders. */ *p++ = '\n'; p += strlen(strcpy(p, "Readers ")); ! if (innconf->allowreaders) p += strlen(strcpy(p, "follow ")); else p += strlen(strcpy(p, "separate ")); --- 899,905 ---- /* Newsreaders. */ *p++ = '\n'; p += strlen(strcpy(p, "Readers ")); ! if (innconf->readerswhenstopped) p += strlen(strcpy(p, "follow ")); else p += strlen(strcpy(p, "separate ")); *************** *** 1135,1141 **** syslog(L_NOTICE, "%s changed -l %ld", LogName, innconf->maxartsize); break; case 'n': ! if (!CCparsebool('n', &innconf->allowreaders, *p)) return BADVAL; break; case 'o': --- 1138,1144 ---- syslog(L_NOTICE, "%s changed -l %ld", LogName, innconf->maxartsize); break; case 'n': ! if (!CCparsebool('n', &innconf->readerswhenstopped, *p)) return BADVAL; break; case 'o': *************** *** 1208,1214 **** if (ModeReason) DISPOSE(ModeReason); ModeReason = COPY(reason); ! if (NNRPReason == NULL && innconf->allowreaders) { av[0] = NO; av[1] = ModeReason; (void)CCreaders(av); --- 1211,1217 ---- if (ModeReason) DISPOSE(ModeReason); ModeReason = COPY(reason); ! if (NNRPReason == NULL && innconf->readerswhenstopped) { av[0] = NO; av[1] = ModeReason; (void)CCreaders(av); *************** *** 1283,1288 **** --- 1286,1292 ---- { char *inndstart; char *p; + int i; if (CCargv == NULL) return "1 no argv!"; *************** *** 1297,1302 **** --- 1301,1311 ---- JustCleanup(); syslog(L_NOTICE, "%s execv %s", LogName, CCargv[0]); + + /* Close all fds to protect possible fd leaking accross successive innds. */ + for (i=3; i<30; i++) + (void)close(i); + (void)execv(CCargv[0], CCargv); syslog(L_FATAL, "%s cant execv %s %m", LogName, CCargv[0]); _exit(1); *************** *** 2031,2037 **** CCsetup(); } ! # include "qio.h" /* * Read a file containing lines of the form "newsgroup lowmark", * and reset the low article number for the specified groups. --- 2040,2317 ---- CCsetup(); } ! /* ! * The beginnings of a perl interface to the INN command set. ! * I chose to put it in this file to avoid having to rewrite any code, ! * and to avoid having to change the visibility of any of the functions ! * in this module. ! * -- Ed Mooring (mooring@acm.org) May 14, 1998 ! */ ! ! #if defined(DO_PERL) ! ! #include "EXTERN.h" ! #include "perl.h" ! #include "XSUB.h" ! ! ! XS(XS_INN_havehist) ! { ! dXSARGS; ! char* msgid; ! ! if (items != 1) ! croak("Usage: INN::havehist(msgid)"); ! ! msgid = (char *)SvPV(ST(0),na); ! if (HIShavearticle(HashMessageID(msgid))) ! XSRETURN_YES; ! else ! XSRETURN_NO; ! } ! ! XS(XS_INN_cancel) ! { ! dXSARGS; ! char* msgid; ! char* parambuf[2]; ! ! if (items != 1) ! croak("Usage: INN::cancel(msgid)"); ! ! msgid = (char *)SvPV(ST(0),na); ! parambuf[0]=msgid; ! parambuf[1]= 0; ! /* CCcancel returns NULL on success, hence reversed return codes */ ! if (CCcancel(parambuf)) ! XSRETURN_NO; ! else ! XSRETURN_YES; ! } ! ! XS(XS_INN_addhist) ! { ! dXSARGS; ! char* msgid; ! char* arrivaltime; ! char* articletime; ! char* expiretime; ! char* articlepaths = ""; ! char tbuff[12]; ! char* parambuf[6]; ! ! if (items < 1 || items > 5) ! croak("Usage INN::addhist(msgid,[arrivaltime,articletime,expiretime,paths])"); ! ! ! /* we will always have a message id */ ! msgid = (char *)SvPV(ST(0),na); ! ! /* set up sensible defaults for the time values */ ! sprintf(tbuff, "%d",time((long *)0)); ! arrivaltime = articletime = expiretime = tbuff; ! ! switch (items) { ! case 2: ! arrivaltime = (char *)SvPV(ST(1),na); ! articletime = expiretime = arrivaltime; ! break; ! case 3: ! arrivaltime = (char *)SvPV(ST(1),na); ! articletime = (char *)SvPV(ST(2),na); ! expiretime = arrivaltime; ! break; ! case 4: ! arrivaltime = (char *)SvPV(ST(1),na); ! articletime = (char *)SvPV(ST(2),na); ! expiretime = (char *)SvPV(ST(3),na); ! break; ! case 5: ! arrivaltime = (char *)SvPV(ST(1),na); ! articletime = (char *)SvPV(ST(2),na); ! expiretime = (char *)SvPV(ST(3),na); ! articlepaths = (char *)SvPV(ST(4),na); ! break; ! } ! parambuf[0] = msgid; ! parambuf[1] = arrivaltime; ! parambuf[2] = articletime; ! parambuf[3] = expiretime; ! parambuf[4] = articlepaths; ! parambuf[5] = 0; ! ! /* CCaddhist returns NULL on success, hence reversed return codes */ ! if (CCaddhist(parambuf)) ! XSRETURN_NO; ! else ! XSRETURN_YES; ! } ! ! XS(XS_INN_newsgroup) ! { ! dXSARGS; ! char* newsgroup; ! NEWSGROUP* ngp; ! ! if (items != 1) ! croak("Usage: INN::newsgroup(msgid)"); ! newsgroup = (char *)SvPV(ST(0),na); ! ! if ((ngp = NGfind(newsgroup)) == NULL) ! XSRETURN_UNDEF; ! else ! XSRETURN_PV(ngp->Rest); ! } ! ! XS(XS_INN_filesfor) ! { ! dXSARGS; ! char* msgid; ! char* files; ! ! if (items != 1) ! croak("Usage: INN::filesfor(msgid)"); ! ! msgid = (char *)SvPV(ST(0),na); ! files = HISfilesfor(HashMessageID(msgid)); ! if (files) { ! XSRETURN_PV(files); ! } ! else { ! XSRETURN_UNDEF; ! } ! } ! ! XS(XS_INN_head) ! { ! dXSARGS; ! char* msgid; ! char* p; ! char* q; ! char* bufptr; ! QIOSTATE* qp; ! ! if (items != 1) ! croak("Usage: INN::head(msgid)"); ! ! msgid = (char *)SvPV(ST(0),na); ! ! /* Get the article filenames; open the first file */ ! if ((q = HISfilesfor(HashMessageID(msgid))) == NULL) { ! XSRETURN_UNDEF; ! } ! if ((p = strchr(q, ' '))) ! *p = '\0'; ! ! if ((qp = QIOopen(q)) == NULL) { ! XSRETURN_UNDEF; ! } ! ! if (CCperlbuff.Data == NULL) { ! CCperlbuff.Size = SITE_BUFFER_SIZE; ! CCperlbuff.Data = NEW(char, CCperlbuff.Size); ! } ! ! strcpy(CCperlbuff.Data, ""); ! ! for (p = QIOread(qp); (p != NULL) && (*p != '\0'); p = QIOread(qp)) { ! if (CCperlbuff.Size < (qp->Count + 3)) { ! CCperlbuff.Size += SITE_BUFFER_SIZE; ! RENEW(CCperlbuff.Data, char, CCperlbuff.Size); ! } ! strncat(CCperlbuff.Data, p, QIOlength(qp)); ! strncat(CCperlbuff.Data, "\n", 1); ! } ! QIOclose(qp); ! XSRETURN_PV(CCperlbuff.Data); ! } ! ! XS(XS_INN_article) ! { ! dXSARGS; ! char* msgid; ! char* p; ! char* q; ! char* bufptr; ! QIOSTATE* qp; ! ! if (items != 1) ! croak("Usage: INN::article(msgid)"); ! ! msgid = (char *)SvPV(ST(0),na); ! ! /* Get the article filenames; open the first file */ ! if ((q = HISfilesfor(HashMessageID(msgid))) == NULL) { ! XSRETURN_UNDEF; ! } ! if ((p = strchr(q, ' '))) ! *p = '\0'; ! ! if ((qp = QIOopen(q)) == NULL) { ! XSRETURN_UNDEF; ! } ! ! if (CCperlbuff.Data == NULL) { ! CCperlbuff.Size = SITE_BUFFER_SIZE; ! CCperlbuff.Data = NEW(char, CCperlbuff.Size); ! } ! ! strcpy(CCperlbuff.Data, ""); ! ! for (p = QIOread(qp); (p != NULL); p = QIOread(qp)) { ! if (CCperlbuff.Size < (qp->Count + 3)) { ! CCperlbuff.Size += SITE_BUFFER_SIZE; ! RENEW(CCperlbuff.Data, char, CCperlbuff.Size); ! } ! strncat(CCperlbuff.Data, p, QIOlength(qp)); ! strcat(CCperlbuff.Data, "\n"); ! } ! QIOclose(qp); ! XSRETURN_PV(CCperlbuff.Data); ! } ! ! XS(XS_INN_syslog) ! { ! dXSARGS; ! char* loglevel; ! char* logmsg; ! int priority; ! ! if (items != 2) ! croak("Usage: INN::syslog(level, message)"); ! ! loglevel = (char *)SvPV(ST(0),na); ! logmsg = (char *)SvPV(ST(1),na); ! ! switch (*loglevel) { ! default: priority = LOG_NOTICE ; ! case 'a': case 'A': priority = LOG_ALERT ; break; ! case 'c': case 'C': priority = LOG_CRIT ; break; ! case 'e': case 'E': priority = LOG_ERR ; break; ! case 'w': case 'W': priority = LOG_WARNING ; break; ! case 'n': case 'N': priority = LOG_NOTICE ; break; ! case 'i': case 'I': priority = LOG_INFO ; break; ! case 'd': case 'D': priority = LOG_DEBUG ; break; ! } ! syslog(priority, "filter: %s", logmsg); ! XSRETURN_UNDEF; ! } ! ! ! void ! PERLinndAPIinit() ! { ! newXS("INN::havehist", XS_INN_havehist, "cc.c"); ! newXS("INN::cancel", XS_INN_cancel, "cc.c"); ! newXS("INN::addhist", XS_INN_addhist, "cc.c"); ! newXS("INN::newsgroup", XS_INN_newsgroup, "cc.c"); ! newXS("INN::filesfor", XS_INN_filesfor, "cc.c"); ! newXS("INN::head", XS_INN_head, "cc.c"); ! newXS("INN::article", XS_INN_article, "cc.c"); ! newXS("INN::syslog", XS_INN_syslog, "cc.c"); ! } ! #endif ! /* * Read a file containing lines of the form "newsgroup lowmark", * and reset the low article number for the specified groups. diff -Nacr inn-2.1/innd/chan.c inn-2.2/innd/chan.c *** inn-2.1/innd/chan.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/chan.c Wed Nov 11 22:56:12 1998 *************** *** 1,4 **** ! /* $Id: chan.c,v 1.28 1998/07/02 02:16:58 kondou Exp $ ** ** I/O channel (and buffer) processing. */ --- 1,4 ---- ! /* $Id: chan.c,v 1.32.2.1 1998/11/11 22:56:12 kondou Exp $ ** ** I/O channel (and buffer) processing. */ *************** *** 85,90 **** --- 85,108 ---- *b2 = b; } + /* + ** Trim '\r' from buffer. + */ + void BUFFtrimcr(BUFFER *bp) + { + char *p, *q; + int trimmed = 0; + + for (p = q = bp->Data ; p < bp->Data + bp->Left ; p++) { + if (*p == '\r' && p+1 < bp->Data + bp->Left && p[1] == '\n') { + trimmed++; + continue; + } + *q++ = *p; + } + bp->Left -= trimmed; + } + /* ** Initialize all the I/O channels. *************** *** 161,172 **** --- 179,197 ---- cp->Rest=0; cp->SaveUsed=0; cp->Lastch=0; + cp->MaxCnx=0; + cp->ActiveCnx=0; HashClear(&cp->CurrentMessageIDHash); memset(cp->PrecommitWIP, '\0', sizeof(cp->PrecommitWIP)); cp->PrecommitiCachenext=0; /* Make the descriptor close-on-exec and non-blocking. */ CloseOnExec(fd, TRUE); + #if !defined(HPUX) + /* Stupid HPUX 11.0 has a broken listen/accept where setting the + * listensocket to nonblocking prevents you from successfully setting the + * socket returned by accept(2) back to blocking mode, no matter what, + * resulting in all kinds of funny behaviour, data loss, etc. etc. */ if (SetNonBlocking(fd, TRUE) < 0 #if defined(ENOTSOCK) && errno != ENOTSOCK *************** *** 176,181 **** --- 201,207 ---- #endif /* defined(ENOTTY) */ ) syslog(L_ERROR, "%s cant nonblock %d %m", LogName, fd); + #endif /* Note control channel, for efficiency. */ if (Type == CTcontrol) { *************** *** 250,255 **** --- 276,299 ---- DISPOSE(cp->Argument); if (cp->fd >= 0 && close(cp->fd) < 0) syslog(L_ERROR, "%s cant close %s %m", LogName, name); + + if (cp->MaxCnx > 0 && cp->Type == CTnntp) { + int tfd; + CHANNEL *tempchan; + + cp->fd = -1; + for(tfd = 0; tfd < CHANlastfd; tfd++) { + tempchan = &CHANtable[tfd]; + if(tempchan->fd > 0 && + cp->Address.s_addr == tempchan->Address.s_addr) { + if(tempchan->ActiveCnx == 0) { + tempchan->ActiveCnx = cp->ActiveCnx; + RCHANadd(tempchan); + break; + } + } + } + } } /* Mark it unused. */ *************** *** 523,531 **** --- 567,577 ---- BUFFER *bp; char *p; int oerrno; + int maxbyte; /* Grow buffer if we're getting close to current limit. */ bp = &cp->In; + bp->Left = bp->Size - bp->Used; if (bp->Left <= LOW_WATER) { i = GROW_AMOUNT(bp->Size); bp->Size += i; *************** *** 549,557 **** * data, or less. BUFSIZ is often about 1 kilobyte, and is * attractive for other reasons, so let's use that as our size limit. */ ! bp->Left = bp->Size - bp->Used; ! i = read(cp->fd, &bp->Data[bp->Used], ! (bp->Left - 1 > BUFSIZ ? BUFSIZ : bp->Left - 1)); if (i < 0) { #ifdef POLL_BUG /* return of -2 indicates EAGAIN, for SUNOS5.4 poll() bug workaround */ --- 595,605 ---- * data, or less. BUFSIZ is often about 1 kilobyte, and is * attractive for other reasons, so let's use that as our size limit. */ ! /* ! * Reduce the read size only if we are reading commands. ! */ ! maxbyte = (cp->State != CSgetcmd || bp->Left < BUFSIZ) ? bp->Left : BUFSIZ; ! i = read(cp->fd, &bp->Data[bp->Used], maxbyte-1); if (i < 0) { #ifdef POLL_BUG /* return of -2 indicates EAGAIN, for SUNOS5.4 poll() bug workaround */ *************** *** 859,864 **** --- 907,914 ---- fd = 0; else fd++; + cp->ActiveCnx = 0; + RCHANremove(cp); } continue; } diff -Nacr inn-2.1/innd/his.c inn-2.2/innd/his.c *** inn-2.1/innd/his.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/his.c Sat Dec 26 16:16:10 1998 *************** *** 1,4 **** ! /* $Id: his.c,v 1.32 1998/07/06 07:21:00 kondou Exp $ ** ** History file routines. */ --- 1,4 ---- ! /* $Id: his.c,v 1.33.2.4 1998/12/26 16:16:10 kondou Exp $ ** ** History file routines. */ *************** *** 28,33 **** --- 28,34 ---- STATIC int HIShitneg; /* The entry existed in the cache but not in history */ STATIC int HISmisses; /* The entry was not in the cache, but was in the history file */ STATIC int HISdne; /* The entry was not in cache or history */ + STATIC time_t HISlastlog; /* Last time that we logged stats */ /* ** Put an entry into the history cache *************** *** 81,86 **** --- 82,95 ---- syslog(L_FATAL, "%s cant fopen %s %m", LogName, HIShistpath); exit(1); } + /* fseek to the end of file because the result of ftell() is undefined + for files freopen()-ed in append mode according to POSIX 1003.1. + ftell() is used later on to determine a new article's offset + in the history file. Fopen() uses freopen() internally. */ + if (fseek(HISwritefp, 0L, SEEK_END) == -1) { + syslog(L_FATAL, "cant fseek to end of %s %m", HIShistpath); + exit(1); + } CloseOnExec((int)fileno(HISwritefp), TRUE); /* Open the history file for reading. */ *************** *** 136,141 **** --- 145,158 ---- TMRstop(TMR_HISSYNC); } + + STATIC void HISlogstats() { + syslog(L_NOTICE, "ME HISstats %d hitpos %d hitneg %d missed %d dne", + HIShitpos, HIShitneg, HISmisses, HISdne); + HIShitpos = HIShitneg = HISmisses = HISdne = 0; + } + + /* ** Close the history files. */ *************** *** 153,158 **** --- 170,177 ---- HISreadfd = -1; } if (HIScache) { + HISlogstats(); /* print final HISstats */ + HISlastlog = Now.time; DISPOSE(HIScache); HIScache = NULL; HIScachesize = 0; *************** *** 247,259 **** return dest; } - STATIC void HISlogstats() { - syslog(L_NOTICE, "ME HISstats %d hitpos %d hitneg %d missed %d dne", - HIShitpos, HIShitneg, HISmisses, HISdne); - HIShitpos = HIShitneg = HISmisses = HISdne = 0; - } - - /* ** Have we already seen an article? --- 266,271 ---- *************** *** 261,271 **** BOOL HIShavearticle(const HASH MessageID) { BOOL val; - STATIC time_t lastlog; /* Last time that we logged stats */ ! if ((Now.time - lastlog) > 3600) { HISlogstats(); ! lastlog = Now.time; } TMRstart(TMR_HISHAVE); --- 273,282 ---- BOOL HIShavearticle(const HASH MessageID) { BOOL val; ! if ((Now.time - HISlastlog) > 3600) { HISlogstats(); ! HISlastlog = Now.time; } TMRstart(TMR_HISHAVE); *************** *** 320,326 **** BOOL HISwrite(const ARTDATA *Data, const HASH hash, char *paths, TOKEN *token) { static char NOPATHS[] = ""; ! long offset; int i; #ifndef DO_TAGGED_HASH void *ivalue; --- 331,337 ---- BOOL HISwrite(const ARTDATA *Data, const HASH hash, char *paths, TOKEN *token) { static char NOPATHS[] = ""; ! OFFSET_T offset; int i; #ifndef DO_TAGGED_HASH void *ivalue; *************** *** 332,340 **** return FALSE; TMRstart(TMR_HISWRITE); ! if (paths != NULL && paths[0] != '\0') ! HISslashify(paths); ! else paths = NOPATHS; offset = ftell(HISwritefp); --- 343,351 ---- return FALSE; TMRstart(TMR_HISWRITE); ! if (paths != NULL && paths[0] != '\0') { ! if (!innconf->storageapi) HISslashify(paths); ! } else paths = NOPATHS; offset = ftell(HISwritefp); *************** *** 428,434 **** */ BOOL HISremember(const HASH hash) { ! long offset; int i; #ifndef DO_TAGGED_HASH void *ivalue; --- 439,445 ---- */ BOOL HISremember(const HASH hash) { ! OFFSET_T offset; int i; #ifndef DO_TAGGED_HASH void *ivalue; diff -Nacr inn-2.1/innd/icd.c inn-2.2/innd/icd.c *** inn-2.1/innd/icd.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/icd.c Wed Oct 21 07:28:06 1998 *************** *** 1,4 **** ! /* $Id: icd.c,v 1.10 1998/05/20 10:08:09 scrappy Exp $ ** ** Routines to read and write the active file. */ --- 1,4 ---- ! /* $Id: icd.c,v 1.13 1998/10/21 07:28:06 brister Exp $ ** ** Routines to read and write the active file. */ *************** *** 83,94 **** syslog(L_FATAL, "%s internal no control and/or junk group", LogName); exit(1); } ! #if defined(DO_MERGE_TO_GROUPS) ! if (NGfind("to") == NULL) { syslog(L_FATAL, "%s internal no to group", LogName); exit(1); } - #endif /* defined(DO_MERGE_TO_GROUPS) */ SITEparsefile(StartSites); } --- 83,96 ---- syslog(L_FATAL, "%s internal no control and/or junk group", LogName); exit(1); } ! if (innconf->usecontrolchan && NGfind("control.cancel") == NULL) { ! syslog(L_FATAL, "%s internal no control.cancel group", LogName); ! exit(1); ! } ! if (innconf->mergetogroups && NGfind("to") == NULL) { syslog(L_FATAL, "%s internal no to group", LogName); exit(1); } SITEparsefile(StartSites); } *************** *** 394,400 **** exit(1); } #else ! if (msync(ICDactpointer, 0) < 0) { syslog(L_FATAL, "%s msync failed %s %m", LogName, ICDactpath); exit(1); } --- 396,402 ---- exit(1); } #else ! if (msync(ICDactpointer, ICDactsize) < 0) { syslog(L_FATAL, "%s msync failed %s %m", LogName, ICDactpath); exit(1); } diff -Nacr inn-2.1/innd/innd.c inn-2.2/innd/innd.c *** inn-2.1/innd/innd.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/innd.c Sat Sep 5 15:04:28 1998 *************** *** 1,4 **** ! /* $Id: innd.c,v 1.38 1998/05/25 22:40:20 kondou Exp $ ** ** Variable definitions, miscellany, and main(). */ --- 1,4 ---- ! /* $Id: innd.c,v 1.40 1998/09/05 15:04:28 kondou Exp $ ** ** Variable definitions, miscellany, and main(). */ *************** *** 639,646 **** default: Usage(); /* NOTREACHED */ ! case 'n': innconf->allowreaders = TRUE; break; ! case 'y': innconf->allowreaders = FALSE; break; } break; case 'o': --- 639,646 ---- default: Usage(); /* NOTREACHED */ ! case 'n': innconf->readerswhenstopped = TRUE; break; ! case 'y': innconf->readerswhenstopped = FALSE; break; } break; case 'o': *************** *** 688,694 **** ac -= optind; if (ac != 0) Usage(); ! if (ModeReason && innconf->allowreaders) NNRPReason = COPY(ModeReason); openlog(path, logflags, LOG_INN_SERVER); --- 688,694 ---- ac -= optind; if (ac != 0) Usage(); ! if (ModeReason && innconf->readerswhenstopped) NNRPReason = COPY(ModeReason); openlog(path, logflags, LOG_INN_SERVER); *************** *** 927,932 **** --- 927,933 ---- p = COPY(cpcatpath(innconf->pathfilter, _PATH_PERL_STARTUP_INND)); PERLsetup(p, cpcatpath(innconf->pathfilter, _PATH_PERL_FILTER_INND), "filter_art"); + PERLinndAPIinit(); PerlFilter (TRUE) ; DISPOSE(p); #endif /* defined(DO_PERL) */ diff -Nacr inn-2.1/innd/innd.h inn-2.2/innd/innd.h *** inn-2.1/innd/innd.h Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/innd.h Thu Oct 8 22:28:29 1998 *************** *** 1,4 **** ! /* $Revision: 1.41 $ ** ** Many of the data types used here have abbreviations, such as CT ** for CHANNELTYPE. Here are a list of the conventions and meanings: --- 1,4 ---- ! /* $Revision: 1.44 $ ** ** Many of the data types used here have abbreviations, such as CT ** for CHANNELTYPE. Here are a list of the conventions and meanings: *************** *** 136,145 **** typedef struct _CHANNEL { CHANNELTYPE Type; CHANNELSTATE State; BOOL Skip; BOOL Streaming; BOOL NoResendId; - int fd; u_long Duplicate; u_long Unwanted_s; u_long Unwanted_f; --- 136,145 ---- typedef struct _CHANNEL { CHANNELTYPE Type; CHANNELSTATE State; + int fd; BOOL Skip; BOOL Streaming; BOOL NoResendId; u_long Duplicate; u_long Unwanted_s; u_long Unwanted_f; *************** *** 485,490 **** --- 485,491 ---- extern void BUFFset(BUFFER *bp, const char *p, const int length); extern void BUFFswap(BUFFER *b1, BUFFER *b2); extern void BUFFappend(BUFFER *bp, const char *p, const int len); + extern void BUFFtrimcr(BUFFER *bp); extern BOOL CHANsleeping(CHANNEL *cp); extern CHANNEL *CHANcreate(int fd, CHANNELTYPE Type, CHANNELSTATE STate, FUNCPTR Reader, FUNCPTR WriteDone); *************** *** 515,521 **** extern STRING CCcheckfile(); extern BOOL HIShavearticle(const HASH MessageID); ! extern BOOL HISwrite(const ARTDATA *Data, HASH hash, char *paths, TOKEN *token); extern BOOL HISremember(const HASH MessageID); extern char *HISfilesfor(const HASH MessageID); extern void HISclose(void); --- 516,522 ---- extern STRING CCcheckfile(); extern BOOL HIShavearticle(const HASH MessageID); ! extern BOOL HISwrite(const ARTDATA *Data, const HASH hash, char *paths, TOKEN *token); extern BOOL HISremember(const HASH MessageID); extern char *HISfilesfor(const HASH MessageID); extern void HISclose(void); diff -Nacr inn-2.1/innd/nc.c inn-2.2/innd/nc.c *** inn-2.1/innd/nc.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/nc.c Sun Jan 17 23:15:13 1999 *************** *** 1,4 **** ! /* $Id: nc.c,v 1.35 1998/07/16 23:04:21 kondou Exp $ ** ** Routines for the NNTP channel. Other channels get the descriptors which ** we turn into NNTP channels, and over which we speak NNTP. --- 1,4 ---- ! /* $Id: nc.c,v 1.37.2.4 1999/01/17 23:15:13 kondou Exp $ ** ** Routines for the NNTP channel. Other channels get the descriptors which ** we turn into NNTP channels, and over which we speak NNTP. *************** *** 471,477 **** else cp->Sendid.Size = MAXHEADERSIZE; cp->Sendid.Data = NEW(char, cp->Sendid.Size); } ! (void)sprintf(cp->Sendid.Data, "%d %s", NNTP_ERR_GOTID_VAL, p); NCwritereply(cp, cp->Sendid.Data); return; } --- 471,477 ---- else cp->Sendid.Size = MAXHEADERSIZE; cp->Sendid.Data = NEW(char, cp->Sendid.Size); } ! (void)sprintf(cp->Sendid.Data, "%d %s", NNTP_HAVEIT_VAL, perlrc); NCwritereply(cp, cp->Sendid.Data); return; } *************** *** 484,490 **** } else if (WIPinprogress(p, cp, FALSE)) { cp->Ihave_Deferred++; ! NCwritereply(cp, NNTP_RESENDIT_LATER); } else { cp->Ihave_SendIt++; --- 484,495 ---- } else if (WIPinprogress(p, cp, FALSE)) { cp->Ihave_Deferred++; ! if (cp->NoResendId) { ! cp->Refused++; ! NCwritereply(cp, NNTP_HAVEIT); ! } else { ! NCwritereply(cp, NNTP_RESENDIT_LATER); ! } } else { cp->Ihave_SendIt++; *************** *** 560,570 **** --- 565,583 ---- if (caseEQ(p, "newsgroups")) { trash = p = ReadInFile(cpcatpath(innconf->pathdb, _PATH_NEWSGROUPS), (struct stat *)NULL); + if (p == NULL) { + NCwritereply(cp, NCdot); + return; + } end = p + strlen(p); } else if (caseEQ(p, "active.times")) { trash = p = ReadInFile(cpcatpath(innconf->pathdb, _PATH_ACTIVETIMES), (struct stat *)NULL); + if (p == NULL) { + NCwritereply(cp, NCdot); + return; + } end = p + strlen(p); } else if (*p == '\0' || (caseEQ(p, "active"))) { *************** *** 602,608 **** for (p = cp->In.Data + STRLEN("mode"); ISWHITE(*p); p++) continue; ! if (caseEQ(p, "reader")) h = HOnnrpd; else if (caseEQ(p, "stream") && (!StreamingOff && cp->Streaming)) { --- 615,621 ---- for (p = cp->In.Data + STRLEN("mode"); ISWHITE(*p); p++) continue; ! if (caseEQ(p, "reader") && !innconf->noreader) h = HOnnrpd; else if (caseEQ(p, "stream") && (!StreamingOff && cp->Streaming)) { *************** *** 643,648 **** --- 656,666 ---- char *p; int i; + if (innconf->storageapi) { + /* not available for storageapi */ + NCwritereply(cp, NNTP_BAD_COMMAND); + return; + } /* Nip off the Message-ID. */ for (p = cp->In.Data + STRLEN("xpath"); ISWHITE(*p); p++) continue; *************** *** 898,903 **** --- 916,922 ---- if (Mode == OMpaused) { /* defer processing while paused */ cp->Rest = 0; bp->Used = cp->SaveUsed; + RCHANremove(cp); /* don't bother trying to read more for now */ SCHANadd(cp, (time_t)(Now.time + innconf->pauseretrytime), (POINTER)&Mode, NCproc, (POINTER)NULL); return; diff -Nacr inn-2.1/innd/newsfeeds.c inn-2.2/innd/newsfeeds.c *** inn-2.1/innd/newsfeeds.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/newsfeeds.c Thu Jan 7 10:19:53 1999 *************** *** 1,4 **** ! /* $Id: newsfeeds.c,v 1.18 1998/04/21 04:29:57 scrappy Exp $ ** ** Routines for the in-core data structures for the newsfeeds file. */ --- 1,4 ---- ! /* $Id: newsfeeds.c,v 1.18.4.2 1999/01/07 10:19:53 kondou Exp $ ** ** Routines for the in-core data structures for the newsfeeds file. */ *************** *** 320,326 **** } break; case 'O': ! sp->Originator = COPY(++p); break; case 'P': if (*++p && CTYPE(isdigit, *p)) --- 320,328 ---- } break; case 'O': ! if (*++p == '\0') ! return "missing originator name for O param in field 3"; ! sp->Originator = COPY(p); break; case 'P': if (*++p && CTYPE(isdigit, *p)) *************** *** 559,564 **** --- 561,567 ---- char *poison; STRING error; int errors; + int setuperrors; /* Free old sites info. */ if (Sites) { *************** *** 581,587 **** poison = NEW(char, nGroups); ME.Prev = 0; /* Used as a flag to ensure exactly one ME entry */ ! for (sp = Sites, errors = 0, i = 0; i < nSites; i++) { p = strings[i]; if (p[0] == 'M' && p[1] == 'E' && ((p[2] == NF_FIELD_SEP) || (p[2] == NF_SUBFIELD_SEP))) { --- 584,590 ---- poison = NEW(char, nGroups); ME.Prev = 0; /* Used as a flag to ensure exactly one ME entry */ ! for (sp = Sites, errors = 0, setuperrors = 0, i = 0; i < nSites; i++) { p = strings[i]; if (p[0] == 'M' && p[1] == 'E' && ((p[2] == NF_FIELD_SEP) || (p[2] == NF_SUBFIELD_SEP))) { *************** *** 602,608 **** } if (StartSite && !SITEsetup(sp)) { syslog(L_FATAL, "%s cant setup %m", sp->Name); ! errors++; continue; } sp->Working = TRUE; --- 605,611 ---- } if (StartSite && !SITEsetup(sp)) { syslog(L_FATAL, "%s cant setup %m", sp->Name); ! setuperrors++; continue; } sp->Working = TRUE; *************** *** 613,620 **** errors++; } ! if (errors) { ! syslog(L_FATAL, "%s syntax_error %s", LogName, SITEfeedspath); JustCleanup(); exit(1); } --- 616,626 ---- errors++; } ! if (errors && setuperrors) { ! if (errors) ! syslog(L_FATAL, "%s syntax_error %s", LogName, SITEfeedspath); ! if (setuperrors) ! syslog(L_FATAL, "%s setup_error %s", LogName, SITEfeedspath); JustCleanup(); exit(1); } diff -Nacr inn-2.1/innd/ng.c inn-2.2/innd/ng.c *** inn-2.1/innd/ng.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/ng.c Tue Oct 6 14:25:29 1998 *************** *** 1,4 **** ! /* $Id: ng.c,v 1.12 1998/05/18 23:39:15 kondou Exp $ ** ** Routine for the in-core data structures for the active and newsfeeds ** files. --- 1,4 ---- ! /* $Id: ng.c,v 1.15 1998/10/06 14:25:29 brister Exp $ ** ** Routine for the in-core data structures for the active and newsfeeds ** files. *************** *** 179,186 **** /* Get active file and space for group entries. */ active = ICDreadactive(&end); ! for (p = active, i = 0; p < end && (p = strchr(p, '\n')) != NULL; p++, i++) ! continue; if ((nGroups = i) == 0) { syslog(L_FATAL, "%s empty active file", LogName); exit(1); --- 179,186 ---- /* Get active file and space for group entries. */ active = ICDreadactive(&end); ! for (p = active, i = 0; p < end; p++) ! if (*p == '\n') i++; if ((nGroups = i) == 0) { syslog(L_FATAL, "%s empty active file", LogName); exit(1); *************** *** 375,417 **** innconf->overviewname); if ((fi = Fopen(p, "r", TEMPORARYOPEN)) == NULL) { DISPOSE(p); - return TRUE; - } - DISPOSE(p); - if (innconf->overviewmmap) { - if (fstat(fileno(fi), &sb) < 0) { - Fclose(fi); - return TRUE; - } - count = sb.st_size / OVERINDEXPACKSIZE; - if (count == 0) { - Fclose(fi); - return TRUE; - } - if ((mapped = (char (*)[][OVERINDEXPACKSIZE])mmap((MMAP_PTR)0, count * OVERINDEXPACKSIZE, - PROT_READ, MAP__ARG, fileno(fi), 0)) == (char (*)[][OVERINDEXPACKSIZE])-1) { - Fclose(fi); - return TRUE; - } - Fclose(fi); - /* assumes .overview.index is sorted */ - UnpackOverIndex((*mapped)[0], &index); - if (index.artnum < lomark) - lomark = index.artnum; - UnpackOverIndex((*mapped)[count-1], &index); - if (index.artnum > himark) - himark = index.artnum; - if ((munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE)) < 0) - return TRUE; } else { ! while (fread(&packed, OVERINDEXPACKSIZE, 1, fi) == 1) { ! UnpackOverIndex(packed, &index); if (index.artnum < lomark) lomark = index.artnum; if (index.artnum > himark) himark = index.artnum; } - Fclose(fi); } } else { /* Scan the directory. */ --- 375,417 ---- innconf->overviewname); if ((fi = Fopen(p, "r", TEMPORARYOPEN)) == NULL) { DISPOSE(p); } else { ! DISPOSE(p); ! if (innconf->overviewmmap) { ! if (fstat(fileno(fi), &sb) < 0) { ! Fclose(fi); ! return TRUE; ! } ! count = sb.st_size / OVERINDEXPACKSIZE; ! if (count == 0) { ! Fclose(fi); ! return TRUE; ! } ! if ((mapped = (char (*)[][OVERINDEXPACKSIZE])mmap((MMAP_PTR)0, count * OVERINDEXPACKSIZE, ! PROT_READ, MAP__ARG, fileno(fi), 0)) == (char (*)[][OVERINDEXPACKSIZE])-1) { ! Fclose(fi); ! return TRUE; ! } ! Fclose(fi); ! /* assumes .overview.index is sorted */ ! UnpackOverIndex((*mapped)[0], &index); if (index.artnum < lomark) lomark = index.artnum; + UnpackOverIndex((*mapped)[count-1], &index); if (index.artnum > himark) himark = index.artnum; + if ((munmap((MMAP_PTR)mapped, count * OVERINDEXPACKSIZE)) < 0) + return TRUE; + } else { + while (fread(packed, OVERINDEXPACKSIZE, 1, fi) == 1) { + UnpackOverIndex(packed, &index); + if (index.artnum < lomark) + lomark = index.artnum; + if (index.artnum > himark) + himark = index.artnum; + } + Fclose(fi); } } } else { /* Scan the directory. */ diff -Nacr inn-2.1/innd/rc.c inn-2.2/innd/rc.c *** inn-2.1/innd/rc.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/rc.c Tue Jan 19 03:14:56 1999 *************** *** 1,4 **** ! /* $Id: rc.c,v 1.29 1998/07/02 02:17:23 kondou Exp $ ** ** Routines for the remote connect channel. Create an Internet stream socket ** that processes connect to. If the incoming site is not one of our feeds, --- 1,4 ---- ! /* $Id: rc.c,v 1.31.2.2 1999/01/19 03:14:56 kondou Exp $ ** ** Routines for the remote connect channel. Create an Internet stream socket ** that processes connect to. If the incoming site is not one of our feeds, *************** *** 469,475 **** break; } ! /* If not a server, and not allowing anyone, hand him off. */ if ((i >= 0) && !rp->Skip) { new = NCcreate(fd, rp->Password[0] != '\0', FALSE); new->Streaming = rp->Streaming; --- 469,476 ---- break; } ! /* If not a server, and not allowing anyone, hand him off unless ! not spawning nnrpd in which case we return an error. */ if ((i >= 0) && !rp->Skip) { new = NCcreate(fd, rp->Password[0] != '\0', FALSE); new->Streaming = rp->Streaming; *************** *** 478,488 **** new->MaxCnx = rp->MaxCnx; } else if (AnyIncoming && !rp->Skip) { new = NCcreate(fd, FALSE, FALSE); ! } else { RChandoff(fd, HOnntpd); if (close(fd) < 0) syslog(L_ERROR, "%s cant close %d %m", LogName, fd); return; } new->Address.s_addr = remote.sin_addr.s_addr; --- 479,501 ---- new->MaxCnx = rp->MaxCnx; } else if (AnyIncoming && !rp->Skip) { new = NCcreate(fd, FALSE, FALSE); ! } else if (!innconf->noreader) { RChandoff(fd, HOnntpd); if (close(fd) < 0) syslog(L_ERROR, "%s cant close %d %m", LogName, fd); return; + } else { + reject_val = NNTP_ACCESS_VAL; + reject_message = NNTP_ACCESS; + new = CHANcreate(fd, CTreject, CSwritegoodbye, RCrejectreader, + RCrejectwritedone); + new->Address.s_addr = remote.sin_addr.s_addr; + new->Rejected = reject_val; + RCHANremove(new); + WCHANset(new, reject_message, (int)strlen(reject_message)); + WCHANappend(new, RCterm, STRLEN(RCterm)); + WCHANadd(new); + return; } new->Address.s_addr = remote.sin_addr.s_addr; *************** *** 801,811 **** if (peer_params.Label != NULL) { RCadddata(data, &infocount, K_END_PEER, T_STRING, NULL); ! /* Hostname */ ! if (peer_params.Name == NULL) { ! syslog(L_ERROR, HOST_NEEDED, LogName, filename, linecount); ! break; ! } for(r = q = RCCommaSplit(COPY(peer_params.Name)); *q != NULL; q++) { (*count)++; --- 814,823 ---- if (peer_params.Label != NULL) { RCadddata(data, &infocount, K_END_PEER, T_STRING, NULL); ! /* Hostname defaults to label if not given */ ! if (peer_params.Name == NULL) ! peer_params.Name = COPY(peer_params.Label); ! for(r = q = RCCommaSplit(COPY(peer_params.Name)); *q != NULL; q++) { (*count)++; *************** *** 835,840 **** --- 847,854 ---- /* Host specified as a text name ? */ if ((hp = gethostbyname(*q)) == NULL) { syslog(L_ERROR, "%s cant gethostbyname %s %m", LogName, *q); + /* decrement *count, since we never got to add this record. */ + (*count)--; continue; } *************** *** 1202,1213 **** /* Write a standard header.. */ /* Find the filename */ ! p = cpcatpath(innconf->pathetc, _PATH_INNDHOSTS); for (r = q = p; *p; p++) if (*p == '/') q = p + 1; ! fprintf (F, "## $Revision: 1.29 $\n"); fprintf (F, "## %s - names and addresses that feed us news\n", q); DISPOSE(r); fprintf (F, "##\n\n"); --- 1216,1227 ---- /* Write a standard header.. */ /* Find the filename */ ! p = COPY(cpcatpath(innconf->pathetc, _PATH_INNDHOSTS)); for (r = q = p; *p; p++) if (*p == '/') q = p + 1; ! fprintf (F, "## $Revision: 1.31.2.2 $\n"); fprintf (F, "## %s - names and addresses that feed us news\n", q); DISPOSE(r); fprintf (F, "##\n\n"); diff -Nacr inn-2.1/innd/status.c inn-2.2/innd/status.c *** inn-2.1/innd/status.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innd/status.c Mon Aug 24 16:29:51 1998 *************** *** 1,5 **** ! /* $Id: status.c,v 1.11 1998/06/09 10:53:49 scrappy Exp $ */ #include #include --- 1,5 ---- ! /* $Id: status.c,v 1.12 1998/08/24 16:29:51 kondou Exp $ */ #include #include *************** *** 16,22 **** #define MAX_PEER 100 #define MIN_REFRESH 60 /* 1 min */ #define HTML_STATUS ! #define STATUS_FILE "inn.status" /* will be in pathhttp */ typedef struct _STATUS { char name[SMBUF]; --- 16,22 ---- #define MAX_PEER 100 #define MIN_REFRESH 60 /* 1 min */ #define HTML_STATUS ! #define STATUS_FILE "inn.status" /* will be in pathlog/pathhttp */ typedef struct _STATUS { char name[SMBUF]; *************** *** 112,118 **** --- 112,122 ---- extern int PerlFilterActive; #endif /* defined(DO_PERL) */ + #if defined(HTML_STATUS) sprintf (TempString, "%s/%s", innconf->pathhttp, STATUS_FILE); + #else + sprintf (TempString, "%s/%s", innconf->pathlog, STATUS_FILE); + #endif if ((F = Fopen(TempString, "w", TEMPORARYOPEN)) == NULL) return; diff -Nacr inn-2.1/innfeed/Makefile inn-2.2/innfeed/Makefile *** inn-2.1/innfeed/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/Makefile Thu Jan 21 10:30:24 1999 *************** *** 1,4 **** ! ## $Revision: 1.27 $ include ../Makefile.global ###################################################################### --- 1,4 ---- ! ## $Revision: 1.28.2.1 $ include ../Makefile.global ###################################################################### *************** *** 12,18 **** CPP.c = $(CC) $(CFLAGS) -E -I. COMPILE.c = $(CC) $(CFLAGS) -c -I. LINK.o = $(LIBTOOL) $(CC) $(LDFLAGS) ($LIBS) ! LINK.c = $(LIBTOOL) $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) OUTPUT_OPTION = -o $@ --- 12,18 ---- CPP.c = $(CC) $(CFLAGS) -E -I. COMPILE.c = $(CC) $(CFLAGS) -c -I. LINK.o = $(LIBTOOL) $(CC) $(LDFLAGS) ($LIBS) ! LINK.c = $(LIBTOOL) $(CC) $(CFLAGS) $(LDFLAGS) OUTPUT_OPTION = -o $@ *************** *** 73,79 **** MORE_WARN = -Wconversion ! VERSION = 0.10.1 COMPRESS = gzip COMPRESS_EXT = gz TARSRC = $(SRC) $(INCS) Makefile README INSTALL innfeed.conf \ --- 73,79 ---- MORE_WARN = -Wconversion ! VERSION = 1.0 COMPRESS = gzip COMPRESS_EXT = gz TARSRC = $(SRC) $(INCS) Makefile README INSTALL innfeed.conf \ *************** *** 108,114 **** install: $(ALL_INSTALLED) innfeed: $(OBJS) version.o $(MALLOC) $(LIBNEWS) ! $(LINK.c) -o $@ $(OBJS) version.o $(LIBNEWS) $(LIBNEWS) $D$(PATHBIN)/innfeed: innfeed $(LIBTOOL) ../installit.sh $(OWNER) -m 550 -b .OLD $? $@ --- 108,114 ---- install: $(ALL_INSTALLED) innfeed: $(OBJS) version.o $(MALLOC) $(LIBNEWS) ! $(LINK.c) -o $@ $(OBJS) version.o $(LIBNEWS) $(LIBNEWS) $(LIBS) $D$(PATHBIN)/innfeed: innfeed $(LIBTOOL) ../installit.sh $(OWNER) -m 550 -b .OLD $? $@ *************** *** 165,174 **** $(COMPILE.c) $? startinnfeed: startinnfeed.o $(EXTRA_SRC:.c=.o) ! $(LINK.c) -o $@ $? $(LIBNEWS) uio_maxiov: uio_maxiov.o ! $(LINK.c) -o $@ uio_maxiov.o check-maxiov: uio_maxiov @./uio_maxiov --- 165,174 ---- $(COMPILE.c) $? startinnfeed: startinnfeed.o $(EXTRA_SRC:.c=.o) ! $(LINK.c) -o $@ $? $(LIBNEWS) $(LIBS) uio_maxiov: uio_maxiov.o ! $(LINK.c) -o $@ uio_maxiov.o $(LIBS) check-maxiov: uio_maxiov @./uio_maxiov diff -Nacr inn-2.1/innfeed/connection.c inn-2.2/innfeed/connection.c *** inn-2.1/innfeed/connection.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/connection.c Sun Aug 2 23:56:01 1998 *************** *** 4,10 **** * Start Date: Thu Dec 28 13:34:47 1995 * Project: INN (innfeed) * File: connection.c ! * RCSId: $Id: connection.c,v 1.19 1998/06/03 07:23:03 kondou Exp $ * Copyright: Copyright (c) 1996 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this --- 4,10 ---- * Start Date: Thu Dec 28 13:34:47 1995 * Project: INN (innfeed) * File: connection.c ! * RCSId: $Id: connection.c,v 1.20 1998/08/02 23:56:01 kondou Exp $ * Copyright: Copyright (c) 1996 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this *************** *** 78,84 **** */ #if ! defined (lint) ! static const char *rcsid = "$Id: connection.c,v 1.19 1998/06/03 07:23:03 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } --- 78,84 ---- */ #if ! defined (lint) ! static const char *rcsid = "$Id: connection.c,v 1.20 1998/08/02 23:56:01 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } *************** *** 255,260 **** --- 255,261 ---- static u_int gCxnCount = 0 ; static u_int max_reconnect_period = MAX_RECON_PER ; static u_int init_reconnect_period = INIT_RECON_PER ; + static u_long bind_addr = INADDR_ANY; #if 0 static bool inited = false ; #endif *************** *** 363,368 **** --- 364,370 ---- int cxnConfigLoadCbk (void *data) { long iv ; + char *sv ; int rval = 1 ; FILE *fp = (FILE *) data ; *************** *** 396,401 **** --- 398,415 ---- iv = INIT_RECON_PER ; init_reconnect_period = (u_int) iv ; + if (getString (topScope,"bindaddress",&sv,NO_INHERIT)) + { + bind_addr = inet_addr(sv); + if (bind_addr == INADDR_NONE) + { + logOrPrint (LOG_ERR,fp,"innfeed unable to determine bind ip") ; + bind_addr = INADDR_ANY; + } + } + else + bind_addr = INADDR_ANY; + return rval ; } *************** *** 511,517 **** */ bool cxnConnect (Connection cxn) { ! struct sockaddr_in cxnAddr ; int fd, rval ; struct in_addr *addr = NULL; const char *peerName = hostPeerName (cxn->myHost) ; --- 525,531 ---- */ bool cxnConnect (Connection cxn) { ! struct sockaddr_in cxnAddr, cxnSelf ; int fd, rval ; struct in_addr *addr = NULL; const char *peerName = hostPeerName (cxn->myHost) ; *************** *** 557,562 **** --- 571,593 ---- cxnSleepOrDie (cxn) ; return false ; + } + + /* bind to a specified virtual host */ + if (bind_addr != INADDR_ANY) + { + memset (&cxnSelf, 0, sizeof (cxnSelf)) ; + cxnSelf.sin_family = AF_INET ; + cxnSelf.sin_port = 0 ; + cxnSelf.sin_addr.s_addr = bind_addr; + if (bind (fd, (struct sockaddr *) &cxnSelf,sizeof (cxnSelf)) < 0) + { + syslog (LOG_ERR,"bind: %m") ; + + cxnSleepOrDie (cxn) ; + + return false ; + } } /* set our file descriptor to non-blocking */ diff -Nacr inn-2.1/innfeed/innlistener.c inn-2.2/innfeed/innlistener.c *** inn-2.1/innfeed/innlistener.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/innlistener.c Sat Aug 15 05:34:59 1998 *************** *** 4,10 **** * Start Date: Thu Dec 28 13:15:04 1995 * Project: INN (innfeed) * File: innlistener.c ! * RCSId: $Id: innlistener.c,v 1.10 1998/07/06 07:23:42 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * --- 4,10 ---- * Start Date: Thu Dec 28 13:15:04 1995 * Project: INN (innfeed) * File: innlistener.c ! * RCSId: $Id: innlistener.c,v 1.11 1998/08/15 05:34:59 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * *************** *** 29,35 **** */ #if ! defined (lint) ! static const char *rcsid = "$Id: innlistener.c,v 1.10 1998/07/06 07:23:42 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } --- 29,35 ---- */ #if ! defined (lint) ! static const char *rcsid = "$Id: innlistener.c,v 1.11 1998/08/15 05:34:59 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } *************** *** 684,690 **** dropArticle (peerName,article) ; } else ! syslog (LOG_NOTICE,DYNAMIC_PEER,peerName) ; } else { --- 684,693 ---- dropArticle (peerName,article) ; } else ! { ! d_printf (1,"Giving article to peer: %s\n", peerName) ; ! hostSendArticle (newHostObj,artTakeRef (article)) ; ! } } else { diff -Nacr inn-2.1/innfeed/main.c inn-2.2/innfeed/main.c *** inn-2.1/innfeed/main.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/main.c Wed Nov 11 22:56:56 1998 *************** *** 4,10 **** * Start Date: Mon, 15 Jan 1996 17:31:58 +1100 * Project: INN -- innfeed * File: main.c ! * RCSId: $Id: main.c,v 1.18 1998/07/11 03:47:58 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * --- 4,10 ---- * Start Date: Mon, 15 Jan 1996 17:31:58 +1100 * Project: INN -- innfeed * File: main.c ! * RCSId: $Id: main.c,v 1.18.2.1 1998/11/11 22:56:56 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * *************** *** 29,35 **** */ #if ! defined (lint) ! static const char *rcsid = "$Id: main.c,v 1.18 1998/07/11 03:47:58 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } --- 29,35 ---- */ #if ! defined (lint) ! static const char *rcsid = "$Id: main.c,v 1.18.2.1 1998/11/11 22:56:56 kondou Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } *************** *** 333,339 **** } val = TRUE; ! if (!SMsetup(SM_RDWR, (void *)&val) || !SMsetup(SM_PREOPEN, (void *)&val)) { syslog(LOG_ERR, "cant setup the storage subsystem\n"); exit(1); } --- 333,339 ---- } val = TRUE; ! if (!SMsetup(SM_PREOPEN, (void *)&val)) { syslog(LOG_ERR, "cant setup the storage subsystem\n"); exit(1); } diff -Nacr inn-2.1/innfeed/startinnfeed.c inn-2.2/innfeed/startinnfeed.c *** inn-2.1/innfeed/startinnfeed.c Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/startinnfeed.c Thu Jul 30 23:36:01 1998 *************** *** 1,5 **** /* ! * $Id: startinnfeed.c,v 1.7 1998/07/21 14:43:40 kondou Exp $ * * Start innfeed and pass it all the arguments given. Sets up process * limits for innfeed. --- 1,5 ---- /* ! * $Id: startinnfeed.c,v 1.8 1998/07/30 23:36:01 kondou Exp $ * * Start innfeed and pass it all the arguments given. Sets up process * limits for innfeed. *************** *** 26,32 **** #include "clibrary.h" #include "libinn.h" ! void main(int ac, char **av, char **ep) { struct passwd *pwd; --- 26,32 ---- #include "clibrary.h" #include "libinn.h" ! int main(int ac, char **av, char **ep) { struct passwd *pwd; diff -Nacr inn-2.1/innfeed/sysconfig.h inn-2.2/innfeed/sysconfig.h *** inn-2.1/innfeed/sysconfig.h Fri Jul 24 13:13:00 1998 --- inn-2.2/innfeed/sysconfig.h Wed Jan 13 07:03:21 1999 *************** *** 4,10 **** * Start Date: Thu, 01 Feb 1996 22:17:51 +1100 * Project: INN -- innfeed * File: sysconfig.h ! * RCSId: $Id: sysconfig.h,v 1.13 1998/07/06 07:23:42 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * --- 4,10 ---- * Start Date: Thu, 01 Feb 1996 22:17:51 +1100 * Project: INN -- innfeed * File: sysconfig.h ! * RCSId: $Id: sysconfig.h,v 1.15.2.3 1999/01/13 07:03:21 kondou Exp $ * * Copyright: Copyright (c) 1996 by Internet Software Consortium * *************** *** 45,57 **** ** INNFEED PRIVATE SECTION ** ***************************************************************************/ /* ** BSD/OS */ #if defined (__bsdi__) #define MAX_WRITEV_VEC 1024 - #define HAVE_MMAP #endif /* --- 45,73 ---- ** INNFEED PRIVATE SECTION ** ***************************************************************************/ + #if defined(sinix) + /* to avoid duplicate definition when using system derived yacc */ + /* this may be ugly, but do you have another suggestion ? */ + #define yy_yyv _yy_yyv + #define yyval _yyval + #define yylval _yylval + #define yys _yys + #define yyv _yyv + #define yyexca _yyexca + #define yyact _yyact + #define yypact _yypact + #define yypgo _yypgo + #define yyr1 _yyr1 + #define yyr2 _yyr2 + #define yychk _yychk + #define yydef _yydef + #endif /* ** BSD/OS */ #if defined (__bsdi__) #define MAX_WRITEV_VEC 1024 #endif /* *************** *** 69,75 **** #if defined (__FreeBSD__) #define MAX_WRITEV_VEC 1024 - #define HAVE_MMAP #endif /* --- 85,90 ---- *************** *** 79,85 **** #if defined (__NetBSD__) #define MAX_WRITEV_VEC 1024 - #define HAVE_MMAP #endif --- 94,99 ---- *************** *** 93,99 **** number to use. Lower than that, and you should use 1. */ #define MAX_WRITEV_VEC 1 #undef DO_NEED_SYS_SELECT - #define HAVE_MMAP 1 #define USE_SIGACTION #endif --- 107,112 ---- *************** *** 131,139 **** #define GETSOCKOPT_ARG char * #define MAX_WRITEV_VEC 16 #define DO_NEED_STREAM 1 - #define HAVE_MMAP #define MAX_STDIO_FD 256 /* this may be needed for solaris version < 2.6 */ /* #define wait3(a,b,c) waitpid(-1,a,b) */ --- 144,167 ---- #define GETSOCKOPT_ARG char * #define MAX_WRITEV_VEC 16 #define DO_NEED_STREAM 1 #define MAX_STDIO_FD 256 + /* to avoid duplicate definition when using system derived yacc */ + /* this may be ugly, but do you have another suggestion ? */ + #define yy_yyv _yy_yyv + #define yyval _yyval + #define yylval _yylval + #define yys _yys + #define yyv _yyv + #define yyexca _yyexca + #define yyact _yyact + #define yypact _yypact + #define yypgo _yypgo + #define yyr1 _yyr1 + #define yyr2 _yyr2 + #define yychk _yychk + #define yydef _yydef + /* this may be needed for solaris version < 2.6 */ /* #define wait3(a,b,c) waitpid(-1,a,b) */ *************** *** 147,155 **** #if defined (sun) && ! defined (__SVR4) #define MAX_WRITEV_VEC 16 #define DO_NEED_STRERROR 1 - #define HAVE_MMAP #define MAX_STDIO_FD 128 #define atexit(arg) on_exit (arg,0) #endif --- 175,199 ---- #if defined (sun) && ! defined (__SVR4) #define MAX_WRITEV_VEC 16 #define DO_NEED_STRERROR 1 #define MAX_STDIO_FD 128 #define atexit(arg) on_exit (arg,0) + + /* to avoid duplicate definition when using system derived yacc */ + /* this may be ugly, but do you have another suggestion ? */ + #define yy_yyv _yy_yyv + #define yyval _yyval + #define yylval _yylval + #define yys _yys + #define yyv _yyv + #define yyexca _yyexca + #define yyact _yyact + #define yypact _yypact + #define yypgo _yypgo + #define yyr1 _yyr1 + #define yyr2 _yyr2 + #define yychk _yychk + #define yydef _yydef + #endif *************** *** 160,166 **** #if defined (__sgi) #define MAX_WRITEV_VEC 16 /* actually bigger on 5.2, but this on 5.3 and 6.x */ - #define HAVE_MMAP #endif --- 204,209 ---- *************** *** 173,183 **** #define MAX_WRITEV_VEC 16 #define DO_NEED_STREAM 1 #define NO_SBRK 1 - #if ! defined(__GNUC__) #define yy_yyv _yy_yyv #define yyval _yyval #define yylval _yylval ! #endif #endif --- 216,234 ---- #define MAX_WRITEV_VEC 16 #define DO_NEED_STREAM 1 #define NO_SBRK 1 #define yy_yyv _yy_yyv #define yyval _yyval #define yylval _yylval ! #define yys _yys ! #define yyv _yyv ! #define yyexca _yyexca ! #define yyact _yyact ! #define yypact _yypact ! #define yypgo _yypgo ! #define yyr1 _yyr1 ! #define yyr2 _yyr2 ! #define yychk _yychk ! #define yydef _yydef #endif diff -Nacr inn-2.1/lib/Makefile inn-2.2/lib/Makefile *** inn-2.1/lib/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/Makefile Fri Sep 4 10:07:35 1998 *************** *** 1,4 **** ! ## $Revision: 1.30 $ include ../Makefile.global CC = $(LIBCC) --- 1,4 ---- ! ## $Revision: 1.35 $ include ../Makefile.global CC = $(LIBCC) *************** *** 19,25 **** SOURCES = $(MISSING_SRC) \ checkart.c cleanfrom.c clientactive.c clientlib.c closeonexec.c \ ! dbz.c defdist.c findheader.c genid.c getconfig.c getdtab.c \ getfqdn.c getmodaddr.c gettime.c hash.c inndcomm.c innvers.c localopen.c \ lockfile.c makedir.c md5.c nonblocking.c over.c parsedate.c perl.c radix32.c\ readin.c remopen.c reservedfd.c resource.c sendarticle.c sendpass.c tempname.c \ --- 19,25 ---- SOURCES = $(MISSING_SRC) \ checkart.c cleanfrom.c clientactive.c clientlib.c closeonexec.c \ ! conffile.c dbz.c defdist.c findheader.c genid.c getconfig.c getdtab.c \ getfqdn.c getmodaddr.c gettime.c hash.c inndcomm.c innvers.c localopen.c \ lockfile.c makedir.c md5.c nonblocking.c over.c parsedate.c perl.c radix32.c\ readin.c remopen.c reservedfd.c resource.c sendarticle.c sendpass.c tempname.c \ *************** *** 27,33 **** xwritev.c OBJECTS = $(MISSING_OBJ) \ checkart.o cleanfrom.o clientactive.o clientlib.o closeonexec.o \ ! dbz.o defdist.o findheader.o genid.o getconfig.o getdtab.o \ getfqdn.o getmodaddr.o gettime.o hash.o inndcomm.o innvers.o localopen.o \ lockfile.o makedir.o md5.o over.o nonblocking.o parsedate.o radix32.o\ readin.o remopen.o reservedfd.o resource.o sendarticle.o sendpass.o tempname.o \ --- 27,33 ---- xwritev.c OBJECTS = $(MISSING_OBJ) \ checkart.o cleanfrom.o clientactive.o clientlib.o closeonexec.o \ ! conffile.o dbz.o defdist.o findheader.o genid.o getconfig.o getdtab.o \ getfqdn.o getmodaddr.o gettime.o hash.o inndcomm.o innvers.o localopen.o \ lockfile.o makedir.o md5.o over.o nonblocking.o parsedate.o radix32.o\ readin.o remopen.o reservedfd.o resource.o sendarticle.o sendpass.o tempname.o \ *************** *** 69,75 **** rm -f $(OBJECTS) endian: endian.c ! $(CC) $(CFLAGS) $(LDFLAGS) -o $@ endian.c ../include/autoconfig.h: endian ./endian >../include/autoconfig.h --- 69,78 ---- rm -f $(OBJECTS) endian: endian.c ! $(LIBCCWITHOUTLIBTOOL) $(CFLAGS) $(LDFLAGS) -o $@ endian.c ! ! perl.o: perl.c ! $(LIBCCWITHOUTLIBTOOL) $(CFLAGS) $(LDFLAGS) -c perl.c ../include/autoconfig.h: endian ./endian >../include/autoconfig.h *************** *** 100,106 **** ## Low-level install actions. $(D)$(PATHLIB)/libinn.$(EXTLIB): libinn.$(EXTLIB) @rm -f $@ ! $(LIBTOOL) cp libinn.$(EXTLIB) $@ ## Dependencies. Default list, below, is probably good enough. depend: Makefile $(SOURCES) ../include/dbz.h --- 103,109 ---- ## Low-level install actions. $(D)$(PATHLIB)/libinn.$(EXTLIB): libinn.$(EXTLIB) @rm -f $@ ! $(LIBTOOL) ../installit.sh $(OWNER) -m 0555 -b .OLD libinn.$(EXTLIB) $@ ## Dependencies. Default list, below, is probably good enough. depend: Makefile $(SOURCES) ../include/dbz.h *************** *** 115,120 **** --- 118,124 ---- clientlib.o: ../include/nntp.h clientlib.o: ../include/macros.h clientlib.o: ../include/paths.h + conffile.o: ../include/configdata.h ../include/macros.h dbz.o: ../include/dbz.h defdist.o: ../include/paths.h defdist.o: ../include/macros.h diff -Nacr inn-2.1/lib/cleanfrom.c inn-2.2/lib/cleanfrom.c *** inn-2.1/lib/cleanfrom.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/cleanfrom.c Tue Oct 13 11:37:57 1998 *************** *** 1,4 **** ! /* $Revision: 1.2 $ ** */ #include --- 1,4 ---- ! /* $Revision: 1.4 $ ** */ #include *************** *** 22,38 **** { char *p; char *end; ! /* Do the equivalent of sed's "1q" */ ! if ((p = strchr(from, '\n')) != NULL) *p = '\0'; ! /* Do pretty much the equivalent of sed's "s/ (.*)//"; doesn't ! * work for "(save (delete this)" but that's okay. */ ! if ((p = strchr(from, LPAREN)) ! && p > from ! && *--p == ' ' ! && (end = strrchr(p, RPAREN))) { while (*++end) *p++ = *end; *p = '\0'; --- 22,62 ---- { char *p; char *end; + int len; ! if ((len = strlen(from)) == 0) ! return; ! /* concatenate folded header */ ! for (p = end = from ; p < from + len ;) { ! if (*p == '\n') { ! if ((p + 1 < from + len) && ISWHITE(p[1])) { ! if ((p - 1 >= from) && (p[-1] == '\r')) { ! end--; ! *end = p[1]; ! p += 2; ! } else { ! *end = p[1]; ! p++; ! } ! } else { ! *end = '\0'; ! break; ! } ! } else ! *end++ = *p++; ! } ! if (end != from) ! *end = '\0'; ! ! /* Do pretty much the equivalent of sed's "s/(.*)//g"; */ ! while ((p = strchr(from, LPAREN)) && (end = strchr(p, RPAREN))) { ! while (*++end) ! *p++ = *end; *p = '\0'; + } ! /* Do pretty much the equivalent of sed's "s/\".*\"//g"; */ ! while ((p = strchr(from, '"')) && (end = strchr(p, '"'))) { while (*++end) *p++ = *end; *p = '\0'; *************** *** 44,47 **** --- 68,84 ---- *from++ = *p; *from = '\0'; } + + /* drop white spaces */ + if ((len = strlen(from)) == 0) + return; + for (p = end = from ; p < from + len ;) { + if (ISWHITE(*p)) { + p++; + continue; + } + *end++ = *p++; + } + if (end != from) + *end = '\0'; } diff -Nacr inn-2.1/lib/conffile.c inn-2.2/lib/conffile.c *** inn-2.1/lib/conffile.c Thu Jan 1 00:00:00 1970 --- inn-2.2/lib/conffile.c Wed Dec 9 01:30:31 1998 *************** *** 0 **** --- 1,140 ---- + /* $Revision: 1.4.2.2 $ + ** + ** Routines for reading in incoming.conf-style config files. + */ + + #include + #include + #include + #include + #include + #include + #include + + static char *CONFgetword(CONFFILE *F) + { + register char *p; + register char *s; + register char *t; + char *word; + register BOOL flag; + + if (!F) return (NULL); /* No conf file */ + if (!F->buf || !F->buf[0]) { + if (feof (F->f)) return (NULL); + if (!F->buf) { + F->sbuf = SMBUF; + F->buf = NEW(char, F->sbuf); + } + fgets(F->buf, F->sbuf, F->f); + F->lineno++; + if (strlen (F->buf) == F->sbuf) + return (NULL); /* Line too long */ + } + do { + /* Ignore blank and comment lines. */ + if ((p = strchr(F->buf, '\n')) != NULL) + *p = '\0'; + if ((p = strchr(F->buf, COMMENT_CHAR)) != NULL) { + if (p == F->buf || (p > F->buf && *(p - 1) != '\\')) + *p = '\0'; + } + for (p = F->buf; *p == ' ' || *p == '\t' ; p++); + flag = TRUE; + if (*p == '\0' && !feof (F->f)) { + flag = FALSE; + fgets(F->buf, F->sbuf, F->f); + F->lineno++; + if (strlen (F->buf) == F->sbuf) + return (NULL); /* Line too long */ + continue; + } + break; + } while (!feof (F->f) || !flag); + + if (*p == '"') { /* double quoted string ? */ + p++; + do { + for (t = p; (*t != '"' || (*t == '"' && *(t - 1) == '\\')) && + *t != '\0'; t++); + if (*t == '\0') { + *t++ = '\n'; + fgets(t, F->sbuf - strlen (F->buf), F->f); + F->lineno++; + if (strlen (F->buf) == F->sbuf) + return (NULL); /* Line too long */ + if ((s = strchr(t, '\n')) != NULL) + *s = '\0'; + } + else + break; + } while (!feof (F->f)); + *t++ = '\0'; + } + else { + for (t = p; *t != ' ' && *t != '\t' && *t != '\0'; t++); + if (*t != '\0') + *t++ = '\0'; + } + if (*p == '\0' && feof (F->f)) return (NULL); + word = COPY (p); + for (p = F->buf; *t != '\0'; t++) + *p++ = *t; + *p = '\0'; + + return (word); + } + + CONFFILE *CONFfopen(char *filename) + { + FILE *f; + CONFFILE *ret; + + f = fopen(filename, "r"); + if (!f) + return(0); + ret = NEW(CONFFILE, 1); + if (!ret) { + fclose(f); + return(0); + } + ret->buf = 0; + ret->sbuf = 0; + ret->lineno = 0; + ret->f = f; + return(ret); + } + + void CONFfclose(CONFFILE *f) + { + if (!f) return; /* No conf file */ + fclose(f->f); + if (f->buf) + DISPOSE(f->buf); + DISPOSE(f); + } + + CONFTOKEN *CONFgettoken(CONFTOKEN *toklist, CONFFILE *file) + { + char *word; + static CONFTOKEN ret = {CONFstring, 0}; + int i; + + if (ret.name) { + DISPOSE(ret.name); + ret.name = 0; + } + word = CONFgetword(file); + if (!word) + return(0); + if (toklist) { + for (i = 0; toklist[i].type; i++) { + if (EQ(word, toklist[i].name)) { + DISPOSE(word); + return(&toklist[i]); + } + } + } + ret.name = word; + return(&ret); + } diff -Nacr inn-2.1/lib/dbz.c inn-2.2/lib/dbz.c *** inn-2.1/lib/dbz.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/dbz.c Tue Oct 13 23:17:51 1998 *************** *** 201,207 **** typedef struct { long tsize; /* table size */ long used[NUSEDS]; /* entries used today, yesterday, ... */ ! long vused[NUSEDS]; /* ditto for text size */ int valuesize; /* size of table values, == sizeof(dbzrec) */ int fillpercent; /* fillpercent/100 is the percent full we'll try to keep the .pag file */ --- 201,207 ---- typedef struct { long tsize; /* table size */ long used[NUSEDS]; /* entries used today, yesterday, ... */ ! long vused[NUSEDS]; /* ditto for text size */ int valuesize; /* size of table values, == sizeof(dbzrec) */ int fillpercent; /* fillpercent/100 is the percent full we'll try to keep the .pag file */ *************** *** 271,277 **** /* Structure for hash tables */ typedef struct { int fd; /* Non-blocking descriptor for writes */ ! int pos; /* Current offset into the table */ int reclen; /* Length of records in the table */ dbz_incore_val incore; /* What we're using core for */ void *core; /* Pointer to in-core table */ --- 271,277 ---- /* Structure for hash tables */ typedef struct { int fd; /* Non-blocking descriptor for writes */ ! OFFSET_T pos; /* Current offset into the table */ int reclen; /* Length of records in the table */ dbz_incore_val incore; /* What we're using core for */ void *core; /* Pointer to in-core table */ *************** *** 397,403 **** * size - table size (0 means default) * fillpercent - target percentage full ***** inactive */ ! BOOL dbzfresh(const char *name, const long size, const int fillpercent) { char *fn; dbzconfig c; --- 397,403 ---- * size - table size (0 means default) * fillpercent - target percentage full ***** inactive */ ! BOOL dbzfresh(const char *name, const OFFSET_T size, const int fillpercent) { char *fn; dbzconfig c; *************** *** 513,520 **** * dbzsize - what's a good table size to hold this many entries? * contents - size of table (0 means return the default) */ ! long dbzsize(const long contents) { ! long n; if (contents <= 0) { /* foulup or default inquiry */ DEBUG(("dbzsize: preposterous input (%ld)\n", contents)); --- 513,520 ---- * dbzsize - what's a good table size to hold this many entries? * contents - size of table (0 means return the default) */ ! long dbzsize(const OFFSET_T contents) { ! OFFSET_T n; if (contents <= 0) { /* foulup or default inquiry */ DEBUG(("dbzsize: preposterous input (%ld)\n", contents)); *************** *** 524,530 **** if ((conf.fillpercent > 0) && (conf.fillpercent < 100)) n = (contents / conf.fillpercent) * 100; else ! n = contents * 2; /* try to keep table at most half full */ /* Make sure that we get at least 2 bytes of implicit hash */ if (n < (64 * 1024)) --- 524,530 ---- if ((conf.fillpercent > 0) && (conf.fillpercent < 100)) n = (contents / conf.fillpercent) * 100; else ! n = (contents * 3) / 2; /* try to keep table at most 2/3's full */ /* Make sure that we get at least 2 bytes of implicit hash */ if (n < (64 * 1024)) *************** *** 1093,1099 **** idxrec *ionevalue = (idxrec *)ivalue; idxrecext *iextvalue = (idxrecext *)ivalue; erec evalue; - int offset; #endif if (!opendb) { --- 1093,1098 ---- *************** *** 1317,1323 **** DEBUG(("getcore: mmap failed\n")); return FALSE; } ! #if defined (MADV_RANDOM) && !defined(_nec_ews) /* not present in all versions of mmap() */ madvise(it, (size_t)conf.tsize * sizeof(tab->reclen), MADV_RANDOM); #endif --- 1316,1322 ---- DEBUG(("getcore: mmap failed\n")); return FALSE; } ! #if defined (MADV_RANDOM) && defined(HAVE_MADVISE) /* not present in all versions of mmap() */ madvise(it, (size_t)conf.tsize * sizeof(tab->reclen), MADV_RANDOM); #endif diff -Nacr inn-2.1/lib/endian.c inn-2.2/lib/endian.c *** inn-2.1/lib/endian.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/endian.c Wed Aug 19 06:50:54 1998 *************** *** 43,48 **** --- 43,63 ---- exit(0); } + /* + * some compiler recognize the code unwantedly + * to avoid this the code is separated and call store() and load_and_store() + */ + void + store(unsigned long *p, unsigned long val) + { + *p = val; + } + void + load_and_store(unsigned long *p, unsigned long val) + { + *p += val; + } + /* byte order array */ char byte[8] = { (char)0x12, (char)0x36, (char)0x48, (char)0x59, *************** *** 80,87 **** /* mis-align our long fetches */ for (i=0; i < sizeof(long); ++i) { p = (unsigned long *)(byte+i); ! *p = i; ! *p += 1; } /* if we got here, then we can mis-align longs */ --- 95,102 ---- /* mis-align our long fetches */ for (i=0; i < sizeof(long); ++i) { p = (unsigned long *)(byte+i); ! store(p, i); ! load_and_store(p, 1); } /* if we got here, then we can mis-align longs */ diff -Nacr inn-2.1/lib/getconfig.c inn-2.2/lib/getconfig.c *** inn-2.1/lib/getconfig.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/getconfig.c Sat Nov 7 03:03:12 1998 *************** *** 1,4 **** ! /* $Revision: 1.41 $ ** */ #include --- 1,4 ---- ! /* $Revision: 1.48.2.1 $ ** */ #include *************** *** 31,44 **** } /* To add a new config value, add it to the following: ! Use the comment embedded method in include/libinn.h, then ! run developconfig.sh, which splits items out to the other ! locations. ! OR: ! include/paths.h : Add #define _CONF_VARNAME "varname" include/libinn.h : Add varname to conf_vars struct ! lib/getconfig.c : SetDefaults() & ReadConfig(), ClearInnConf() samples/inn.conf : Set the default value doc/inn.conf.5 : Document it! wherever you need it : Use as innconf->varname */ --- 31,42 ---- } /* To add a new config value, add it to the following: ! ! include/innconf.h : Add to conf_defaults include/libinn.h : Add varname to conf_vars struct ! lib/getconfig.c : SetDefaults() & ReadInnConf(), ClearInnConf() samples/inn.conf : Set the default value + samples/inncheck.in : So we can check it doc/inn.conf.5 : Document it! wherever you need it : Use as innconf->varname */ *************** *** 199,205 **** innconf->linecountfuzz = 0; innconf->peertimeout = 1 * 60 * 60; innconf->clienttimeout = 10 * 60; ! innconf->allowreaders = FALSE; innconf->allownewnews = TRUE; innconf->localmaxartsize = 1000000L; innconf->logartsize = TRUE; --- 197,203 ---- innconf->linecountfuzz = 0; innconf->peertimeout = 1 * 60 * 60; innconf->clienttimeout = 10 * 60; ! innconf->readerswhenstopped = FALSE; innconf->allownewnews = TRUE; innconf->localmaxartsize = 1000000L; innconf->logartsize = TRUE; *************** *** 219,224 **** --- 217,223 ---- innconf->bindaddress = COPY(p); SET_CONFIG(CONF_VAR_BINDADDRESS); } + innconf->sourceaddress = NULL; innconf->port = NNTP_PORT; innconf->readertrack = FALSE; innconf->strippostcc = FALSE; *************** *** 228,233 **** --- 227,234 ---- innconf->keyartlimit = 100000; innconf->keymaxwords = 250; innconf->nnrpdposthost = NULL; + innconf->nnrpdpostport = NNTP_PORT; + innconf->nnrpperlauth = FALSE; innconf->pathnews = NULL; innconf->pathbin = NULL; *************** *** 264,269 **** --- 265,274 ---- innconf->activedupdate = 30L; innconf->activedport = 1119; innconf->storemsgid = TRUE; + innconf->nicenewnews = 0; + innconf->usecontrolchan = FALSE; + innconf->mergetogroups = FALSE; + innconf->noreader = FALSE; } void ClearInnConf() *************** *** 282,287 **** --- 287,293 ---- if (innconf->mta != NULL) DISPOSE(innconf->mta); if (innconf->mailcmd != NULL) DISPOSE(innconf->mailcmd); if (innconf->bindaddress != NULL) DISPOSE(innconf->bindaddress); + if (innconf->sourceaddress != NULL) DISPOSE(innconf->sourceaddress); if (innconf->overviewname != NULL) DISPOSE(innconf->overviewname); if (innconf->nnrpdposthost != NULL) DISPOSE(innconf->nnrpdposthost); *************** *** 623,637 **** if (!bit) innconf->clienttimeout = atoi(p); SET_CONFIG(CONF_VAR_CLIENTTIMEOUT); } else ! if (EQ(ConfigBuff,_CONF_ALLOWREADERS)) { ! TEST_CONFIG(CONF_VAR_ALLOWREADERS, bit); if (!bit && boolval != -1) { if (boolval == TRUE) ! innconf->allowreaders = FALSE; else ! innconf->allowreaders = TRUE; } ! SET_CONFIG(CONF_VAR_ALLOWREADERS); } else if (EQ(ConfigBuff,_CONF_ALLOWNEWNEWS)) { TEST_CONFIG(CONF_VAR_ALLOWNEWNEWS, bit); --- 629,643 ---- if (!bit) innconf->clienttimeout = atoi(p); SET_CONFIG(CONF_VAR_CLIENTTIMEOUT); } else ! if (EQ(ConfigBuff,_CONF_READERSWHENSTOPPED)) { ! TEST_CONFIG(CONF_VAR_READERSWHENSTOPPED, bit); if (!bit && boolval != -1) { if (boolval == TRUE) ! innconf->readerswhenstopped = FALSE; else ! innconf->readerswhenstopped = TRUE; } ! SET_CONFIG(CONF_VAR_READERSWHENSTOPPED); } else if (EQ(ConfigBuff,_CONF_ALLOWNEWNEWS)) { TEST_CONFIG(CONF_VAR_ALLOWNEWNEWS, bit); *************** *** 722,727 **** --- 728,738 ---- TEST_CONFIG(CONF_VAR_READERTRACK, bit); if (!bit && boolval != -1) innconf->readertrack = boolval; SET_CONFIG(CONF_VAR_READERTRACK); + } else + if (EQ(ConfigBuff,_CONF_NNRPPERLAUTH)) { + TEST_CONFIG(CONF_VAR_NNRPPERLAUTH, bit); + if (!bit && boolval != -1) innconf->nnrpperlauth = boolval; + SET_CONFIG(CONF_VAR_NNRPPERLAUTH); } else if (EQ(ConfigBuff,_CONF_STRIPPOSTCC)) { TEST_CONFIG(CONF_VAR_STRIPPOSTCC, bit); *************** *** 848,853 **** --- 859,869 ---- if (!bit) innconf->nnrpdposthost = COPY(p); SET_CONFIG(CONF_VAR_NNRPDPOSTHOST); } else + if (EQ(ConfigBuff,_CONF_NNRPDPOSTPORT)) { + TEST_CONFIG(CONF_VAR_NNRPDPOSTPORT, bit); + if (!bit) innconf->nnrpdpostport = atol(p); + SET_CONFIG(CONF_VAR_NNRPDPOSTPORT); + } else if (EQ(ConfigBuff,_CONF_EXTENDEDDBZ)) { TEST_CONFIG(CONF_VAR_EXTENDEDDBZ, bit); if (!bit && boolval != -1) innconf->extendeddbz = boolval; *************** *** 927,932 **** --- 943,978 ---- TEST_CONFIG(CONF_VAR_STOREMSGID, bit); if (!bit && boolval != -1) innconf->storemsgid = boolval; SET_CONFIG(CONF_VAR_STOREMSGID); + } else + if (EQ(ConfigBuff,_CONF_NICENEWNEWS)) { + TEST_CONFIG(CONF_VAR_NICENEWNEWS, bit); + if (!bit) innconf->nicenewnews = atoi(p); + SET_CONFIG(CONF_VAR_NICENEWNEWS); + } else + if (EQ(ConfigBuff,_CONF_USECONTROLCHAN)) { + TEST_CONFIG(CONF_VAR_USECONTROLCHAN, bit); + if (!bit && boolval != -1) innconf->usecontrolchan = boolval; + SET_CONFIG(CONF_VAR_USECONTROLCHAN); + } else + if (EQ(ConfigBuff,_CONF_MERGETOGROUPS)) { + TEST_CONFIG(CONF_VAR_MERGETOGROUPS, bit); + if (!bit && boolval != -1) innconf->mergetogroups = boolval; + SET_CONFIG(CONF_VAR_MERGETOGROUPS); + } else + if (EQ(ConfigBuff,_CONF_NOREADER)) { + TEST_CONFIG(CONF_VAR_NOREADER, bit); + if (!bit && boolval != -1) innconf->noreader = boolval; + SET_CONFIG(CONF_VAR_NOREADER); + } else + if (EQ(ConfigBuff,_CONF_SOURCEADDRESS)) { + TEST_CONFIG(CONF_VAR_SOURCEADDRESS, bit); + if (!bit) { + if (EQ(p,"all") || EQ(p,"any")) + innconf->sourceaddress = NULL; + else + innconf->sourceaddress = COPY(p); + } + SET_CONFIG(CONF_VAR_SOURCEADDRESS); } } (void)Fclose(F); diff -Nacr inn-2.1/lib/hash.c inn-2.2/lib/hash.c *** inn-2.1/lib/hash.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/hash.c Tue Oct 13 13:39:47 1998 *************** *** 66,72 **** len = strlen(MessageID); if (newlen <= len) { if (new) ! new = RENEW(new, char, len + 1); else new = NEW(char, len + 1); newlen = len + 1; --- 66,72 ---- len = strlen(MessageID); if (newlen <= len) { if (new) ! RENEW(new, char, len + 1); else new = NEW(char, len + 1); newlen = len + 1; *************** *** 118,124 **** /* ** Converts a hex digit and converts it to a int */ ! STATIC int hextodec(const char c) { return isdigit(c) ? (c - '0') : ((c - 'A') + 10); } --- 118,124 ---- /* ** Converts a hex digit and converts it to a int */ ! STATIC int hextodec(const int c) { return isdigit(c) ? (c - '0') : ((c - 'A') + 10); } diff -Nacr inn-2.1/lib/inndcomm.c inn-2.2/lib/inndcomm.c *** inn-2.1/lib/inndcomm.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/inndcomm.c Tue Oct 13 13:39:47 1998 *************** *** 1,4 **** ! /* $Revision: 1.5 $ ** ** Library routines to let other programs control innd. */ --- 1,4 ---- ! /* $Revision: 1.7 $ ** ** Library routines to let other programs control innd. */ *************** *** 267,273 **** return -1; } #else ! if ((fd = open(cpcatpath(inconf->pathrun, _PATH_NEWSCONTROL), O_WRONLY)) < 0) { DISPOSE(buff); ICCfailure = "open"; return -1; --- 267,273 ---- return -1; } #else ! if ((fd = open(cpcatpath(innconf->pathrun, _PATH_NEWSCONTROL), O_WRONLY)) < 0) { DISPOSE(buff); ICCfailure = "open"; return -1; *************** *** 385,392 **** /* Parse the rest of the reply; expected to be like " */ i = 0; ! if (CTYPE(isdigit, buff[0])) { ! for (p = buff; *p && CTYPE(isdigit, *p); p++) continue; if (*p) { save = *p; --- 385,392 ---- /* Parse the rest of the reply; expected to be like " */ i = 0; ! if (CTYPE(isdigit, (int)buff[0])) { ! for (p = buff; *p && CTYPE(isdigit, (int)*p); p++) continue; if (*p) { save = *p; diff -Nacr inn-2.1/lib/localopen.c inn-2.2/lib/localopen.c *** inn-2.1/lib/localopen.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/localopen.c Wed Aug 5 05:35:17 1998 *************** *** 1,4 **** ! /* $Revision: 1.4 $ ** */ #include --- 1,4 ---- ! /* $Revision: 1.5 $ ** */ #include *************** *** 81,86 **** } return 0; #else ! return NNTPconnect(LOOPBACK_HOST, FromServerp, ToServerp, errbuff); #endif /* defined(HAVE_UNIX_DOMAIN_SOCKETS) */ } --- 81,86 ---- } return 0; #else ! return NNTPconnect(LOOPBACK_HOST, innconf->port, FromServerp, ToServerp, errbuff); #endif /* defined(HAVE_UNIX_DOMAIN_SOCKETS) */ } diff -Nacr inn-2.1/lib/makedir.c inn-2.2/lib/makedir.c *** inn-2.1/lib/makedir.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/makedir.c Thu Aug 6 23:06:06 1998 *************** *** 1,6 **** #include - #include #include #include "configdata.h" #include "clibrary.h" #include "libinn.h" --- 1,6 ---- #include #include + #include #include "configdata.h" #include "clibrary.h" #include "libinn.h" diff -Nacr inn-2.1/lib/parsedate.y inn-2.2/lib/parsedate.y *** inn-2.1/lib/parsedate.y Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/parsedate.y Sat Nov 21 11:55:20 1998 *************** *** 1,5 **** %{ ! /* $Revision: 1.3 $ ** ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by --- 1,5 ---- %{ ! /* $Revision: 1.4.2.1 $ ** ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by *************** *** 242,255 **** } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { if ($1 > 100) { yyYear = $1; yyMonth = $3; yyDay = $5; } else { yyMonth = $1; yyDay = $3; ! yyYear = $5; } } | tMONTH tUNUMBER { --- 242,263 ---- } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { if ($1 > 100) { + /* assume YYYY/MM/DD format, so need not to add 1900 */ yyYear = $1; yyMonth = $3; yyDay = $5; } else { + /* assume MM/DD/YY* format */ yyMonth = $1; yyDay = $3; ! if ($5 > 100) { ! /* assume year is YYYY format, so need not to add 1900 */ ! yyYear = $5; ! } else { ! /* assume year is YY format, so need to add 1900 */ ! yyYear = $5 + 1900; ! } } } | tMONTH tUNUMBER { *************** *** 259,265 **** | tMONTH tUNUMBER ',' tUNUMBER { yyMonth = $1; yyDay = $2; ! yyYear = $4; } | tUNUMBER tMONTH { yyDay = $1; --- 267,279 ---- | tMONTH tUNUMBER ',' tUNUMBER { yyMonth = $1; yyDay = $2; ! if ($4 > 100) { ! /* assume year is YYYY format, so need not to add 1900 */ ! yyYear = $4; ! } else { ! /* assume year is YY format, so need to add 1900 */ ! yyYear = $4 + 1900; ! } } | tUNUMBER tMONTH { yyDay = $1; *************** *** 268,279 **** | tUNUMBER tMONTH tUNUMBER { yyDay = $1; yyMonth = $2; ! yyYear = $3; } | tDAY ',' tUNUMBER tMONTH tUNUMBER { yyDay = $3; yyMonth = $4; ! yyYear = $5; } ; --- 282,305 ---- | tUNUMBER tMONTH tUNUMBER { yyDay = $1; yyMonth = $2; ! if ($3 > 100) { ! /* assume year is YYYY format, so need not to add 1900 */ ! yyYear = $3; ! } else { ! /* assume year is YY format, so need to add 1900 */ ! yyYear = $3 + 1900; ! } } | tDAY ',' tUNUMBER tMONTH tUNUMBER { yyDay = $3; yyMonth = $4; ! if ($5 > 100) { ! /* assume year is YYYY format, so need not to add 1900 */ ! yyYear = $5; ! } else { ! /* assume year is YY format, so need to add 1900 */ ! yyYear = $5 + 1900; ! } } ; *************** *** 514,519 **** --- 540,547 ---- int i; time_t tod; + /* Year should not be passed as a relative value, but absolute one. + so this should not happen, but just ensure it */ if (Year < 0) Year = -Year; if (Year < 100) *************** *** 575,580 **** --- 603,609 ---- tm = localtime(&Start); Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; Year = Month / 12; + Year += 1900; Month = Month % 12 + 1; return DSTcorrect(Start, Convert(Month, (time_t)tm->tm_mday, Year, *************** *** 684,690 **** for ( ; ; ) { /* Get first character after the whitespace. */ for ( ; ; ) { ! while (CTYPE(isspace, *yyInput)) yyInput++; c = *yyInput; --- 713,719 ---- for ( ; ; ) { /* Get first character after the whitespace. */ for ( ; ; ) { ! while (CTYPE(isspace, (int)*yyInput)) yyInput++; c = *yyInput; *************** *** 702,718 **** } /* A number? */ ! if (CTYPE(isdigit, c) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; yyInput++; ! if (!CTYPE(isdigit, *yyInput)) /* Skip the plus or minus sign. */ continue; } else sign = 0; ! for (i = 0; (c = *yyInput++) != '\0' && CTYPE(isdigit, c); ) i = 10 * i + c - '0'; yyInput--; yylval.Number = sign < 0 ? -i : i; --- 731,747 ---- } /* A number? */ ! if (CTYPE(isdigit, (int)c) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; yyInput++; ! if (!CTYPE(isdigit, (int)*yyInput)) /* Skip the plus or minus sign. */ continue; } else sign = 0; ! for (i = 0; (c = *yyInput++) != '\0' && CTYPE(isdigit, (int)c); ) i = 10 * i + c - '0'; yyInput--; yylval.Number = sign < 0 ? -i : i; *************** *** 720,729 **** } /* A word? */ ! if (CTYPE(isalpha, c)) { ! for (p = buff; (c = *yyInput++) == '.' || CTYPE(isalpha, c); ) if (p < &buff[sizeof buff - 1]) ! *p++ = CTYPE(isupper, c) ? tolower(c) : c; *p = '\0'; yyInput--; return LookupWord(buff, p - buff); --- 749,758 ---- } /* A word? */ ! if (CTYPE(isalpha, (int)c)) { ! for (p = buff; (c = *yyInput++) == '.' || CTYPE(isalpha, (int)c); ) if (p < &buff[sizeof buff - 1]) ! *p++ = CTYPE(isupper, (int)c) ? tolower(c) : c; *p = '\0'; yyInput--; return LookupWord(buff, p - buff); *************** *** 748,754 **** } tm = localtime(&now->time); ! yyYear = tm->tm_year; yyMonth = tm->tm_mon + 1; yyDay = tm->tm_mday; yyTimezone = now->tzone; --- 777,783 ---- } tm = localtime(&now->time); ! yyYear = tm->tm_year + 1900; yyMonth = tm->tm_mon + 1; yyDay = tm->tm_mday; yyTimezone = now->tzone; diff -Nacr inn-2.1/lib/perl.c inn-2.2/lib/perl.c *** inn-2.1/lib/perl.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/perl.c Tue Oct 13 13:39:47 1998 *************** *** 3,15 **** * Author: Christophe Wolfhugel * (although he wouldn't recognise it anymore so don't blame him) * File: perl.c ! * RCSId: $Id: perl.c,v 1.6 1998/05/21 03:00:20 scrappy Exp $ * Description: Perl hooks for libinn.a * */ #if ! defined (lint) ! static const char *rcsid = "$Id: perl.c,v 1.6 1998/05/21 03:00:20 scrappy Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } --- 3,15 ---- * Author: Christophe Wolfhugel * (although he wouldn't recognise it anymore so don't blame him) * File: perl.c ! * RCSId: $Id: perl.c,v 1.7 1998/10/13 13:39:47 coneill Exp $ * Description: Perl hooks for libinn.a * */ #if ! defined (lint) ! static const char *rcsid = "$Id: perl.c,v 1.7 1998/10/13 13:39:47 coneill Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } *************** *** 18,28 **** #include #include #include "configdata.h" #include "clibrary.h" ! #include ! #include "fcntl.h" ! #if defined(DO_PERL) --- 18,29 ---- #include #include + #include + #include #include "configdata.h" #include "clibrary.h" ! #include "libinn.h" ! #include "macros.h" #if defined(DO_PERL) *************** *** 34,41 **** #include #include - #include "macros.h" - extern void xs_init _((void)); extern void boot_DynaLoader _((CV* cv)); --- 35,40 ---- *************** *** 70,76 **** if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_end died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! POPs ; } } else { PerlFilterActive = value ; --- 69,75 ---- if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_end died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! (void)POPs ; } } else { PerlFilterActive = value ; *************** *** 112,119 **** ** function name that must be defined after the file file is loaded for ** filtering to be turned on to start with. */ ! int ! PERLsetup (startupfile, filterfile, function) char *startupfile, *filterfile, *function; { if (PerlCode == NULL) { --- 111,117 ---- ** function name that must be defined after the file file is loaded for ** filtering to be turned on to start with. */ ! void PERLsetup (startupfile, filterfile, function) char *startupfile, *filterfile, *function; { if (PerlCode == NULL) { *************** *** 179,185 **** if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_before_reload died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! POPs ; PerlFilter (FALSE) ; } } --- 177,183 ---- if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_before_reload died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! (void)POPs ; PerlFilter (FALSE) ; } } *************** *** 213,219 **** if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_after_reload died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! POPs ; PerlFilter (FALSE) ; } } --- 211,217 ---- if (SvTRUE(GvSV(errgv))) /* check $@ */ { syslog (L_ERROR,"%s perl function filter_after_reload died: %s", LogName, SvPV(GvSV(errgv), na)) ; ! (void)POPs ; PerlFilter (FALSE) ; } } diff -Nacr inn-2.1/lib/remopen.c inn-2.2/lib/remopen.c *** inn-2.1/lib/remopen.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/remopen.c Wed Sep 2 15:24:31 1998 *************** *** 1,4 **** ! /* $Revision: 1.6 $ ** */ #include --- 1,4 ---- ! /* $Revision: 1.7 $ ** */ #include *************** *** 45,51 **** struct hostent *hp; struct hostent fakehp; struct in_addr quadaddr; ! struct sockaddr_in server; buff = errbuff ? errbuff : mybuff; *buff = '\0'; --- 45,51 ---- struct hostent *hp; struct hostent fakehp; struct in_addr quadaddr; ! struct sockaddr_in server, client; buff = errbuff ? errbuff : mybuff; *buff = '\0'; *************** *** 79,90 **** --- 79,106 ---- (void)memset((POINTER)&server, 0, sizeof server); server.sin_family = hp->h_addrtype; server.sin_port = htons(port); + /* Source IP address to which we bind. */ + (void)memset((POINTER)&client, 0, sizeof client); + client.sin_family = AF_INET; + if (innconf->sourceaddress) { + client.sin_addr.s_addr = inet_addr(innconf->sourceaddress); + if (server.sin_addr.s_addr == INADDR_NONE) + return -1; + } else + client.sin_addr.s_addr = htonl(INADDR_ANY); /* Loop through the address list, trying to connect. */ for (; ap && *ap; ap++) { /* Make a socket and try to connect. */ if ((i = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) break; + /* Bind to the source address we want. */ + if (bind(i, (struct sockaddr *)&client, sizeof client) < 0) { + oerrno = errno; + (void)close(i); + errno = oerrno; + continue; + } /* Copy the address via inline memcpy: * (void)memcpy((POINTER)&server.sin_addr, (POINTER)*ap, (int)hp->h_length); */ diff -Nacr inn-2.1/lib/reservedfd.c inn-2.2/lib/reservedfd.c *** inn-2.1/lib/reservedfd.c Fri Jul 24 13:13:00 1998 --- inn-2.2/lib/reservedfd.c Tue Oct 13 13:39:47 1998 *************** *** 1,12 **** ! /* $Revision: 1.3 $ ** */ #include #include #include "configdata.h" #include "clibrary.h" #include "macros.h" ! #include STATIC FILE **Reserved_fd = NULL; --- 1,13 ---- ! /* $Revision: 1.5 $ ** */ #include #include + #include #include "configdata.h" #include "clibrary.h" #include "macros.h" ! #include "libinn.h" STATIC FILE **Reserved_fd = NULL; *************** *** 58,64 **** FILE *Fopen(const char *p, char *type, int index) { FILE *nfp; ! if (p == NULL || *p == NULL) return NULL; if (index < 0 || index > Maxfd || Reserved_fd[index] == NULL) return fopen(p, type); --- 59,65 ---- FILE *Fopen(const char *p, char *type, int index) { FILE *nfp; ! if (p == NULL || *p == '\0') return NULL; if (index < 0 || index > Maxfd || Reserved_fd[index] == NULL) return fopen(p, type); diff -Nacr inn-2.1/makedirs.sh.in inn-2.2/makedirs.sh.in *** inn-2.1/makedirs.sh.in Fri Jul 24 13:13:00 1998 --- inn-2.2/makedirs.sh.in Thu Jul 30 23:45:11 1998 *************** *** 1,5 **** #! /bin/sh ! ## $Revision: 1.10 $ ## Script to make INN directories. PATHNEWS=@prefix@ --- 1,5 ---- #! /bin/sh ! ## $Revision: 1.11 $ ## Script to make INN directories. PATHNEWS=@prefix@ *************** *** 19,25 **** PATHARCHIVE=${PATHSPOOL}/archive PATHUNIOVER=${PATHSPOOL}/uniover PATHTAPE=${PATHSPOOL}/innfeed ! PATHMAN=${PATHNEWS}/man PATHTMP=@TMPPATH@ ## Some systems don't support -x, so we have to use -f. --- 19,25 ---- PATHARCHIVE=${PATHSPOOL}/archive PATHUNIOVER=${PATHSPOOL}/uniover PATHTAPE=${PATHSPOOL}/innfeed ! PATHMAN=@MANDIR@ PATHTMP=@TMPPATH@ ## Some systems don't support -x, so we have to use -f. diff -Nacr inn-2.1/nnrpd/Makefile inn-2.2/nnrpd/Makefile *** inn-2.1/nnrpd/Makefile Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/Makefile Wed Oct 21 07:30:01 1998 *************** *** 1,4 **** ! ## $Revision: 1.21 $ include ../Makefile.global CFLAGS = $(GCFLAGS) $(PERLINC) --- 1,4 ---- ! ## $Revision: 1.23 $ include ../Makefile.global CFLAGS = $(GCFLAGS) $(PERLINC) *************** *** 39,49 **** nnrpd: $(P) nnrpd.o $(OBJECTS) $(LIBNEWS) @rm -f $@ ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $@.o $(OBJECTS) $(LIBNEWS) $(LIBS) $(PERLLIB) actived: $(P) actived.o activedstats.o $(OBJECTS) $(LIBNEWS) @rm -f $@ ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $@.o activedstats.o $(OBJECTS) $(LIBNEWS) $(LIBS) $(PERLLIB) ../include/dbz.h: (cd ../lib ; $(MAKE) ../include/dbz.h) --- 39,49 ---- nnrpd: $(P) nnrpd.o $(OBJECTS) $(LIBNEWS) @rm -f $@ ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $@.o $(OBJECTS) $(LIBNEWS) $(PERLLIB) $(LIBS) actived: $(P) actived.o activedstats.o $(OBJECTS) $(LIBNEWS) @rm -f $@ ! $(LIBTOOL) $(CC) $(LDFLAGS) -o $@ $@.o activedstats.o $(OBJECTS) $(LIBNEWS) $(PERLLIB) $(LIBS) ../include/dbz.h: (cd ../lib ; $(MAKE) ../include/dbz.h) *************** *** 56,62 **** nnrpdp: $(SOURCES) rm -f $(OBJECTS) ! $(MAKE) nnrpd CFLAGS="$(CFLAGS) $(PROF)" LIBNEWS=../libinn_p.a mv nnrpd nnrpdp rm -f $(OBJECTS) --- 56,62 ---- nnrpdp: $(SOURCES) rm -f $(OBJECTS) ! $(MAKE) nnrpd CFLAGS="$(CFLAGS) $(PROF)" LIBNEWS="../libinn_p.a ../storage/libstorage.a ../libinn_p.a ../storage/libstorage.a" mv nnrpd nnrpdp rm -f $(OBJECTS) diff -Nacr inn-2.1/nnrpd/actived.c inn-2.2/nnrpd/actived.c *** inn-2.1/nnrpd/actived.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/actived.c Thu Oct 22 15:47:49 1998 *************** *** 1,4 **** ! /* $Revision: 1.1 $ ** ** Active file server for readers (NNRP) for InterNetNews. */ --- 1,4 ---- ! /* $Revision: 1.2.2.1 $ ** ** Active file server for readers (NNRP) for InterNetNews. */ *************** *** 30,36 **** char *ACTIVETIMES = NULL; char NOACCESS[] = NNTP_ACCESS; char *NEWSGROUPS = NULL; - BOOL PERMdefault = FALSE; void #if defined(VAR_VARARGS) --- 30,35 ---- *************** *** 160,166 **** ACTIVE = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVE)); innconf->activedenable = 0; /* This is the daemon */ ! if ((s = create_udp_socket(innconf->activedport)) < 0) { syslog(L_ERROR, "cant createudpsocket %m"); exit(1); } --- 159,165 ---- ACTIVE = COPY(cpcatpath(innconf->pathdb, _PATH_ACTIVE)); innconf->activedenable = 0; /* This is the daemon */ ! if ((s = create_udp_socket(innconf->activedport, 0)) < 0) { syslog(L_ERROR, "cant createudpsocket %m"); exit(1); } diff -Nacr inn-2.1/nnrpd/article.c inn-2.2/nnrpd/article.c *** inn-2.1/nnrpd/article.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/article.c Sun Nov 15 22:45:13 1998 *************** *** 1,4 **** ! /* $Revision: 1.45 $ ** ** Article-related routines. */ --- 1,4 ---- ! /* $Revision: 1.57.2.5 $ ** ** Article-related routines. */ *************** *** 36,50 **** STRING Item; } SENDDATA; - typedef struct _OVERDATA { - int index; - char *addr; - long size; - FILE *fp; - int offset; - } OVERDATA; - - /* ** Information about the schema of the news overview files. */ --- 36,41 ---- *************** *** 82,88 **** extern unsigned int RARTtable[]; extern int RARTcount; - extern int RARTenable; /* ** Overview state information. --- 73,78 ---- *************** *** 97,102 **** --- 87,96 ---- STATIC struct iovec iov[IOV_MAX]; STATIC int queued_iov = 0; + /* Prototypes */ + STATIC BOOL IsCancelled(int artnum, BOOL checkart); + STATIC BOOL IsCancelledByIndex(int i, int artnum); + BOOL PushIOv(void) { fflush(stdout); if (writev(STDOUT_FILENO, iov, queued_iov) <= 0) { *************** *** 205,211 **** if (ARThandle) { SMfreearticle(ARThandle); } else { ! #if defined(MC_ADVISE) && defined(MADV_DONTNEED) && !defined(_nec_ews) madvise(ARTmem, ARTlen, MADV_DONTNEED); #endif munmap(ARTmem, ARTlen); --- 199,205 ---- if (ARThandle) { SMfreearticle(ARThandle); } else { ! #if defined(MADV_DONTNEED) && defined(HAVE_MADVISE) madvise(ARTmem, ARTlen, MADV_DONTNEED); #endif munmap(ARTmem, ARTlen); *************** *** 229,234 **** --- 223,231 ---- ARTHANDLE *art; struct timeval stv, etv; + if (IsCancelledByIndex(i,0)) + return FALSE; + if (ARTnumbers[i].Tokenretrieved) token = ARTnumbers[i].Token; else { *************** *** 237,248 **** return FALSE; } UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! ARTnumbers[i].Tokenretrieved = TRUE; ! if ((tokentext = HISgetent(&index.hash, FALSE, NULL)) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; } token = ARTnumbers[i].Token = TextToToken(tokentext); if ( token.type == TOKEN_EMPTY || token.index == OVER_NONE || token.cancelled ) --- 234,252 ---- return FALSE; } UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! if (HashEmpty(index.hash)) ! return FALSE; ! if (ARTnumbers[i].Offset >= 0) { ! tokentext = HISgetent(&index.hash, TRUE, &ARTnumbers[i].Offset); ! } else { ! tokentext = HISgetent(&index.hash, FALSE, NULL); ! } ! if (tokentext == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; } token = ARTnumbers[i].Token = TextToToken(tokentext); + ARTnumbers[i].Tokenretrieved = TRUE; if ( token.type == TOKEN_EMPTY || token.index == OVER_NONE || token.cancelled ) *************** *** 259,265 **** if (art) { SMfreearticle(art); return TRUE; ! } else return FALSE; } /* --- 263,270 ---- if (art) { SMfreearticle(art); return TRUE; ! } ! return FALSE; } /* *************** *** 277,297 **** return -1; top = &ARTnumbers[ARTsize - 1]; ! if (ARTcache && (++ARTcache <= top) && (ARTcache->ArtNum <= i)) { ! if (ARTcache->ArtNum == i) { if (needcheck) { return ARTinstore(ARTcache - ARTnumbers) ? (ARTcache - ARTnumbers) : -1; } ! return ARTcache - ARTnumbers; ! } ! bottom = ARTcache; ! } ! else { ! ARTcache = NULL; ! bottom = ARTnumbers; } for ( ; ; ) { if ((i < bottom->ArtNum) || (i > top->ArtNum)) break; --- 282,343 ---- return -1; top = &ARTnumbers[ARTsize - 1]; ! if (ARTcache) { ! /* They're finding the same article again. */ ! if (ARTcache->ArtNum == i) { if (needcheck) { return ARTinstore(ARTcache - ARTnumbers) ? (ARTcache - ARTnumbers) : -1; } ! else ! return ARTcache - ARTnumbers; ! } ! else if ((++ARTcache <= top) && (ARTcache->ArtNum <= i)) { ! /* Next article. */ ! if (ARTcache->ArtNum == i) { ! if (needcheck) { ! return ARTinstore(ARTcache - ARTnumbers) ! ? (ARTcache - ARTnumbers) : -1; ! } ! else ! return ARTcache - ARTnumbers; ! } ! bottom = ARTcache; ! } ! else if ( (ARTcache->ArtNum > i) && ((--ARTcache)->ArtNum < i) ) { ! /* Missing article. */ ! return -1; ! } ! else { ! ARTcache=NULL; ! bottom = ARTnumbers; ! } } + else + bottom=ARTnumbers; + /* The first hit when looping through is always bottom. + * This is a common case, and also happens to be the worst-case + * for this binary search. + * So take the gamble, and check it. + */ + if (bottom->ArtNum >= i) + { + ARTcache=bottom; + if (bottom->ArtNum == i) + { + if (needcheck) { + return ARTinstore(bottom - ARTnumbers) + ? (bottom-ARTnumbers) : -1; + } + return bottom-ARTnumbers; + } + else + { + /* The first article requested has already been cancelled. */ + return -1; + } + } for ( ; ; ) { if ((i < bottom->ArtNum) || (i > top->ArtNum)) break; *************** *** 342,349 **** return FALSE; if ((ARTnumbers[i].ArtNum == artnum) && innconf->storageapi) { ! if (ARTnumbers[i].Token.cancelled) ! return FALSE; if (ARTnumbers[i].Tokenretrieved) token = ARTnumbers[i].Token; else { --- 388,396 ---- return FALSE; if ((ARTnumbers[i].ArtNum == artnum) && innconf->storageapi) { ! if (IsCancelledByIndex(i,artnum)) ! return FALSE; ! if (ARTnumbers[i].Tokenretrieved) token = ARTnumbers[i].Token; else { *************** *** 353,364 **** return FALSE; } UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! ARTnumbers[i].Tokenretrieved = TRUE; if ((tokentext = HISgetent(&index.hash, FALSE, NULL)) == (char *)NULL) { ARTnumbers[i].Token.cancelled = TRUE; return FALSE; } token = ARTnumbers[i].Token = TextToToken(tokentext); } if (token.type != TOKEN_EMPTY && token.index != OVER_NONE && !token.cancelled) { if ((ARThandle = SMretrieve(token, RETR_ALL)) == NULL) { --- 400,413 ---- return FALSE; } UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! if (HashEmpty(index.hash)) ! return FALSE; if ((tokentext = HISgetent(&index.hash, FALSE, NULL)) == (char *)NULL) { ARTnumbers[i].Token.cancelled = TRUE; return FALSE; } token = ARTnumbers[i].Token = TextToToken(tokentext); + ARTnumbers[i].Tokenretrieved = TRUE; } if (token.type != TOKEN_EMPTY && token.index != OVER_NONE && !token.cancelled) { if ((ARThandle = SMretrieve(token, RETR_ALL)) == NULL) { *************** *** 432,439 **** *ap = 0; } else { if (innconf->articlemmap) { ! if ((fd = open(p, O_RDONLY)) < 0) return FALSE; if ((fstat(fd, &Sb) < 0) || !S_ISREG(Sb.st_mode)) { close(fd); return FALSE; --- 481,489 ---- *ap = 0; } else { if (innconf->articlemmap) { ! if ((fd = open(p, O_RDONLY)) < 0) { return FALSE; + } if ((fstat(fd, &Sb) < 0) || !S_ISREG(Sb.st_mode)) { close(fd); return FALSE; *************** *** 445,459 **** } close(fd); } else { ! if ((ARTqp = QIOopen(p)) == NULL) return FALSE; if (fstat(QIOfileno(ARTqp), &Sb) < 0 || !S_ISREG(Sb.st_mode)) { ARTclose(); return FALSE; } CloseOnExec(QIOfileno(ARTqp), TRUE); } - p += SPOOLlen + 1; if ((q = strrchr(p, '/')) != NULL) *q++ = '\0'; if (GRPlast[0] && EQ(p, GRPlast)) --- 495,509 ---- } close(fd); } else { ! if ((ARTqp = QIOopen(p)) == NULL) { return FALSE; + } if (fstat(QIOfileno(ARTqp), &Sb) < 0 || !S_ISREG(Sb.st_mode)) { ARTclose(); return FALSE; } CloseOnExec(QIOfileno(ARTqp), TRUE); } if ((q = strrchr(p, '/')) != NULL) *q++ = '\0'; if (GRPlast[0] && EQ(p, GRPlast)) *************** *** 463,468 **** --- 513,588 ---- } /* + * Figure out if an article has been cancelled. + * As a side-effect (and a very important one), sets + * the Token for the article. + * IsCancelled uses the article number proper. + * IsCancelledByIndex uses an index into ARTnumbers. + */ + STATIC BOOL IsCancelled(int artnum, BOOL checkart) + { + int i; + + if (!innconf->storageapi) + return FALSE; + + if ((i = ARTfind(artnum, checkart)) < 0) + return TRUE; + + + return IsCancelledByIndex(i,artnum); + } + + STATIC BOOL IsCancelledByIndex(int i, int artnum) + { + OVERINDEX index; + char *tokentext; + + if (!innconf->storageapi) + return FALSE; + + if (ARTnumbers[i].Token.cancelled) + return TRUE; + if (ARTnumbers[i].Tokenretrieved) { + if (ARTnumbers[i].Token.type == TOKEN_EMPTY) + return TRUE; + return FALSE; + } + + if ((artnum && (ARTnumbers[i].ArtNum != artnum)) || !ARTnumbers[i].Index) + return ARTnumbers[i].Token.cancelled = TRUE; + + UnpackOverIndex(*(ARTnumbers[i].Index), &index); + if (HashEmpty(index.hash)) + return TRUE; + if (artnum && (index.artnum != artnum)) + return ARTnumbers[i].Token.cancelled = TRUE; + + #ifndef DO_TAGGED_HASH + if (innconf->extendeddbz) { + if (!OVERgetent(&index.hash, &ARTnumbers[i].Token, &ARTnumbers[i].Offset)) + return ARTnumbers[i].Token.cancelled = TRUE; + return FALSE; + } else { + if (HISgetent(&index.hash, FALSE, &ARTnumbers[i].Offset) == (char *)NULL) + return ARTnumbers[i].Token.cancelled = TRUE; + } + #else + /* need to call HISgetent here so ARTnumbers[i].Offset will be set for + code below. */ + if (HISgetent(&index.hash, FALSE, &ARTnumbers[i].Offset) == (char *)NULL) + return ARTnumbers[i].Token.cancelled = TRUE; + #endif + + ARTnumbers[i].Tokenretrieved = TRUE; + if ((tokentext = HISgetent(&index.hash, TRUE, &ARTnumbers[i].Offset)) == (char *)NULL) + return ARTnumbers[i].Token.cancelled = TRUE; + + ARTnumbers[i].Token = TextToToken(tokentext); + + return FALSE; + } + /* ** Send a (part of) a file to stdout, doing newline and dot conversion. */ STATIC void ARTsendmmap(SENDTYPE what) *************** *** 498,504 **** if (*p == '\n') { if (FirstLine) FirstLine = 0; ! if ((lastchar == '\n') && !InBody) if (what == SThead) { if (*(p-1) == '\r') p--; --- 618,624 ---- if (*p == '\n') { if (FirstLine) FirstLine = 0; ! if ((lastchar == '\n') && !InBody) { if (what == SThead) { if (*(p-1) == '\r') p--; *************** *** 516,521 **** --- 636,642 ---- } } } + } if (((what == STarticle) || ((what == SThead) && !InBody) || ((what == STbody) && InBody)) && *************** *** 639,646 **** } if ((lastchar == '\n') || (p == ARTmem)) { if (!strncasecmp(p, header, strlen(header))) { ! for (; (p < limit) && !isspace(*p) ; p++); ! for (; (p < limit) && isspace(*p) ; p++); for (q = p; q < limit; q++) if ((*q == '\r') || (*q == '\n')) break; --- 760,767 ---- } if ((lastchar == '\n') || (p == ARTmem)) { if (!strncasecmp(p, header, strlen(header))) { ! for (; (p < limit) && !isspace((int)*p) ; p++); ! for (; (p < limit) && isspace((int)*p) ; p++); for (q = p; q < limit; q++) if ((*q == '\r') || (*q == '\n')) break; *************** *** 744,750 **** ARTsendmmap(what->Type); else ARTsendqio(what->Type); ! if (tart != 0 && RARTenable && RARTcount < ART_MAX) RARTtable[RARTcount++]=tart; } ARTclose(); --- 865,871 ---- ARTsendmmap(what->Type); else ARTsendqio(what->Type); ! if (tart != 0 && innconf->readertrack && RARTcount < ART_MAX) RARTtable[RARTcount++]=tart; } ARTclose(); *************** *** 794,800 **** ARTsendmmap(what->Type); else ARTsendqio(what->Type); ! if (tart != 0 && RARTenable && RARTcount < ART_MAX) RARTtable[RARTcount++]=tart; } if (ac > 1) --- 915,921 ---- ARTsendmmap(what->Type); else ARTsendqio(what->Type); ! if (tart != 0 && innconf->readertrack && RARTcount < ART_MAX) RARTtable[RARTcount++]=tart; } if (ac > 1) *************** *** 874,883 **** STATIC BOOL CMDgetrange(int ac, char *av[], ARTRANGE *rp, BOOL *DidReply) { ! char *p, *tokentext; ! OVERINDEX index; ! int i; ! ARTNUM artnum; *DidReply = FALSE; if (GRPcount == 0) { --- 995,1001 ---- STATIC BOOL CMDgetrange(int ac, char *av[], ARTRANGE *rp, BOOL *DidReply) { ! char *p; *DidReply = FALSE; if (GRPcount == 0) { *************** *** 894,959 **** return FALSE; } rp->High = rp->Low = ARTnumbers[ARTindex].ArtNum; ! if (!innconf->storageapi) ! return TRUE; ! if ((i = ARTfind(rp->High, FALSE)) < 0) ! return FALSE; ! if (ARTnumbers[i].Token.cancelled) ! return FALSE; ! if (ARTnumbers[i].Tokenretrieved) { ! if (ARTnumbers[i].Token.type == TOKEN_EMPTY) ! return FALSE; ! return TRUE; ! } ! if ((ARTnumbers[i].ArtNum != rp->High) || !ARTnumbers[i].Index) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! if (index.artnum != rp->High) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! ARTnumbers[i].Tokenretrieved = TRUE; ! if ((tokentext = HISgetent(&index.hash, FALSE, NULL)) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! ARTnumbers[i].Token = TextToToken(tokentext); ! return TRUE; } /* Got just a single number? */ if ((p = strchr(av[1], '-')) == NULL) { rp->Low = rp->High = atol(av[1]); ! if (!innconf->storageapi) { ! return TRUE; ! } ! if ((i = ARTfind(rp->Low, FALSE)) < 0) ! return FALSE; ! if (ARTnumbers[i].Token.cancelled) ! return FALSE; ! if (ARTnumbers[i].Tokenretrieved) { ! if (ARTnumbers[i].Token.type == TOKEN_EMPTY) ! return FALSE; ! return TRUE; ! } ! if ((ARTnumbers[i].ArtNum != rp->Low) || !ARTnumbers[i].Index) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! if (index.artnum != rp->Low) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! ARTnumbers[i].Tokenretrieved = TRUE; ! if ((tokentext = HISgetent(&index.hash, FALSE, NULL)) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! return FALSE; ! } ! ARTnumbers[i].Token = TextToToken(tokentext); ! return TRUE; } /* Parse range. */ --- 1012,1024 ---- return FALSE; } rp->High = rp->Low = ARTnumbers[ARTindex].ArtNum; ! return !IsCancelled(rp->High, innconf->nnrpdcheckart); } /* Got just a single number? */ if ((p = strchr(av[1], '-')) == NULL) { rp->Low = rp->High = atol(av[1]); ! return !IsCancelled(rp->Low, innconf->nnrpdcheckart); } /* Parse range. */ *************** *** 971,1038 **** else /* No articles; make sure loops don't run. */ rp->High = rp->Low ? rp->Low - 1 : 0; ! if (!innconf->storageapi) ! return TRUE; ! for (artnum = rp->Low; artnum <= rp->High; artnum++) { ! if ((i = ARTfind(artnum, FALSE)) < 0) ! continue; ! if (ARTnumbers[i].Token.cancelled) ! continue; ! if (ARTnumbers[i].Token.type != TOKEN_EMPTY) ! continue; ! if ((ARTnumbers[i].ArtNum != artnum) || !ARTnumbers[i].Index) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! UnpackOverIndex(*(ARTnumbers[i].Index), &index); ! if (index.artnum != artnum) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! #ifdef DO_TAGGED_HASH ! ARTnumbers[i].Tokenretrieved = TRUE; ! if (HISgetent(&index.hash, FALSE, &ARTnumbers[i].Offset) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! if ((tokentext = HISgetent(&index.hash, TRUE, &ARTnumbers[i].Offset)) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! ARTnumbers[i].Token = TextToToken(tokentext); ! #else ! if (innconf->extendeddbz) { ! if (!OVERgetent(&index.hash, &ARTnumbers[i].Token)) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! } else { ! if (HISgetent(&index.hash, FALSE, &ARTnumbers[i].Offset) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! } ! #endif ! } ! #ifdef DO_TAGGED_HASH ! return TRUE; ! #else ! if (innconf->extendeddbz) ! return TRUE; ! for (artnum = rp->Low; artnum <= rp->High; artnum++) { ! if ((i = ARTfind(artnum, FALSE)) < 0) ! continue; ! if (ARTnumbers[i].Token.cancelled) ! continue; ! ARTnumbers[i].Tokenretrieved = TRUE; ! if ((tokentext = HISgetent(&index.hash, TRUE, &ARTnumbers[i].Offset)) == (char *)NULL) { ! ARTnumbers[i].Token.cancelled = TRUE; ! continue; ! } ! ARTnumbers[i].Token = TextToToken(tokentext); ! } return TRUE; - #endif } --- 1036,1043 ---- else /* No articles; make sure loops don't run. */ rp->High = rp->Low ? rp->Low - 1 : 0; ! return TRUE; } *************** *** 1154,1160 **** */ void OVERclose(void) { - int i; if (innconf->storageapi) { (void)OVERshutdown(); } else { --- 1159,1164 ---- *************** *** 1180,1190 **** STATIC char *OVERfind(ARTNUM artnum, int *linelen) { int i; - char *q; - OVERINDEX index; STATIC char *OVERline = NULL; ! char *tokentext, *nextline; ! TOKEN token; if (innconf->storageapi) { if ((i = ARTfind(artnum, FALSE)) < 0) --- 1184,1191 ---- STATIC char *OVERfind(ARTNUM artnum, int *linelen) { int i; STATIC char *OVERline = NULL; ! char *nextline; if (innconf->storageapi) { if ((i = ARTfind(artnum, FALSE)) < 0) *************** *** 1481,1506 **** } Reply("%d %s fields follow\r\n", NNTP_HEAD_FOLLOWS_VAL, av[1]); ! for (i = range.Low; i <= range.High; i++) { if (ARTfind(i, innconf->storageapi && innconf->nnrpdcheckart) < 0) continue; /* Get it from the overview? */ ! if (Overview && (p = OVERfind(i, &linelen)) != NULL) { p = OVERGetHeader(p, Overview); ! Printf("%ld %s\r\n", i, p && *p ? p : "(none)"); continue; } ! (void)sprintf(buff, "%ld", i); if (!ARTopen(buff)) continue; p = GetHeader(av[1], IsLines); ! Printf("%ld %s\r\n", i, p ? p : "(none)"); ARTclose(); } Printf(".\r\n"); ! OVERclose(); } --- 1482,1508 ---- } Reply("%d %s fields follow\r\n", NNTP_HEAD_FOLLOWS_VAL, av[1]); ! for (i = range.Low; i <= range.High && range.High > 0; i++) { if (ARTfind(i, innconf->storageapi && innconf->nnrpdcheckart) < 0) continue; /* Get it from the overview? */ ! if (Overview && !IsCancelled(i, FALSE) && (p = OVERfind(i, &linelen)) != NULL) { p = OVERGetHeader(p, Overview); ! Printf("%d %s\r\n", i, p && *p ? p : "(none)"); continue; } ! (void)sprintf(buff, "%d", i); if (!ARTopen(buff)) continue; p = GetHeader(av[1], IsLines); ! Printf("%d %s\r\n", i, p ? p : "(none)"); ARTclose(); } Printf(".\r\n"); ! if (innconf->storageapi) ! OVERclose(); } *************** *** 1510,1522 **** FUNCTYPE CMDxover(int ac, char *av[]) { char *p; ! ARTNUM i; BOOL Opened; BOOL DidReply; ARTRANGE range; char buff[SPOOLNAMEBUFF]; struct timeval stv, etv; int linelen; if (!PERMcanread) { Printf("%s\r\n", NOACCESS); --- 1512,1525 ---- FUNCTYPE CMDxover(int ac, char *av[]) { char *p; ! int i, j; BOOL Opened; BOOL DidReply; ARTRANGE range; char buff[SPOOLNAMEBUFF]; struct timeval stv, etv; int linelen; + BOOL checkart; if (!PERMcanread) { Printf("%s\r\n", NOACCESS); *************** *** 1541,1566 **** OVERcount++; Reply("%d data follows\r\n", NNTP_OVERVIEW_FOLLOWS_VAL); ! for (Opened = OVERopen(), i = range.Low; i <= range.High; i++) { ! if (ARTfind(i, innconf->storageapi && innconf->nnrpdcheckart) < 0) { ! if (innconf->storageapi) ! OVERmiss++; continue; } ! if (Opened && (p = OVERfind(i, &linelen)) != NULL) { OVERhit++; OVERsize+=linelen; if ((innconf->storageapi && innconf->overviewmmap) || OVERmem) { if (innconf->storageapi && innconf->overviewmmap) { ! (void)sprintf(buff, "%ld\t", i); SendIOb(buff, strlen(buff)); } SendIOb(p, linelen); SendIOb("\r\n", 2); } else { if (innconf->storageapi) { ! Printf("%ld\t%s\r\n", i, p); } else { Printf("%s\r\n", p); } --- 1544,1575 ---- OVERcount++; Reply("%d data follows\r\n", NNTP_OVERVIEW_FOLLOWS_VAL); ! /* Find the first article in the group that actually exists */ ! checkart = (innconf->storageapi && innconf->nnrpdcheckart); ! for (; ((i = ARTfind(range.Low, checkart)) < 0) && (range.Low <= range.High); ! range.Low++); ! ! for (Opened = OVERopen(); ! (i >= 0) && (i < ARTsize) && (ARTnumbers[i].ArtNum <= range.High) && (range.High > 0); ! i++) { ! if (innconf->storageapi && !ARTinstore(i)) { ! OVERmiss++; continue; } ! if (Opened && (p = OVERfind(ARTnumbers[i].ArtNum, &linelen)) != NULL) { OVERhit++; OVERsize+=linelen; if ((innconf->storageapi && innconf->overviewmmap) || OVERmem) { if (innconf->storageapi && innconf->overviewmmap) { ! (void)sprintf(buff, "%ld\t", ARTnumbers[i].ArtNum); SendIOb(buff, strlen(buff)); } SendIOb(p, linelen); SendIOb("\r\n", 2); } else { if (innconf->storageapi) { ! Printf("%ld\t%s\r\n", ARTnumbers[i].ArtNum, p); } else { Printf("%s\r\n", p); } *************** *** 1571,1577 **** continue; /* This happens with traditional spool */ ! (void)sprintf(buff, "%ld", i); if ((p = OVERgen(buff)) != NULL) { OVERmiss++; linelen = strlen(p); --- 1580,1586 ---- continue; /* This happens with traditional spool */ ! (void)sprintf(buff, "%ld", ARTnumbers[i].ArtNum); if ((p = OVERgen(buff)) != NULL) { OVERmiss++; linelen = strlen(p); *************** *** 1590,1596 **** } else { Printf(".\r\n"); } ! OVERclose(); gettimeofday(&etv, NULL); OVERtime+=(etv.tv_sec - stv.tv_sec) * 1000; OVERtime+=(etv.tv_usec - stv.tv_usec) / 1000; --- 1599,1606 ---- } else { Printf(".\r\n"); } ! if (innconf->storageapi) ! OVERclose(); gettimeofday(&etv, NULL); OVERtime+=(etv.tv_sec - stv.tv_sec) * 1000; OVERtime+=(etv.tv_usec - stv.tv_usec) / 1000; *************** *** 1662,1692 **** } Printf("%d %s matches follow.\r\n", NNTP_HEAD_FOLLOWS_VAL, header); ! for (pattern = Glom(&av[3]), i = range.Low; i <= range.High; i++) { if (ARTfind(i, innconf->storageapi && innconf->nnrpdcheckart) < 0) continue; /* Get it from the Overview? */ if (Overview && (p = OVERfind(i, &linelen)) != NULL && (p = OVERGetHeader(p, Overview)) != NULL) { if (wildmat(p, pattern)) ! Printf("%ld %s\r\n", i, p); continue; } ! (void)sprintf(buff, "%ld", i); if (!ARTopen(buff)) continue; if ((p = GetHeader(av[1], FALSE)) == NULL) p = "(none)"; if (wildmat(p, pattern)) ! Printf("%ld %s\r\n", i, p); ARTclose(); } Printf(".\r\n"); DISPOSE(pattern); ! OVERclose(); } --- 1672,1704 ---- } Printf("%d %s matches follow.\r\n", NNTP_HEAD_FOLLOWS_VAL, header); ! for (pattern = Glom(&av[3]), i = range.Low; i <= range.High && range.High > 0; i++) { if (ARTfind(i, innconf->storageapi && innconf->nnrpdcheckart) < 0) continue; /* Get it from the Overview? */ if (Overview + && !IsCancelled(i, FALSE) && (p = OVERfind(i, &linelen)) != NULL && (p = OVERGetHeader(p, Overview)) != NULL) { if (wildmat(p, pattern)) ! Printf("%d %s\r\n", i, p); continue; } ! (void)sprintf(buff, "%d", i); if (!ARTopen(buff)) continue; if ((p = GetHeader(av[1], FALSE)) == NULL) p = "(none)"; if (wildmat(p, pattern)) ! Printf("%d %s\r\n", i, p); ARTclose(); } Printf(".\r\n"); DISPOSE(pattern); ! if (innconf->storageapi) ! OVERclose(); } diff -Nacr inn-2.1/nnrpd/commands.c inn-2.2/nnrpd/commands.c *** inn-2.1/nnrpd/commands.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/commands.c Mon Jan 11 02:00:28 1999 *************** *** 1,4 **** ! /* $Revision: 1.18 $ ** ** Miscellaneous commands. */ --- 1,4 ---- ! /* $Revision: 1.20.2.3 $ ** ** Miscellaneous commands. */ *************** *** 20,25 **** --- 20,28 ---- } LISTINFO; + extern int LLOGenable; + + STATIC LISTINFO INFOactive = { NULL, _PATH_ACTIVE, TRUE, "active newsgroups", "Newsgroups in form \"group high low flags\"" *************** *** 206,211 **** --- 209,215 ---- static char User[30]; static char Password[30]; char accesslist[BIG_BUFFER]; + int code; if (caseEQ(av[1], "generic")) { char *logrec = Glom(av); *************** *** 254,280 **** (void)strncpy(Password, av[2], sizeof Password - 1); Password[sizeof Password - 1] = 0; ! if (EQ(User, PERMuser) && EQ(Password, PERMpass)) { ! syslog(L_NOTICE, "%s user %s", ClientHost, User); ! Reply("%d Ok\r\n", NNTP_AUTH_OK_VAL); ! PERMneedauth = FALSE; ! PERMauthorized = TRUE; ! return; ! } ! if (PERMinfile((char *)NULL, (char *)NULL, User, Password, ! accesslist, NNRPACCESS)) { ! PERMspecified = NGgetlist(&PERMlist, accesslist); ! syslog(L_NOTICE, "%s user %s", ClientHost, User); ! Reply("%d Ok\r\n", NNTP_AUTH_OK_VAL); ! PERMneedauth = FALSE; ! PERMauthorized = TRUE; ! return; } syslog(L_NOTICE, "%s bad_auth", ClientHost); Reply("%d Authentication error\r\n", NNTP_ACCESS_VAL); ExitWithStats(1); - } } --- 258,318 ---- (void)strncpy(Password, av[2], sizeof Password - 1); Password[sizeof Password - 1] = 0; ! #ifdef DO_PERL ! if (innconf->nnrpperlauth) { ! code = perlAuthenticate(ClientHost, ClientIp, User, Password, accesslist); ! if (code == NNTP_AUTH_OK_VAL) { ! PERMspecified = NGgetlist(&PERMlist, accesslist); ! syslog(L_NOTICE, "%s user %s", ClientHost, User); ! Reply("%d Ok\r\n", NNTP_AUTH_OK_VAL); ! PERMneedauth = FALSE; ! PERMauthorized = TRUE; ! return; ! } else { ! syslog(L_NOTICE, "%s bad_auth", ClientHost); ! Reply("%d Authentication error\r\n", NNTP_ACCESS_VAL); ! ExitWithStats(1); ! } ! } else { ! #endif /* DO_PERL */ ! if (EQ(User, PERMuser) && EQ(Password, PERMpass)) { ! syslog(L_NOTICE, "%s user %s", ClientHost, User); ! if (LLOGenable) { ! fprintf(locallog, "%s user (%s):%s\n", ClientHost, Username, User); ! fflush(locallog); ! } ! if (LLOGenable) { ! fprintf(locallog, "%s user (%s):%s\n", ClientHost, Username, User); ! fflush(locallog); ! } ! Reply("%d Ok\r\n", NNTP_AUTH_OK_VAL); ! /* save these values in case you need them later */ ! strcpy(PERMuser, User); ! strcpy(PERMpass, Password); ! PERMneedauth = FALSE; ! PERMauthorized = TRUE; ! return; ! } ! if (PERMinfile((char *)NULL, (char *)NULL, User, Password, ! accesslist, NNRPACCESS)) { ! PERMspecified = NGgetlist(&PERMlist, accesslist); ! syslog(L_NOTICE, "%s user %s", ClientHost, User); ! if (LLOGenable) { ! fprintf(locallog, "%s user (%s):%s\n", ClientHost, Username, User); ! fflush(locallog); ! } ! Reply("%d Ok\r\n", NNTP_AUTH_OK_VAL); ! PERMneedauth = FALSE; ! PERMauthorized = TRUE; ! return; ! } ! #ifdef DO_PERL } + #endif /* DO_PERL */ syslog(L_NOTICE, "%s bad_auth", ClientHost); Reply("%d Authentication error\r\n", NNTP_ACCESS_VAL); ExitWithStats(1); } } *************** *** 341,347 **** grplist[0] = av[2]; grplist[1] = NULL; Reply("%d list:\r\n", NNTP_LIST_FOLLOWS_VAL); ! if (PERMmatch(PERMdefault, PERMlist, grplist)) Printf("%s %ld %ld %c%s\r\n.\r\n", GPNAME(gp), (long)GPHIGH(gp), (long)GPLOW(gp), GPFLAG(gp), GPALIAS(gp) ? GPALIAS(gp) : ""); --- 379,385 ---- grplist[0] = av[2]; grplist[1] = NULL; Reply("%d list:\r\n", NNTP_LIST_FOLLOWS_VAL); ! if (PERMmatch(PERMlist, grplist)) Printf("%s %ld %ld %c%s\r\n.\r\n", GPNAME(gp), (long)GPHIGH(gp), (long)GPLOW(gp), GPFLAG(gp), GPALIAS(gp) ? GPALIAS(gp) : ""); *************** *** 400,406 **** } Reply("%d %s.\r\n", NNTP_LIST_FOLLOWS_VAL, lp->Format); ! if (!PERMspecified && !PERMdefault) { /* Optmize for unlikely case of no permissions and FALSE default. */ (void)QIOclose(qp); Printf(".\r\n"); --- 438,444 ---- } Reply("%d %s.\r\n", NNTP_LIST_FOLLOWS_VAL, lp->Format); ! if (!PERMspecified) { /* Optmize for unlikely case of no permissions and FALSE default. */ (void)QIOclose(qp); Printf(".\r\n"); *************** *** 429,435 **** continue; *save = '\0'; grplist[0] = q; ! if (!PERMmatch(PERMdefault, PERMlist, grplist)) continue; *save = ':'; } --- 467,473 ---- continue; *save = '\0'; grplist[0] = q; ! if (!PERMmatch(PERMlist, grplist)) continue; *save = ':'; } *************** *** 453,459 **** if (PERMspecified) { grplist[0] = p; ! if (!PERMmatch(PERMdefault, PERMlist, grplist)) continue; } if (wildarg && !wildmat(p, wildarg)) --- 491,497 ---- if (PERMspecified) { grplist[0] = p; ! if (!PERMmatch(PERMlist, grplist)) continue; } if (wildarg && !wildmat(p, wildarg)) *************** *** 561,570 **** if (PERMspecified) { grplist[0] = p; grplist[1] = NULL; ! if (!PERMmatch(PERMdefault, PERMlist, grplist)) continue; } ! else if (!PERMdefault) continue; if (!All) { --- 599,608 ---- if (PERMspecified) { grplist[0] = p; grplist[1] = NULL; ! if (!PERMmatch(PERMlist, grplist)) continue; } ! else continue; if (!All) { *************** *** 758,765 **** char *p; HASH hash = HashMessageID(av[1]); ! if ((p = HISgetent(&hash, TRUE, NULL)) == NULL) Reply("%d Don't have it\r\n", NNTP_DONTHAVEIT_VAL); ! else Reply("%d %s\r\n", NNTP_NOTHING_FOLLOWS_VAL, p); } --- 796,806 ---- char *p; HASH hash = HashMessageID(av[1]); ! if (innconf->storageapi) { ! Reply("%d Syntax error or bad command\r\n", NNTP_BAD_COMMAND_VAL); ! } else if ((p = HISgetent(&hash, TRUE, NULL)) == NULL) { Reply("%d Don't have it\r\n", NNTP_DONTHAVEIT_VAL); ! } else { Reply("%d %s\r\n", NNTP_NOTHING_FOLLOWS_VAL, p); + } } diff -Nacr inn-2.1/nnrpd/group.c inn-2.2/nnrpd/group.c *** inn-2.1/nnrpd/group.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/group.c Sun Nov 15 22:45:14 1998 *************** *** 1,4 **** ! /* $Revision: 1.26 $ ** ** Newsgroups and the active file. */ --- 1,4 ---- ! /* $Revision: 1.32.2.2 $ ** ** Newsgroups and the active file. */ *************** *** 43,49 **** unsigned int RARTtable[ART_MAX]; int RARTcount=0; - int RARTenable=FALSE; int LLOGenable=FALSE; void --- 43,48 ---- *************** *** 467,473 **** struct timeval timeout; if (GRPactived < 0) { ! if ((s = create_udp_socket(0)) < 0) { syslog(L_ERROR, "%s actived socket couldnt be created %m", ClientHost); return(FALSE); --- 466,475 ---- struct timeval timeout; if (GRPactived < 0) { ! /* On Linux, the obtained socket can have the same ID (IP+port) */ ! /* than the actived server. In that case, any future nnrpd will */ ! /* be unable to connect to actived. */ ! if ((s = create_udp_socket(0, innconf->activedport)) < 0) { syslog(L_ERROR, "%s actived socket couldnt be created %m", ClientHost); return(FALSE); *************** *** 569,575 **** ** Fill in ARTnumbers with the numbers of the articles in the current ** group. */ ! STATIC void GRPscandir(char *dir) { static int ARTarraysize; DIRENTRY *ep; --- 571,577 ---- ** Fill in ARTnumbers with the numbers of the articles in the current ** group. */ ! STATIC void GRPscandir(char *dir, GROUPENTRY *ge) { static int ARTarraysize; DIRENTRY *ep; *************** *** 582,587 **** --- 584,593 ---- char (*tmp)[][OVERINDEXPACKSIZE]; int icount; OVERINDEX index; + ARTNUM low, high; + + low = GPLOW(ge); + high = GPHIGH(ge); ARTsize = 0; GRPcount++; *************** *** 614,620 **** if (ARTarraysize == 0) { ARTnumbers = NEW(ARTLIST, OVERicount); } else { ! ARTnumbers = RENEW(ARTnumbers, ARTLIST, OVERicount); } ARTarraysize = OVERicount; for (i = 0; i < OVERicount; i++) { --- 620,626 ---- if (ARTarraysize == 0) { ARTnumbers = NEW(ARTLIST, OVERicount); } else { ! RENEW(ARTnumbers, ARTLIST, OVERicount); } ARTarraysize = OVERicount; for (i = 0; i < OVERicount; i++) { *************** *** 623,631 **** ARTnumbers[ARTsize].Token.cancelled = FALSE; ARTnumbers[ARTsize].Token.type = TOKEN_EMPTY; ARTnumbers[ARTsize].Tokenretrieved = FALSE; ARTnumbers[ARTsize++].Index = &(*OVERindex)[i]; } ! } } else if (!innconf->storageapi) { DISPOSE(path); --- 629,639 ---- ARTnumbers[ARTsize].Token.cancelled = FALSE; ARTnumbers[ARTsize].Token.type = TOKEN_EMPTY; ARTnumbers[ARTsize].Tokenretrieved = FALSE; + ARTnumbers[ARTsize].Offset = -1; ARTnumbers[ARTsize++].Index = &(*OVERindex)[i]; } ! } else ! close(fd); } else if (!innconf->storageapi) { DISPOSE(path); *************** *** 660,672 **** } if (*p || i == 0) continue; ! if (ARTsize + 1 >= ARTarraysize) { ARTarraysize += 1024; RENEW(ARTnumbers, ARTLIST, ARTarraysize); } ARTnumbers[ARTsize].ArtNum = i; ARTnumbers[ARTsize++].Index = NULL; } (void)closedir(dp); --- 668,682 ---- } if (*p || i == 0) continue; ! if (i < low || i > high) ! continue; if (ARTsize + 1 >= ARTarraysize) { ARTarraysize += 1024; RENEW(ARTnumbers, ARTLIST, ARTarraysize); } ARTnumbers[ARTsize].ArtNum = i; + ARTnumbers[ARTsize].Offset = -1; ARTnumbers[ARTsize++].Index = NULL; } (void)closedir(dp); *************** *** 693,698 **** --- 703,709 ---- char *grplist[2]; char *group; char buff[SPOOLNAMEBUFF]; + GROUPENTRY *ge; if (!PERMcanread) { Reply("%s\r\n", NOACCESS); *************** *** 713,719 **** } else group = av[1]; ! if (GRPfind(group) == NULL) { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } --- 724,730 ---- } else group = av[1]; ! if ((ge = GRPfind(group)) == NULL) { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } *************** *** 722,733 **** if (PERMspecified) { grplist[0] = group; grplist[1] = NULL; ! if (!PERMmatch(PERMdefault, PERMlist, grplist)) { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } ! } ! else if (!PERMdefault) { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } --- 733,743 ---- if (PERMspecified) { grplist[0] = group; grplist[1] = NULL; ! if (!PERMmatch(PERMlist, grplist)) { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } ! } else { Reply("%s %s\r\n", NOSUCHGROUP, group); return; } *************** *** 748,754 **** /* If we haven't been in the group recently, rescan. */ (void)time(&now); if (!EQ(buff, GRPlast) || now > last_time + NNRP_RESCAN_DELAY) { ! GRPscandir(buff); (void)strcpy(GRPlast, buff); last_time = now; } --- 758,764 ---- /* If we haven't been in the group recently, rescan. */ (void)time(&now); if (!EQ(buff, GRPlast) || now > last_time + NNRP_RESCAN_DELAY) { ! GRPscandir(buff, ge); (void)strcpy(GRPlast, buff); last_time = now; } *************** *** 794,800 **** syslog(L_NOTICE, "%s group %s %ld", ClientHost, buff, GRParticles); GRParticles = 0; repbuff[0]='\0'; ! if (RARTenable && (RARTcount > 0)) { for (pp=0;ppreadertrack && (RARTcount > 0)) { for (pp=0;pp --- 1,4 ---- ! /* $Revision: 1.3.2.1 $ ** */ #include *************** *** 9,14 **** --- 9,20 ---- #include "nnrpd.h" #if NNRP_LOADLIMIT > 0 #ifdef linux + #ifdef HAVE_SYS_SYSINFO_H + #include + #else + /* not all linuces have sys/sysinfo.h -- egil@kvaleberg.no */ + #include + #endif /* ** Get the current load average as an integer. *************** *** 16,30 **** int GetLoadAverage() { ! FILE *ProcLoadAve; ! float load; ! if ((ProcLoadAve=fopen("/proc/loadavg", "r"))==NULL) ! return -1; ! if (fscanf(ProcLoadAve,"%f", &load)!=1) ! return -1; ! fclose(ProcLoadAve); ! return (int)(load+0.5); } #else --- 22,33 ---- int GetLoadAverage() { ! struct sysinfo si; ! if (sysinfo (&si)) ! return -1; ! ! return (si.loads[0] + (1 << 15)) >> 16; } #else diff -Nacr inn-2.1/nnrpd/misc.c inn-2.2/nnrpd/misc.c *** inn-2.1/nnrpd/misc.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/misc.c Fri Jan 8 22:02:04 1999 *************** *** 1,4 **** ! /* $Revision: 1.22 $ ** ** Miscellaneous support routines. */ --- 1,4 ---- ! /* $Revision: 1.28.2.4 $ ** ** Miscellaneous support routines. */ *************** *** 20,26 **** #define ASCtoNUM(c) ((c) - '0') #define CHARStoINT(c1, c2) (ASCtoNUM((c1)) * 10 + ASCtoNUM((c2))) ! #define DaysInYear(y) ((y % 4 ? 365 : 366)) /* --- 20,26 ---- #define ASCtoNUM(c) ((c) - '0') #define CHARStoINT(c1, c2) (ASCtoNUM((c1)) * 10 + ASCtoNUM((c2))) ! #define DaysInYear(y) ((y) % 4 ? 365 : (y) % 100 ? 366 : (y) % 400 ? 365 : 366) /* *************** *** 97,110 **** ** Match a list of newsgroup specifiers against a list of newsgroups. ** func is called to see if there is a match. */ ! BOOL ! PERMmatch(match, Pats, list) ! register BOOL match; ! char **Pats; ! char **list; { ! register int i; ! register char *p; if (Pats[0] == NULL) return TRUE; --- 97,107 ---- ** Match a list of newsgroup specifiers against a list of newsgroups. ** func is called to see if there is a match. */ ! BOOL PERMmatch(char **Pats, char **list) { ! int i; ! char *p; ! int match = FALSE; if (Pats[0] == NULL) return TRUE; *************** *** 138,144 **** char *p; if (!PERMspecified) ! return PERMdefault; if ((p = GetHeader("Newsgroups", FALSE)) == NULL) return 1; --- 135,141 ---- char *p; if (!PERMspecified) ! return FALSE; if ((p = GetHeader("Newsgroups", FALSE)) == NULL) return 1; *************** *** 146,152 **** /* No newgroups or null entry. */ return 1; ! return PERMmatch(PERMdefault, PERMlist, grplist); } --- 143,149 ---- /* No newgroups or null entry. */ return 1; ! return PERMmatch(PERMlist, grplist); } *************** *** 169,191 **** int hour; int mins; int secs; register int i; long seconds; ! char buff[6 + 6 + 1]; ! if (strlen(av1) != 6 || strlen(av2) != 6) return -1; (void)sprintf(buff, "%s%s", av1, av2); for (p = buff; *p; p++) ! if (!CTYPE(isdigit, *p)) return -1; ! year = CHARStoINT(buff[ 0], buff[ 1]); ! month = CHARStoINT(buff[ 2], buff[ 3]); ! day = CHARStoINT(buff[ 4], buff[ 5]); ! hour = CHARStoINT(buff[ 6], buff[ 7]); ! mins = CHARStoINT(buff[ 8], buff[ 9]); ! secs = CHARStoINT(buff[10], buff[11]); if (month < 1 || month > 12 || day < 1 || day > 31 --- 166,210 ---- int hour; int mins; int secs; + int datelen; register int i; long seconds; ! char buff[8 + 6 + 1]; ! /* Y2K: accept YYMMDD, YYYMMDD or YYYYMMDD. ! First is strict NNTP spec, ! Second is broken clients that do "printf %02d tm_year", ! Third is people trying to do the right date thing ! despite the spec. */ ! datelen = strlen(av1); ! if ((datelen < 6 || datelen > 8) || strlen(av2) != 6) return -1; (void)sprintf(buff, "%s%s", av1, av2); for (p = buff; *p; p++) ! if (!CTYPE(isdigit, (int)*p)) return -1; ! p = buff + datelen - 6; ! ! year = CHARStoINT(p[ 0], p[ 1]); ! month = CHARStoINT(p[ 2], p[ 3]); ! day = CHARStoINT(p[ 4], p[ 5]); ! hour = CHARStoINT(p[ 6], p[ 7]); ! mins = CHARStoINT(p[ 8], p[ 9]); ! secs = CHARStoINT(p[10], p[11]); ! ! if (datelen == 6) { /* YYMMDD */ ! if (year > 70) ! year += 1900; ! else ! year += 2000; ! } else { ! year += ASCtoNUM(*--p) * 100; ! if (datelen == 7) /* YYYMMDD */ ! year += 1900; ! else ! year += ASCtoNUM(*--p) * 1000; /* YYYYMMDD */ ! } if (month < 1 || month > 12 || day < 1 || day > 31 *************** *** 199,208 **** else if (hour < 0 || hour > 23) return -1; ! if (year < 50) ! year += 100 ; ! ! for (seconds = 0, year += 1900, i = 1970; i < year; i++) seconds += DaysInYear(i); if (DaysInYear(year) == 366 && month > 2) seconds++; --- 218,224 ---- else if (hour < 0 || hour > 23) return -1; ! for (seconds = 0, i = 1970; i < year; i++) seconds += DaysInYear(i); if (DaysInYear(year) == 366 && month > 2) seconds++; *************** *** 251,257 **** /* ** Get overview offset */ ! BOOL OVERgetent(HASH *key, TOKEN *token) { struct timeval stv, etv; idxrec ionevalue; --- 267,273 ---- /* ** Get overview offset */ ! BOOL OVERgetent(HASH *key, TOKEN *token, OFFSET_T *offset) { struct timeval stv, etv; idxrec ionevalue; *************** *** 283,292 **** OVERdbz+=(etv.tv_usec - stv.tv_usec) / 1000; } OVERmaketoken(token, iextvalue.offset[OVEROFFSET], iextvalue.overindex, iextvalue.overlen); ! } else { ! return FALSE; } ! return TRUE; } #endif --- 299,309 ---- OVERdbz+=(etv.tv_usec - stv.tv_usec) / 1000; } OVERmaketoken(token, iextvalue.offset[OVEROFFSET], iextvalue.overindex, iextvalue.overlen); ! if (offset) ! *offset = iextvalue.offset[HISTOFFSET]; ! return TRUE; } ! return FALSE; } #endif *************** *** 294,300 **** ** Return the path name of an article if it is in the history file. ** Return a pointer to static data. */ ! char *HISgetent(HASH *key, BOOL flag, OFFSET_T *off) { static char path[BIG_BUFFER]; char *p; --- 311,317 ---- ** Return the path name of an article if it is in the history file. ** Return a pointer to static data. */ ! char *HISgetent(HASH *key, BOOL useoffset, OFFSET_T *off) { static char path[BIG_BUFFER]; char *p; *************** *** 305,324 **** struct stat Sb; struct timeval stv, etv; static int entrysize = 0; #ifndef DO_TAGGED_HASH idxrec ionevalue; idxrecext iextvalue; #endif if (entrysize == 0) { ! HASH hash; ! time_t dummy = ~(time_t)0; ! TOKEN token; ! sprintf(buff, "[%s]%c%lu%c%lu%c%lu%c%s\n", HashToText(hash), ! HIS_FIELDSEP, dummy, HIS_SUBFIELDSEP, ! dummy, HIS_SUBFIELDSEP, ! dummy, HIS_FIELDSEP, TokenToText(token)); ! entrysize = strlen(buff); } if (!setup) { if (!dbzinit(HISTORY)) { --- 322,346 ---- struct stat Sb; struct timeval stv, etv; static int entrysize = 0; + int i; #ifndef DO_TAGGED_HASH idxrec ionevalue; idxrecext iextvalue; #endif if (entrysize == 0) { ! if (innconf->storageapi) { ! HASH hash; ! time_t dummy = ~(time_t)0; ! TOKEN token; ! sprintf(buff, "[%s]%c%lu%c%lu%c%lu%c%s\n", HashToText(hash), ! HIS_FIELDSEP, dummy, HIS_SUBFIELDSEP, ! dummy, HIS_SUBFIELDSEP, ! dummy, HIS_FIELDSEP, TokenToText(token)); ! entrysize = strlen(buff); ! } else { ! entrysize = sizeof(buff) - 1; ! } } if (!setup) { if (!dbzinit(HISTORY)) { *************** *** 329,335 **** } /* Set the key value, fetch the entry. */ ! if (flag && (off != NULL)) { offset = *off; gettimeofday(&stv, NULL); } else { --- 351,357 ---- } /* Set the key value, fetch the entry. */ ! if (useoffset && (off != NULL)) { offset = *off; gettimeofday(&stv, NULL); } else { *************** *** 404,424 **** OVERseek+=(etv.tv_usec - stv.tv_usec) / 1000; } stv = etv; ! if (flag && (off == NULL)) { ! if (fgets(buff, sizeof buff, hfp) == NULL) { ! syslog(L_ERROR, "%s cant fgets from %ld %m", ClientHost, offset); ! return NULL; ! } ! } else { ! if (read(fileno(hfp), buff, entrysize) < 0) { ! syslog(L_ERROR, "%s cant read from %ld %m", ClientHost, offset); ! return NULL; ! } ! buff[entrysize+1] = '\0'; ! if (strchr(buff, '\n') == NULL) { ! syslog(L_ERROR, "%s cant find end of line %ld %m", ClientHost, offset); ! return NULL; ! } } if (innconf->nnrpdoverstats) { gettimeofday(&etv, NULL); --- 426,439 ---- OVERseek+=(etv.tv_usec - stv.tv_usec) / 1000; } stv = etv; ! if (read(fileno(hfp), buff, entrysize) < 0) { ! syslog(L_ERROR, "%s cant read from %ld %m", ClientHost, offset); ! return NULL; ! } ! buff[entrysize] = '\0'; ! if (strchr(buff, '\n') == NULL) { ! syslog(L_ERROR, "%s cant find end of line %ld %m", ClientHost, offset); ! return NULL; } if (innconf->nnrpdoverstats) { gettimeofday(&etv, NULL); *************** *** 438,454 **** return NULL; save = p + 1; ! if (IsToken(save)) { strcpy(path, save); return path; } /* Want the full data? */ ! if (flag) { (void)strcpy(path, save); ! for (p = path; *p; p++) if (*p == '.') *p = '/'; return path; } --- 453,473 ---- return NULL; save = p + 1; ! if (IsToken(save) && ((useoffset != TRUE) || (off != NULL))) { strcpy(path, save); return path; } /* Want the full data? */ ! if ((useoffset == TRUE) && (off == NULL)) { ! /* this is the case for called by CMDxpath() */ ! if (innconf->storageapi) ! return NULL; (void)strcpy(path, save); ! for (p = path; *p; p++) { if (*p == '.') *p = '/'; + } return path; } *************** *** 636,655 **** /* Read the runtime config file to get parameters */ ! if (innconf->backoff_db == NULL) return; ! else ! (void)strncpy(postrec_dir,innconf->backoff_db,SMBUF); /* Need this database for backing off */ if (stat(postrec_dir, &st) < 0) { syslog(L_ERROR, "%s cannot stat backoff_db '%s': %s",ClientHost,postrec_dir,strerror(errno)); return; } ! ! /* Only enable if the constants make sense */ ! if (innconf->backoff_k > 1L && innconf->backoff_postfast > 0L && innconf->backoff_postslow > 1L) { ! BACKOFFenabled = TRUE; ! } return; } --- 655,671 ---- /* Read the runtime config file to get parameters */ ! if ((innconf->backoff_db == NULL) || ! !(innconf->backoff_k > 1L && innconf->backoff_postfast > 0L && innconf->backoff_postslow > 1L)) ! return; /* Need this database for backing off */ + (void)strncpy(postrec_dir,innconf->backoff_db,SMBUF); if (stat(postrec_dir, &st) < 0) { syslog(L_ERROR, "%s cannot stat backoff_db '%s': %s",ClientHost,postrec_dir,strerror(errno)); return; } ! BACKOFFenabled = TRUE; return; } diff -Nacr inn-2.1/nnrpd/newnews.c inn-2.2/nnrpd/newnews.c *** inn-2.1/nnrpd/newnews.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/newnews.c Thu Oct 22 15:47:50 1998 *************** *** 1,4 **** ! /* $Revision: 1.8 $ ** ** The newnews command. */ --- 1,4 ---- ! /* $Revision: 1.9.2.1 $ ** ** The newnews command. */ *************** *** 248,253 **** --- 248,257 ---- return; } + /* Make other processes happier if someone uses NEWNEWS */ + if (innconf->nicenewnews > 0) + nice(innconf->nicenewnews); + (void)sprintf(line, "%s %s %s %s %s", av[1], av[2], av[3], (ac >= 5 && *av[4] == 'G') ? "GMT" : "local", *************** *** 347,353 **** continue; } else art = NULL; ! if (!AllGroups && !PERMmatch(FALSE, groups, files)) continue; if (!AllDists && !DistMatches(art, distribs, files)) continue; --- 351,357 ---- continue; } else art = NULL; ! if (!AllGroups && !PERMmatch(groups, files)) continue; if (!AllDists && !DistMatches(art, distribs, files)) continue; diff -Nacr inn-2.1/nnrpd/nnrpd.c inn-2.2/nnrpd/nnrpd.c *** inn-2.1/nnrpd/nnrpd.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/nnrpd.c Sun Nov 15 22:45:15 1998 *************** *** 1,4 **** ! /* $Revision: 1.43 $ ** ** NNTP server for readers (NNRP) for InterNetNews. ** This server doesn't do any real load-limiting, except for what has --- 1,4 ---- ! /* $Revision: 1.49.2.3 $ ** ** NNTP server for readers (NNRP) for InterNetNews. ** This server doesn't do any real load-limiting, except for what has *************** *** 18,27 **** #include "nnrpd.h" #include #include #if defined(HPUX) #include #endif /* defined(HPUX) */ ! /* ** Here is some defensive code to protect the news server from hosts, --- 18,30 ---- #include "nnrpd.h" #include #include + #include #if defined(HPUX) #include #endif /* defined(HPUX) */ ! #if HAVE_GETSPNAM ! # include ! #endif /* HAVE_GETSPNAM */ /* ** Here is some defensive code to protect the news server from hosts, *************** *** 35,40 **** --- 38,45 ---- #define INITIAL_TIMEOUT 10 #endif + #define MAXPATTERNDEFINE 10 + #define CMDany -1 *************** *** 54,61 **** char *HISTORY = NULL; char *NEWSGROUPS = NULL; char *NNRPACCESS = NULL; ! /* Default permission -- change with adb. */ ! BOOL PERMdefault = FALSE; BOOL ForceReadOnly = FALSE; char LocalLogFileName[256]; --- 59,65 ---- char *HISTORY = NULL; char *NEWSGROUPS = NULL; char *NNRPACCESS = NULL; ! BOOL ForceReadOnly = FALSE; char LocalLogFileName[256]; *************** *** 68,74 **** #endif /* !defined(HPUX) */ STATIC SIGVAR ChangeTrace; BOOL DaemonMode = FALSE; ! extern FUNCTYPE CMDauthinfo(); extern FUNCTYPE CMDdate(); --- 72,80 ---- #endif /* !defined(HPUX) */ STATIC SIGVAR ChangeTrace; BOOL DaemonMode = FALSE; ! #if HAVE_GETSPNAM ! STATIC char *ShadowGroup; ! #endif extern FUNCTYPE CMDauthinfo(); extern FUNCTYPE CMDdate(); *************** *** 88,94 **** extern FUNCTYPE CMDxpath(); extern FUNCTYPE CMD_unimp(); - extern int RARTenable; extern int LLOGenable; extern int TrackClient(); --- 94,99 ---- *************** *** 175,181 **** ClientHost, usertime, systime, STATfinish - STATstart); /* Tracking code - Make entries in the logfile(s) to show that we have finished with this session */ ! if (RARTenable) { syslog(L_NOTICE, "%s Tracking Disabled (%s)", ClientHost, Username); if (LLOGenable) { fprintf(locallog, "%s Tracking Disabled (%s)\n", ClientHost, Username); --- 180,186 ---- ClientHost, usertime, systime, STATfinish - STATstart); /* Tracking code - Make entries in the logfile(s) to show that we have finished with this session */ ! if (innconf->readertrack) { syslog(L_NOTICE, "%s Tracking Disabled (%s)", ClientHost, Username); if (LLOGenable) { fprintf(locallog, "%s Tracking Disabled (%s)\n", ClientHost, Username); *************** *** 362,371 **** --- 367,381 ---- register char *p; register BOOL found; register int i; + register int lines; struct passwd *pwd; char buff[BIG_BUFFER]; + char *definelist[MAXPATTERNDEFINE]; char filename[SMBUF]; char *fields[5]; + #if HAVE_GETSPNAM + struct spwd *spwd; + #endif if ((F = fopen(accessfile, "r")) == NULL) { syslog(L_ERROR, "%s cant fopen %s %m", ClientHost, accessfile); *************** *** 378,384 **** --- 388,397 ---- found = FALSE; accesslist[0] = '\0'; filename[0] = '\0'; + lines = 0; + for (i=0;i= MAXPATTERNDEFINE)) { ! syslog(L_ERROR, "Too many defines in access file (line %d)", lines); ! continue; ! } ! definelist[i] = COPY(fields[1]); continue; } *************** *** 447,464 **** } else filename[0] = '\0'; - #ifdef DONT_HAVE_SHADOW /* See if we should lookup a specific user in the passwd file */ if (user && pass && EQ(fields[2], "+")) { if ((pwd = getpwnam(user)) == NULL) continue; if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd))) continue; ! } else ! #endif ! /* Matching for a specific user or just the host? */ ! if (user && (!EQ(user, fields[2]) || !EQ(pass, fields[3]))) ! continue; PERMcanread = strchr(fields[1], 'R') != NULL; PERMcanpost = strchr(fields[1], 'P') != NULL; --- 472,492 ---- } else filename[0] = '\0'; /* See if we should lookup a specific user in the passwd file */ if (user && pass && EQ(fields[2], "+")) { if ((pwd = getpwnam(user)) == NULL) continue; + #if HAVE_GETSPNAM + if ((spwd = getspnam(user)) != NULL) + pwd->pw_passwd = spwd->sp_pwdp; + #endif if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd))) continue; ! } else { ! /* Matching for a specific user or just the host? */ ! if (user && (!EQ(user, fields[2]) || !EQ(pass, fields[3]))) ! continue; ! } PERMcanread = strchr(fields[1], 'R') != NULL; PERMcanpost = strchr(fields[1], 'P') != NULL; *************** *** 467,476 **** if (ForceReadOnly) PERMcanpost=FALSE; (void)strcpy(PERMuser, user ? user : fields[2]); (void)strcpy(PERMpass, pass ? pass : fields[3]); ! (void)strcpy(accesslist, fields[4]); found = TRUE; } (void)fclose(F); if (found && (strlen(filename) > 0)) return(PERMinfile(hp, ip, user, pass, accesslist, filename)); return found; --- 495,515 ---- if (ForceReadOnly) PERMcanpost=FALSE; (void)strcpy(PERMuser, user ? user : fields[2]); (void)strcpy(PERMpass, pass ? pass : fields[3]); ! if (*fields[4] == '%') { ! p = fields[4] + 1; ! i = atoi(p); ! if ((i < 0) || (i >= MAXPATTERNDEFINE) || (definelist[i] == NULL)) { ! syslog(L_ERROR, "No definition %d in access file (line %d)", i, lines); ! continue; ! } ! (void)strcpy(accesslist, definelist[i]); ! } else ! (void)strcpy(accesslist, fields[4]); found = TRUE; } (void)fclose(F); + for (i=0;i 0)) return(PERMinfile(hp, ip, user, pass, accesslist, filename)); return found; *************** *** 480,504 **** /* ** Determine access rights of the client. */ ! STATIC void ! StartConnection(accesslist) ! char *accesslist; { struct sockaddr_in sin; ARGTYPE length; char buff[SMBUF]; char *ClientAddr; /* Get the peer's name. */ length = sizeof sin; ClientAddr = NULL; if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) { ! if (!isatty(STDIN)) { syslog(L_TRACE, "%s cant getpeername %m", "?"); (void)strcpy(ClientHost, "?"); /* so stats generation looks correct. */ Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL); ExitWithStats(1); } (void)strcpy(ClientHost, "stdin"); ClientIP = 0L; } --- 519,544 ---- /* ** Determine access rights of the client. */ ! STATIC void StartConnection(char *accesslist) { struct sockaddr_in sin; ARGTYPE length; char buff[SMBUF]; char *ClientAddr; + int code; /* Get the peer's name. */ length = sizeof sin; ClientAddr = NULL; if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) { ! #ifndef DEBUG ! if (!isatty(STDIN)) { syslog(L_TRACE, "%s cant getpeername %m", "?"); (void)strcpy(ClientHost, "?"); /* so stats generation looks correct. */ Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL); ExitWithStats(1); } + #endif (void)strcpy(ClientHost, "stdin"); ClientIP = 0L; } *************** *** 549,566 **** LogName[sizeof(LogName) - 1] = '\0'; syslog(L_NOTICE, "%s connect", ClientHost); ! if (!PERMinfile(ClientHost, ClientAddr, (char *)NULL, (char *)NULL, ! accesslist, NNRPACCESS)) { ! syslog(L_NOTICE, "%s no_access", ClientHost); ! Printf("%d You are not in my access file. Goodbye.\r\n", ! NNTP_ACCESS_VAL); ! ExitWithStats(1); } } #if !defined(VAR_NONE) #if defined(VAR_VARARGS) #if defined(lint) #define START_VARARG(fmt, vp, type) va_start(vp); fmt = NULL --- 589,621 ---- LogName[sizeof(LogName) - 1] = '\0'; syslog(L_NOTICE, "%s connect", ClientHost); ! #ifdef DO_PERL ! if (innconf->nnrpperlauth) { ! if ((code = perlConnect(ClientHost, ClientIp, accesslist)) == 502) { ! syslog(L_NOTICE, "%s no_access", ClientHost); ! Printf("%d You are not in my access file. Goodbye.\r\n", ! NNTP_ACCESS_VAL); ! ExitWithStats(1); ! } ! } else { ! #endif /* DO_PERL */ ! if (!PERMinfile(ClientHost, ClientAddr, (char *)NULL, (char *)NULL, ! accesslist, NNRPACCESS)) { ! syslog(L_NOTICE, "%s no_access", ClientHost); ! Printf("%d You are not in my access file. Goodbye.\r\n", ! NNTP_ACCESS_VAL); ! ExitWithStats(1); ! } ! PERMneedauth = PERMuser[0] != '\0' && PERMpass[0] != '\0'; ! #ifdef DO_PERL } + #endif /* DO_PERL */ } #if !defined(VAR_NONE) + #if !defined(VAR_NONE) #if defined(VAR_VARARGS) #if defined(lint) #define START_VARARG(fmt, vp, type) va_start(vp); fmt = NULL *************** *** 571,576 **** --- 626,632 ---- #if defined(VAR_STDARGS) #define START_VARARG(fmt, vp, type) va_start(vp, fmt) #endif /* defined(VAR_STDARGS) */ + #endif /* defined(VAR_NONE) */ /* ** Send a reply, possibly with debugging output. *************** *** 606,612 **** p = buff + strlen(buff) - 1; while (p >= buff && (*p == '\n' || *p == '\r')) *p-- = '\0'; ! syslog(LOG_DEBUG, "%s > %s", ClientHost, buff); va_end(vp); errno = oerrno; --- 662,668 ---- p = buff + strlen(buff) - 1; while (p >= buff && (*p == '\n' || *p == '\r')) *p-- = '\0'; ! syslog(L_TRACE, "%s > %s", ClientHost, buff); va_end(vp); errno = oerrno; *************** *** 654,659 **** --- 710,737 ---- (void)signal(s, WaitChild); } + STATIC void SetupDaemon(void) { + BOOL val; + + #if defined(DO_PERL) + /* Load the Perl code */ + PERLsetup(NULL, cpcatpath(innconf->pathfilter, _PATH_PERL_FILTER_NNRPD), "filter_post"); + if (innconf->nnrpperlauth) { + PERLsetup(NULL, cpcatpath(innconf->pathfilter, _PATH_PERL_AUTH), "authenticate"); + PerlFilter(TRUE); + perlAuthInit(); + } else { + PerlFilter(TRUE); + } + #endif /* defined(DO_PERL) */ + + val = TRUE; + if (innconf->storageapi && SMsetup(SM_PREOPEN, (void *)&val) && !SMinit()) { + syslog(L_NOTICE, "%s cant initialize storage method, %s", ClientHost, SMerrorstr); + Reply("%d NNTP server unavailable. Try later.\r\n", NNTP_TEMPERR_VAL); + ExitWithStats(1); + } + } /* ** Print a usage message and exit. *************** *** 702,707 **** --- 780,789 ---- UID_T NewsUID; int one = 1; FILE *pidfile; + #if HAVE_GETSPNAM + struct group *grp; + GID_T shadowgid; + #endif /* HAVE_GETSPNAM */ #if !defined(HPUX) /* Save start and extent of argv for TITLEset. */ *************** *** 712,725 **** /* Parse arguments. Must COPY() optarg if used because the * TITLEset() routine would clobber it! */ Reject = NULL; - RARTenable=FALSE; LLOGenable=FALSE; openlog("nnrpd", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG); if (ReadInnConf() < 0) exit(1); ! while ((i = getopt(argc, argv, "b:Di:lop:Rr:s:t")) != EOF) switch (i) { default: Usage(); --- 794,806 ---- /* Parse arguments. Must COPY() optarg if used because the * TITLEset() routine would clobber it! */ Reject = NULL; LLOGenable=FALSE; openlog("nnrpd", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG); if (ReadInnConf() < 0) exit(1); ! while ((i = getopt(argc, argv, "b:Di:g:op:Rr:s:t")) != EOF) switch (i) { default: Usage(); *************** *** 733,744 **** case 'D': /* standalone daemon mode */ DaemonMode = TRUE; break; case 'i': /* Initial command */ PushedBack = COPY(optarg); break; - case 'l': /* Tracking */ - RARTenable=TRUE; - break; case 'o': Offlinepost = TRUE; /* Offline posting only */ break; --- 814,827 ---- case 'D': /* standalone daemon mode */ DaemonMode = TRUE; break; + #if HAVE_GETSPNAM + case 'g': + ShadowGroup = optarg; + break; + #endif /* HAVE_GETSPNAM */ case 'i': /* Initial command */ PushedBack = COPY(optarg); break; case 'o': Offlinepost = TRUE; /* Offline posting only */ break; *************** *** 795,800 **** --- 878,909 ---- syslog(L_FATAL, "nnrpd cant stat %s %m", innconf->pathrun); exit(1); } + + #if HAVE_GETSPNAM + shadowgid = -1; + /* Find shadowgroup gid if needed */ + if (ShadowGroup != NULL) { + if ((grp = getgrnam(ShadowGroup)) == NULL) + syslog(L_ERROR, "nnrpd cannot find group %s", + ShadowGroup); + else + shadowgid = grp->gr_gid; + } else if ((grp = getgrnam("shadow")) != NULL) { + /* found default group "shadow" */ + shadowgid = grp->gr_gid; + ShadowGroup = "shadow"; + } + /* If we have a shadowgid, try to set it as an extra group. */ + if (shadowgid >= 0) { + if (setgroups(1, &shadowgid) < 0) + syslog(L_ERROR, "nnrpd cannot set supplementary group %s %m", + ShadowGroup); + else + syslog(L_NOTICE, "nnrpd added supplementary group %s", + ShadowGroup); + } + #endif /* HAVE_GETSPNAM */ + NewsUID = Sb.st_uid; NewsGID = Sb.st_gid; (void)setgid(NewsGID); *************** *** 806,813 **** } /* Detach */ ! if ((pid = FORK()) < 0) { ! fprintf(stderr, "%s: can't ford (%s)\n", argv[0], strerror(errno)); syslog(L_FATAL, "can't fork (%m)"); exit(1); } else if (pid != 0) --- 915,922 ---- } /* Detach */ ! if ((pid = fork()) < 0) { ! fprintf(stderr, "%s: can't fork (%s)\n", argv[0], strerror(errno)); syslog(L_FATAL, "can't fork (%m)"); exit(1); } else if (pid != 0) *************** *** 825,830 **** --- 934,940 ---- /* Set signal handle to care for dead children */ (void)signal(SIGCHLD, WaitChild); + SetupDaemon(); TITLEset("nnrpd: accepting connections"); *************** *** 836,842 **** if (fd < 0) goto listen_loop; ! for (i = 0; (pid = FORK()) < 0; i++) { if (i == MAX_FORKS) { syslog(L_FATAL, "cant fork %m -- giving up"); exit(1); --- 946,952 ---- if (fd < 0) goto listen_loop; ! for (i = 0; (pid = fork()) < 0; i++) { if (i == MAX_FORKS) { syslog(L_FATAL, "cant fork %m -- giving up"); exit(1); *************** *** 857,864 **** close(fd); dup2(0, 1); dup2(0, 2); ! } /* DaemonMode */ /* Setup. */ if (GetTimeInfo(&Now) < 0) { --- 967,979 ---- close(fd); dup2(0, 1); dup2(0, 2); + + /* Only automatically reap children in the listening process */ + (void)signal(SIGCHLD, SIG_DFL); ! } else { ! SetupDaemon(); ! }/* DaemonMode */ /* Setup. */ if (GetTimeInfo(&Now) < 0) { *************** *** 899,905 **** /* Get permissions and see if we can talk to this client */ StartConnection(accesslist); ! if (!PERMcanread && !PERMcanpost) { syslog(L_NOTICE, "%s no_permission", ClientHost); Printf("%d You have no permission to talk. Goodbye.\r\n", NNTP_ACCESS_VAL); --- 1014,1020 ---- /* Get permissions and see if we can talk to this client */ StartConnection(accesslist); ! if (!PERMcanread && !PERMcanpost && !PERMneedauth) { syslog(L_NOTICE, "%s no_permission", ClientHost); Printf("%d You have no permission to talk. Goodbye.\r\n", NNTP_ACCESS_VAL); *************** *** 907,913 **** } /* Proceed with initialization. */ - PERMneedauth = PERMuser[0] != '\0' && PERMpass[0] != '\0'; PERMspecified = NGgetlist(&PERMlist, accesslist); TITLEset("connect"); --- 1022,1027 ---- *************** *** 918,927 **** ExitWithStats(0); } ! if (RARTenable) ! RARTenable=TrackClient(ClientHost,Username); ! if (RARTenable) { syslog(L_NOTICE, "%s Tracking Enabled (%s)", ClientHost, Username); pid=getpid(); gettimeofday(&tv,NULL); --- 1032,1041 ---- ExitWithStats(0); } ! if (innconf->readertrack) ! innconf->readertrack=TrackClient(ClientHost,Username); ! if (innconf->readertrack) { syslog(L_NOTICE, "%s Tracking Enabled (%s)", ClientHost, Username); pid=getpid(); gettimeofday(&tv,NULL); *************** *** 945,962 **** Reply("%d NNTP server unavailable. Try later.\r\n", NNTP_TEMPERR_VAL); ExitWithStats(1); } - - if (innconf->storageapi && !SMinit()) { - syslog(L_NOTICE, "%s cant initialize storage method, %s", ClientHost, SMerrorstr); - Reply("%d NNTP server unavailable. Try later.\r\n", NNTP_TEMPERR_VAL); - ExitWithStats(1); - } - - #if defined(DO_PERL) - /* Load the Perl code */ - PERLsetup(NULL, cpcatpath(innconf->pathfilter, _PATH_PERL_FILTER_NNRPD), "filter_post"); - PerlFilter (TRUE) ; - #endif /* defined(DO_PERL) */ Reply("%d %s InterNetNews NNRP server %s ready (%s).\r\n", PERMcanpost ? NNTP_POSTOK_VAL : NNTP_NOPOSTOK_VAL, --- 1059,1064 ---- diff -Nacr inn-2.1/nnrpd/nnrpd.h inn-2.2/nnrpd/nnrpd.h *** inn-2.1/nnrpd/nnrpd.h Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/nnrpd.h Thu Oct 15 00:54:18 1998 *************** *** 1,4 **** ! /* $Revision: 1.24 $ ** ** Net News Reading Protocol server. */ --- 1,4 ---- ! /* $Revision: 1.26 $ ** ** Net News Reading Protocol server. */ *************** *** 87,95 **** typedef struct _ARTLIST { ARTNUM ArtNum; char (*Index)[OVERINDEXPACKSIZE]; ! TOKEN Token; /* for overview */ ! OFFSET_T Offset; ! BOOL Tokenretrieved; } ARTLIST; --- 87,95 ---- typedef struct _ARTLIST { ARTNUM ArtNum; char (*Index)[OVERINDEXPACKSIZE]; ! TOKEN Token; /* for overview */ ! OFFSET_T Offset; /* Offset into history file */ ! BOOL Tokenretrieved; } ARTLIST; *************** *** 127,133 **** EXTERN FILE *locallog; EXTERN int ARTindex; EXTERN int ARTsize; - extern int PERMdefault; EXTERN long ARTcount; EXTERN long ARTget; EXTERN long ARTgettime; --- 127,132 ---- *************** *** 193,196 **** --- 192,199 ---- ARTNUM GPHIGH(GROUPENTRY *gp); char GPFLAG(GROUPENTRY *gp); char *GPALIAS(GROUPENTRY *gp); + char *HandleHeaders(char *article); + int perlConnect(char *ClientHost, char *ClientIP, char *accesslist); + int perlAuthenticate(char *ClientHost, char *ClientIP, char *user, char *passwd, char *accesslist); + diff -Nacr inn-2.1/nnrpd/perl.c inn-2.2/nnrpd/perl.c *** inn-2.1/nnrpd/perl.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/perl.c Tue Oct 13 12:18:47 1998 *************** *** 3,15 **** * Author: Christophe Wolfhugel * (although he wouldn't recognise it anymore so don't blame him) * File: perl.c ! * RCSId: $Id: perl.c,v 1.6 1998/05/21 03:00:21 scrappy Exp $ * Description: Perl hooks for nnrpd. * */ #if ! defined (lint) ! static const char *rcsid = "$Id: perl.c,v 1.6 1998/05/21 03:00:21 scrappy Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } --- 3,15 ---- * Author: Christophe Wolfhugel * (although he wouldn't recognise it anymore so don't blame him) * File: perl.c ! * RCSId: $Id: perl.c,v 1.8 1998/10/13 12:18:47 coneill Exp $ * Description: Perl hooks for nnrpd. * */ #if ! defined (lint) ! static const char *rcsid = "$Id: perl.c,v 1.8 1998/10/13 12:18:47 coneill Exp $" ; static void use_rcsid (const char *rid) { /* Never called */ use_rcsid (rcsid) ; use_rcsid (rid) ; } *************** *** 25,30 **** --- 25,32 ---- #include "post.h" #include #include "macros.h" + #include "nntp.h" + #include "nnrpd.h" #if defined(DO_PERL) *************** *** 38,48 **** extern BOOL PerlFilterActive; extern HEADER Table[], *EndOfTable; extern char LogName[]; extern char **OtherHeaders; extern int OtherCount; extern BOOL HeadersModified; - extern char *ClientHost; static int HeaderLen; /* #define DEBUG_MODIFY only if you want to see verbose outout */ --- 40,50 ---- extern BOOL PerlFilterActive; extern HEADER Table[], *EndOfTable; extern char LogName[]; + extern char PERMuser[]; extern char **OtherHeaders; extern int OtherCount; extern BOOL HeadersModified; static int HeaderLen; /* #define DEBUG_MODIFY only if you want to see verbose outout */ *************** *** 51,59 **** void dumpTable(char *msg); #endif /* DEBUG_MODIFY */ ! char * ! HandleHeaders(article) ! char *article; { dSP; HEADER *hp; --- 53,59 ---- void dumpTable(char *msg); #endif /* DEBUG_MODIFY */ ! char *HandleHeaders(char *article) { dSP; HEADER *hp; *************** *** 103,109 **** s++; hv_store(hdr, p, (s - p) - 1, newSVpv(s, 0), 0); } ! /* Store body */ body = perl_get_sv("body", TRUE); --- 103,110 ---- s++; hv_store(hdr, p, (s - p) - 1, newSVpv(s, 0), 0); } ! /* Store user */ ! sv_setpv(perl_get_sv("user",TRUE), PERMuser); /* Store body */ body = perl_get_sv("body", TRUE); *************** *** 165,170 **** --- 166,172 ---- } hv_undef (hdr); + sv_setsv (body, &sv_undef); buf [0] = '\0' ; *************** *** 187,192 **** --- 189,344 ---- if (buf[0] != '\0') return buf ; return NULL; + } + + int perlConnect(char *ClientHost, char *ClientIP, char *accesslist) { + dSP; + HV *attribs; + int rc; + SV *sv; + char *p; + int code; + + if (!PerlFilterActive) + return NNTP_ACCESS_VAL; + + ENTER; + SAVETMPS; + attribs = perl_get_hv("attributes", TRUE); + hv_store(attribs, "type", 4, newSVpv("connect", 0), 0); + hv_store(attribs, "hostname", 8, newSVpv(ClientHost, 0), 0); + hv_store(attribs, "ipaddress", 9, newSVpv(ClientIP, 0), 0); + + PUSHMARK(SP); + rc = perl_call_pv("authenticate", G_EVAL|G_ARRAY); + + SPAGAIN; + + if (rc == 0 ) { /* Error occured, same as checking $@ */ + syslog(L_ERROR, "Perl function authenticate died: %s", + SvPV(GvSV(errgv), na)); + Reply("%d Internal Error (1). Goodbye\r\n", NNTP_ACCESS_VAL); + ExitWithStats(1); + } + + if (rc != 4) { + syslog(L_ERROR, "Perl function authenticate returned wrong number of results: %d", rc); + Reply("%d Internal Error (2). Goodbye\r\n", NNTP_ACCESS_VAL); + ExitWithStats(1); + } + + p = POPp; + strcpy(accesslist, p); + sv = POPs; PERMcanpost = SvTRUE(sv); + sv = POPs; PERMcanread = SvTRUE(sv); + code = POPi; + + if ((code == NNTP_POSTOK_VAL) || (code == NNTP_NOPOSTOK_VAL)) + code = PERMcanpost ? NNTP_POSTOK_VAL : NNTP_NOPOSTOK_VAL; + + if (code == NNTP_AUTH_NEEDED_VAL) + PERMneedauth = TRUE; + + hv_undef(attribs); + + PUTBACK; + FREETMPS; + LEAVE; + + return code; + } + + int perlAuthInit(char *ClientHost, char *ClientIP, char *accesslist) { + dSP; + int rc; + + if (!PerlFilterActive) + return NNTP_ACCESS_VAL; + + ENTER; + SAVETMPS; + PUSHMARK(SP); + + if (perl_get_cv("auth_init", 0) != NULL) + rc = perl_call_pv("auth_init", G_EVAL|G_DISCARD); + + SPAGAIN; + + + if (SvTRUE(GvSV(errgv))) /* check $@ */ { + syslog(L_ERROR, "Perl function authenticate died: %s", + SvPV(GvSV(errgv), na)); + Reply("%d Internal Error (1). Goodbye\r\n", NNTP_ACCESS_VAL); + ExitWithStats(1); + } + + while (rc--) { + POPs; + } + + PUTBACK; + FREETMPS; + LEAVE; + + } + + int perlAuthenticate(char *ClientHost, char *ClientIP, char *user, char *passwd, char *accesslist) { + dSP; + HV *attribs; + int rc; + SV *sv; + char *p; + int code; + + if (!PerlFilterActive) + return NNTP_ACCESS_VAL; + + ENTER; + SAVETMPS; + attribs = perl_get_hv("attributes", TRUE); + hv_store(attribs, "type", 4, newSVpv("authenticate", 0), 0); + hv_store(attribs, "hostname", 8, newSVpv(ClientHost, 0), 0); + hv_store(attribs, "ipaddress", 9, newSVpv(ClientIP, 0), 0); + hv_store(attribs, "username", 8, newSVpv(user, 0), 0); + hv_store(attribs, "password", 8, newSVpv(passwd, 0), 0); + + PUSHMARK(SP); + rc = perl_call_pv("authenticate", G_EVAL|G_ARRAY); + + SPAGAIN; + + if (rc == 0 ) { /* Error occured, same as checking $@ */ + syslog(L_ERROR, "Perl function authenticate died: %s", + SvPV(GvSV(errgv), na)); + Reply("%d Internal Error (1). Goodbye\r\n", NNTP_ACCESS_VAL); + ExitWithStats(1); + } + + if (rc != 4) { + syslog(L_ERROR, "Perl function authenticate returned wrong number of results: %d", rc); + Reply("%d Internal Error (2). Goodbye\r\n", NNTP_ACCESS_VAL); + ExitWithStats(1); + } + + p = POPp; + strcpy(accesslist, p); + sv = POPs; PERMcanpost = SvTRUE(sv); + sv = POPs; PERMcanread = SvTRUE(sv); + code = POPi; + + if ((code == NNTP_POSTOK_VAL) || (code == NNTP_NOPOSTOK_VAL)) + code = PERMcanpost ? NNTP_POSTOK_VAL : NNTP_NOPOSTOK_VAL; + + if (code == NNTP_AUTH_NEEDED_VAL) + PERMneedauth = TRUE; + + hv_undef(attribs); + + PUTBACK; + FREETMPS; + LEAVE; + + return code; } #ifdef DEBUG_MODIFY diff -Nacr inn-2.1/nnrpd/post.c inn-2.2/nnrpd/post.c *** inn-2.1/nnrpd/post.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/post.c Tue Jan 12 13:33:38 1999 *************** *** 1,4 **** ! /* $Revision: 1.22 $ ** ** Check article, send it to the local server. */ --- 1,4 ---- ! /* $Revision: 1.28.2.5 $ ** ** Check article, send it to the local server. */ *************** *** 18,24 **** #define FLUSH_ERROR(F) (fflush((F)) == EOF || ferror((F))) #define HEADER_DELTA 20 - extern int RARTenable; extern int LLOGenable; STATIC char *tmpPtr ; --- 18,23 ---- *************** *** 168,174 **** for (start = p; ISWHITE(*start); start++) continue; ! for (p = start + strlen(start); p > start && CTYPE(isspace, p[-1]); ) *--p = '\0'; return start; } --- 167,173 ---- for (start = p; ISWHITE(*start); start++) continue; ! for (p = start + strlen(start); p > start && CTYPE(isspace, (int)p[-1]); ) *--p = '\0'; return start; } *************** *** 209,215 **** for (p = article; ; ) { /* See if it's a known header. */ ! c = CTYPE(islower, *p) ? toupper(*p) : *p; for (hp = Table; hp < ENDOF(Table); hp++) if (c == hp->Name[0] && p[hp->Size] == ':' --- 208,214 ---- for (p = article; ; ) { /* See if it's a known header. */ ! c = CTYPE(islower, (int)*p) ? toupper(*p) : *p; for (hp = Table; hp < ENDOF(Table); hp++) if (c == hp->Name[0] && p[hp->Size] == ':' *************** *** 363,369 **** * unauthenticated data. */ if (PERMauthorized && HDR(_sender) == NULL) { (void)sprintf(sendbuff, "%s@%s", ! PERMuser ? PERMuser : "UNKNOWN", ClientHost); HDR(_sender) = sendbuff; } else if (!PERMauthorized) --- 362,368 ---- * unauthenticated data. */ if (PERMauthorized && HDR(_sender) == NULL) { (void)sprintf(sendbuff, "%s@%s", ! PERMuser[0] ? PERMuser : "UNKNOWN", ClientHost); HDR(_sender) = sendbuff; } else if (!PERMauthorized) *************** *** 575,581 **** i--; break; } ! if ((p = strchr(p + 1, '\n')) == NULL) break; } if ((i * 2 > lines) && (lines > 40)) --- 574,580 ---- i--; break; } ! if ((p = strchr(p, '\n')) == NULL) break; } if ((i * 2 > lines) && (lines > 40)) *************** *** 605,612 **** --- 604,613 ---- if ((address = GetModeratorAddress(NULL, NULL, group)) == NULL) { (void)sprintf(Error, "No mailing address for \"%s\" -- %s", group, "ask your news administrator to fix this"); + DISPOSE(group); return Error; } + DISPOSE(group); /* Now build up the command (ignore format/argument mismatch errors, * in case %s isn't in inconf->mta) and send the headers. */ *************** *** 661,669 **** ** moderated, etc. */ STATIC STRING ! ValidNewsgroups(hdr, article) char *hdr; ! char *article; { static char distbuff[SMBUF]; register char *groups; --- 662,670 ---- ** moderated, etc. */ STATIC STRING ! ValidNewsgroups(hdr, modgroup) char *hdr; ! char **modgroup; { static char distbuff[SMBUF]; register char *groups; *************** *** 682,697 **** return "Can't parse newsgroups line"; /* Don't mail article if just checking Followup-To line. */ ! approved = HDR(_approved) != NULL || article == NULL; Error[0] = '\0'; FoundOne = FALSE; h = DDstart((FILE *)NULL, (FILE *)NULL); do { ! #if defined(DO_MERGE_TO_GROUPS) ! if (p[0] == 't' && p[1] == 'o' && p[2] == '.') p = "to"; ! #endif /* defined(DO_MERGE_TO_GROUPS) */ if ((gp = GRPfind(p)) == NULL) continue; FoundOne = TRUE; --- 683,703 ---- return "Can't parse newsgroups line"; /* Don't mail article if just checking Followup-To line. */ ! approved = HDR(_approved) != NULL || modgroup == NULL; Error[0] = '\0'; FoundOne = FALSE; h = DDstart((FILE *)NULL, (FILE *)NULL); do { ! if (innconf->mergetogroups && p[0] == 't' && p[1] == 'o' && p[2] == '.') p = "to"; ! if (PERMspecified) { ! grplist[0] = p; ! grplist[1] = NULL; ! if (!PERMmatch(PERMlist, grplist)) { ! sprintf(Error, "You are not allowed to post to %s\r\n", p); ! } ! } if ((gp = GRPfind(p)) == NULL) continue; FoundOne = TRUE; *************** *** 700,710 **** case NF_FLAG_OK: break; case NF_FLAG_MODERATED: ! if (!approved) { ! DISPOSE(groups); ! tmpPtr = DDend(h); ! DISPOSE(tmpPtr); ! return MailArticle(GPNAME(gp), article); } break; case NF_FLAG_IGNORE: --- 706,713 ---- case NF_FLAG_OK: break; case NF_FLAG_MODERATED: ! if (!approved && !*modgroup) { ! *modgroup = COPY(GPNAME(gp)); } break; case NF_FLAG_IGNORE: *************** *** 722,734 **** p, GPALIAS(gp)); break; } - if (PERMspecified) { - grplist[0] = p; - grplist[1] = NULL; - if (!PERMmatch(PERMdefault, PERMlist, grplist)) { - sprintf(Error,"%s: %s\r\n", NNTP_NOSUCHGROUP,p); - } - } } while ((p = strtok((char *)NULL, NGSEPS)) != NULL); DISPOSE(groups); --- 725,730 ---- *************** *** 794,802 **** ** Spool article to temp file. */ STATIC STRING ! Spoolit(article, Error) char *article; char *Error; { static char CANTSPOOL[NNTP_STRLEN+2]; register HEADER *hp; --- 790,799 ---- ** Spool article to temp file. */ STATIC STRING ! SpoolitTo(article, Error, SpoolDir) char *article; char *Error; + char *SpoolDir; { static char CANTSPOOL[NNTP_STRLEN+2]; register HEADER *hp; *************** *** 809,815 **** sprintf(CANTSPOOL, "%s and can't write text to local spool file", Error); /* Try to write it to the spool dir. */ ! TempName(innconf->pathincoming, temp); /* rnews -U ignores files starting with . */ strrchr(temp, '/')[1] = '.'; if ((F = fopen(temp, "w")) == NULL) { --- 806,812 ---- sprintf(CANTSPOOL, "%s and can't write text to local spool file", Error); /* Try to write it to the spool dir. */ ! TempName(SpoolDir, temp); /* rnews -U ignores files starting with . */ strrchr(temp, '/')[1] = '.'; if ((F = fopen(temp, "w")) == NULL) { *************** *** 847,853 **** if (fclose(F)) return CANTSPOOL; ! TempName(innconf->pathincoming, path); if (rename(temp, path) < 0) { syslog(L_FATAL, "cant rename %s %s %m", temp, path); return CANTSPOOL; --- 844,850 ---- if (fclose(F)) return CANTSPOOL; ! TempName(SpoolDir, path); if (rename(temp, path) < 0) { syslog(L_FATAL, "cant rename %s %s %m", temp, path); return CANTSPOOL; *************** *** 857,862 **** --- 854,871 ---- return NULL; } + /* + ** Spool article to temp file. + */ + STATIC STRING + Spoolit(article, Error) + char *article; + char *Error; + { + return SpoolitTo(article, Error, innconf->pathincoming); + } + + STRING ARTpost(article, idbuff) char *article; *************** *** 870,879 **** --- 879,890 ---- FILE *ToServer; FILE *FromServer; char buff[NNTP_STRLEN + 2], frombuf[SMBUF]; + char *modgroup = NULL; STRING error; char TrackID[NNTP_STRLEN]; FILE *ftd; int result; + char SDir[255]; sprintf(TrackID,"%s/trackposts/track.", innconf->pathlog); *************** *** 904,916 **** if (i == 0 && HDR(_control) == NULL) return "Article is empty"; ! if (idbuff != NULL) ! strcpy (idbuff,"(mailed to moderator)") ; ! if ((error = ValidNewsgroups(HDR(_newsgroups), article)) != NULL ! || WasMailed) return error; - if (idbuff != NULL) - idbuff [0] = '\0' ; strncpy(frombuf, HDR(_from), sizeof(frombuf) - 1); frombuf[sizeof(frombuf) - 1] = '\0'; --- 915,922 ---- if (i == 0 && HDR(_control) == NULL) return "Article is empty"; ! if ((error = ValidNewsgroups(HDR(_newsgroups), &modgroup)) != NULL) return error; strncpy(frombuf, HDR(_from), sizeof(frombuf) - 1); frombuf[sizeof(frombuf) - 1] = '\0'; *************** *** 924,952 **** if (p) { strcpy(frombuf, p+1); p = strrchr(frombuf, '.'); ! if (!p) return "From: address not in Internet syntax"; } ! else return "From: address not in Internet syntax"; if ((p = HDR(_followupto)) != NULL && !EQ(p, "poster") ! && (error = ValidNewsgroups(p, (char *)NULL)) != NULL) return error; if ((innconf->localmaxartsize > 0) && (strlen(article) > innconf->localmaxartsize)) { (void)sprintf(Error, "Article is bigger then local limit of %ld bytes\n", atoi(p)); return Error; } #if defined(DO_PERL) /* Calls the Perl subroutine for headers management */ ! if ((p = (char *)HandleHeaders(article)) != NULL) ! return p; #endif /* defined(DO_PERL) */ if (innconf->spoolfirst) return Spoolit(article, Error); --- 930,1008 ---- if (p) { strcpy(frombuf, p+1); p = strrchr(frombuf, '.'); ! if (!p) { ! if (modgroup) ! DISPOSE(modgroup); return "From: address not in Internet syntax"; + } } ! else { ! if (modgroup) ! DISPOSE(modgroup); return "From: address not in Internet syntax"; + } if ((p = HDR(_followupto)) != NULL && !EQ(p, "poster") ! && (error = ValidNewsgroups(p, (char **)NULL)) != NULL) { ! if (modgroup) ! DISPOSE(modgroup); return error; + } if ((innconf->localmaxartsize > 0) && (strlen(article) > innconf->localmaxartsize)) { (void)sprintf(Error, "Article is bigger then local limit of %ld bytes\n", atoi(p)); + if (modgroup) + DISPOSE(modgroup); return Error; } #if defined(DO_PERL) /* Calls the Perl subroutine for headers management */ ! if ((p = (char *)HandleHeaders(article)) != NULL) { ! if (idbuff) { ! if (modgroup) ! sprintf(idbuff, "(mailed to moderator for %s)", modgroup); ! else ! (void)strncpy(idbuff, HDR(_messageid), SMBUF - 1); ! idbuff[SMBUF - 1] = '\0'; ! } ! if (strncmp(p, "DROP", 4) == 0) { ! syslog(L_NOTICE, "%s post %s", ClientHost, p); ! if (modgroup) ! DISPOSE(modgroup); ! return NULL; ! } ! else if (strncmp(p, "SPOOL", 5) == 0) { ! syslog(L_NOTICE, "%s post %s", ClientHost, p); ! strcpy(SDir, innconf->pathincoming); ! if (modgroup) ! { ! DISPOSE(modgroup); ! return SpoolitTo(article, p, strcat(SDir,"/spam/mod")); ! } ! else ! return SpoolitTo(article, p, strcat(SDir,"/spam")); ! } ! else ! { ! if (modgroup) ! DISPOSE(modgroup); ! return p; ! } ! } #endif /* defined(DO_PERL) */ + /* handle mailing to moderated groups */ + + if (modgroup) + { + if (idbuff != NULL) + strcpy (idbuff,"(mailed to moderator)") ; + return MailArticle(modgroup, article); + } + if (innconf->spoolfirst) return Spoolit(article, Error); *************** *** 955,966 **** /* Open a local connection to the server. */ if (innconf->nnrpdposthost != NULL) ! i = NNTPconnect(innconf->nnrpdposthost, NNTP_PORT, &FromServer, &ToServer, buff); else { #if defined(HAVE_UNIX_DOMAIN_SOCKETS) i = NNTPlocalopen(&FromServer, &ToServer, buff); #else ! i = NNTPremoteopen(NNTP_PORT, &FromServer, &ToServer, buff); #endif /* defined(HAVE_UNIX_DOMAIN_SOCKETS) */ } --- 1011,1024 ---- /* Open a local connection to the server. */ if (innconf->nnrpdposthost != NULL) ! i = NNTPconnect(innconf->nnrpdposthost, innconf->nnrpdpostport, ! &FromServer, &ToServer, buff); else { #if defined(HAVE_UNIX_DOMAIN_SOCKETS) i = NNTPlocalopen(&FromServer, &ToServer, buff); #else ! i = NNTPremoteopen(innconf->port, &FromServer, ! &ToServer, buff); #endif /* defined(HAVE_UNIX_DOMAIN_SOCKETS) */ } *************** *** 1038,1044 **** } /* Tracking */ ! if (RARTenable) { strcat(TrackID,HDR(_messageid)); if ((ftd=fopen(TrackID,"w")) != NULL) { for (hp = Table; hp < ENDOF(Table); hp++) --- 1096,1102 ---- } /* Tracking */ ! if (innconf->readertrack) { strcat(TrackID,HDR(_messageid)); if ((ftd=fopen(TrackID,"w")) != NULL) { for (hp = Table; hp < ENDOF(Table); hp++) diff -Nacr inn-2.1/nnrpd/udp.c inn-2.2/nnrpd/udp.c *** inn-2.1/nnrpd/udp.c Fri Jul 24 13:13:00 1998 --- inn-2.2/nnrpd/udp.c Sun Jan 17 23:16:25 1999 *************** *** 1,17 **** ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! ! ! ! ! int create_udp_socket(int port) { int s; struct sockaddr_in sin; --- 1,15 ---- ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include "config.h" ! int create_udp_socket(int port, int portexclude) { int s; struct sockaddr_in sin; *************** *** 24,43 **** sin.sin_family = AF_INET; if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { ! perror("create_udp_socket: socket"); return(-1); } if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { ! /* perror("create_udp_socket: bind"); */ return(-1); } return(s); } - - - int make_udp_sockaddr(struct sockaddr_in *addr, char *ascii) { struct hostent *host; --- 22,42 ---- sin.sin_family = AF_INET; if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { ! syslog(L_ERROR, "create_udp_socket: socket %m"); return(-1); } if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { ! syslog(L_ERROR, "create_udp_socket: bind %m"); ! return(-1); ! } ! if (sin.sin_port == htons(portexclude)) { ! close(s); return(-1); } return(s); } int make_udp_sockaddr(struct sockaddr_in *addr, char *ascii) { struct hostent *host; *************** *** 49,55 **** char *ptr; if (! str) { ! perror("make_udp_sockaddr: malloc"); return(-1); } --- 48,54 ---- char *ptr; if (! str) { ! syslog(L_ERROR, "make_udp_sockaddr: malloc"); return(-1); } *************** *** 84,90 **** /* Or a name */ if (! (host = gethostbyname(str))) { free(str); ! perror("make_udp_sockaddr: gethostbyname"); return(-1); } mybcopy(host->h_addr_list[0], (char *)&addr->sin_addr.s_addr, sizeof(addr->sin_addr.s_addr)); --- 83,89 ---- /* Or a name */ if (! (host = gethostbyname(str))) { free(str); ! syslog(L_ERROR, "make_udp_sockaddr: gethostbyname %s", str); return(-1); } mybcopy(host->h_addr_list[0], (char *)&addr->sin_addr.s_addr, sizeof(addr->sin_addr.s_addr)); *************** *** 109,145 **** return(-1); } if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { ! perror("connect_udp_socket: connect"); return(-1); } return(0); } - - - - int write_udp(int s, char *buf, int len) { int rval; if ((rval = send(s, buf, len, 0x0)) < 0) { ! perror("write_udp: send"); return(-1); } return(rval); } - - - int read_udp(int s, char *buf, int len) { int rval; if ((rval = recv(s, buf, len, 0x0)) < 0) { ! /* perror("read_udp: recv"); */ return(-1); } return(rval); --- 108,137 ---- return(-1); } if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { ! syslog(L_ERROR, "connect_udp_socket: connect %m"); return(-1); } return(0); } int write_udp(int s, char *buf, int len) { int rval; if ((rval = send(s, buf, len, 0x0)) < 0) { ! syslog(L_ERROR, "write_udp: send %m"); return(-1); } return(rval); } int read_udp(int s, char *buf, int len) { int rval; if ((rval = recv(s, buf, len, 0x0)) < 0) { ! syslog(L_ERROR, "read_udp: recv %m"); return(-1); } return(rval); diff -Nacr inn-2.1/obsolete/innshellvars.csh.in inn-2.2/obsolete/innshellvars.csh.in *** inn-2.1/obsolete/innshellvars.csh.in Thu Jan 1 00:00:00 1970 --- inn-2.2/obsolete/innshellvars.csh.in Wed Oct 21 15:13:31 1998 *************** *** 0 **** --- 1,102 ---- + # -*- shell-script -*- + # + # Author: James Brister -- berkeley-unix -- + # Start Date: Thu, 24 Oct 1996 14:44:33 +0200 + # Project: INN + # File: innshellvars.csh + # RCSId: $Id: innshellvars.csh.in,v 1.1 1998/10/21 15:13:31 tale Exp $ + # Description: csh version of innshellvars. Hopefully nobody writes + # scripts to use this... + # + # The contents should mirror innshellvars (the bourne-shell + # version). + + eval `@prefix@/bin/innconfval -c` + + set inn_newshome = ${inn_pathnews} + set inn_spoolbase = ${inn_pathspool} + set inn_most_logs = ${inn_pathlog} + + set inn_errlog = ${inn_most_logs}/errlog + set inn_log = ${inn_most_logs}/news + + set inn_newsetc = ${inn_pathetc} + set inn_newslib = ${inn_pathlib} + set inn_newsbin = ${inn_pathbin} + set inn_locks = ${inn_pathrun} + set inn_innddir = ${inn_pathrun} + + set inn_spool = ${inn_patharticles} + set inn_overviewdir = ${inn_pathoverview} + set inn_batch = ${inn_pathoutgoing} + set inn_archivedir = ${inn_patharchive} + set inn_badnews = ${inn_pathincoming}/bad + set inn_spoolnews = ${inn_pathincoming} + set inn_incoming = ${inn_pathincoming} + + set inn_active = ${inn_pathdb}/active + set inn_activetimes = ${inn_pathdb}/active.times + set inn_ctlfile = ${inn_newsetc}/control.ctl + set inn_ctlwatch = ${inn_newsetc}/innwatch.ctl + set inn_history = ${inn_pathdb}/history + set inn_newactive = ${inn_pathdb}/active.tmp + set inn_localgroups = ${inn_pathdb}/localgroups + set inn_newsfeeds = ${inn_newsetc}/newsfeeds + set inn_newsgroups = ${inn_pathdb}/newsgroups + set inn_oldactive = ${inn_pathdb}/active.old + set inn_path_motd = ${inn_newsetc}/motd.news + set inn_path_storagectl = ${inn_newsetc}/storage.ctl + set inn_path_overviewctl = ${inn_newsetc}/overview.ctl + set inn_expirectl = ${inn_newsetc}/expire.ctl + + set inn_path_tcl_startup = ${inn_pathfilter}/startup.tcl + set inn_path_tcl_filter = ${inn_pathfilter}/filter.tcl + set inn_controlprogs = ${inn_pathcontrol} + set inn_inews = ${inn_newsbin}/inews + set inn_innconfval = ${inn_newsbin}/innconfval + set inn_innd = ${inn_newsbin}/innd + set inn_inndstart = ${inn_newsbin}/inndstart + set inn_innwatch = ${inn_newsbin}/innwatch + set inn_rnews = ${inn_newsbin}/rnews + set inn_perl_startup_innd = ${inn_pathfilter}/startup_innd.pl + set inn_perl_filter_innd = ${inn_pathfilter}/filter_innd.pl + set inn_perl_filter_nnrpd = ${inn_pathfilter}/filter_nnrpd.pl + + set inn_daily = ${inn_locks}/LOCK.news.daily + + set inn_newscontrol = ${inn_innddir}/control + set inn_nntpconnect = ${inn_innddir}/nntpin + set inn_serverpid = ${inn_innddir}/innd.pid + set inn_innwstatus = ${inn_innddir}/innwatch.status + set inn_watchpid = ${inn_innddir}/innwatch.pid + + set inn_awk = @_PATH_AWK@ + set inn_sed = @_PATH_SED@ + set inn_inndf = ${inn_newsbin}/inndf + set inn_egrep = @_PATH_EGREP@ + set inn_perl = @_PATH_PERL@ + set inn_pgp = @_PATH_PGP@ + set inn_sort = @_PATH_SORT@ + set inn_getftp = @GETFTP@ + set inn_compress = @COMPRESS@ + set inn_log_compress = @LOG_COMPRESS@ + set inn_z = @LOG_COMPRESSEXT@ + + set inn_tempsock = `basename ${inn_innddir}/ctlinndXXXXXX | ${inn_sed} -e 's/XXXXXX$/*/'` + set inn_tempsockdir = `echo ${inn_innddir}/ctlinndXXXXXX | ${inn_sed} -e 's@/[^/]*$@@'` + + ## =()@>()= + set inn_have_uustat = DO + + set inn_newsmaster = @NEWSMASTER@ + set inn_newsuser = @NEWSUSER@ + + setenv TMPDIR ${inn_pathtmp} + + set inn_spooltemp = ${inn_pathtmp} + + setenv NEWSLBIN ${inn_newshome}/local + + umask 02 + + set inn_path = ( ${NEWSLBIN} ${inn_newsbin} $path /bin /usr/bin /usr/ucb ) diff -Nacr inn-2.1/samples/actsync.cfg.in inn-2.2/samples/actsync.cfg.in *** inn-2.1/samples/actsync.cfg.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/actsync.cfg.in Sat Oct 17 01:07:27 1998 *************** *** 1,7 **** ! # $Id: actsync.cfg.in,v 1.2 1998/05/18 23:30:18 scrappy Exp $ ! ! host=news.foo.bar.com ! ! flags=-v 2 -q 2 -b 0 -d 0 -g 7 -s 79 -t 2 ignore_file=@ETCDIR@/actsync.ign --- 1,6 ---- ! # $Id: actsync.cfg.in,v 1.3 1998/10/17 01:07:27 tale Exp $ + host=ftp.isc.org + ftppath=/pub/usenet/CONFIG/active.Z + flags=-v 0 -p 80 ignore_file=@ETCDIR@/actsync.ign diff -Nacr inn-2.1/samples/checkgroups.in inn-2.2/samples/checkgroups.in *** inn-2.1/samples/checkgroups.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/checkgroups.in Mon Sep 7 08:59:09 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.12 $ ## Checkgroups control-message handler. . @LIBDIR@/innshellvars --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.14 $ ## Checkgroups control-message handler. . @LIBDIR@/innshellvars *************** *** 19,32 **** echo 'message into docheckgroups while running as the' echo "\"${NEWSUSER}\" userid:" echo '' ! echo "${PATHLIB}/docheckgroups <<\-EOF-" ${SM} ${ARTICLE} | ${SED} -e '1,/^$/d' echo '-EOF-' ) | sed -e 's/^~/~~/' | ${MAILCMD} -s "checkgroups by ${FROM}" ${NEWSMASTER} ;; doit) ${SM} ${ARTICLE} | ${SED} -e '1,/^$/d' \ ! | ${PATHETC}/docheckgroups \ | ${WRITELOG} ${LOGFILE} "checkgroups by ${FROM}" ;; esac --- 19,32 ---- echo 'message into docheckgroups while running as the' echo "\"${NEWSUSER}\" userid:" echo '' ! echo "@LIBDIR@/docheckgroups '${NEWSGROUPPATS}' <<\-EOF-" ${SM} ${ARTICLE} | ${SED} -e '1,/^$/d' echo '-EOF-' ) | sed -e 's/^~/~~/' | ${MAILCMD} -s "checkgroups by ${FROM}" ${NEWSMASTER} ;; doit) ${SM} ${ARTICLE} | ${SED} -e '1,/^$/d' \ ! | @LIBDIR@/docheckgroups '${NEWSGROUPPATS}' \ | ${WRITELOG} ${LOGFILE} "checkgroups by ${FROM}" ;; esac diff -Nacr inn-2.1/samples/checkgroups.pl.in inn-2.2/samples/checkgroups.pl.in *** inn-2.1/samples/checkgroups.pl.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/checkgroups.pl.in Fri Oct 9 17:23:34 1998 *************** *** 0 **** --- 1,85 ---- + #!@_PATH_PERL@ + # $Id: checkgroups.pl.in,v 1.8 1998/10/09 17:23:34 kondou Exp $ + # Copyright (c)1998 G.J. Andruk + # checkgroups.pl - The checkgroups control message. + # Parameters: params sender reply-to token site action[=log] approved + sub control_checkgroups { + my $artfh; + my @params = split(/\s+/,shift); + my $sender = shift; + my $replyto = shift; + my $token = shift; + my $site = shift; + my ($action, $logging) = split(/=/, shift); + my $approved = shift; + + my $newsgrouppats = shift; + + my $pid = $$; + my $tempfile = "$inn::tmpdir/checkgroups.$pid"; + + my ($errmsg, $status, $nc, @component, @oldgroup, $locktry, + $ngname, $ngdesc, $modcmd); + + if ($action eq "mail") { + open(TEMPFILE, ">$tempfile"); + print TEMPFILE ("$sender posted the following checkgroups message:\n"); + + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + CGHEAD: + while (
) { + last CGHEAD if /^$/; + s/^~/~~/; + print TEMPFILE $_; + } + print TEMPFILE ("\nIf you want to process it, feed the body\n", + "of the message to docheckgroups while logged\n", + "in as user ID \"$newsuser\":\n\n", + "$inn::newslib/docheckgroups '$newsgrouppats' <) { + s/^~/~~/; + print TEMPFILE ($_) if (! /^\s+$/); + } + print TEMPFILE ("zRbJ\n"); + close(ARTICLE); + close(TEMPFILE); + logger($tempfile, "mail", "checkgroups by $sender\n"); + unlink($tempfile); + } elsif ($action eq "log") { + if (!$logging) { + logmsg ('notice', 'checkgroups by %s', $sender); + } else { + logger($token, $logging, "checkgroups by $sender"); + } + } elsif ($action eq "doit") { + # Do checkgroups. + open(TEMPART,">$tempfile.art"); + + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + CGHEAD2: + while (
) { + last CGHEAD2 if /^$/; + } + while (
) { + print TEMPART ($_) if (! /^\s+$/); + } + close ARTICLE; + close TEMPART; + + open OLDIN, "<&STDIN"; + open OLDOUT, "<&STDOUT"; + open STDIN, "<$tempfile.art"; + open STDOUT, ">$tempfile"; + system ("$inn::newslib/docheckgroups", $newsgrouppats); + open STDIN, "<&OLDIN"; + open STDOUT, "<&OLDOUT"; + logger($tempfile, $logging, "checkgroups by $sender"); + unlink ($tempfile, "$tempfile.art"); + } + } diff -Nacr inn-2.1/samples/cnfsstat.in inn-2.2/samples/cnfsstat.in *** inn-2.1/samples/cnfsstat.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/cnfsstat.in Fri Dec 25 01:29:41 1998 *************** *** 0 **** --- 1,483 ---- + #!@_PATH_PERL@ + # $Id: cnfsstat.in,v 1.3.2.2 1998/12/25 01:29:41 kondou Exp $ + # + # Copyright Andreas Lamrecht 1998 + # + # + # Modified by Kjetil T. Homme 1998 + # + # + # Modified by Robert R. Collier 1998 + # + # + # bigint support added by Duane Currie (sandman@hub.org) 1998 + + use vars qw($opt_l $opt_h $opt_a $opt_s); + use Getopt::Long; + + # Set common paths (actually just $pathetc ...) + require '@LIBDIR@/innshellvars.pl'; + + # required for >32bit ints + require 'bigint.pl'; + + my($conffile) = "$inn::pathetc/cycbuff.conf"; + my($storagectl) = "$inn::pathetc/storage.ctl"; + my($storageconf) = "$inn::pathetc/storage.conf"; + + # Hex to bigint conversion routine + # bhex(HEXSTRING) returns BIGINT (with leading + chopped off) + # + # In most langauge, unlimited size integers are done using string math + # libraries usually called bigint. (Java, Perl, etc...) + + # Bigint's are really just strings. + + # Mathematics routines for bigint's: + + # bneg(BINT) return BINT negation + # babs(BINT) return BINT absolute value + # bcmp(BINT,BINT) return CODE compare numbers (undef,<0,=0,>0) + # badd(BINT,BINT) return BINT addition + # bsub(BINT,BINT) return BINT subtraction + # bmul(BINT,BINT) return BINT multiplication + # bdiv(BINT,BINT) return (BINT,BINT) division (quo,rem) just quo if scalar + # bmod(BINT,BINT) return BINT modulus + # bgcd(BINT,BINT) return BINT greatest common divisor + # bnorm(BINT) return BINT normalization + + sub bhex { + my $hexValue = shift; + $hexValue =~ s/^0x//; + + my $integerValue = '0'; + for (my $i = 0; $i < length($hexValue); $i+=2) { + # Could be more efficient going at larger increments, but byte + # by byte is safer for the case of 9 byte values, 11 bytes, etc.. + + my $byte = substr($hexValue,$i,2); + my $byteIntValue = hex($byte); + + $integerValue = bmul($integerValue,'256'); + $integerValue = badd($integerValue,"$byteIntValue"); + } + + $integerValue =~ s/^\+//; + return $integerValue; + } + + sub usage { + print <<_end_; + Summary tool for CNFS + + Usage: + $0 [-c CLASS] [-l [seconds]] + + If called without args, does a one-time status of all CNFS buffers + -a: print the age of the oldest article in the cycbuff + -c : prints out status of CNFS buffers in class CLASS + -l seconds: loops like vmstat, default seconds = 600 + -s: logs through syslog + -h: This information + -m : prints out information suitable for mrtg + -p: prints out an mrtg config file + _end_ + exit(1); + } + + my(@line, %class, %buff, %stor, $c, @buffers); + + my($gr, $cl, $min, $max, @storsort, $oclass, $header_printed); + + GetOptions("-a", "-c=s", \$oclass, "-h", "-l:i", "-s", "-m=s", \$obuffer, "-p"); + + &usage if $opt_h; + + if ($opt_s) { + $use_syslog = 0; + ## Comment out this eval line if you don't want to try to syslog + eval { require Sys::Syslog; import Sys::Syslog; $use_syslog = 1 }; + if ($use_syslog) { + openlog ('cnfsstat', 'pid', 'news'); + } else { + print STDERR "Syslog is not available. -s option is ignored.\n"; + } + } + + my($sleeptime) = (defined($opt_l) && $opt_l > 0) ? $opt_l : 600; + + unless (&read_cycbuffconf) { + print STDERR "Cannot open CycBuff Conffile $conffile ...\n"; + exit (1); + } + + unless (&read_storageconf || &read_storagectl) { + print STDERR "No valid $storageconf or $storagectl.\n"; + exit (1); + } + + sub read_cycbuffconf { + return 0 unless open (CONFFILE, $conffile); + + while() { + $_ =~ s/^\s*(.*?)\s*$/$1/; + # \x23 below is #. Emacs perl-mode gets confused by the "comment" + next if($_ =~ /^\s*$/ || $_ =~ /^\x23/); + next if($_ =~ /^cycbuffupdate:/ || $_ =~ /^refreshinterval:/); + + if($_ =~ /^metacycbuff:/) { + @line = split(/:/, $_); + if($class{$line[1]}) { + print STDERR "Class $line[1] more than one time in CycBuff Conffile $conffile ...\n"; + return 0; + } + + $class{$line[1]} = $line[2]; + next; + } + + if ($_ =~ /^cycbuff/) { + @line = split(/:/, $_); + if($buff{$line[1]}) { + print STDERR "Buff $line[1] more than one time in CycBuff Conffile $conffile ...\n"; + return 1; + } + $buff{$line[1]} = $line[2]; + next; + } + + print STDERR "Unknown config line \"$_\" in CycBuff Conffile $conffile ...\n"; + } + close(CONFFILE); + return 1; + } + + sub read_storagectl { + return 0 unless open (STOR, $storagectl); + + while () { + $_ =~ s/^\s*(.*?)\s*$/$1/; + next if $_ =~ /^\s*$/ || $_ =~ /^#/; + + if ($_ =~ /^cnfs:/) { + @line = split(/:/, $_); + if($#line != 5) { + print STDERR "Wrong Storage Control Line \"$_\" in $storagectl ...\n"; + return 0; + } + + if($stor{$line[5]}) { + print STDERR "CNFS Storage Line \"$_\" more than one time in $storagectl ...\n"; + return 0; + } + $stor{$line[5]} = join(":", @line[1 .. 4]); + push(@storsort, $line[5]); + } + } + close(STOR); + return 1; + } + + sub read_storageconf { + my $line = 0; + return 0 unless open (STOR, $storageconf); + + while () { + ++$line; + next if /^\s*#/; + + # defaults + %key = ("NEWSGROUPS" => "*", + "SIZE" => "0,0"); + + if (/method\s+cnfs\s+\{/) { + while () { + ++$line; + next if /^\s*#/; + last if /\}/; + if (/(\w+):\s+(\S+)/i) { + $key{uc($1)} = $2; + } + } + unless (defined $key{'CLASS'} && defined $key{'OPTIONS'}) { + print STDERR "storage.conf:$line: ". + "Missing 'class' or 'options'\n"; + return 0; + } + + $key{'SIZE'} .= ",0" unless $key{'SIZE'} =~ /,/; + $key{'SIZE'} =~ s/,/:/; + + if (defined $stor{$key{'OPTIONS'}}) { + print STDERR "storage.conf:$line: ". + "Class $key{'CLASS'} has several criteria\n"; + } else { + $stor{$key{'OPTIONS'}} = "$key{'NEWSGROUPS'}:$key{'CLASS'}:" . + "$key{'SIZE'}:$key{'OPTIONS'}"; + push(@storsort, $key{'OPTIONS'}); + } + } + } + return 1; + } + + &mrtg($obuffer) if $obuffer; + &mrtg_config if $opt_p; + + #foreach $c (keys(%class)) { + # print "Class: $c, definition: $class{$c}\n"; + #} + #foreach $c (keys(%buff)) { + # print "Buff: $c, definition: $buff{$c}\n"; + #} + # exit(0); + + START: + + undef($logline); + if ($oclass) { + if ($class{$oclass}) { + if (!$header_printed) { + ($gr, $cl, $min, $max) = split(/:/, $stor{$oclass}); + if ($use_syslog) { + if ($min || $max) { + $logline = sprintf("Class %s for groups matching \"%s\" article size min/max: %d/%d", $oclass, $gr, $min, $max); + } else { + $logline = sprintf("Class %s for groups matching \"%s\"", $oclass, $gr); + } + } else { + print STDOUT "Class $oclass"; + print STDOUT " for groups matching \"$gr\""; + if ($min || $max) { + print STDOUT ", article size min/max: $min/$max"; + } + print STDOUT "\n"; + } + $header_printed = 1; + } + + @buffers = split(/,/, $class{$oclass}); + if (! @buffers) { + print STDERR "No buffers in Class $main::ARGV[0] ...\n"; + next; + } + + foreach $b (@buffers) { + if (! $buff{$b} ) { + print STDERR "No buffer definition for buffer $b ...\n"; + next; + } + &print_cycbuff_head($buff{$b}); + } + } else { + print STDERR "Class $ARGV[1] not found ...\n"; + } + } else { # Print all Classes + + foreach $c (@storsort) { + ($gr, $cl, $min, $max) = split(/:/, $stor{$c}); + if ($use_syslog) { + if ($min || $max) { + $logline = sprintf("Class %s for groups matching \"%s\" article size min/max: %d/%d", $c, $gr, $min, $max); + } else { + $logline = sprintf("Class %s for groups matching \"%s\"", $c, $gr); + } + } else { + print STDOUT "Class $c "; + print STDOUT " for groups matching \"$gr\""; + if($min || $max) { + print STDOUT ", article size min/max: $min/$max"; + } + print STDOUT "\n"; + } + @buffers = split(/,/, $class{$c}); + if(! @buffers) { + print STDERR "No buffers in Class $c ...\n"; + next; + } + + foreach $b (@buffers) { + if(! $buff{$b} ) { + print STDERR "No buffer definition for buffer $b ...\n"; + next; + } + &print_cycbuff_head($buff{$b}); + } + if ($use_syslog == 0) { + print STDOUT "\n"; + } + } + } + + if(defined($opt_l)) { + sleep($sleeptime); + if ($use_syslog == 0) { + print STDOUT "$sleeptime seconds later:\n"; + } + goto START; + } + + sub print_cycbuff_head { + my($buffpath) = $_[0]; + my($name,$len,$free,$update,$cyclenum,$nupdate_str,$nago_str,$oupdate_str,$oago_str) = &get_cycbuff_info($buffpath); + + if ($use_syslog) { + ($name) = split(/\b/, $name); + $name =~ s/\0//g; + syslog ('notice', '%s Buffer %s, len: %d Mbytes, used: %.2f Mbytes (%4.1f%%) %3d cycles', $logline, $name, $len / (1024 * 1024), $free / (1024 * 1024), 100 * $free/$len, $cyclenum); + return 0; + } else { + $name =~ s/\0//g; + print " Buffer $name, len: "; + printf("%.2f", $len / (1024 * 1024)); + print " Mbytes, used: "; + printf("%.2f Mbytes", $free / (1024 * 1024)); + printf(" (%4.1f%%) %3d cycles", 100 * $free/$len, $cyclenum); + } + + print "\n Newest: $nupdate_str, $nago_str ago\n"; + + if ($opt_a) { + print " Oldest: $oupdate_str, $oago_str ago\n"; + } + } + + sub lookup_age { + my ($msgid) = @_; + + my $history = `grephistory -l '$msgid' 2>&1`; + if ($history =~ /\t(\d+)~/) { + return $1; + } + print " (Missing $msgid)\n"; + return 0; + } + + sub make_time { + my ($t) = @_; + my (@ret); + + my ($sec,$min,$hour,$mday,$mon,$year) = + (localtime($t))[0..5]; + push (@ret, sprintf("%04d-%02d-%02d %2d:%02d:%02d", + $year + 1900, $mon + 1, $mday, $hour, $min, $sec)); + $t = time - $t; + + $mday = int($t/86400); $t = $t % 86400; + $hour = int($t/3600); $t = $t % 3600; + $min = int($t/60); $t = $t % 60; + + push (@ret, sprintf("%4d days, %2d:%02d:%02d", + $mday, $hour, $min, $t)); + return @ret; + } + + sub mrtg { + my $buffer = shift; + print "Buffer = $buff{$buffer}\n"; + @info = &get_cycbuff_info($buff{$buffer}); + print "$info[1]\n"; + print "$info[2]\n"; + print "$info[4]\n"; + print "$info[0]\n"; + exit(0); + } + + sub mrtg_config { + print "Sub MRTG-CONFIG\n"; + foreach $class (sort(keys(%class))) { + print "##\n## Class : $class\n## Wildmat: $stor{$class}\n##\n\n"; + foreach $buffer (split /\,/,$class{$class}) { + &mrtg_buffer($class,$buffer); + } + } + exit(0); + } + + sub mrtg_buffer { + my ($class,$buffer) = @_; + #my ($name, $num, $buff, $size) = @_; + $tag = 'cnfs-' . $buffer; + + print 'Target[', $tag, ']: `', "$inn::pathbin/cnfsstat -m ", $buffer, '`', "\n"; + print 'MaxBytes[', $tag, ']: ', (&get_cycbuff_info($buff{$buffer}))[1], "\n"; + print 'Title[', $tag, ']: ', "${buffer} Usage\n"; + print 'Options[', $tag, ']: growright gauge', "\n"; + print 'YLegend[', $tag, ']: ', "${buffer}\n"; + print 'ShortLegend[', $tag, ']: MB', "\n"; + print 'PageTop[', $tag, ']: ', "

Usage of ${buffer}

\n"; + print "
$stor{$class}\n"; + print "\n"; + 1; + } + + sub get_cycbuff_info { + my($buffpath) = $_[0]; + + my($CNFSMASIZ)=8; + my($CNFSNASIZ)=16; + my($CNFSPASIZ)=64; + my($CNFSLASIZ)=16; + my($headerlength) = $CNFSMASIZ + $CNFSNASIZ + $CNFSPASIZ + (4 * $CNFSLASIZ); + + my($buff, @entries, $e); + my($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma); + + if(! open(BUFF, "< $buffpath") ) { + print STDERR "Cannot open Cycbuff $buffpath ...\n"; + exit(1); + } + + $buff = ""; + if(! read(BUFF, $buff, $headerlength) ) { + print STDERR "Cannot read $headerlength bytes from file $buffpath...\n"; + exit(1); + } + + ($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma) = unpack("a8 a16 a64 a16 a16 a16 a16", $buff); + + if(!$magic) { + print STDERR "Error while unpacking header ...\n"; + exit(1); + } + + my($len) = bhex($lena); + my($free) = hex($freea); + my($update) = hex($updatea); + my($cyclenum) = hex($cyclenuma) - 1; + + my ($nupdate_str, $nago_str) = &make_time ($update); + + if ($opt_a) { + + # The 16384 is a fuzz factor. New articles are actually + # written a little past free. + + $offset = 0; + do_seek: + while (1) { + $offset += 16384; + seek (BUFF, $cyclenum ? $free + $offset : 0, 0); + + while () { + next unless /^message-id:\s+(<.*>)/i; + + # We give up if the article is missing in history, or else + # we stand a high risk of checking the whole cycbuff... + + last do_seek unless $time = &lookup_age ($1); + # Is the article newer than the last update? + if ($time > $update) { + $update = $time; + next do_seek; + } + + ($oupdate_str, $oago_str) = &make_time ($time); + last do_seek; + } + } + } + close(BUFF); + return($name,$len,$free,$update,$cyclenum,$nupdate_str,$nago_str,$oupdate_str,$oago_str); + } + diff -Nacr inn-2.1/samples/control.ctl inn-2.2/samples/control.ctl *** inn-2.1/samples/control.ctl Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/control.ctl Mon Nov 16 01:13:31 1998 *************** *** 32,39 **** ## to fix some sections here. Search for *PGP*. At each "*PGP*" found ## you'll need to comment out the block of lines right after it (that have ## 'verify-' in their 4th field). Then uncomment the block of lines that ! ## comes right after that. You'll also need to change WANT_PGPVERIFY in ! ## config.data. ## ## For more information on using PGP to varify control messages, upgrade ## to INN-1.5 (or later) or see: ftp://ftp.isc.org/pub/pgpcontrol/ --- 32,38 ---- ## to fix some sections here. Search for *PGP*. At each "*PGP*" found ## you'll need to comment out the block of lines right after it (that have ## 'verify-' in their 4th field). Then uncomment the block of lines that ! ## comes right after that. You'll also need to change pgpverify in inn.conf. ## ## For more information on using PGP to varify control messages, upgrade ## to INN-1.5 (or later) or see: ftp://ftp.isc.org/pub/pgpcontrol/ *************** *** 504,510 **** rmgroup:news@noc.eu.net:eunet.*:doit=rmgroup ## EXAMPLE ( Bogus hierarchy reserved for standards documents ) ! checkgroups:*@*:example.*:drop newgroup:*@*:example.*:drop rmgroup:*@*:example.*:doit=rmgroup --- 503,509 ---- rmgroup:news@noc.eu.net:eunet.*:doit=rmgroup ## EXAMPLE ( Bogus hierarchy reserved for standards documents ) ! # checkgroups:*@*:example.*:drop newgroup:*@*:example.*:drop rmgroup:*@*:example.*:doit=rmgroup *************** *** 534,543 **** # rmgroup:news@wing.matsim.udmurtia.su:fido7.*:doit=rmgroup ## FJ (Japan and Japanese language) ! newgroup:fj-committee@etl.go.jp:fj.*:doit=newgroup ! newgroup:fj-committee@cow.nara.sharp.co.jp:fj.*:doit=newgroup ! rmgroup:fj-committee@etl.go.jp:fj.*:doit=rmgroup ! rmgroup:fj-committee@cow.nara.sharp.co.jp:fj.*:doit=rmgroup ## FL (Florida, USA ) newgroup:hgoldste@news1.mpcs.com:fl.*:doit=newgroup --- 533,541 ---- # rmgroup:news@wing.matsim.udmurtia.su:fido7.*:doit=rmgroup ## FJ (Japan and Japanese language) ! checkgroups:fj-committee@cow.nara.sharp.co.jp:fj.*:verify-fj.news.announce ! newgroup:fj-committee@cow.nara.sharp.co.jp:fj.*:verify-fj.news.announce ! rmgroup:fj-committee@cow.nara.sharp.co.jp:fj.*:verify-fj.news.announce ## FL (Florida, USA ) newgroup:hgoldste@news1.mpcs.com:fl.*:doit=newgroup *************** *** 556,567 **** ## FR (French Language) # *PGP* See comment at top of file. ! checkgroups:control@usenet.fr.net:fr.*:verify-fr.announce.newgroups ! newgroup:control@usenet.fr.net:fr.*:verify-fr.announce.newgroups ! rmgroup:control@usenet.fr.net:fr.*:verify-fr.announce.newgroups ! # newgroup:control@usenet.fr.net:fr.*:doit=newgroup ! # rmgroup:control@usenet.fr.net:fr.*:doit=rmgroup ## FREE --- 554,565 ---- ## FR (French Language) # *PGP* See comment at top of file. ! checkgroups:control@usenet-fr.news.eu.org:fr.*:verify-control@usenet-fr.news.eu.org ! newgroup:control@usenet-fr.news.eu.org:fr.*:verify-control@usenet-fr.news.eu.org ! rmgroup:control@usenet-fr.news.eu.org:fr.*:verify-control@usenet-fr.news.eu.org ! # newgroup:control@usenet-fr.news.eu.org:fr.*:doit=newgroup ! # rmgroup:control@usenet-fr.news.eu.org:fr.*:doit=rmgroup ## FREE *************** *** 1081,1089 **** ## RELCOM ( Commonwealth of Independent States) ## The official list of relcom groups is supposed to be available from ## URL: ftp://ftp.kiae.su/relcom/netinfo/telconfs.txt ! checkgroups:dmart@new*.relcom.ru:relcom.*:mail ! newgroup:dmart@new*.relcom.ru:relcom.*:doit=newgroup ! rmgroup:dmart@new*.relcom.ru:relcom.*:doit=rmgroup ## RPI ( Rensselaer Polytechnic Institute, Troy, NY, USA) # Contact: sofkam@rpi.edu --- 1079,1091 ---- ## RELCOM ( Commonwealth of Independent States) ## The official list of relcom groups is supposed to be available from ## URL: ftp://ftp.kiae.su/relcom/netinfo/telconfs.txt ! checkgroups:dmart@new*.relcom.ru:relcom.*:verify-relcom.newsgroups ! newgroup:dmart@new*.relcom.ru:relcom.*:verify-relcom.newsgroups ! rmgroup:dmart@new*.relcom.ru:relcom.*:verify-relcom.newsgroups ! ! #checkgroups:dmart@new*.relcom.ru:relcom.*:doit ! #newgroup:dmart@new*.relcom.ru:relcom.*:doit=newgroup ! #rmgroup:dmart@new*.relcom.ru:relcom.*:doit=rmgroup ## RPI ( Rensselaer Polytechnic Institute, Troy, NY, USA) # Contact: sofkam@rpi.edu *************** *** 1315,1322 **** ## UKR ( Ukraine ) ! newgroup:news-server@sita.kiev.ua:ukr.*:doit=newgroup ! rmgroup:news-server@sita.kiev.ua:ukr.*:doit=rmgroup ## UMN (University of Minnesota, USA ) newgroup:edh@*.tc.umn.edu:umn.*:doit=newgroup --- 1317,1324 ---- ## UKR ( Ukraine ) ! newgroup:ay@sita.kiev.ua:ukr.*:doit=newgroup ! rmgroup:ay@sita.kiev.ua:ukr.*:doit=rmgroup ## UMN (University of Minnesota, USA ) newgroup:edh@*.tc.umn.edu:umn.*:doit=newgroup diff -Nacr inn-2.1/samples/controlbatch.in inn-2.2/samples/controlbatch.in *** inn-2.1/samples/controlbatch.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/controlbatch.in Sun Sep 20 13:25:08 1998 *************** *** 0 **** --- 1,92 ---- + #!@_PATH_SH@ + ######################################################################## + # controlbatch - Run controlchan against a batch file. + # + # Command usage: controlbatch [feedsite batchfile] + # Defaults are feedsite: controlchan!, batchfile: ${BATCH}/controlchan! + ######################################################################## + # + # This script will run controlchan against a batch file. You can use + # it to clear occasional backlogs while running controls from a + # channel, or even skip the channel and run control messages as a file + # feed. + # + ######################################################################## + # + # If you're doing the channel thing, you might want to put something + # like this in your crontab to do a cleanup in the wee hours: + # + # 00 04 * * * @prefix@/bin/controlbatch + # + ######################################################################## + # + # If you would rather skip the channel and just process controls each + # hour in a batch, use this newsfeeds entry instead of the "stock" + # version: + # + # controlchan!\ + # :!*,control,control.*,!control.cancel\ + # :Tf,Wnsm: + # + # And, a crontab entry something like this: + # + # 30 * * * * @prefix@/bin/controlbatch + # + ######################################################################## + + ## Change this to point at *your* innshellvars ## + . @LIBDIR@/innshellvars + + + batchlock="${LOCKS}/LOCK.controlbatch" + mypid=$$ + + # A concession to INN 1.x + if [ me${PATHBIN}ow = meow ] ; then + PATHBIN=${NEWSBIN} + export PATHBIN + fi + + # See if we have no arguments and should use the defaults. If there are + # arguments, make sure we have enough to attempt something useful. + if [ me${1}ow != meow ] ; then + if [ me${2}ow = meow ] ; then + echo "Usage: ${0} [feedsite batchfile]" >&2 + exit 0 + else + feedsite=${1} + batchfile=${2} + fi + else + feedsite=controlchan\! + batchfile=controlchan\! + fi + + # Check if any other copies of controlbatch are running. If we are not + # alone, give up here and now. + ${PATHBIN}/shlock -p $mypid -f ${batchlock} || exit 0 + + cd ${BATCH} + + if [ -s ${batchfile}.work ] ; then + cat ${batchfile}.work >>${batchfile}.doit + rm -f ${batchfile}.work + fi + + if [ -s ${batchfile} ] ; then + mv ${batchfile} ${batchfile}.work + if ${PATHBIN}/ctlinnd -s -t30 flush ${feedsite} ; then + cat ${batchfile}.work >>${batchfile}.doit + rm -f ${batchfile}.work + fi + fi + + if [ -s ${batchfile}.doit ] ; then + ${PATHBIN}/controlchan \ + < ${batchfile}.doit >> ${MOST_LOGS}/controlbatch.log 2>&1 + # if you want extra assurance that nothing gets lost... + # cat ${batchfile}.doit >> ${batchfile}.done + rm -f ${batchfile}.doit + fi + + rm -f ${batchlock} diff -Nacr inn-2.1/samples/controlchan.in inn-2.2/samples/controlchan.in *** inn-2.1/samples/controlchan.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/controlchan.in Mon Oct 19 09:19:26 1998 *************** *** 0 **** --- 1,450 ---- + #!@_PATH_PERL@ + # $Id: controlchan.in,v 1.21 1998/10/19 09:19:26 kondou Exp $ + # Copyright (c)1998 G.J. Andruk + ########################################################################### + # controlchan - read a feed, sniff out control messages, and send them + # to the appropriate script. + # + # Give this program its own newsfeed. Make sure that you've created + # the newsgroup control.cancel so that you don't have to scan through + # cancels, which this program won't process anyway. + # + # Make a newsfeeds entry like this: + # + # controlchan!\ + # :!*,control,control.*,!control.cancel\ + # :Tc,Wnsm\ + # :@prefix@/bin/controlchan + # + ########################################################################### + + require 5.004; + + use IPC::Open2; # Makes mailing easier. + + $ENV{'PATH'} = '/bin:/usr/bin'; + delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; + + ## *** Change this to be correct for your site. *** ## + require "@LIBDIR@/innshellvars.pl" ; + $inn::newslib = "@LIBDIR@"; # location of docheckgroups + + # hackage for pre-2.0 INNs. + if (!$inn::pathhost) { + $inn::pathhost = `$inn::newsbin/innconfval pathhost`; + chomp $inn::pathhost; + } + @inn::mailcmd = split /\s+/, $inn::mailcmd; #for nonstandard mailers + my $use_syslog = 0; + + ## Comment out this line if you don't want to try to syslog + my $try_syslog = 1; + + + if ($try_syslog) { + eval { require INN::Syslog; import INN::Syslog; $use_syslog = 1 }; + if (!$use_syslog) { + eval { require Sys::Syslog; import Sys::Syslog; $use_syslog = 1 }; + } + } + if ($use_syslog) { + if (defined &Sys::Syslog::setlogsock && $] >= 5.00403) { + Sys::Syslog::setlogsock('unix') if $^O =~ /linux/; + } + openlog ('controlchan', 'pid', 'news'); + } + + logmsg ('notice', 'starting'); + + my $lastctl = 0; + my (@headers, %hdrcount, %hdrval, $msgid, $token, $progname, + @progparams, $pathhost, @ctllist, $action, $logname, $act_log, + $errmsg, @ctlprogs, $subfind, $SM, $keyowner, $pgpresult, $ArtFH, + $sitepath, $newsgrouppats, $kid); + + # If we have $newsbin/sm, this must be an INN 2.x installation. + # Otherwise, we'll fake it on older servers. + if (-e "$inn::newsbin/sm") { + if ($inn::storageapi =~ /true|yes|on/i) { + $SM = "$inn::newsbin/sm -q"; + } else { + $SM = "cat"; + } + } else { + $SM = "cat"; + } + + # Scan the control directory and load *.pl. This will bring in the + # new-style control scripts. For controlchan to use a perl control + # instead of falling back to the old shell system, it must be declared + # as a sub in the form control_xxx. For example, if + # control_newgroup() exists, we will use that when encountering a + # newgroup control. If control_newgroup() is undefined, we'll use the + # old shell version. + + # This stuff looks weird, but perl -T doesn't like globbing. It's our + # private directory, we should be able to trust it. + opendir CTL, $inn::controlprogs or die ("can't open ctlprogs"); + @ctlprogs=grep { /\.pl$/ && !/filter_(?:innd|nnrpd)|startup_innd/ && + -f "$inn::controlprogs/$_" } readdir(CTL); + closedir CTL; + for (@ctlprogs) { + if (/(^[a-z.]+$)/) { + do "$inn::controlprogs/$1"; + logmsg ('notice', 'loaded $inn::controlprogs/%s', $1); + } + } + + CHANITEM: + while () { + undef(@headers); + undef(@progparams); + undef(%hdrcount); + undef(%hdrval); + + chomp; + ($token, $sitepath, $msgid) = split(/\s+/, $_); + $token = $inn::spool . '/' . $token if ! ($token =~ /^\@.+\@$/ || /^\//); + + $ArtFH = open_article($token); + next if (!defined($ArtFH)); + *ARTICLE = $ArtFH; + + # suck in headers, normalize the strange ones. + GETHEADERS: + while (
) { + chomp; + s/\s+$//; + last GETHEADERS if $_ =~ /^$/; + s/^Also-Control:/Control:/i; + s/^Supersedes:/Control: cancel/i; + push @headers, $_; + s/:.+//; + $hdrcount{lc($_)}++; + } + close ARTICLE; + + # warn on failed header retrieval + if (! @headers) { + logmsg ('notice', 'No headers in article %s', $msgid); + next CHANITEM; + } + + $hdrcount{approved} = 0 if ! exists $hdrcount{approved}; + + # check for duplicate controls/supersedes; these are goof-ups or + # denial-of-service attacks, don't process. + if ($hdrcount{control} > 1) { + logmsg ('notice', 'Multiple control headers in article %s', $msgid); + next CHANITEM; + } + + # Dig out useful headers. If duplicates, use the first found. Innd + # should have weeded out some of this but the paranoia can't hurt. + for (@headers) { + my $hdr = $_; + for ("Sender", "From", "Reply-To", "Control", "Subject") { + if (($hdr =~ /^$_:/i) && (! defined($hdrval{$_}))) { + $hdrval{$_} = $hdr; + $hdrval{$_} =~ s/^[^:]*:\s+//; + } + } + } + + if ((!defined $hdrval{Control}) && + ($hdrval{Subject} =~ /^cmsg\s+(.+)/)) { + $hdrval{Control} = $1; + $hdrcount{control} = 1; + } + + next CHANITEM if (! exists $hdrcount{control}); + + $hdrval{Sender} = $hdrval{From} if ! defined($hdrval{Sender}); + $hdrval{Sender} = CleanAddy($hdrval{Sender}); + $hdrval{'Reply-To'} = $hdrval{From} if ! defined($hdrval{'Reply-To'}); + $hdrval{'Reply-To'} = CleanAddy($hdrval{'Reply-To'}); + + $hdrval{Control} =~ s/\s+/ /g; + + if ($hdrval{Control} =~ /\s/) { + $hdrval{Control} =~ /^(\S+)(\s+)?(.+)?/; + $progname = lc($1); + @progparams = split(/\s+/, lc($3)); + } else { + $progname = lc($hdrval{Control}); + } + + next CHANITEM if ($progname =~ /^(cancel)$/); + + if ($progname !~ /(^[a-z]+$)/) { + logmsg ('notice', 'Naughty control in article %s', $msgid); + } else { + $progname = $1; + } + + ($action, $logname, $newsgrouppats) = + split(/=/, ctlperm($progname, $hdrval{Sender}, $progparams[0], $token)); + + # Do we want to process the message? Let's check the permissions. + $act_log = $action; + $act_log .= "=" . $logname if $logname; + if ($newsgrouppats) { + $newsgrouppats =~ s/\$\|/\|/g; + $newsgrouppats =~ s/[^\\]\.[^*]/\?/g; + $newsgrouppats =~ s/^(.*)\$/$1/g; + $newsgrouppats =~ s/\.\*/*/g; + $newsgrouppats =~ s/\\([\@\$\+\.])/$1/g; + } + + #print(scalar localtime, + # ": $progname:$hdrval{Sender}:@progparams:$action=$logname\n"); + + if ($action eq "drop") { + next CHANITEM; + } elsif ($action =~ /^_pgp/) { + $errmsg = "skipping $progname "; + if ($progparams[0] eq "newgroup") { + if ($progparams[1] eq "moderated") { + $errmsg .= "m "; + } else { + $errmsg .= "y "; + } + } + $errmsg .= $hdrval{Sender} . " (pgpverify failed)"; + + logmsg ('err', '%s in %s', $errmsg, $msgid); + #logger($token, $logname, $errmsg); + next CHANITEM; + } + + $subfind = "control_$progname"; + if (defined (&$subfind)) { # It's a new-style control message. + logmsg ('notice', '%s, %s %s %s %s, %s, %s, %s', + $subfind, join(" ", @progparams), $hdrval{Sender}, + $hdrval{'Reply-To'}, $token, $sitepath, $act_log, + $hdrcount{approved}); + + if ($progname eq "checkgroups" and $act_log =~ /^doit/) { + $act_log = "doit=mail" if $act_log !~ /^doit=.+/; + } + &$subfind (join(" ", @progparams), $hdrval{Sender}, + $hdrval{'Reply-To'}, $token, $sitepath, + $act_log, $hdrcount{approved}, $newsgrouppats); + } else { # old style + $progname = $inn::controlprogs . '/' . $progname ; + if (-e $progname) { + system($progname, $hdrval{Sender}, $hdrval{'Reply-To'}, + $token, $sitepath); + } else { # This replaces the 'default' script. + if ($logname) { + logger($token, $logname, + "Unknown control message by $hdrval{Sender}"); + } else { + $progname =~ s/.*\///; + logmsg ('notice', 'Unknown "%s" control by %s', + $progname, $hdrval{Sender}); + } + } + } + } + closelog() if ($use_syslog); + + + # Strip a mail address, innd-style. + sub CleanAddy { + $_ = shift; + s/(\s+)?\(.*\)(\s+)?//g; + s/^.*<(.*)>.*$/$1/; + s/[^-a-zA-Z0-9+_.@%]//g; # protect /bin/mail + s/^-//; # protect /bin/mail + return $_; + } + + # Read control.ctl and put it into @ctllist. + # Params: none + # Returns: none + sub readctlfile { + my @ctlstat = stat($inn::ctlfile); + return if ($lastctl == $ctlstat[9]); # mtime hasn't changed. + + undef(@ctllist); + open(CTLFILE, "<$inn::ctlfile") || die; + while () { + chomp; + # Not a comment or blank? Convert wildmat to regex + if (/^(\s+)?[^\#]/ && ! (/^$/)) { + s/([\@\$\+\.])/\\$1/g; + s/\*/.*/g; + s/\?/./g; + s/(.*)/^$1\$/; + s/:/\$:^/g; + s/\|/\$\|^/g; + push(@ctllist, $_); + ###print $_,"\n"; + } + } + close(CTLFILE); + $lastctl = $ctlstat[9]; + } + + + # Parse a control message's permissions. + # Params: (controltype, sender, newsgroup, token) + # Returns: action + sub ctlperm { + my $controltype = shift; + my $sender = shift; + my $newsgroup = shift; + my $token = shift; + my $action = "drop"; + my @ctlline; + + readctlfile(); + + for (@ctllist) { + @ctlline = split(/:/); + if ((($controltype =~ /$ctlline[0]/) && + ($sender =~ /$ctlline[1]/)) && + (($controltype !~ /^(newgroup|rmgroup)$/) || + ($newsgroup =~ $ctlline[2]))) { + $action = $ctlline[3]; + $action =~ s/.(.+)./$1/; + $action =~ s/\\//g; + if ($controltype eq "checkgroups") { + $action .= "=" if $action !~ /=/; + $action .= "=" . $ctlline[2]; + } + } + } + + if ($action =~ /^verify-(.+)/) { + $keyowner = $1; + if ((!$inn::want_pgpverify) && + (not $inn::pgpverify or $inn::pgpverify !~ /true|on|yes/i)) { + $action = "mail"; + } else { + $keyowner =~ s/=.+//; + open(PGPCHECK, "$SM $token|$inn::newsbin/pgpverify|"); + $pgpresult = ; + close PGPCHECK; + chomp $pgpresult; + if ($keyowner eq $pgpresult) { + $action =~ s/^[^=]+/doit/; + } else { + $action =~ s/^[^=]+/_pgpfail/; + } + } + } + return($action); + } + + + # Write stuff to a log or send mail to the news admin. + # Params: (token, logfile, message) + sub logger { + my $token = shift; + my $logfile = shift; + my $message = shift; + my ($lockfile, $locktry, $lockpid); + my $pid = $$; + my $tempfile = "$inn::tmpdir/controlchan.$pid"; + + if ($logfile =~ /(^[^.\/].*)/ ) { + $logfile = $1; + } else { + $logfile = "control"; + } + + if ($logfile eq "mail") { + $ArtFH = open_article($token); + next if (!defined($ArtFH)); + *ARTICLE = $ArtFH; + $kid = open2(\*R, \*MAIL, @inn::mailcmd, "-s", $message, $inn::newsmaster); + for (
) { + print MAIL (" ", $_); + } + close (ARTICLE); + close R; + close MAIL; + waitpid($kid, 0); + return; + } elsif ($logfile !~ /\//) { + $logfile = "$inn::most_logs/$logfile.log"; + } + + my $shlock = "$inn::newsbin/shlock"; + + $inn::locks = $inn::locks; + $lockfile = $logfile; + $lockfile =~ s/.*\///; + $lockfile = "$inn::locks/LOCK." . $lockfile; + + # We want to make sure the log is ours. Use shlock so as not + # to confuse other programs. + $locktry = 0; + GETLOGLOCK: + while ($locktry < 60) { + if (system($shlock, "-p", $pid, "-f", $lockfile)) { + $locktry++; + sleep(2); + } else { + $locktry = -1; + last GETLOGLOCK; + } + } + + if ($locktry < 0) { # we got the lock + open(LOGFILE, ">>$logfile"); + print LOGFILE $message,"\n"; + + $ArtFH = open_article($token); + next if (!defined($ArtFH)); + *ARTICLE = $ArtFH; + + for (
) { + print LOGFILE (" ", $_); + } + print LOGFILE "\n"; + close (ARTICLE); + close (LOGFILE); + unlink $lockfile; + } else { + open LOCKFILE, $lockfile; + $lockpid = ; + close LOCKFILE; + logmsg('err', 'Cannot get lock %s, held by %s', + $lockfile, $lockpid); + } + } + + + # Open an article appropriately to our storage method (or lack thereof). + sub open_article { + my $token = shift; + local(*ART); + + my $fail = 0; + if ($SM eq "cat") { + $fail = 1 if (!open(ART,"<$token")); + } else { + $fail = 1 if (!open(ART, "$SM $token|")); + } + if ($fail) { + logmsg ('notice', 'Cannot open article %s using method %s: %s', + $token, $SM, $!); + } + return(*ART); + } + + + # write to syslog or errlog + sub logmsg { + my $lvl = shift; + my $fmt = shift; + + if ($use_syslog) { + syslog($lvl, $fmt, @_); + } else { + printf("%s: $fmt\n", scalar localtime, @_); + } + } diff -Nacr inn-2.1/samples/docheckgroups.in inn-2.2/samples/docheckgroups.in *** inn-2.1/samples/docheckgroups.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/docheckgroups.in Mon Sep 7 08:59:10 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.9 $ ## Script to execute checkgroups text; results to stdout. . @LIBDIR@/innshellvars --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.10 $ ## Script to execute checkgroups text; results to stdout. . @LIBDIR@/innshellvars *************** *** 21,34 **** | (tr '\012' '|' ; echo '' )\ | ${SED} -e 's/|$//'` ! ${EGREP} "${PATS}" ${ACTIVE} | ${SED} 's/ .*//' | sort >${T}/$$active ! ${EGREP} "${PATS}" ${T}/$$msg | ${SED} 's/[ ].*//' | sort >${T}/$$newsgrps comm -13 ${T}/$$active ${T}/$$newsgrps >${T}/$$missing comm -23 ${T}/$$active ${T}/$$newsgrps >${T}/$$remove ! ${EGREP} "${PATS}" ${ACTIVE} | ${SED} -n '/ m$/s/ .*//p' | sort >${T}/$$amod.all ! ${EGREP} "${PATS}" ${T}/$$msg | ${SED} -n '/(Moderated)$/s/[ ].*//p' | sort >${T}/$$ng.mod comm -12 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.mod --- 21,34 ---- | (tr '\012' '|' ; echo '' )\ | ${SED} -e 's/|$//'` ! ${EGREP} "${PATS}" ${ACTIVE} | ${EGREP} "${1}" | ${SED} 's/ .*//' | sort >${T}/$$active ! ${EGREP} "${PATS}" ${T}/$$msg | ${EGREP} "${1}" | ${SED} 's/[ ].*//' | sort >${T}/$$newsgrps comm -13 ${T}/$$active ${T}/$$newsgrps >${T}/$$missing comm -23 ${T}/$$active ${T}/$$newsgrps >${T}/$$remove ! ${EGREP} "${PATS}" ${ACTIVE} | ${EGREP} "${1}" | ${SED} -n '/ m$/s/ .*//p' | sort >${T}/$$amod.all ! ${EGREP} "${PATS}" ${T}/$$msg | ${EGREP} "${1}" | ${SED} -n '/(Moderated)$/s/[ ].*//p' | sort >${T}/$$ng.mod comm -12 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.mod diff -Nacr inn-2.1/samples/ihave.pl.in inn-2.2/samples/ihave.pl.in *** inn-2.1/samples/ihave.pl.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/ihave.pl.in Mon Dec 28 15:43:11 1998 *************** *** 0 **** --- 1,78 ---- + #!@_PATH_PERL@ + # $Id: ihave.pl.in,v 1.9.2.1 1998/12/28 15:43:11 kondou Exp $ + # Copyright (c)1998 G.J. Andruk + # ihave.pl - The ihave control message. + # Parameters: params sender reply-to token site action[=log] approved + sub control_ihave { + my $artfh; + + my @params = split(/\s+/,shift); + my $sender = shift; + my $replyto = shift; + my $token = shift; + my $site = shift; + my ($action, $logging) = split(/=/, shift); + my $approved = shift; + + my $pid = $$; + my $tempfile = "$inn::tmpdir/ihave.$pid"; + + my ($errmsg, $status, $nc, @component, @oldgroup, $locktry, + $ngname, $ngdesc, $modcmd, $kid); + + if ($action eq "mail") { + + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + IHHEAD: + while (
) { + last IHHEAD if /^$/; + } + $kid = open2(\*R, \*MAIL, @inn::mailcmd, "-s", + "ihave by $sender", $inn::newsmaster); + while (
) { + s/^~/~~/; + print MAIL $_; + } + close ARTICLE; + close R; + close MAIL; + waitpid($kid, 0); + } elsif ($action eq "log") { + if (!$logging) { + logmsg ('notice', 'ihave %s', $sender); + } else { + logger($token, $logging, "ihave $sender"); + } + } elsif ($action eq "doit") { + + open(GREPHIST, "|grephistory -i > $tempfile"); + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + IHHEAD2: + while (
) { + last IHHEAD2 if /^$/; + } + print GREPHIST $_ while
; + close(ARTICLE); + close(GREPHIST); + + if (-s "$tempfile") { + $kid = open2(\*R, \*INEWS, $inn::inews, "-h"); + print INEWS ("Newsgroups: to.$site\n", + "Subject: cmsg sendme $inn::pathhost\n", + "Control: sendme $inn::pathhost\n\n"); + open TEMPFILE, "<$tempfile"; + print INEWS $_ while ; + close R; + close INEWS; + close TEMPFILE; + waitpid($kid, 0); + } + unlink ($tempfile); + } + } diff -Nacr inn-2.1/samples/incoming.conf inn-2.2/samples/incoming.conf *** inn-2.1/samples/incoming.conf Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/incoming.conf Sun Jan 17 23:18:16 1999 *************** *** 1,4 **** ! ## $Revision: 1.3 $ ## incoming.conf - names and addresses that feed us news ## ## This file consists of three types of entries: key/value, peer and group. --- 1,4 ---- ! ## $Revision: 1.3.4.2 $ ## incoming.conf - names and addresses that feed us news ## ## This file consists of three types of entries: key/value, peer and group. *************** *** 120,125 **** --- 120,132 ---- ## skip: ## This key requires a boolean value. Setting this entry causes this peer ## to be skipped. Reserved for future use. (default=false) + ## + ## noresendid: + ## This key requires a boolean value. It defines whether innd should send + ## "431 RESENDID" (stream mode) or "436 Retry later" (non-stream mode) + ## responses if a message is offered that is already received from another + ## peer. This can be useful for peers that resend messages right away, + ## as innfeed does. (default=false) ## streaming: true # streaming allowed by default diff -Nacr inn-2.1/samples/inn.conf.in inn-2.2/samples/inn.conf.in *** inn-2.1/samples/inn.conf.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/inn.conf.in Sat Nov 7 03:06:05 1998 *************** *** 1,4 **** ! ## $Revision: 1.12 $ ## inn.conf -- inn configuration data ## Format: ## : --- 1,4 ---- ! ## $Revision: 1.24.2.1 $ ## inn.conf -- inn configuration data ## Format: ## : *************** *** 24,34 **** maxforks: 10 maxartsize: 1000000 nicekids: 4 verifycancels: false logcancelcomm: false wanttrash: false remembertrash: true ! linecountfuzz: true peertimeout: 3600 clienttimeout: 600 allownewnews: true --- 24,35 ---- maxforks: 10 maxartsize: 1000000 nicekids: 4 + nicenewnews: 0 verifycancels: false logcancelcomm: false wanttrash: false remembertrash: true ! linecountfuzz: 0 peertimeout: 3600 clienttimeout: 600 allownewnews: true *************** *** 44,60 **** strippostcc: false status: 0 timer: 0 ! allowreaders: true extendeddbz: false nnrpdoverstats: false storeonxref: true nnrpdcheckart: true storemsgid: true ! backoff_auth: false ! backoff_db: @DBDIR@/backoff ! backoff_postfast: 0L ! backoff_postslow: 1L ! backoff_trigger: 10000L mimeversion: mimecontenttype: mimeencoding: --- 45,64 ---- strippostcc: false status: 0 timer: 0 ! readerswhenstopped: true ! noreader: false extendeddbz: false nnrpdoverstats: false storeonxref: true nnrpdcheckart: true storemsgid: true ! usecontrolchan: false ! mergetogroups: false ! backoffauth: false ! backoffdb: @DBDIR@/backoff ! backoffpostfast: 0L ! backoffpostslow: 1L ! backofftrigger: 10000L mimeversion: mimecontenttype: mimeencoding: *************** *** 62,67 **** --- 66,72 ---- activedenable: false activedupdate: 30 activedport: 1119 + nnrpperlauth: false # # # These options are unlikely to need changing in most situations *************** *** 81,92 **** --- 86,99 ---- wireformat: false xrefslave: false nnrpdposthost: + nnrpdpostport: 119 spoolfirst: false writelinks: true storageapi: false articlemmap: false overviewmmap: true bindaddress: all + sourceaddress: any port: 119 # ## Keywords-in-overview options *************** *** 102,107 **** --- 109,126 ---- # Other options innflags: doinnwatch: true + innwatchsleeptime: 600 + pgpverify: @pgpverify@ + controlfailnotice: false + logcycles: 3 + innwatchpauseload: 1500 + innwatchhiload: 2000 + innwatchloload: 1000 + innwatchspoolspace: 8000 + innwatchbatchspace: 800 + innwatchlibspace: 25000 + innwatchspoolnodes: 200 + docnfsstat: false # # --------------------------------- # Paths to various aspects of the news system diff -Nacr inn-2.1/samples/inncheck.in inn-2.2/samples/inncheck.in *** inn-2.1/samples/inncheck.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/inncheck.in Tue Nov 10 23:33:11 1998 *************** *** 1,5 **** #!@_PATH_PERL@ -- ! ## $Revision: 1.17 $ ## Sanity-check the configuration of an INN system ## by Brendan Kehoe and Rich $alz. --- 1,5 ---- #!@_PATH_PERL@ -- ! ## $Revision: 1.22.2.3 $ ## Sanity-check the configuration of an INN system ## by Brendan Kehoe and Rich $alz. *************** *** 268,284 **** ## inn.conf ## %inn_conf'fields = ( - 'domain', 0, 'fromhost', 0, ! 'moderatormailer', 0, ! 'organization', 0, 'pathhost', 0, 'pathalias', 0, ! 'server', 0, 'mimeversion', 0, 'mimecontenttype', 0, 'mimeencoding', 0, 'mta', 0, 'checkincludedtext', 0, 'maxforks', 0, 'maxartsize', 0, --- 268,296 ---- ## inn.conf ## %inn_conf'fields = ( 'fromhost', 0, ! 'server', 0, 'pathhost', 0, 'pathalias', 0, ! 'organization', 0, ! 'moderatormailer', 0, ! 'domain', 0, 'mimeversion', 0, 'mimecontenttype', 0, 'mimeencoding', 0, + 'hiscachesize', 0, + 'wireformat', 0, + 'xrefslave', 0, + 'complaints', 0, + 'spoolfirst', 0, + 'writelinks', 0, + 'timer', 0, + 'status', 0, + 'storageapi', 0, + 'articlemmap', 0, + 'overviewmmap', 0, 'mta', 0, + 'mailcmd', 0, 'checkincludedtext', 0, 'maxforks', 0, 'maxartsize', 0, *************** *** 290,326 **** 'linecountfuzz', 0, 'peertimeout', 0, 'clienttimeout', 0, 'allownewnews', 0, 'localmaxartsize', 0, 'logartsize', 0, 'logipaddr', 0, - 'logsitename', 0, - 'maxconnections', 0, - 'artcutoff', 0, - 'icdsynccount', 0, 'chaninacttime', 0, 'chanretrytime', 0, 'pauseretrytime', 0, 'nntplinklog', 0, 'nntpactsync', 0, 'badiocount', 0, 'blockbackoff', 0, ! 'hiscachesize', 0, ! 'wireformat', 0, ! 'xrefslave', 0, ! 'nnrpdposthost', 0, ! 'spoolfirst', 0, ! 'writelinks', 0, ! 'timer', 0, ! 'status', 0, ! 'storageapi', 0, ! 'articlemmap', 0, ! 'overviewmmap', 0, ! 'allowreaders', 0, ! 'extendeddbz', 0, ! 'nnrpdoverstats', 0, 'bindaddress', 0, 'port', 0, 'keywords', 0, 'keylimit', 0, 'keyartlimit', 0, --- 302,328 ---- 'linecountfuzz', 0, 'peertimeout', 0, 'clienttimeout', 0, + 'readerswhenstopped', 0, 'allownewnews', 0, 'localmaxartsize', 0, 'logartsize', 0, 'logipaddr', 0, 'chaninacttime', 0, + 'maxconnections', 0, 'chanretrytime', 0, + 'artcutoff', 0, 'pauseretrytime', 0, 'nntplinklog', 0, 'nntpactsync', 0, 'badiocount', 0, 'blockbackoff', 0, ! 'icdsynccount', 0, 'bindaddress', 0, + 'sourceaddress', 0, 'port', 0, + 'readertrack', 0, + 'strippostcc', 0, + 'overviewname', 0, 'keywords', 0, 'keylimit', 0, 'keyartlimit', 0, *************** *** 333,365 **** 'pathetc', 0, 'pathrun', 0, 'pathlog', 0, - 'pathhttp', 0, 'pathspool', 0, 'patharticles', 0, 'pathoverview', 0, 'pathoutgoing', 0, 'pathincoming', 0, 'patharchive', 0, ! 'mailcmd', 0, ! 'readertrack', 0, ! 'strippostcc', 0, ! 'complaints', 0, ! 'overviewname', 0, 'decnetdomain', 0, 'pathtmp', 0, 'pathuniover', 0, 'storeonxref', 0, 'refusecybercancels', 0, 'nnrpdcheckart', 0, - 'storemsgid', 0, 'activedenable', 0, 'activedupdate', 0, 'activedport', 0, ! 'backoff_auth', 0, ! 'backoff_db', 0, ! 'backoff_postfast', 0, ! 'backoff_postslow', 0, ! 'backoff_trigger', 0 ); %inn_conf'optionals = ( 'innflags', 0, --- 335,385 ---- 'pathetc', 0, 'pathrun', 0, 'pathlog', 0, 'pathspool', 0, 'patharticles', 0, 'pathoverview', 0, 'pathoutgoing', 0, 'pathincoming', 0, 'patharchive', 0, ! 'logsitename', 0, ! 'pathhttp', 0, ! 'nnrpdposthost', 0, ! 'nnrpdpostport', 0, ! 'extendeddbz', 0, ! 'nnrpdoverstats', 0, 'decnetdomain', 0, + 'backoffauth', 0, + 'backoffdb', 0, + 'backoffk', 0, + 'backoffpostfast', 0, + 'backoffpostslow', 0, + 'backofftrigger', 0, 'pathtmp', 0, 'pathuniover', 0, 'storeonxref', 0, 'refusecybercancels', 0, 'nnrpdcheckart', 0, 'activedenable', 0, 'activedupdate', 0, 'activedport', 0, ! 'storemsgid', 0, ! 'nicenewnews', 0, ! 'usecontrolchan', 0, ! 'mergetogroups', 0, ! 'noreader', 0, ! 'innwatchsleeptime', 0, ! 'pgpverify', 0, ! 'controlfailnotice', 0, ! 'logcycles', 0, ! 'innwatchpauseload', 0, ! 'innwatchhiload', 0, ! 'innwatchloload', 0, ! 'innwatchspoolspace', 0, ! 'innwatchbatchspace', 0, ! 'innwatchlibspace', 0, ! 'innwatchspoolnodes', 0, ! 'nnrpperlauth', 0, ! 'docnfsstat', 0 ); %inn_conf'optionals = ( 'innflags', 0, *************** *** 481,487 **** 'H', '^\d+$', 'I', '^\d+$', 'N', '^[mu]$', ! 'O', '^\s+$', 'P', '^\d+$', 'S', '^\d+$', 'T', '^[cflmpx]$', --- 501,507 ---- 'H', '^\d+$', 'I', '^\d+$', 'N', '^[mu]$', ! 'O', '^\S+$', 'P', '^\d+$', 'S', '^\d+$', 'T', '^[cflmpx]$', diff -Nacr inn-2.1/samples/innreport.conf.in inn-2.2/samples/innreport.conf.in *** inn-2.1/samples/innreport.conf.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innreport.conf.in Wed Dec 16 06:00:50 1998 *************** *** 1447,1453 **** name "Rej"; format_name "%4s"; format "%4d"; ! value "$nnrpd_post_rej{$key} + $nnrpd_post_error{key}"; total "total(%nnrpd_post_rej) + total(%nnrpd_post_error)"; }; --- 1447,1453 ---- name "Rej"; format_name "%4s"; format "%4d"; ! value "$nnrpd_post_rej{$key} + $nnrpd_post_error{$key}"; total "total(%nnrpd_post_rej) + total(%nnrpd_post_error)"; }; diff -Nacr inn-2.1/samples/innreport_inn.pm inn-2.2/samples/innreport_inn.pm *** inn-2.1/samples/innreport_inn.pm Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innreport_inn.pm Wed Jan 6 04:53:17 1999 *************** *** 349,355 **** artlink\ (\d+)\((\d+)\)\s+ # artlink hiswrite\ (\d+)\((\d+)\)\s+ # hiswrite hissync\ (\d+)\((\d+)\)\s+ # hissync ! sitesend\ (\d+)\((\d+)\)\s+ # sitesend artctrl\ (\d+)\((\d+)\)\s+ # artctrl artcncl\ (\d+)\((\d+)\)\s+ # artcncl hishave\ (\d+)\((\d+)\)\s+ # hishave --- 349,355 ---- artlink\ (\d+)\((\d+)\)\s+ # artlink hiswrite\ (\d+)\((\d+)\)\s+ # hiswrite hissync\ (\d+)\((\d+)\)\s+ # hissync ! sitesend\ (\d+)\((\d+)\)\s+ # sitesend artctrl\ (\d+)\((\d+)\)\s+ # artctrl artcncl\ (\d+)\((\d+)\)\s+ # artcncl hishave\ (\d+)\((\d+)\)\s+ # hishave *************** *** 615,620 **** --- 615,622 ---- } # bad_newsfeeds no feeding sites return 1 if $left =~ /\S+ bad_newsfeeds no feeding sites/o; + # CNFS-sm: cycbuff rollover - possibly interesting + return 1 if $left =~ /CNFS-sm: cycbuff \S+ rollover to cycle/o; } ######## ## innfeed *************** *** 1579,1584 **** --- 1581,1588 ---- return 1 if ($prog eq "newsx"); return 1 if ($prog eq "demmf"); return 1 if ($prog eq "nnnn"); + return 1 if ($prog eq "controlchan"); + return 1 if ($prog eq "cnfsstat"); return 0; } *************** *** 1767,1780 **** $hash_time{$date} = $delay; } my ($h, $t) = $last_date =~ m/ (\d+):(\d\d:\d\d)$/o; my $date2 = $date; ! $date2 =~ s/:59:59$/:$t/; $hash{$date2} = $hash{$date}; undef $hash{"$date"}; $hash_size{$date2} = $hash_size{$date}; undef $hash_size{"$date"}; $t =~ m/(\d\d):(\d\d)/o; ! $hash_time{$date2} = $hash_time{$date} - 3600 + $1 * 60 + $2; undef $hash_time{"$date"}; $inn_flow_labels{$date2} = $h; %inn_flow = %hash; --- 1771,1785 ---- $hash_time{$date} = $delay; } my ($h, $t) = $last_date =~ m/ (\d+):(\d\d:\d\d)$/o; + my ($h2) = $date =~ m/ (\d+):\d\d:\d\d /o; my $date2 = $date; ! $date2 =~ s/$h2:59:59$/$h:$t/; $hash{$date2} = $hash{$date}; undef $hash{"$date"}; $hash_size{$date2} = $hash_size{$date}; undef $hash_size{"$date"}; $t =~ m/(\d\d):(\d\d)/o; ! $hash_time{$date2} = $hash_time{$date} - ($h2 == $h) * 3600 + $1 * 60 + $2; undef $hash_time{"$date"}; $inn_flow_labels{$date2} = $h; %inn_flow = %hash; diff -Nacr inn-2.1/samples/innshellvars.csh.in inn-2.2/samples/innshellvars.csh.in *** inn-2.1/samples/innshellvars.csh.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innshellvars.csh.in Thu Jan 1 00:00:00 1970 *************** *** 1,120 **** - # -*- shell-script -*- - # - # Author: James Brister -- berkeley-unix -- - # Start Date: Thu, 24 Oct 1996 14:44:33 +0200 - # Project: INN - # File: innshellvars.csh - # RCSId: $Id: innshellvars.csh.in,v 1.15 1998/06/25 06:09:03 kondou Exp $ - # Description: csh version of innshellvars. Hopefully nobody writes - # scripts to use this... - # - # The contents should mirror innshellvars (the bourne-shell - # version). - - eval `@prefix@/bin/innconfval -c` - - set inn_newshome = ${inn_pathnews} - set inn_spoolbase = ${inn_pathspool} - set inn_most_logs = ${inn_pathlog} - - set inn_errlog = ${inn_most_logs}/errlog - set inn_log = ${inn_most_logs}/news - - set inn_newsetc = ${inn_pathetc} - set inn_newslib = ${inn_pathlib} - set inn_newsbin = ${inn_pathbin} - set inn_locks = ${inn_pathrun} - set inn_innddir = ${inn_pathrun} - - set inn_spool = ${inn_patharticles} - set inn_overviewdir = ${inn_pathoverview} - set inn_batch = ${inn_pathoutgoing} - set inn_archivedir = ${inn_patharchive} - set inn_badnews = ${inn_pathincoming}/bad - set inn_spoolnews = ${inn_pathincoming} - set inn_incoming = ${inn_pathincoming} - - set inn_active = ${inn_pathdb}/active - set inn_activetimes = ${inn_pathdb}/active.times - set inn_ctlfile = ${inn_newsetc}/control.ctl - set inn_ctlwatch = ${inn_newsetc}/innwatch.ctl - set inn_history = ${inn_pathdb}/history - set inn_newactive = ${inn_pathdb}/active.tmp - set inn_localgroups = ${inn_pathdb}/localgroups - set inn_newsfeeds = ${inn_newsetc}/newsfeeds - set inn_newsgroups = ${inn_pathdb}/newsgroups - set inn_oldactive = ${inn_pathdb}/active.old - set inn_path_motd = ${inn_newsetc}/motd.news - set inn_path_storagectl = ${inn_newsetc}/storage.ctl - set inn_path_overviewctl = ${inn_newsetc}/overview.ctl - set inn_expirectl = ${inn_newsetc}/expire.ctl - - set inn_path_tcl_startup = ${inn_pathfilter}/startup.tcl - set inn_path_tcl_filter = ${inn_pathfilter}/filter.tcl - set inn_controlprogs = ${inn_pathcontrol} - set inn_inews = ${inn_newsbin}/inews - set inn_innconfval = ${inn_newsbin}/innconfval - set inn_innd = ${inn_newsbin}/innd - set inn_inndstart = ${inn_newsbin}/inndstart - set inn_innwatch = ${inn_newsbin}/innwatch - set inn_rnews = ${inn_newsbin}/rnews - set inn_perl_startup_innd = ${inn_pathfilter}/startup_innd.pl - set inn_perl_filter_innd = ${inn_pathfilter}/filter_innd.pl - set inn_perl_filter_nnrpd = ${inn_pathfilter}/filter_nnrpd.pl - - set inn_daily = ${inn_locks}/LOCK.news.daily - - set inn_newscontrol = ${inn_innddir}/control - set inn_nntpconnect = ${inn_innddir}/nntpin - set inn_serverpid = ${inn_innddir}/innd.pid - set inn_innwstatus = ${inn_innddir}/innwatch.status - set inn_watchpid = ${inn_innddir}/innwatch.pid - - set inn_awk = @_PATH_AWK@ - set inn_sed = @_PATH_SED@ - set inn_inndf = "@_PATH_DF@" - set inn_egrep = @_PATH_EGREP@ - set inn_perl = @_PATH_PERL@ - set inn_pgp = @_PATH_PGP@ - set inn_sort = @_PATH_SORT@ - set inn_compress = @COMPRESS@ - set inn_log_compress = @LOG_COMPRESS@ - set inn_z = @LOG_COMPRESSEXT@ - - set inn_tempsock = `basename ${inn_innddir}/ctlinndXXXXXX | ${inn_sed} -e 's/XXXXXX$/*/'` - set inn_tempsockdir = `echo ${inn_innddir}/ctlinndXXXXXX | ${inn_sed} -e 's@/[^/]*$@@'` - - ## =()@>()= - set inn_cycles = 3 - - ## =()@>()= - set inn_have_uustat = DO - - ## =()@>()= - set inn_mail_badcontrols = DONT - - set inn_newsmaster = @NEWSMASTER@ - set inn_newsuser = @NEWSUSER@ - - ## =()@>()= - set inn_sleeptime = 600 - - ## =()@>()= - set inn_want_pgpverify = DO - - ## =()@>()= - set inn_perl_support = DONT - - ## =()@>()= - set inn_tcl_support = DONT - - setenv TMPDIR ${inn_pathtemp} - - - set inn_spooltemp = ${inn_pathtemp} - - setenv NEWSLBIN ${inn_newshome}/local - - umask 02 - - set inn_path = ( ${NEWSLBIN} ${inn_newsbin} $path /bin /usr/bin /usr/ucb ) --- 0 ---- diff -Nacr inn-2.1/samples/innshellvars.in inn-2.2/samples/innshellvars.in *** inn-2.1/samples/innshellvars.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innshellvars.in Sat Oct 17 01:07:27 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.17 $ ## Set up any and all shell variables that an INN shell script ## might need. Also sets umask. --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.22 $ ## Set up any and all shell variables that an INN shell script ## might need. Also sets umask. *************** *** 15,24 **** NEWSBIN=${PATHBIN} NEWSETC=${PATHETC} - NEWSLIB=${PATHLIB} INNDDIR=${PATHRUN} LOCKS=${PATHRUN} ! export NEWSBIN NEWSETC NEWSLIB INNDDIR NEWSHOME ERRLOG=${MOST_LOGS}/errlog LOG=${MOST_LOGS}/news --- 15,23 ---- NEWSBIN=${PATHBIN} NEWSETC=${PATHETC} INNDDIR=${PATHRUN} LOCKS=${PATHRUN} ! export NEWSBIN NEWSETC INNDDIR NEWSHOME ERRLOG=${MOST_LOGS}/errlog LOG=${MOST_LOGS}/news *************** *** 69,79 **** AWK=@_PATH_AWK@ SED=@_PATH_SED@ ! INNDF="@_PATH_DF@" EGREP=@_PATH_EGREP@ PERL=@_PATH_PERL@ PGP=@_PATH_PGP@ SORT="@_PATH_SORT@" COMPRESS=@COMPRESS@ LOG_COMPRESS=@LOG_COMPRESS@ Z=@LOG_COMPRESSEXT@ --- 68,79 ---- AWK=@_PATH_AWK@ SED=@_PATH_SED@ ! INNDF=${NEWSBIN}/inndf EGREP=@_PATH_EGREP@ PERL=@_PATH_PERL@ PGP=@_PATH_PGP@ SORT="@_PATH_SORT@" + GETFTP="@GETFTP@" COMPRESS=@COMPRESS@ LOG_COMPRESS=@LOG_COMPRESS@ Z=@LOG_COMPRESSEXT@ *************** *** 81,104 **** TEMPSOCK=`basename ${INNDDIR}/ctlinndXXXXXX | ${SED} -e 's/XXXXXX$/*/'` TEMPSOCKDIR=`echo ${INNDDIR}/ctlinndXXXXXX | ${SED} -e 's@/[^/]*$@@'` - ## =()@>()= - CYCLES=3 ## =()@>()= HAVE_UUSTAT=DO - ## =()@>()= - MAIL_BADCONTROLS=DONT NEWSMASTER=@NEWSMASTER@ NEWSUSER=@NEWSUSER@ - ## =()@>()= - SLEEPTIME=600 - ## =()@>()= - WANT_PGPVERIFY=DO - ## =()@>()= - PERL_SUPPORT=DONT - ## =()@>()= - TCL_SUPPORT=DONT TMPDIR=${PATHTMP}; export TMPDIR; SPOOLTEMP=${PATHTMP} --- 81,92 ---- diff -Nacr inn-2.1/samples/innshellvars.pl.in inn-2.2/samples/innshellvars.pl.in *** inn-2.1/samples/innshellvars.pl.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innshellvars.pl.in Sat Oct 17 01:07:27 1998 *************** *** 3,9 **** # Start Date: Sat, 24 Aug 1996 22:08:19 +0200 # Project: INN # File: innshellvars.pl ! # RCSId: $Id: innshellvars.pl.in,v 1.17 1998/06/25 06:09:04 kondou Exp $ # Description: Set up any and all variables that an INN perl script # might need. --- 3,9 ---- # Start Date: Sat, 24 Aug 1996 22:08:19 +0200 # Project: INN # File: innshellvars.pl ! # RCSId: $Id: innshellvars.pl.in,v 1.20 1998/10/17 01:07:27 tale Exp $ # Description: Set up any and all variables that an INN perl script # might need. *************** *** 71,81 **** $awk = "@_PATH_AWK@" ; $sed = "@_PATH_SED@" ; ! $inndf = "@_PATH_DF@" ; $egrep = "@_PATH_EGREP@" ; $perl = "@_PATH_PERL@" ; $pgp = "@_PATH_PGP@" ; $sort = "@_PATH_SORT@" ; $compress = "@COMPRESS@" ; $log_compress = "@LOG_COMPRESS@" ; $z = "@LOG_COMPRESSEXT@" ; --- 71,82 ---- $awk = "@_PATH_AWK@" ; $sed = "@_PATH_SED@" ; ! $inndf = "${newsbin}/inndf" ; $egrep = "@_PATH_EGREP@" ; $perl = "@_PATH_PERL@" ; $pgp = "@_PATH_PGP@" ; $sort = "@_PATH_SORT@" ; + $getftp = "@GETFTP@" ; $compress = "@COMPRESS@" ; $log_compress = "@LOG_COMPRESS@" ; $z = "@LOG_COMPRESSEXT@" ; *************** *** 83,111 **** ($tempsock = "${innddir}/ctlinndXXXXXX") =~ s!.*/(.*)XXXXXX$!$1*! ; ($tempsockdir = "${innddir}/ctlinndXXXXXX") =~ s!/[^/]*$!! ; - ## =()<$cycles = @@ ;>()= - $cycles = 3 ; - ## =()<$have_uustat = ("@@" eq "DO" ? 1 : 0) ;>()= $have_uustat = ("DO" eq "DO" ? 1 : 0) ; - ## =()<$mail_badcontrols = ("@@" eq "DO" ? 1 : 0) ;>()= - $mail_badcontrols = ("DONT" eq "DO" ? 1 : 0) ; - $newsmaster = '@NEWSMASTER@' ; $newsuser = "@NEWSUSER@" ; - - ## =()<$sleeptime = @@ ;>()= - $sleeptime = 600 ; - - ## =()<$want_pgpverify = ("@@" eq "DO" ? 1 : 0) ;>()= - $want_pgpverify = ("DO" eq "DO" ? 1 : 0) ; - - ## =()<$perl_support = ("@@" eq "DO" ? 1 : 0) ;>()= - $perl_support = ("DONT" eq "DO" ? 1 : 0) ; - - ## =()<$tcl_support = ("@@" eq "DO" ? 1 : 0) ;>()= - $tcl_support = ("DONT" eq "DO" ? 1 : 0) ; $ENV{'TMPDIR'} = $pathtmp; $tmpdir = $pathtmp; --- 84,94 ---- diff -Nacr inn-2.1/samples/innshellvars.tcl.in inn-2.2/samples/innshellvars.tcl.in *** inn-2.1/samples/innshellvars.tcl.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innshellvars.tcl.in Sat Oct 17 01:07:28 1998 *************** *** 4,10 **** # Start Date: Sat, 24 Aug 1996 23:45:34 +0200 # Project: INN # File: innshellvars.tcl ! # RCSId: $Id: innshellvars.tcl.in,v 1.15 1998/06/25 06:09:04 kondou Exp $ # Description: Set up any and all variables that an INN tcl script # might need. --- 4,10 ---- # Start Date: Sat, 24 Aug 1996 23:45:34 +0200 # Project: INN # File: innshellvars.tcl ! # RCSId: $Id: innshellvars.tcl.in,v 1.18 1998/10/17 01:07:28 tale Exp $ # Description: Set up any and all variables that an INN tcl script # might need. *************** *** 72,80 **** set inn_sed "@_PATH_SED@" set inn_perl "@_PATH_PERL@" set inn_pgp "@_PATH_PGP@" ! set inn_inndf "@_PATH_DF@" set inn_egrep "@_PATH_EGREP@" set inn_sort "@_PATH_SORT@" set inn_compress "@COMPRESS@" set inn_log_compress "@LOG_COMPRESS@" set inn_z "@LOG_COMPRESSEXT@" --- 72,81 ---- set inn_sed "@_PATH_SED@" set inn_perl "@_PATH_PERL@" set inn_pgp "@_PATH_PGP@" ! set inn_inndf "${inn_newsbin}/inndf" set inn_egrep "@_PATH_EGREP@" set inn_sort "@_PATH_SORT@" + set inn_getftp "@GETFTP@" set inn_compress "@COMPRESS@" set inn_log_compress "@LOG_COMPRESS@" set inn_z "@LOG_COMPRESSEXT@" *************** *** 82,110 **** set inn_tempsock [ eval exec basename ${inn_innddir}/ctlinndXXXXXX | $inn_sed -e {s/XXXXXX$/*/} ] set inn_tempsockdir [ exec echo ${inn_innddir}/ctlinndXXXXXX | $inn_sed -e {s@/[^/]*$@@} ] - ## =()@" "%d" inn_cycles>()= - scan "3" "%d" inn_cycles - ## =()@" == "DO" ? 1 : 0 } ]>()= set inn_have_uustat [ expr { "DO" == "DO" ? 1 : 0 } ] - ## =()@" == "DO" ? 1 : 0 } ]>()= - set inn_mail_badcontrols [ expr { "DONT" == "DO" ? 1 : 0 } ] - set inn_newsmaster "@NEWSMASTER@" set inn_newsuser "@NEWSUSER@" - - ## =()@" "%d" inn_sleeptime>()= - scan "600" "%d" inn_sleeptime - - ## =()@" == "DO" ? 1 : 0 } ]>()= - set inn_want_pgpverify [ expr { "DO" == "DO" ? 1 : 0 } ] - - ## =()@" == "DO" ? 1 : 0 } ]>()= - set inn_perl_support [ expr { "DONT" == "DO" ? 1 : 0 } ] - - ## =()@" == "DO" ? 1 : 0 } ]>()= - set inn_tcl_support [ expr { "DONT" == "DO" ? 1 : 0 } ] set env(TMPDIR) "$inn_pathtmp" set inn_tmpdir "$inn_pathtmp" --- 83,93 ---- diff -Nacr inn-2.1/samples/innstat.in inn-2.2/samples/innstat.in *** inn-2.1/samples/innstat.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innstat.in Thu Sep 17 06:15:01 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.11 $ ## Display status of INN. ## Written by Landon Curt Noll . --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.12 $ ## Display status of INN. ## Written by Landon Curt Noll . *************** *** 31,37 **** echo '' echo 'Disk usage:' ${INNDF} ${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH} \ ! ${PATHDB} ${MOST_LOGS} | grep '/dev/' | sort -u ## Show size of batch files. echo '' --- 31,37 ---- echo '' echo 'Disk usage:' ${INNDF} ${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH} \ ! ${PATHDB} ${MOST_LOGS} | sort -u ## Show size of batch files. echo '' diff -Nacr inn-2.1/samples/innwatch.ctl.in inn-2.2/samples/innwatch.ctl.in *** inn-2.1/samples/innwatch.ctl.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innwatch.ctl.in Thu Sep 17 06:15:01 1998 *************** *** 1,4 **** ! ## $Revision: 1.5 $ ## innwatch.ctl -- control file for innwatch. ## Indicates what to run to test the state of the news system, and what ## to do about it. Format: --- 1,4 ---- ! ## $Revision: 1.6 $ ## innwatch.ctl -- control file for innwatch. ## Indicates what to run to test the state of the news system, and what ## to do about it. Format: *************** *** 19,39 **** ## Next test the load average. Above first threshold pause, above higher ## threshold throttle, below restart limit undo whatever was done. ! ## =()@ ! go ! loadav>()= ! !load!load hiload! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! lt ! 1000 ! go ! loadav ! ## =()@ ! throttle ! loadav>()= ! !hiload!+ load! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 2000 ! throttle ! loadav ! ## =()@ ! pause ! loadav>()= ! !load!+! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 1500 ! pause ! loadav ## If load is OK, check space (and inodes) on various filesystems ! ## =()@ }' ! lt ! @@ ! throttle ! No space (spool)>()= ! !!! @_PATH_DF@ . | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (spool) ! ## =()@ }' ! lt ! @@ ! throttle ! No space (newsq)>()= ! !!! @_PATH_DF@ ${BATCH} | awk 'NR == 2 { print $4 }' ! lt ! 800 ! throttle ! No space (newsq) ! ## =()@ }' ! lt ! @@ ! throttle ! No space (newslib)>()= ! !!! @_PATH_DF@ ${PATHDB} | awk 'NR == 2 { print $4 }' ! lt ! 25000 ! throttle ! No space (newslib) ! ## =()@ }' ! lt ! @@ ! throttle ! No space (spool inodes)>()= ! !!! @_PATH_DF@ -i . | awk 'NR == 2 { print $7 }' ! lt ! 200 ! throttle ! No space (spool inodes) ! ## =()@ }' ! lt ! @@ ! throttle ! No space (overview)>()= ! !!! @_PATH_DF@ ${OVERVIEWDIR} | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (overview) --- 19,31 ---- ## Next test the load average. Above first threshold pause, above higher ## threshold throttle, below restart limit undo whatever was done. ! !load!load hiload! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! lt ! ${INNWATCHLOLOAD} ! go ! loadav ! !hiload!+ load! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! ${INNWATCHHILOAD} ! throttle ! loadav ! !load!+! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! ${INNWATCHPAUSELOAD} ! pause ! loadav ## If load is OK, check space (and inodes) on various filesystems ! !!! ${INNDF} . ! lt ! ${INNWATCHSPOOLSPACE} ! throttle ! No space (spool) ! !!! ${INNDF} ${BATCH} ! lt ! ${INNWATCHBATCHSPACE} ! throttle ! No space (newsq) ! !!! ${INNDF} ${PATHDB} ! lt ! ${INNWATCHLIBSPACE} ! throttle ! No space (newslib) ! !!! ${INNDF} -i . ! lt ! ${INNWATCHSPOOLNODES} ! throttle ! No space (spool inodes) ! !!! ${INNDF} ${OVERVIEWDIR} ! lt ! ${INNWATCHSPOOLSPACE} ! throttle ! No space (overview) diff -Nacr inn-2.1/samples/innwatch.in inn-2.2/samples/innwatch.in *** inn-2.1/samples/innwatch.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/innwatch.in Sun Sep 20 02:53:16 1998 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.8 $ ## Watch the state of the system relative to the news subsystem. ## As controlled by the control file, when space or inodes are almost ## exhausted innd is throttled, or paused, similarly if the load is --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.13 $ ## Watch the state of the system relative to the news subsystem. ## As controlled by the control file, when space or inodes are almost ## exhausted innd is throttled, or paused, similarly if the load is *************** *** 23,28 **** --- 23,38 ---- ## Logfile to watch. Comment out if no logwatch. LOGFILE=${MOST_LOGS}/news.crit + ## Default value in case there is no definition in inn.conf + : ${INNWATCHPAUSELOAD:=1500} + : ${INNWATCHHILOAD:=2000} + : ${INNWATCHLOLOAD:=1000} + : ${INNWATCHSPOOLSPACE:=8000} + : ${INNWATCHBATCHSPACE:=800} + : ${INNWATCHLIBSPACE:=25000} + : ${INNWATCHSPOOLNODES:=200} + : ${INNWATCHSLEEPTIME:=600} + ## Parse JCL. while [ $# -gt 0 ] ; do case X"$1" in *************** *** 41,51 **** LOGFILE=`expr "$1" : '-s\(.*\)'` ;; X-t) ! SLEEPTIME=$2 shift ;; X-t*) ! SLEEPTIME=`expr "$1" : '-t\(.*\)'` ;; X--) shift --- 51,61 ---- LOGFILE=`expr "$1" : '-s\(.*\)'` ;; X-t) ! INNWATCHSLEEPTIME=$2 shift ;; X-t*) ! INNWATCHSLEEPTIME=`expr "$1" : '-t\(.*\)'` ;; X--) shift *************** *** 92,105 **** ## We need to remember the process ID of innd, in case one exits ## But we need to wait for innd to start before we can do that while PID=`cat ${SERVERPID} 2>/dev/null`; test -z "${PID}"; do ! sleep ${SLEEPTIME} done trap '( if [ -z "${STATE}" ]; then ! echo "${PROGNAME} state RUN interval ${SLEEPTIME} pid $$" else ! echo "${PROGNAME} state ${STATE} interval ${SLEEPTIME} pid $$" fi if [ -z "${INND}" ]; then X=GO --- 102,115 ---- ## We need to remember the process ID of innd, in case one exits ## But we need to wait for innd to start before we can do that while PID=`cat ${SERVERPID} 2>/dev/null`; test -z "${PID}"; do ! sleep ${INNWATCHSLEEPTIME} done trap '( if [ -z "${STATE}" ]; then ! echo "${PROGNAME} state RUN interval ${INNWATCHSLEEPTIME} pid $$" else ! echo "${PROGNAME} state ${STATE} interval ${INNWATCHSLEEPTIME} pid $$" fi if [ -z "${INND}" ]; then X=GO *************** *** 117,123 **** HASEXITED=false while { sleep ${NEXTSLEEP} & wait; } ; : ; do ! NEXTSLEEP=${SLEEPTIME} ## If news.daily is running, idle: we don't want to change the ## status of anything while news.daily may be depending on what we --- 127,133 ---- HASEXITED=false while { sleep ${NEXTSLEEP} & wait; } ; : ; do ! NEXTSLEEP=${INNWATCHSLEEPTIME} ## If news.daily is running, idle: we don't want to change the ## status of anything while news.daily may be depending on what we *************** *** 174,180 **** "CND='"'"'" $3 "'"'"'", \ "EXP='"'"'" $4 "'"'"'", \ "TST='"'"'" $5 "'"'"'", \ ! "LIM='"'"'" $6 "'"'"'", \ "CMD='"'"'" $7 "'"'"'", \ "CMT='"'"'" $8 "'"'"'" }'` --- 184,190 ---- "CND='"'"'" $3 "'"'"'", \ "EXP='"'"'" $4 "'"'"'", \ "TST='"'"'" $5 "'"'"'", \ ! "LIM=" $6, \ "CMD='"'"'" $7 "'"'"'", \ "CMT='"'"'" $8 "'"'"'" }'` diff -Nacr inn-2.1/samples/mailpost.in inn-2.2/samples/mailpost.in *** inn-2.1/samples/mailpost.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/mailpost.in Wed Dec 9 15:52:07 1998 *************** *** 0 **** --- 1,444 ---- + #!@_PATH_PERL@ + + # mailpost - yet another mail-to-news filter + # brister 19oct98 cleaned up somewhat for perl v. 5. and made a little more robust. + # vixie 29jan95 RCS'd [$Id: mailpost.in,v 1.1.2.1 1998/12/09 15:52:07 kondou Exp $] + # vixie 15jun93 [added -m] + # vixie 30jun92 [added -a and -d] + # vixie 17jun92 [attempt simple-minded fixup to $path] + # vixie 14jun92 [original] + + use Getopt::Std ; + use IPC::Open3; + use IO::Select; + use Sys::Syslog; + use strict ; + + my $debugging = 0 ; + my $tmpfile ; + my $msg ; + + END { + unlink ($tmpfile) if $tmpfile ; # incase we die() + } + + require "@LIBDIR@/innshellvars.pl" ; + + my $LOCK_SH = 1; + my $LOCK_EX = 2; + my $LOCK_NB = 4; + my $LOCK_UN = 8; + + my $usage = $0 ; + $usage =~ s!.*/!! ; + my $prog = $usage ; + + openlog $usage, "pid", "news" ; + + $usage .= "[ -r addr ][ -f addr ][ -a approved ][ -d distribution ]" . + " [ -m mailing-list ][ -b database ][ -o output-path ] newsgroups" ; + + use vars qw($opt_r $opt_f $opt_a $opt_d $opt_m $opt_b $opt_n $opt_o $opt_h) ; + getopts("hr:f:a:d:m:b:no:") || die "usage: $usage\n" ; + die "usage: $usage\n" if $opt_h ; + + # + # $Submit is a program which takes no arguments and whose stdin is supposed + # to be a news article (without the #!rnews header but with the news hdr). + # + + my $Sendmail = $inn::mta ; + my $Submit = $inn::inews . " -S -h"; + my $Database = ($opt_b || $inn::pathtmp) . "/mailpost-msgid" ; + my $Maintainer = $inn::newsmaster || "usenet" ; + my $WhereTo = $opt_o || $Submit ; + my $Mailname = $inn::fromhost ; + + # can't use $inn::tmpdir as we're usually not running as news + my $Tmpdir = "/var/tmp" ; + + if ($debugging || $opt_n) { + $Sendmail = "cat" ; + $WhereTo = "cat" ; + } + + chop ($Mailname = `/bin/hostname`) if ! $Mailname ; + + + # + # our command-line argument(s) are the list of newsgroups to post to. + # + # there may be a "-r sender" or "-f sender" which becomes the $path + # (which is in turn overridden below by various optional headers.) + # + # -d (distribution) and -a (approved) are also supported to supply + # or override the mail headers by those names. + # + + my $path = 'nobody'; + my $newsgroups = undef; + my $approved = undef; + my $distribution = undef; + my $mailing_list = undef; + my $references = undef; + my @errorText = (); + + if ($opt_r || $opt_f) { + $path = $opt_r || $opt_f ; + push @errorText, "((path: $path))\n" ; + } + + if ($opt_a) { + $approved = &fix_sender_addr($opt_a); + push @errorText, "((approved: $approved))\n"; + } + + if ($opt_d) { + $distribution = $opt_d ; + push @errorText, "((distribution: $distribution))\n"; + } + + if ($opt_m) { + $mailing_list = "<" . $opt_m . "> /dev/null"; + push @errorText, "((mailing_list: $mailing_list))\n"; + } + + $newsgroups = join ", ", @ARGV ; + + die "usage: $0 newsgroup [newsgroup]\n" unless $newsgroups; + + + # + # do the header. our input is a mail message, with or without the From_ + # + + #$message_id = sprintf("", time, $$, $Hostname); + my $real_news_hdrs = ''; + my $weird_mail_hdrs = ''; + my $fromHdr = "MAILPOST-UNKNOWN-FROM" ; + my $dateHdr= "MAILPOST-UNKNOWN-DATE" ; + my $msgIdHdr = "MAILPOST-UNKNOWN-MESSAGE-ID" ; + my $from = undef; + my $date = undef; + my $hdr = undef; + my $txt = undef; + my $message_id ; + my $subject = "(NONE)"; + + $_ = ; + if (!$_) { + if ( $debugging || -t STDERR ) { + die "empty input" ; + } else { + syslog "err", "empty input" ; + exit (0) ; + } + } + + chomp $_; + + my $line = undef; + if (/^From\s+([^\s]+)\s+/) { + $path = $1; + push @errorText, "((path: $path))\n"; + $_ = $'; + if (/ remote from /) { + $path = $' . '!' . $path; + $_ = $`; + } + $date = $_; + } else { + $line = $_; + } + + for (;;) { + $_ = ; + chomp ; + + # gather up a single header with possible continuation lines into $line + if (/^\s+/) { + if (! $line) { + $msg = "First line with leading whitespace!" ; + syslog "err", $msg unless -t STDERR ; + die "$msg\n" ; + } + + $line .= "\n" . $_ ; + next ; + } + + # On the first header $line will be undefined. + ($_, $line) = ($line, $_) ; # swap $line and $_ ; + + last if defined($_) && /^$/ ; + next if /^$/ ; # only on first header will this happen + + push @errorText, "($_)\n"; + + next if /^Approved:\s/sio && defined($approved); + next if /^Distribution:\s/sio && defined($distribution); + + if (/^(Organization|Distribution):\s*/sio) { + $real_news_hdrs .= "$_\n"; + next; + } + + if (/^Subject:\s*/sio) { + $subject = $'; + next; + } + + if (/^Message-ID:\s*/sio) { + $message_id = $'; + next; + } + + if (/^Mailing-List:\s*/sio) { + $mailing_list = $'; + next; + } + + if (/^(Sender|Approved):\s*/sio) { + $real_news_hdrs .= "$&" . fix_sender_addr($') . "\n"; + next; + } + + if (/^Return-Path:\s*/sio) { + $path = $'; + $path = $1 if ($path =~ /\<([^\>]*)\>/); + push@errorText, "((path: $path))\n"; + next; + } + + if (/^Date:\s*/sio) { + $date = $'; + next; + } + + if (/^From:\s*/sio) { + $from = &fix_sender_addr($'); + next; + } + + if (/^References:\s*/sio) { + $references = $'; + next; + } + + if (!defined($references) && /^In-Reply-To:[^\<]*\<([^\>]+)\>/sio) { + $references = "<$1>"; + # FALLTHROUGH + } + + if (/^(MIME|Content)-[^:]+:\s*/sio) { + $real_news_hdrs .= $_ . "\n" ; + next ; + } + + # random unknown header. prepend 'X-' if it's not already there. + $_ = "X-$_" unless /^X-/sio ; + $weird_mail_hdrs .= "$_\n"; + } + + + $msgIdHdr = $message_id if $message_id ; + $fromHdr = $from if $from ; + $dateHdr = $date if $date ; + + if ($path !~ /\!/) { + $path = "$'!$`" if ($path =~ /\@/); + } + + $real_news_hdrs .= "Subject: ${subject}\n"; + $real_news_hdrs .= "Message-ID: ${msgIdHdr}\n" if defined($message_id); + $real_news_hdrs .= "Mailing-List: ${mailing_list}\n" if defined($mailing_list); + $real_news_hdrs .= "Distribution: ${distribution}\n" if defined($distribution); + $real_news_hdrs .= "Approved: ${approved}\n" if defined($approved); + $real_news_hdrs .= "References: ${references}\n" if defined($references); + + # Inews writes error messages to stdout. We want to capture those and mail + # them back to the newsmaster. Trying to write and read from a subprocess is + # ugly and prone to deadlock, so we use a temp file. + $tmpfile = sprintf "%s/mailpost.%d.%d", $Tmpdir, time, $$ ; + + if (!open TMPFILE,">$tmpfile") { + $msg = "cant open temp file ($tmpfile): $!" ; + $tmpfile = undef ; + syslog "err", "$msg\n" unless $debugging || -t STDERR ; + open TMPFILE, "|" . sprintf ($Sendmail, $Maintainer) || + die "die(no tmpfile): sendmail: $!\n" ; + print TMPFILE <<"EOF"; + To: $Maintainer + Subject: mailpost failure ($newsgroups): $msg + + -------- Article Contents + + EOF + } + + print TMPFILE <<"EOF"; + Path: ${path} + From: ${fromHdr} + Newsgroups: ${newsgroups} + ${real_news_hdrs}Date: ${dateHdr} + ${weird_mail_hdrs} + EOF + + print TMPFILE $line, "\n" ; # left over from header parsing loop + print TMPFILE ; + # do we really want to add this next line? (inews will append a signature) + print TMPFILE "---\n" ; + + close TMPFILE ; + + if ( ! $tmpfile ) { + # we had to bail and mail the article to the admin. + exit (0) ; + } + + + ## + ## We've got the article in a temp file and now we validate some of the + ## data we found and update our message-id database. + ## + + mailArtAndDie ("no From: found") unless $from; + mailArtAndDie ("no Date: found") unless $date; + mailArtAndDie ("no Message-ID: found") unless $message_id; + mailArtAndDie ("Malformed message ID ($message_id)") + if ($message_id !~ /\<(\S+)\@(\S+)\>/); + + + # update (with locking) our message-id database. this is used to make sure we + # don't loop our own gatewayed articles back through the mailing list. + + my ($lhs, $rhs) = ($1, $2); # of message_id match above. + $rhs =~ tr/A-Z/a-z/; + + $message_id = "${lhs}\@${rhs}"; + + push @errorText, "(TAS message-id database for $message_id)\n"; + + my $lockfile = sprintf("%s.lock", $Database); + + open LOCKFILE, "<$lockfile" || + open LOCKFILE, ">$lockfile" || + mailArtAndDie ("can't open $lockfile: $!") ; + + my $i ; + for ($i = 0 ; $i < 5 ; $i++) { + flock LOCKFILE, $LOCK_EX && last ; + sleep 1 ; + } + + mailArtAndDie ("can't lock $lockfile: $!") if ($i == 5) ; + + my %DATABASE ; + dbmopen %DATABASE, $Database, 0666 || mailArtAndDie ("can't dbmopen $lockfile: $!"); + + exit 0 if defined $DATABASE{$message_id}; # already seen. + + $DATABASE{$message_id} = sprintf "%d.%s", time, 'mailpost' ; + + mailArtAndDie ("TAS didn't set $message_id") unless defined $DATABASE{$message_id}; + + dbmclose %DATABASE || mailArtAndDie ("can't dbmclose $lockfile: $!") ; + + flock LOCKFILE, $LOCK_UN || mailArtAndDie ("can't unlock $lockfile: $!"); + close LOCKFILE ; + + if (!open INEWS, "$WhereTo < $tmpfile 2>&1 |") { + mailArtAndDie ("cant start: $WhereTo: $!") ; + } + + my @inews = ; + close INEWS ; + my $status = $? ; + + if (@inews) { + chomp @inews ; + mailArtAndDie ("inews failed: @inews") ; + } + + unlink $tmpfile ; + + exit $status; + + sub mailArtAndDie { + my ($msg) = @_ ; + + print STDERR $msg,"\n" if -t STDERR ; + + open SENDMAIL, "|" . sprintf ($Sendmail,$Maintainer) || + die "die($msg): sendmail: $!\n" ; + print SENDMAIL <<"EOF" ; + To: $Maintainer + Subject: mailpost failure ($newsgroups): $msg + + $msg + EOF + + if ($tmpfile && -f $tmpfile) { + print SENDMAIL "\n-------- Article Contents\n\n" ; + open FILE, "<$tmpfile" || die "open($tmpfile): $!\n" ; + print SENDMAIL while ; + close FILE ; + } else { + print "No article left to send back.\n" ; + } + close SENDMAIL ; + + # unlink $tmpfile ; + + exit (0) ; # using a non-zero exit may cause problems. + } + + + # + # take 822-format name (either "comment comment" or "addr (comment)") + # and return in always-qualified 974-format ("addr (comment)"). + # + sub fix_sender_addr { + my ($address) = @_; + my ($lcomment, $addr, $rcomment, $comment); + local ($',$`,$_) ; + + if ($address =~ /\<([^\>]*)\>/) { + ($lcomment, $addr, $rcomment) = (&dltb($`), &dltb($1), &dltb($')); + } elsif ($address =~ /\(([^\)]*)\)/) { + ($lcomment, $addr, $rcomment) = ('', &dltb($`.$'), &dltb($1)); + } else { + ($lcomment, $addr, $rcomment) = ('', &dltb($address), ''); + } + + #print STDERR "fix_sender_addr($address) == ($lcomment, $addr, $rcomment)\n"; + + $addr .= "\@$Mailname" unless ($addr =~ /\@/); + + if ($lcomment && $rcomment) { + $comment = $lcomment . ' ' . $rcomment; + } else { + $comment = $lcomment . $rcomment; + } + + $_ = $addr; + $_ .= " ($comment)" if $comment; + + #print STDERR "\t-> $_\n"; + + return $_; + } + + # + # delete leading and trailing blanks + # + + sub dltb { + my ($str) = @_; + + $str =~ s/^\s+//o; + $str =~ s/\s+$//o; + + return $str; + } + diff -Nacr inn-2.1/samples/mod-active.in inn-2.2/samples/mod-active.in *** inn-2.1/samples/mod-active.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/mod-active.in Wed Oct 28 02:45:43 1998 *************** *** 0 **** --- 1,101 ---- + #!@_PATH_PERL@ -w + # batch-active-update + # Author: David Lawrence + + # Reads a series of ctlinnd newgroup/rmgroup/changegroup commands, such as + # is output by checkgroups and actsync, and efficiently handles them all at + # once. Input can come from command line files or stdin, a la awk/sed. + + require '@LIBDIR@/innshellvars.pl'; + + $oldact = $inn::active; # active file location + $oldact = $inn::active; # active file location (same; shut up, perl -w) + $newact = "$oldact.new$$"; # temporary name for new active file + $actime = "$oldact.times"; # active.times file + $pausemsg = 'batch active update, ok'; # message to be used for pausing? + + $0 =~ s#^.*/##; + + die "$0: must run as $inn::newsuser user" + unless $> == (getpwnam($inn::newsuser))[2]; + + $debug = -t STDOUT ? 1 : 0; + + $| = 1; # show output as it happens (for an rsh/ssh pipe) + + print "reading list of groups to update\n" if $debug; + + $eval = "while () {\n"; + $eval .= " \$group = (split)[0];\n"; + + while (<>) { + if (/^\s*\S*ctlinnd newgroup (\S+) (\S)/) { + $toadd{$1} = $2; + } elsif (/^\s*\S*ctlinnd rmgroup (\S+)/) { + $eval .= " next if \$group eq '$1';\n"; + } elsif (/^\s*\S*ctlinnd changegroup (\S+) (\S)/) { + $eval .= " s/ \\S+\$/ $2/ if \$group eq '$1';\n"; + } + } + + $eval .= " delete \$toadd{\$group};\n"; + $eval .= " if (!print(NEWACT \$_)) {\n"; + $eval .= " die \"\$0: writing \$newact failed (\$!), aborting\\n\";\n"; + $eval .= " }\n"; + $eval .= "}\n"; + + &ctlinnd("pause $pausemsg"); + &ctlinnd("flush ''"); + + open(OLDACT, "< $oldact") || die "$0: open $oldact: $!\n"; + open(NEWACT, "> $newact") || die "$0: open $newact: $!\n"; + + print "rewriting active file\n" if $debug; + eval $eval; + for (sort keys %toadd) { + $add = "$_ 0000000000 0000000001 $toadd{$_}\n"; + if (!print( NEWACT $add)) { + &ctlinnd("go $pausemsg"); + die "$0: writing $newact failed ($!), aborting\n"; + } + } + + close(OLDACT) || warn "$0: close $oldact: $!\n"; + close(NEWACT) || warn "$0: close $newact: $!\n"; + + if (!rename("$oldact", "$oldact.old")) { + warn "$0: rename $oldact $oldact.old: $!\n"; + } + + if (!rename("$newact", "$oldact")) { + die "$0: rename $newact $oldact: $!\n"; + } + + &ctlinnd("reload active 'updated from checkgroups'"); + system("diff -c0 $oldact.old $oldact"); + &ctlinnd("go $pausemsg"); + + print "updating $actime\n" if $debug; + if (open(TIMES, ">> $actime")) { + $time = time; + for (sort keys %toadd) { + print TIMES "$_ $time checkgroups-update\n" || last; + } + close(TIMES) || warn "$0: close $actime: $!\n"; + } else { + warn "$0: $actime not updated: $!\n"; + } + + exit 0; + + sub + ctlinnd + + { + local($command) = @_; + + print "ctlinnd $command\n" if $debug; + if (system("$inn::newsbin/ctlinnd -s $command")) { + die "$0: \"$command\" failed, aborting\n"; + } + } diff -Nacr inn-2.1/samples/newgroup.pl.in inn-2.2/samples/newgroup.pl.in *** inn-2.1/samples/newgroup.pl.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/newgroup.pl.in Sun Nov 29 02:14:26 1998 *************** *** 0 **** --- 1,224 ---- + #!@_PATH_PERL@ + # $Id: newgroup.pl.in,v 1.10.2.1 1998/11/29 02:14:26 kondou Exp $ + # Copyright (c)1998 G.J. Andruk + # newgroup.pl - The newgroup control message. + # Parameters: params sender reply-to token site action[=log] approved + sub control_newgroup { + my ($artfh, $qgroup); + + my @params = split(/\s+/,shift); + my $sender = shift; + my $replyto = shift; + my $token = shift; + my $site = shift; + my ($action, $logging) = split(/=/, shift); + my $approved = shift; + + my $groupname = $params[0]; + my $modflag = $params[1]; + + my $pid = $$; + my $tempfile = "$inn::tmpdir/newgroup.$pid"; + my ($errmsg, $status, $nc, @component, @oldgroup, $locktry, + $ngname, $ngdesc, $modcmd); + + $modcmd = "y"; + $modcmd = "m" if ($modflag eq "moderated"); + + # Check the group name. This is partially derived from C News. + # Some checks are commented out if I think they're too strict or + # language-dependent. Your mileage may vary. + NEWGROUPSANITY: + for ($groupname) { + # whole-name checking + if (/^$/) { + $errmsg = "Empty group name"; + } elsif (/\s/) { + $errmsg = "Whitespace in group name"; + } elsif (/[\`\/:;]/) { + $errmsg = "unsafe group name"; + } elsif (/^\./ || /\.$/ || /\.\./) { + $errmsg = "Bad dots in group name"; + } + #elsif (/^[a-zA-Z0-9].+[a-zA-Z0-9]$/) { + # $errmsg = "Group name does not begin/end with alphanumeric"; + #} + elsif (/^(junk|control)\./) { + $errmsg = "Group name begins in control. or junk."; + } + #elsif (length($groupname) > 128) { + # $errmsg = "Group name too long"; + #} + else { + $errmsg = ""; + } + + last NEWGROUPSANITY if $errmsg; + + # per-component checking + $nc = (@component = split(/\./)); + for ($i = 0; $i <= $#component; $i++) { + $c = $component[$i]; + if ($c =~ /^[0-9]+$/) { + $errmsg = 'all-numeric name component'; + } + #elsif ($c !~ /^[a-zA-Z0-9]/) {# A-Z caught later + # $errmsg = 'name component starts with non-alphanumeric'; + #} + #elsif ($c !~ /[a-zA-Z]/) {# A-Z caught later + # $errmsg = 'name component does not contain letter'; + #} + elsif ($c eq 'all' || $c eq 'ctl') { + $errmsg = "`all' || `ctl' used as name component"; + } + #elsif (length($c) > 30) { + # $errmsg = 'name component longer than 30 characters'; + #} + #elsif ($c =~ /[A-Z]/) { + # $errmsg = 'uppercase letter(s) in name'; + #} + elsif ($c =~ /[^a-z0-9+_\-.]/) { + $errmsg = 'illegal character(s) in name'; + } + elsif ($c =~ /--|__|\+\+./) { # sigh, c++ etc must be allowed + $errmsg = 'repeated punctuation in name'; + } + #elsif ($i+2 <= $#component && ($c eq $component[$i + 1]) && + # ($c eq $component[$i + 2])) { + # $errmsg = 'repeated component(s) in name'; + #} + } + + #prevent alt.a.b.c.d.e.f.g.w.x.y.z... + $errmsg = "Too many components" if (! $errmsg) && ($nc > 9); + } + + if ($errmsg) { + if (!$logging) { + logmsg('notice', 'skipping newgroup (%s)', $errmsg); + } else { + logger($token, $logging, "skipping newgroup ($errmsg)"); + } + } else { # Our group name survived. + # Scan active to see what sort of change we are making. + open ACTIVE, $inn::active; + $qgroup = quotemeta ($groupname); + @oldgroup = grep(/^$qgroup\s/, ); + @oldgroup = split(/\s+/, $oldgroup[0]); + #print "newgroup: $oldgroup[0] $oldgroup[1]"," + # $oldgroup[2] $oldgroup[3] $modflag\n"; + close ACTIVE; + if (scalar @oldgroup) { + if (($oldgroup[3] eq "m") && ($modflag ne "moderated")) { + $status = "made unmoderated"; + } elsif (($oldgroup[3] ne "m") && ($modflag eq "moderated")) { + $status = "made moderated"; + } else { + $status = "no change"; + } + } elsif (! $approved) { + $status = "unapproved"; + } else { + $status = "created"; + } + + if ($action eq "mail" && ($status !~ /(no change|unapproved)/)) { + open(TEMPFILE, ">$tempfile"); + print TEMPFILE ("$sender asks for $groupname\n", + "to be $status.\n\n", + "If this is acceptable, type:\n", + " $inn::newsbin/ctlinnd newgroup ", + "$groupname $modcmd $sender\n\n", + "The control message follows:\n\n"); + + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + print TEMPFILE $_ while
; + close(ARTICLE); + close(TEMPFILE); + logger($tempfile, "mail", "newgroup $groupname $modcmd $sender\n"); + unlink($tempfile); + } elsif ($action eq "log") { + if (!$logging) { + logmsg ('notice', 'skipping newgroup %s %s %s (would be %s)', + $groupname, $modcmd, $sender, $status); + } else { + logger($token, $logging, + "skipping newgroup $groupname " . + "$modcmd $sender (would be $status)"); + } + } elsif (($action eq "doit") && + ($status !~ /(no change|unapproved)/)) { + # Create the group. + system("$inn::newsbin/ctlinnd", "-s", "newgroup", + $groupname, $modcmd, $sender); + + # If there's a tag line, update newsgroups too. + + $artfh = open_article($token); + next if (!defined($artfh)); + *ARTICLE = $artfh; + + NEWSGROUPS: + while (
) { + chomp; + if (/^For your newsgroups file:$/) { + $ngline = (
); + chomp $ngline; + last NEWSGROUPS; + } + } + ($ngname, $ngdesc) = split(/\s+/, $ngline, 2); + if ($ngdesc) { + $ngdesc =~ s/\s+(moderated)$//i; + $ngdesc .= " (Moderated)" if $modflag eq "moderated"; + } + if (($ngdesc) && ($ngname eq $groupname)) { + # Get a lock on newsgroups + $locktry = 0; + GETNGLOCK: + while ($locktry < 60) { + if (system("$inn::newsbin/shlock", "-p", "$pid", + "-f", "$inn::locks/LOCK.newsgroups")) { + $locktry++; + sleep(2); + } else { + $locktry = -1; + last GETNGLOCK; + } + } + + if ($locktry > -1) { + logmsg ('err', 'Cannot get lock %s', + "$inn::locks/LOCK.newsgroups"); + } else { + open(NEWSGROUPS, "<$inn::newsgroups"); + open(TEMPFILE, ">$tempfile"); + while () { + print TEMPFILE $_ if ! /$qgroup\s/; + } + print TEMPFILE ($ngname, "\t", $ngdesc, "\n"); + + open(TEMPFILE, "<$tempfile"); + open(NEWSGROUPS, ">$inn::newsgroups"); + print NEWSGROUPS $_ while ; + close TEMPFILE; + close NEWSGROUPS; + unlink "$inn::locks/LOCK.newsgroups"; + unlink($tempfile); + } + } # update newsgroups + + # Now, log what we did. + if ($logging) { + $errmsg = "newgroup $groupname "; + ($modflag eq "moderated" ? $errmsg .= "m " : $errmsg .= "y "); + $errmsg .= $status . " " . $sender; + logger($token, $logging, $errmsg); + } + } + } + } + diff -Nacr inn-2.1/samples/news.daily.in inn-2.2/samples/news.daily.in *** inn-2.1/samples/news.daily.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/news.daily.in Sun Jan 17 23:18:16 1999 *************** *** 1,5 **** #!@_PATH_SH@ ! ## $Revision: 1.26 $ ## Daily news maintenance. ## Optional arguments: ## expdir=xxx Directory in which to build new history file --- 1,5 ---- #!@_PATH_SH@ ! ## $Revision: 1.28.2.1 $ ## Daily news maintenance. ## Optional arguments: ## expdir=xxx Directory in which to build new history file *************** *** 26,31 **** --- 26,33 ---- DATE=`date` AZ=ABCDEFGHIJKLMNOPQRSTUVWXYZ az=abcdefghijklmnopqrstuvwxyz + TAGGEDHASH=@DO_DBZ_TAGGED_HASH@ + SORT=sort ## If your expire does not pause or throttle innd, enable this next line: #MESSAGE="Expiration script $$" *************** *** 327,334 **** cp /dev/null ${HISTORY} mv -f ${EXPDIR}/history.n ${HISTORY} mv -f ${EXPDIR}/history.n.dir ${HISTORY}.dir ! mv -f ${EXPDIR}/history.n.index ${HISTORY}.index ! mv -f ${EXPDIR}/history.n.hash ${HISTORY}.hash rm -f ${EXPDIR}/history.n.done case "${EXPIREFLAGS}" in *-n*) --- 329,340 ---- cp /dev/null ${HISTORY} mv -f ${EXPDIR}/history.n ${HISTORY} mv -f ${EXPDIR}/history.n.dir ${HISTORY}.dir ! if [ X${TAGGEDHASH} = XDO ] ; then ! mv -f ${EXPDIR}/history.n.pag ${HISTORY}.pag ! else ! mv -f ${EXPDIR}/history.n.index ${HISTORY}.index ! mv -f ${EXPDIR}/history.n.hash ${HISTORY}.hash ! fi rm -f ${EXPDIR}/history.n.done case "${EXPIREFLAGS}" in *-n*) *************** *** 396,405 **** test -n "${RMFILE}" -a -s "${RMFILE}" && { mv ${RMFILE} ${RMFILE}.$$ && RMFILE=${RMFILE}.$$ ! test -n "${TMPDIR}" && T="-T ${TMPDIR}" ! sort -u -o ${RMFILE} ${RMFILE} if [ X${SAPI} = X"true" ]; then ! sort -u -o ${INDEXFILE} ${INDEXFILE} fi ${DOEXPIREOVER} && { if ${DOEXPLOG}; then --- 402,411 ---- test -n "${RMFILE}" -a -s "${RMFILE}" && { mv ${RMFILE} ${RMFILE}.$$ && RMFILE=${RMFILE}.$$ ! test -n "${TMPDIR}" && SORT="${SORT} -T ${TMPDIR}" ! ${SORT} -u -o ${RMFILE} ${RMFILE} if [ X${SAPI} = X"true" ]; then ! ${SORT} -u -o ${INDEXFILE} ${INDEXFILE} fi ${DOEXPIREOVER} && { if ${DOEXPLOG}; then *************** *** 427,433 **** # expire overview lines for files we just removed if ${DOEXPIREOVER}; then if [ X${SAPI} = X"true" ]; then ! sort -u -o ${INDEXFILE} ${INDEXFILE} fi if ${DOEXPLOG}; then echo " ${EXPIREOVER} start `date`" >>${EXPLOG} --- 433,439 ---- # expire overview lines for files we just removed if ${DOEXPIREOVER}; then if [ X${SAPI} = X"true" ]; then ! ${SORT} -u -o ${INDEXFILE} ${INDEXFILE} fi if ${DOEXPLOG}; then echo " ${EXPIREOVER} start `date`" >>${EXPLOG} diff -Nacr inn-2.1/samples/news2mail.cf inn-2.2/samples/news2mail.cf *** inn-2.1/samples/news2mail.cf Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/news2mail.cf Wed Oct 21 07:10:09 1998 *************** *** 0 **** --- 1,20 ---- + # Sample config file for news2mail. Format is: + # + # mailing-list-name address + # + # + # In newsfeeds put an entry like: + # + # n2m!:!*:Tc,Ac,Wn*:/usr/news/bin/news2mail + # + # and for each mailing list have an entry list: + # + # news-software@localhost.our.domain.com:rec.pets.redants.*:Tm:n2m! + # + # The site name used in the newfeeds entry for a mailing list (above + # ``news-software@localhost.our.domain.com'') must be the same as the first + # field in an entry in this file. It is what is put into the ``To'' header of + # mailed messages. + # + # + news-software@localhost.our.domain.com news-software@real-host.somewhere.com diff -Nacr inn-2.1/samples/news2mail.in inn-2.2/samples/news2mail.in *** inn-2.1/samples/news2mail.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/news2mail.in Wed Nov 18 23:03:23 1998 *************** *** 0 **** --- 1,164 ---- + #!@_PATH_PERL@ + # + # news to mail channel backend + # + # INN gives us + # @token@ addrs + # for each article that needs to be mailed. We invoke sm on the + # localhost to get the actual article and stuff + # it down sendmail's throat. + # + # This program expect to find a file that maps listname to listaddrs, + # @prefix@/etc/news2mail.cf + # which must contain address mapping pairs such as + # + # big-red-ants@ucsd.edu big-red-ants-digest@ucsd.edu + # + # where the first token is the name fed to us from INN, and which is + # also placed in the To: header of the outgoing mail. It's probably + # the subscriber's list submittal address so that replies go to the + # right place. The second token is the actual address sendmail ships + # the article to. + # + # In the INN newsfeeds file, you need to have a channel feed: + # n2m!:!*:Tc,Ac,Wn*:@prefix@/bin/news2mail + # and a site for each of the various mailing lists you're feeding, + # such as + # big-red-ants@ucsd.edu:rec.pets.redants.*:Tm:n2m! + # + # Error handling is nearly nonexistent. + # + # - Brian Kantor, UCSD Aug 1998 + + require 5.002; + + use FileHandle; + use Sys::Syslog; + + require "@LIBDIR@/innshellvars.pl"; + my $cfFile = $inn::pathetc . "/news2mail.cf" ; + my $sendmail = $inn::mta ; + my $sm = $inn::pathbin . "/sm" ; + + # + # the syslog calls are here but don't work on my system + # + openlog('news2mail', 'pid', 'mail'); + + syslog('info', 'begin'); + + # + # load the list names and their mail addresses from cf file + # #comments and blank lines are ignored + # + unless (open CF, "< $cfFile") { + syslog('notice', 'CF open failed %m'); + die "bad CF"; + } + + while ( $line = ) { + next if ($line =~ /^#|^\s+/); + ( $ln, $ma ) = split /\s+/, $line; + $maddr{ $ln } = $ma; + } + close CF; + + # + # for each incoming line from the INN channel + # + while ( ) { + chomp; + + syslog('info', $_); + + ($token, $lnames) = split /\s+/, $_, 2; + + $addrs = ""; + $cnt = 0; + + for $ln ( split /\s+/, $lnames ) { + if ( $maddr{ $ln } ) { + $cnt++; + } + $addrs = join ' ', $addrs, $maddr{ $ln }; + } + + if ($cnt > 0) { + mailto($token, $lnames, $addrs); + } + else { + syslog('notice', 'unknown listname %s', $_); + } + } + + syslog ("info", "end") ; + + exit 0; + + use strict; + + sub mailto { + my($t, $l, $a) = @_ ; + + my ($smgrpid, $smgr); + my ($smid, $smpid, $d, $ih, $line, $reply, $sendmail); + + + $sendmail = "|" . $inn::mta ; + $sendmail =~ s!%s!! ; + $sendmail .= " -ee '-f' -odq " . $a; + # $sendmail = "|/usr/local/bin/debug -oi -ee '-f' -odq " . $a; + + syslog('info', $sendmail); + + unless ($smpid = (open SM, $sendmail)) { + syslog('notice', '%s failed!', $sendmail); + die "bad $sendmail"; + } + + if ($inn::storageapi eq "true") { + $smgr = "$sm -q $t |"; + + unless ($smgrpid = (open SMGR, $smgr)) { + syslog('notice', '%s failed!', $smgr); + die "bad $smgr"; + } + } else { + my $path = $inn::patharticles . "/" . $t ; + unless (open SMGR, "<$path") { + syslog('notice', "no such path: $path"); + return ; + } + + } + + $ih = 1; + while ( $line = ) { + chop $line; + + # empty line signals end of header + if ($ih && $line eq "") { + print SM "To: $l\n"; + $ih = 0; + } + + # body + if ( $ih == 0) { + print SM "$line\n"; + next; + } + + # + # only these header lines get through to mail + # + print SM "$line\n" if ($line =~ /^From: /i); + print SM "$line\n" if ($line =~ /^Subject: /i); + print SM "$line\n" if ($line =~ /^Date: /i); + print SM "$line\n" if ($line =~ /^Organization: /i); + print SM "$line\n" if ($line =~ /^Message-ID: /i); + } + + out: + close(SMGR); + close(SM); + } diff -Nacr inn-2.1/samples/newsfeeds inn-2.2/samples/newsfeeds *** inn-2.1/samples/newsfeeds Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/newsfeeds Thu Jan 1 00:00:00 1970 *************** *** 1,110 **** - ## $Revision: 1.8 $ - ## newsfeeds - determine where Usenet articles get sent - ## Format: - ## site[/exclude,exclude...]\ - ## :pattern,pattern...[/distrib,distrib...]\ - ## :flag,flag...\ - ## :param - ## Summary of flags: - ## .*" - ## there. The "distrib" subfield limits incoming articles. - ## - ## You can also have ME/bad.site: to refuse articles from a particular - ## site (by matching the Path: entry). Other pseudo-sites may be put - ## in here, to REFUSE certain types of 3rd-party cancel messages - ## (See the "Cancel FAQ" news.admin.net-abuse.misc): - ## cyberspam Spam cancels, munged articles, binary postings - ## spewcancel just munged articles from runaway gateways - ## bincancel just binary postings to non-binaries groups - ## - ## Note that refusing articles means you won't offer them to sites you feed - - ## Default of everything to everybody except for junk, control, anything - ## with "local" as the newgroup prefix (i.e. matches "localhost.stuff") or - ## groups under foo. Articles posted to any group under alt.binaries.warez - ## will not get propogated, even if they're cross posted to something that - ## is. - ME\ - :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\ - /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\ - :: - - ## Create the links for cross posted articles - ## If you use this you MUST add -L option to FLAGS in rc.news. - ## see innd(8) - #crosspost:*:Tc,Ap,WR:/usr/news/bin/crosspost - - # Feed all moderated source postings to an archiver - #source-archive!:!*,*sources*,!*wanted*,!*.d\ - # :Tc,Wn:/usr/news/bin/archive -f -i /usr/spool/news.archive/INDEX - - ## News overview - # use this flag if storage api is used - #overview!:*:Tc,Ao,WhR,S30000:/usr/news/bin/overchan - # else - #overview!:*:Tc,WO,S30000:/usr/news/bin/overchan - - # Feed all local non-internal postings to nearnet; sent off-line via - # nntpsend or send-nntp. - #nic.near.net\ - # :!junk/!foo\ - # :Tf,Wnm:nic.near.net - - # A real-time nntplink feed - # If you turn on storageapi, you cannot to use nntplink since it cannot handle - # token. - #uunet\ - # :/!foo\ - # :Tc,Wnm:/usr/news/bin/nntplink -i stdin news.uu.net - - # Capture all Foo, Incorporated, postings - #capture\ - # :*/foo\ - # :Tp,H2:/usr/news/local/capture %s - - # A UUCP feed, where we try to keep the "batching" between 4 and 1K. - #ihnp4\ - # :!junk,!control/!foo\ - # :Tf,Wnb,B4096/1024: - - # Innfeed funnel master; individual peers feed into the funnel. - # Note that innfeed with "-y" and no peer in innfeed.conf - # would cause a problem that innfeed drops the first article. - #innfeed!:\ - # !*,\ - # :Tc,Wnm*,S30000:/usr/local/news/bin/startinnfeed - - # A real-time feed through innfeed. - #news.uu.net/uunet\ - # :!junk,!control/!foo\ - # :Tm:innfeed! - --- 0 ---- diff -Nacr inn-2.1/samples/newsfeeds.in inn-2.2/samples/newsfeeds.in *** inn-2.1/samples/newsfeeds.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/newsfeeds.in Wed Dec 9 15:52:07 1998 *************** *** 0 **** --- 1,118 ---- + ## $Revision: 1.3.2.2 $ + ## newsfeeds - determine where Usenet articles get sent + ## Format: + ## site[/exclude,exclude...]\ + ## :pattern,pattern...[/distrib,distrib...]\ + ## :flag,flag...\ + ## :param + ## Summary of flags: + ## .*" + ## there. The "distrib" subfield limits incoming articles. + ## + ## You can also have ME/bad.site: to refuse articles from a particular + ## site (by matching the Path: entry). Other pseudo-sites may be put + ## in here, to REFUSE certain types of 3rd-party cancel messages + ## (See the "Cancel FAQ" news.admin.net-abuse.misc): + ## cyberspam Spam cancels, munged articles, binary postings + ## spewcancel just munged articles from runaway gateways + ## bincancel just binary postings to non-binaries groups + ## + ## Note that refusing articles means you won't offer them to sites you feed + + ## Default of everything to everybody except for junk, control, anything + ## with "local" as the newsgroup prefix (i.e. matches "localhost.stuff") or + ## groups under foo. Articles posted to any group under alt.binaries.warez + ## will not get propagated, even if they're cross posted to something that + ## is. + ME\ + :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\ + /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\ + :: + + ## Create the links for cross posted articles + ## If you use this you MUST add -L option to innflags in inn.conf. + ## see innd(8) + #crosspost:*:Tc,Ap,WR:@prefix@/bin/crosspost + + # Feed all moderated source postings to an archiver + #source-archive!:!*,*sources*,!*wanted*,!*.d\ + # :Tc,Wn:@prefix@/bin/archive -f -i @prefix@/spool/archive/INDEX + + ## News overview + # use this flag if storage api is used + #overview!:*:Tc,Ao,WhR,S30000:@prefix@/bin/overchan + # else + #overview!:*:Tc,WO,S30000:@prefix@/bin/overchan + + # Feed all local non-internal postings to nearnet; sent off-line via + # nntpsend or send-nntp. + #nic.near.net\ + # :!junk/!foo\ + # :Tf,Wnm:nic.near.net + + # A real-time nntplink feed + # If you turn on storageapi, you cannot to use nntplink since it cannot handle + # token. + #uunet\ + # :/!foo\ + # :Tc,Wnm:@prefix@/bin/nntplink -i stdin news.uu.net + + # Capture all Foo, Incorporated, postings + #capture\ + # :*/foo\ + # :Tp,H2:@prefix@/bin/capture %s + + # A UUCP feed, where we try to keep the "batching" between 4 and 1K. + #ihnp4\ + # :!junk,!control/!foo\ + # :Tf,Wnb,B4096/1024: + + # Innfeed funnel master; individual peers feed into the funnel. + # Note that innfeed with "-y" and no peer in innfeed.conf + # would cause a problem that innfeed drops the first article. + #innfeed!:\ + # !*,\ + # :Tc,Wnm*,S30000:@prefix@/bin/startinnfeed + + # A real-time feed through innfeed. + #news.uu.net/uunet\ + # :!junk,!control/!foo\ + # :Tm:innfeed! + + # Use an external program to handle control messages, except cancel + #controlchan!\ + # :!*,control,control.*,!control.cancel\ + # :Tc,Wnsm:@prefix@/bin/controlchan + + # news to mail gateway + #n2m!:!*:Tc,Ac,Wn*:@prefix@/bin/news2mail + #news-software@localhost.our.domain.com:rec.pets.redants.*:Tm:n2m! diff -Nacr inn-2.1/samples/nnrp.access inn-2.2/samples/nnrp.access *** inn-2.1/samples/nnrp.access Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/nnrp.access Sun Oct 25 07:23:52 1998 *************** *** 1,4 **** ! ## $Revision: 1.2 $ ## nnrp.access - access file for on-campus NNTP sites ## Format: ## :::: --- 1,4 ---- ! ## $Revision: 1.3.2.1 $ ## nnrp.access - access file for on-campus NNTP sites ## Format: ## :::: *************** *** 15,23 **** ## there is no way for client to enter one. ## ## Default is no access, no way to authentication, and no groups. ! *:: -no- : -no- :!* ## Foo, Incorporated, hosts have no password, can read anything. ! *.foo.com:Read Post:::* ## Bar, Incorporated have a separate access file that they maintain # *.bar.com:/news/etc/customers/access.bar.com stdin:Read Post:::* --- 15,23 ---- ## there is no way for client to enter one. ## ## Default is no access, no way to authentication, and no groups. ! *::::!* ## Foo, Incorporated, hosts have no password, can read anything. ! #*.foo.com:Read Post:::* ## Bar, Incorporated have a separate access file that they maintain # *.bar.com:/news/etc/customers/access.bar.com stdin:Read Post:::* diff -Nacr inn-2.1/samples/nnrpd_auth.pl.in inn-2.2/samples/nnrpd_auth.pl.in *** inn-2.1/samples/nnrpd_auth.pl.in Thu Jan 1 00:00:00 1970 --- inn-2.2/samples/nnrpd_auth.pl.in Tue Jan 5 22:29:59 1999 *************** *** 0 **** --- 1,147 ---- + # + # $Id: nnrpd_auth.pl.in,v 1.1.2.1 1999/01/05 22:29:59 kondou Exp $ + # + # Sample authentication code for nnrpd hook. + # + + # + # This file is loaded when nnrpd starts up. If it defines a sub named + # `authenticate', then that function will be called during processing of a + # connect, auth request or disconnect. Attributes about the connection are + # passed to the program in the %attributes global variable. It should return + # an array with 4 elements: + # + # 1) NNTP response code. Should be one of the codes from %connectcodes or %authcodes + # 2) Reading Allowed. Should be a boolean value. + # 3) Posting Allowed. Should be a boolean value. + # 4) Wildmat expression that says what groups to provide access to. + # + # All four of these are required. If there is a problem with them then nnrpd + # will die and syslog the exact reason. + + # + # Sample Auth program + # + + use vars qw(@readerconfig); + use CDB_File; + + $authfile = "@DBDIR@/users.cdb"; + $defaultgroups = "*"; + + require "@LIBDIR@/innshellvars.pl"; + + my (%connectcodes) = ("read/post" => 200, "read" => 201, "authneeded" => 480, "permdenied" => 502); + my (%authcodes) = ("allowed" => 281, "denied" => 502); + + sub loadnnrp { + my($file) = shift(@_); + my($block, $perm, $user, $pass, %tmp); + + open(F, $file) || die "Could not open $file: $!\n"; + + while () { + my (%tmp); + + chomp; + s/\#.*//g; + ($block, $perm, $user, $pass, $tmp{groups}) = split(/:/); + if (!defined($tmp{groups})) { + undef %tmp; + next; + } + # Change the glob-type pattern to a regexp + if ( ! ($block =~ /(\d+\.\d+\.\d+\.\d+)\/(\d+)/)) + { + # turn a glob type pattern into a regexp + # escape dots + $block =~ s/\./\./g; + # turn ? into . + $block =~ s/\?/./g; + # turn * into .* + $block =~ s/\*/.*/g; + } + $tmp{block} = $block; + + $tmp{canread} = 1 if ($perm =~ /r/i); + $tmp{canpost} = 1 if ($perm =~ /p/i); + unshift(@readerconfig, \%tmp); + } + close(F); + } + + # This is called by nnrpd when it first starts up. + sub auth_init { + &loadnnrp($inn::newsetc . "/nnrp.access"); + tie(%users, 'CDB_File', $authfile) || warn "Could not open CDB file for users: $!\n"; + } + + # This is called when a user connects or authenticates + sub authenticate { + my $key; + foreach $key (keys %attributes) { + } + if ($attributes{type} eq "connect") { + my (@results) = checkhost(); + return @results; + } elsif ($attributes{type} eq "authenticate") { + return checkuser(); + } elsif ($attributes{type} eq "disconnect") { + } + return 502; + } + + sub checkuser { + my $user = $attributes{'username'}; + my $pass = $attributes{'password'}; + + if (!defined($users{$user})) { + return ($authcodes{'denied'}, undef, undef, undef); + } + my ($password, $news_post, $maxcon, $subscription) = split(/\t/, $users{$user}); + my ($salt) = substr($password, 0, 2); + if (crypt($pass, $salt) ne $password) { + return ($authcodes{'denied'}, undef, undef, undef); + } + $news_post = lc($news_post); + $news_post = ($news_post eq 'y') ? 1 : 0; + if (!defined($subscription)) { + $subscription = $defaultgroups; + } + return ($authcodes{'allowed'}, 1, $news_post , $subscription); + } + + sub permtocode { + my ($read, $post) = @_; + + return $connectcodes{'read/post'} if ($post); + return $connectcodes{'read'} if ($read); + return $connectcodes{'authneeded'}; + } + + sub checkhost { + my ($key, $block, $mask, $ip); + + foreach $key (@readerconfig) { + # Process CIDR style entries first + my ($read, $post) = ($key->{canread}, $key->{canpost}); + + if ($key->{block} =~ /(\d+\.\d+\.\d+\.\d+)\/(\d+)/) { + $block = unpack('N', pack('C4', split(/\./, $1))); + $mask = (0xffffffff << (32 - $2)) & 0xffffffff; + $block = $block & $mask; + $ip = unpack('N', pack('C4', split(/\./, $attributes{ipaddress}))); + if (($ip & $mask) == $block) { + return (permtocode($read, $post) , $read, $post, $key->{groups}); + } + } + if ($attributes{ipaddress} =~ /$key->{block}/) { + return (permtocode($read, $post), $read, $post, $key->{groups}); + } + if ($attributes{hostname} =~ /$key->{block}/) { + return (permtocode($read, $post), $read, $post, $key->{groups}); + } + } + return ($connectcodes{'permdenied'}, undef, undef, undef); + } + diff -Nacr inn-2.1/samples/nntpsend.ctl inn-2.2/samples/nntpsend.ctl *** inn-2.1/samples/nntpsend.ctl Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/nntpsend.ctl Sat Aug 15 05:43:21 1998 *************** *** 1,4 **** ! ## $Revision: 1.1.1.1 $ ## Control file for nntpsend. ## Format: ## site:fqdn:max_size:[] --- 1,4 ---- ! ## $Revision: 1.2 $ ## Control file for nntpsend. ## Format: ## site:fqdn:max_size:[] *************** *** 10,15 **** ## see shrinkfile(1). ## Other args to pass to innxmit ## Everything after the pound sign is ignored. ! nsavax:erehwon.nsavax.gov::-S -t60 ! walldrug:walldrug.com:4m-1m:-T1800 -t300 ! kremvax:kremvax.cis:2m: --- 10,15 ---- ## see shrinkfile(1). ## Other args to pass to innxmit ## Everything after the pound sign is ignored. ! #nsavax:erehwon.nsavax.gov::-S -t60 ! #walldrug:walldrug.com:4m-1m:-T1800 -t300 ! #kremvax:kremvax.cis:2m: diff -Nacr inn-2.1/samples/parsecontrol.in inn-2.2/samples/parsecontrol.in *** inn-2.1/samples/parsecontrol.in Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/parsecontrol.in Mon Sep 7 08:59:11 1998 *************** *** 1,24 **** #!@_PATH_SH@ ! ## $Revision: 1.16 $ ## Initial parsing of control messages. . @LIBDIR@/innshellvars WRITELOG=${PATHBIN}/writelog SM="${PATHBIN}/sm -q" ! PGPVERIFY=false ! if [ "X$WANT_PGPVERIFY" = XDO ]; then PGPVERIFY=true fi ! MAILFAILURES=false ! if [ "X$MAIL_BADCONTROLS" = XDO ]; then MAILFAILURES=true fi - AZ=ABCDEFGHIJKLMNOPQRSTUVWXYZ - az=abcdefghijklmnopqrstuvwxyz ZN=0123456789 # Attempt to sanitize the address FROM="`echo \"$1\" | tr ${AZ} ${az} | tr -dc \\\055${az}${ZN}+_.@%`" --- 1,28 ---- #!@_PATH_SH@ ! ## $Revision: 1.18 $ ## Initial parsing of control messages. . @LIBDIR@/innshellvars WRITELOG=${PATHBIN}/writelog SM="${PATHBIN}/sm -q" + AZ=ABCDEFGHIJKLMNOPQRSTUVWXYZ + az=abcdefghijklmnopqrstuvwxyz ! PGPVERIFY=`echo ${PGPVERIFY} | tr ${AZ} ${az}` ! if [ X${PGPVERIFY} = Xtrue -o X${PGPVERIFY} = Xyes -o X${PGPVERIFY} = Xon ]; then PGPVERIFY=true + else + PGPVERIFY=false fi ! MAILFAILURES=`echo ${CONTROLFAILNOTICE} | tr ${AZ} ${az}` ! if [ X${MAILFAILURES} = Xtrue -o X${MAILFAILURES} = Xyes -o X${MAILFAILURES} = Xon ]; then MAILFAILURES=true + else + MAILFAILURES=false fi ZN=0123456789 # Attempt to sanitize the address FROM="`echo \"$1\" | tr ${AZ} ${az} | tr -dc \\\055${az}${ZN}+_.@%`" *************** *** 137,142 **** --- 141,147 ---- ;; *) ACTION=${ACT_PAT} + NEWSGROUPPATS=${NG_PAT} ;; esac ;; *************** *** 144,149 **** --- 149,157 ---- done rm -f ${TEMP} IFS="`echo stn | tr stn ' \011\012'`" + if [ X${NEWSGROUPPATS} != X ]; then + NEWSGROUPPATS=`echo ${NEWSGROUPPATS} | ${SED} -e 's/^/^/' -e 's/\|/\|^/'` + fi LOGFILE=mail case ${ACTION} in diff -Nacr inn-2.1/samples/passwd.nntp inn-2.2/samples/passwd.nntp *** inn-2.1/samples/passwd.nntp Fri Jul 24 13:13:00 1998 --- inn-2.2/samples/passwd.nntp Sat Aug 15 05:43:21 1998 *************** *** 1,4 **** ! ## $Revision: 1.1.1.1 $ ## passwd.nntp - passwords for connecting to remote NNTP servers ## Format: ## ::[: