--- inn-1.7.2q.orig/debian/inn.postinst +++ inn-1.7.2q/debian/inn.postinst @@ -0,0 +1,82 @@ +#!/bin/sh -e + +make_directories() { + NEED_DIR='in.coming in.coming/bad in.coming/tmp + out.going over.view news.archive' + for D in $NEED_DIR; do + if [ ! -d /var/spool/news/$D ]; then + install -d -m 775 -o news -g news /var/spool/news/$D + fi + done +} + +init_var_lib_news() { + if [ ! -f /var/lib/news/active ]; then + cat > /var/lib/news/active << END +control 0000000000 0000000001 n +control.cancel 0000000000 0000000001 n +junk 0000000000 0000000001 y +misc.test 0000000000 0000000001 y +misc.test.moderated 0000000000 0000000001 m +END + chown news:news /var/lib/news/active + fi + + if [ ! -f /var/lib/news/history ]; then + touch /var/lib/news/history + /usr/lib/news/bin/makehistory -or + chown news:news /var/lib/news/history* + fi + + if [ ! -f /var/lib/news/newsgroups ]; then + cat > /var/lib/news/newsgroups << END +control News server internal group. +control.cancel News server internal group. +junk News server internal group. +misc.test For testing of network software. Very boring. +misc.test.moderated Testing of posting to moderated groups. (Moderated) +END + chown news:news /var/lib/news/newsgroups + fi +} + +add_mail_alias() { + if ! grep -q '^usenet:' /etc/aliases; then + echo 'usenet: root' >> /etc/aliases + newaliases || echo "newaliases command not available." + fi +} + +init_etc_files() { + if [ ! -f /etc/news/server ]; then + echo 'localhost' > /etc/news/server + fi + + if [ ! -f /etc/news/whoami ]; then + if [ -f /etc/mailname ]; then + cp /etc/mailname /etc/news/whoami + else + hostname --fqdn > /etc/news/whoami + fi + fi +} + +case "$1" in + configure) + make_directories + init_var_lib_news + add_mail_alias + init_etc_files + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument '$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + --- inn-1.7.2q.orig/debian/inn.postrm +++ inn-1.7.2q/debian/inn.postrm @@ -0,0 +1,52 @@ +#!/bin/bash -e + +clean_var_lib() { + echo "Purging active file and history data..." + rm -f /var/lib/news/active* /var/lib/news/history* \ + /var/lib/news/newsgroups + if [ -d /var/lib/news/ ]; then + rmdir --ignore-fail-on-non-empty /var/lib/news/ + fi +} + +clean_var_run() { + rm -rf /var/run/innd/ +} + +remove_logs() { + echo "Removing files in /var/log/news and /var/run/innd..." + rm -f /var/lib/news/{.news.daily,active.old} + [ -e /var/log/news/ ] || return 0 + rm -rf /var/log/news/OLD/ + rm -f /var/log/news/{expire.log,log,errlog,unwanted.log} + : > /var/log/news/news.crit + : > /var/log/news/news.err + : > /var/log/news/news.notice +} + +case "$1" in + remove) + ;; + + purge) + clean_var_lib + clean_var_run + remove_logs + + # We do not remove /var/spool/news because that might + # take a lot of time. Most of the time it is on a seperate + # disk anyway and it is faster to do a mkfs on it.. + echo "Remove the news spool in /var/spool/news yourself!" + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument '$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + --- inn-1.7.2q.orig/debian/inn.preinst +++ inn-1.7.2q/debian/inn.preinst @@ -0,0 +1,32 @@ +#!/bin/sh -e + +check_version() { + case "$2" in + 1.4*) + echo "Upgrade from INN 1.4 is not supported." + exit 1 + ;; + + 2.2.2) + echo "Upgrade from INN 2.2.2 is not supported." + exit 1 + ;; + esac +} + +case "$1" in + install) + ;; + + upgrade|abort-upgrade) + check_version "$@" + ;; + + *) + echo "preinst called with unknown argument '$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + --- inn-1.7.2q.orig/debian/rules +++ inn-1.7.2q/debian/rules @@ -0,0 +1,133 @@ +#!/usr/bin/make -f +SHELL=/bin/bash -e + +CFLAGS=-g -O2 +DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow +-include /usr/share/dpkg/buildflags.mk + +QUILT_STAMPFN := debian/.stamp-patched +include /usr/share/quilt/quilt.make + +B := $(CURDIR)/build +D := $(CURDIR)/debian/inn + +# get the debian revision number +DREV := $(shell dpkg-parsechangelog | grep '^Version: 1:1.7.2q-' \ + | sed -e 's/^.*-\(.*\)$$/\1/') +ifeq ($(DREV),) +$(error bad package version) +endif + +# the upstream source needs to be copied in the build dir +src_files = $(shell find . -maxdepth 1 \ + -not -name . -and -not -name debian -and -not -name .pc \ + -and -not -name extra -and -not -name build) + +clean: unpatch + rm -rf debian/.stamp-* $B + dh_clean + +configure: debian/.stamp-configure +debian/.stamp-configure: $(QUILT_STAMPFN) + dh_testdir + mkdir -p $B + for dir in $(src_files); do cp -ldpR $$dir $B; done + perl -pi -e 's|^(#define\s+LOCAL_STRING\s+")[^"]*"|$${1}Debian/$(DREV)"|' \ + $B/include/patchlevel.h + sed -e "s@PERL_LDOPTS@`perl extra/perl-ldopts`@" \ + -e "s@PERL_CCOPTS@`perl extra/perl-ccopts`@" \ + -e "s@DEBIAN_CFLAGS@$(CFLAGS)@" \ + -e "s@DEBIAN_CPPFLAGS@$(CPPFLAGS)@" \ + -e "s@DEBIAN_LDFLAGS@$(LDFLAGS)@" \ + < extra/config.data.debian > $B/config/config.data + touch $@ + +build: build-arch build-indep +build-arch: debian/.stamp-build +build-indep: debian/.stamp-build +debian/.stamp-build: debian/.stamp-configure + dh_testdir + cd $B && $(MAKE) + # Cat the Install docs together + cat $B/Install.ms.[12] | nroff -ms > $B/Install.txt + touch $@ + +binary-arch: debian/.stamp-build checkroot + dh_testdir + dh_clean + dh_installdirs + # Install INN in the temp directory + cd $B && $(MAKE) install DESTDIR=$D + + printf '#!/bin/sh\ngzip -d\n' > $D/usr/lib/news/rnews/gunbatch + printf '#!/bin/sh\nxz -d\n' > $D/usr/lib/news/rnews/xunbatch + chmod +x $D/usr/lib/news/rnews/*unbatch + + cp extra/innreport_inn.pm $D/usr/lib/news/ + install -m 755 extra/send-uucp.pl extra/innreport $D/usr/lib/news/bin/ + pod2man --section=8 < extra/send-uucp.pl \ + > $D/usr/share/man/man8/send-uucp.8 + + # these scripts contain an unfixable bashism + cd $D/usr/lib/news/control/ && \ + for file in *; do \ + perl -i -pe 's@^#! /bin/sh@#! /bin/bash@' $$file; \ + done + + # Fix up innshellvars* and other things + perl -pi -e 's#/usr/ucb#/usr/sbin#' $D/usr/lib/news/innshellvars* + + cp extra/etc/* $D/etc/news + dh_installcron + dh_installdocs extra/doc/inn-README extra/doc/innhelp.tomk.txt \ + $B/FAQ/ $B/Install.txt $B/actived/README.actived + dh_installchangelogs $B/CHANGES + dh_installinit --restart-after-upgrade + install -p -m755 debian/inn.init $D/etc/init.d/inn + + rm -rf $D/var/spool/news/* $D/var/run/innd/ $D/tmp/ \ + $D/etc/news/scripts/*.tcl \ + $D/var/lib/news/innlog.pl \ + $D/usr/share/man/man8/innlog.pl.8.gz \ + $D/usr/lib/news/bin/innmail \ + $D/usr/lib/news/control/sample.control + + dh_fixperms + cd $D/etc/news && \ + chown root:news passwd.nntp nnrp.access hosts.nntp && \ + chmod 640 passwd.nntp nnrp.access hosts.nntp + chown root:news $D/usr/bin/[ri]news + chmod 2755 $D/usr/bin/[ri]news + chown root:news $D/usr/sbin/inndstart + chmod 4754 $D/usr/sbin/inndstart + chown -R news:news $D/var/*/news/ + + # Move some more stuff around. + mv $D/var/lib/news/send-* $D/etc/news/scripts/ + mv $D/var/lib/news/nntpsend.ctl $D/etc/news/nntpsend.ctl + cd $D/usr/share/man/man8 && mv nnrpd.8 in.nnrpd.8 + + # Install the latest pgpverify. + install -m 755 extra/gpgverify $D/usr/lib/news/bin/pgpverify + install -d -m 755 -o news -g news $D/etc/news/pgp + cp extra/pgpverify.8 $D/usr/share/man/man8/ + + # Install controlchan + install -m 755 extra/cch/controlchan $D/usr/lib/news/bin/ + install -m 644 extra/cch/control/* $D/usr/lib/news/control/ + + dh_link + dh_strip + dh_compress + dh_installdeb + dh_shlibdeps + dh_gencontrol -u-VPERLAPI=$$(perl -MConfig -e 'print "perlapi-" . ($$Config{debian_abi} || $$Config{version})') + dh_builddeb + +binary-indep: + +binary: binary-arch + +checkroot: + test root = "`whoami`" + --- inn-1.7.2q.orig/debian/inn.links +++ inn-1.7.2q/debian/inn.links @@ -0,0 +1,9 @@ +/etc/news/scripts/send-ihave /usr/lib/news/bin/send-ihave +/etc/news/scripts/send-nntp /usr/lib/news/bin/send-nntp +/etc/news/scripts/send-uucp /usr/lib/news/bin/send-uucp +/usr/lib/news/innshellvars /etc/news/innshellvars +/usr/lib/news/innshellvars.csh /etc/news/innshellvars.csh +/usr/lib/news/innshellvars.pl /etc/news/innshellvars.pl +/usr/lib/news/innshellvars.tcl /etc/news/innshellvars.tcl +/usr/lib/news/bin/ctlinnd /usr/sbin/ctlinnd +/usr/share/man/man8/innd.8 /usr/share/man/man8/inndstart.8 --- inn-1.7.2q.orig/debian/README.Debian +++ inn-1.7.2q/debian/README.Debian @@ -0,0 +1,145 @@ +Patches applied: + +0_insync_actived +0_insync_dbz_3.3 +0_insync_fastrm_symlink +0_insync_misc (history+timer+perl_mode+perl_messageid) +0_insync_largerhash +0_insync_overscream +0_insync_pathfeed +Ported from the insync patch kit, with some local changes: actived, +DBZ 3.2, fastrm symlink bug fix, precommit cache, Joe Greco's timers, +bigger hash table in expire, mmapped overview, Path feed from a +newsfeeds entry. +To enable actived put "useactived: yes" in inn.conf and "DOACTIVED=true" +in /etc/news/boot. It will *NOT* be used by nnrpd by default. + +1_perl_filter_patch +1_perl_misc +All patches from cleanfeed (mode.patch, messageid.patch, dynamic-load.patch, +filter.patch), some parts in 0_insync_misc too. +Updates for perl 5.8 by Marco d'Itri. + +2_perl_timer +Perl filter timer support. (Marco d'Itri) + +addhist +Disallow addhist when the server is paused or throttled. +(Miquel van Smoorenburg) + +bindaddress +Added port and bindaddress entries to inn.conf (Miquel van Smoorenburg +and Marco d'Itri). + +clientactive.c +Small inews-related fix. (Miquel van Smoorenburg) + +distribution_crash +Distribution header parsing patch. (Sylvain Robitaille) + +fastrm_allow_symlinks +Remove -u from the default fastrm command line. + +fixinterps +Support recent perl releases. + +getmodaddr.c +Use a local moderators file if inews cannot get one from the server. + +inet_addr_is_int +inet_addr does return int, not long. + +inews-misc +inews buffer overflow fix and something else I do not remember. +inews opens the active with CAopen instead of CAlistopen (Colin Watson). +inews authenticates with the remote server (Chip Salzenberg). + +inewsport +Add the inewsport inn.conf option. + +inncheck +Make it check for the right permissions for debian systems. + +innd.c_init_TimeOut +Bugfix: tv_usec must be initialized. + +innwatch_ctlinnd_timeout +Use a timeout when invoking ctlinnd from innwatch. + +misc_config_files +Change some defaults for debian packaging. + +misc_inn.conf +Document all new parameters. + +misc_makefiles +Fix support for $DESTDIR and other minor bugfixes. + +misc_paths.h +Add all new inn.conf parameters. + +misc_rc.news +Disable innwatch by default, add actived support. + +newsgroups_whitespace +Ignore whitespace in Newsgroups headers instead of rejecting the article. + +nnrpd_needs_libcrypt +Link nnrpd with -lcrypt. + +nnrpd_perl_edit_headers+bofh +From the BOFH patch by Andrew Gierth: in filter_post() the authenticated +user is available in the $user variable and the article body is put in +$body. If the string returned by filter_post() starts with DROP, the +article is silently dropped. +Backported from INN 2.x the code to modify headers in filter_nnrpd.pl. + +nntpsend.ctl_in_etc +Move nntpsend.ctl to /etc/. + +no_throttled_rmgroups +Bugfix: disallow rmgroups when the server is throttled or the history +will be damaged. + +parsedate_y2k +Y2K bugfix by Bettina Fink. + +path_audit +path_audit_fix +Path audit trail patch (Ian Jackson). Please read hosts.nntp(5). + +poison+remember_trash +Poison and REMEMBER_TRASH patch by Russ Allbery. + +recommend_ID +Tell clients the recommended Message-ID (Olaf Titz). + +rnews_reject_reason +Have rnews add an header to saved rejected articles. + +rnews_unknown +Minor rnews fixes (Marco d'Itri). + +scanlogs_use_innreport +innreport backported from INN 2.x. + +sendbatch +send-uucp +Commented some hardcoded configuration values, but everybody should use +send-uucp.pl anyway. + +use_controlchan +Controlchan support (backported from INN 2.x by Marco d'Itri). + +use_strerror +sys_errlist[] is deprecated. + +xmode +Add the XMODE command. + +x-trace +X-Trace header generation. + +More precise timer when innd is idle most of the time (Olaf Titz). +[Buried somewhere in the 0_insync_* patches.] + --- inn-1.7.2q.orig/debian/inn.init +++ inn-1.7.2q/debian/inn.init @@ -0,0 +1,69 @@ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: inn +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: INN news server +# Description: The InterNetNews news server. +### END INIT INFO +# +# Start/stop the news server. +# + +test -f /usr/sbin/innd || exit 0 + +case "$1" in + start) + if [ ! -d /var/run/innd ]; then + mkdir -p /var/run/innd + chown news:news /var/run/innd + chmod 775 /var/run/innd + fi + start-stop-daemon --quiet --start --exec /etc/news/boot + ;; + stop) + echo -n "Stopping news server:" + if [ -f /var/run/innd/innwatch.pid ]; then + echo -n " innwatch" + start-stop-daemon --quiet --stop --oknodo \ + --pidfile /var/run/innd/innwatch.pid + fi + if [ -f /var/run/innd/actived.pid ]; then + echo -n " actived" + start-stop-daemon --quiet --stop --oknodo + --pidfile /var/run/innd/actived.pid --exec /usr/lib/news/bin/actived + fi + rm -f /var/run/innd/actived.pid /var/run/innd/innwatch.pid + if [ -f /var/run/innd/innd.pid ]; then + echo -n " innd" + ctlinnd -s -t 20 throttle 'system is going down' || true + ctlinnd -s -t 20 shutdown 'system is going down' || true + start-stop-daemon --quiet --stop --oknodo \ + --pidfile /var/run/innd/innd.pid + fi + echo "." + ;; + reload|force-reload) + echo -n "Reloading INN configuration files: " + ctlinnd -t 20 reload '' /etc/init.d/inn + ;; + restart) + echo -n "Restarting innd: " + if [ -f /var/run/innd/innd.pid ]; then + ctlinnd -s -t 20 throttle "restarting" || true + ctlinnd -s -t 20 xexec inndstart || + start-stop-daemon --quiet --start --exec /etc/news/boot + else + start-stop-daemon --quiet --start --exec /etc/news/boot + fi + echo "done." + ;; + *) + echo "Usage: /etc/init.d/inn start|stop|restart|reload" >&2 + exit 1 + ;; +esac + +exit 0 --- inn-1.7.2q.orig/debian/copyright +++ inn-1.7.2q/debian/copyright @@ -0,0 +1,32 @@ +This is Debian GNU/Linux's prepackaged version of Rich Salz's +INN news transport system. + +It is currently maintained by Marco d'Itri . +Bdale Garbee, Miquel van Smoorenburg and Ian Jackson maintained +this package in the past. + +The authors of applied patches are listed in README.Debian. + +Copyright 1991 Rich Salz. All rights reserved. +Modifications for Debian GNU/Linux Copyright 1994 Ian Jackson. +Modifications for Debian GNU/Linux Copyright 1995-1997 Miquel van Smoorenburg. +Modifications for Debian GNU/Linux Copyright 2000 Marco d'Itri + +Redistribution and use in any form are permitted provided that the +following restrictions are are met: + 1. Source distributions must retain this entire copyright notice + and comment. + 2. Binary distributions must include the acknowledgement ``This + product includes software developed by Rich Salz'' in the + documentation or other materials provided with the + distribution. This must not be represented as an endorsement + or promotion without specific prior written permission. + 3. The origin of this software must not be misrepresented, either + by explicit claim or by omission. Credits must appear in the + source and documentation. + 4. Altered versions must be plainly marked as such in the source + and documentation and must not be misrepresented as being the + original software. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. --- inn-1.7.2q.orig/debian/inn.cron.d +++ inn-1.7.2q/debian/inn.cron.d @@ -0,0 +1,21 @@ +PATH=/usr/lib/news/bin:/bin:/sbin:/usr/bin:/usr/sbin +MAILTO=usenet + +# Expire old news and old overview entries nightly, generate reports. +08 4 * * * news [ -x /usr/lib/news/bin/news.daily ] && /usr/lib/news/bin/news.daily expireover delayrm + +# Refresh the hosts cache every night. +02 4 * * * news [ -x /usr/lib/news/bin/ctlinnd ] && /usr/lib/news/bin/ctlinnd -t 300 -s reload hosts.nntp "flush cache" + +# Every hour, run an rnews -U. This is not only for UUCP sites, but +# also to process queud up articles put there by in.nnrpd in case +# innd wasn't accepting any articles. +14 * * * * news [ -x /usr/bin/rnews ] && /usr/bin/rnews -U + +# Enable this entry to send posted news back to your upstream provider. +# Not if you use innfeed, ofcourse. +#*/15 * * * * news send-nntp news.myprovider.com + +# Enable this if you want to send news by uucp to your provider. +# Also edit /etc/news/send-uucp.cf ! +#22 * * * * news send-uucp.pl --- inn-1.7.2q.orig/debian/inn.dirs +++ inn-1.7.2q/debian/inn.dirs @@ -0,0 +1,11 @@ +etc/init.d +etc/news/scripts +usr/bin +usr/sbin +usr/share +usr/lib/news +usr/lib/news/bin +usr/lib/news/control +usr/lib/news/rnews +var/lib/news +var/spool/news --- inn-1.7.2q.orig/debian/NEWS +++ inn-1.7.2q/debian/NEWS @@ -0,0 +1,14 @@ +inn (1:1.7.2debian-25) unstable; urgency=medium + + * Since this release inewsinn has been merged in the main inn package. + + -- Marco d'Itri Sat, 27 Sep 2003 00:32:34 +0200 + +inn (1:1.7.2debian-23) unstable; urgency=medium + + * Added support for a inewsport config file option. (Closes: #54975) + * Removed /etc/news/crontab and added /etc/cron.d/inn. The old file has + been removed from crontab but its lines have not been added to the + new one, you will have to do this yourself. + + -- Marco d'Itri Wed, 20 Aug 2003 03:56:14 +0200 --- inn-1.7.2q.orig/debian/inn.prerm +++ inn-1.7.2q/debian/inn.prerm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +# delete the pid file if INN is dead, or the init script may fail later +PIDFILE="/var/run/innd/innd.pid" +if [ -f $PIDFILE ]; then + INNPID=$(cat $PIDFILE) + kill -s 0 $INNPID 2> /dev/null || rm -f $PIDFILE +fi + +#DEBHELPER# + --- inn-1.7.2q.orig/debian/compat +++ inn-1.7.2q/debian/compat @@ -0,0 +1 @@ +5 --- inn-1.7.2q.orig/debian/control +++ inn-1.7.2q/debian/control @@ -0,0 +1,34 @@ +Source: inn +Section: news +Priority: extra +Maintainer: Marco d'Itri +Build-Depends: debhelper (>= 5), quilt (>= 0.40), bison, groff, perl, libperl-dev (>= 5.8) +Standards-Version: 3.9.3.1 + +Package: inn +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, cron, default-mta | mail-transport-agent, bsd-mailx | mailx, time, perl, ${PERLAPI} +Suggests: gnupg (>= 1.0.5) +Provides: news-transport-system, inews +Conflicts: inn2, inn2-inews, inn2-dev, inewsinn, news-transport-system +Replaces: inewsinn +Description: News transport system `InterNetNews' by the ISC and Rich Salz + This is INN version 1.x, provided for smaller sites which do not need + the complexity of INN 2.x. + Large sites should use Debian's inn2 package instead. + . + The news transport is the part of the system that stores the articles + and the lists of which groups are available and so on, and provides + those articles on request to users. It receives news (either posted + locally or from a newsfeed site), files it, and passes it on to any + downstream sites. Each article is kept for a period of time and then + deleted (this is known as `expiry'). + . + By default Debian's INN will install in a fairly simple `local-only' + configuration. + . + In order to make use of the services provided by INN you'll have to + use a user-level newsreader program such as trn. The newsreader is + the program that fetches articles from the server and shows them to + the user, remembering which the user has seen so that they don't get + shown again. It also provides the posting interface for the user. --- inn-1.7.2q.orig/debian/changelog +++ inn-1.7.2q/debian/changelog @@ -0,0 +1,610 @@ +inn (1:1.7.2q-41build1) trusty; urgency=low + + * Rebuild for Perl 5.18. + + -- Colin Watson Mon, 21 Oct 2013 13:13:30 +0100 + +inn (1:1.7.2q-41) unstable; urgency=low + + * Replaced innmail, which uses obsolete Perl features, with mailx. + * config.data.debian: added support for dpkg-buildflags. + * New patch fix_perl514: stops using perl4's getopts.pl. (Closes: #670751) + * New patch siteinfo_format: fixes a format error. + * Added a xunbatch program. + + -- Marco d'Itri Fri, 29 Jun 2012 01:51:17 +0200 + +inn (1:1.7.2q-40) unstable; urgency=low + + * Stop using "sort +1n" in makehistory, because it is not supported + anymore by the squeeze version of coreutils. (Closes: #612265) + * Disable CHECK_INCLUDED_TEXT, we have perl filters to do this. + (Closes: #573993) + + -- Marco d'Itri Sat, 16 Apr 2011 02:41:34 +0200 + +inn (1:1.7.2q-39) unstable; urgency=low + + * Updated patch fix_perl510: backported from 2.x the changesets 7937, 7939 + and 8421. Thanks to Julien ÉLIE. (Closes: #541130) + * Link again with libpthread the binaries embedding perl because + binutils-gold correctly requires it. (Closes: #554920) + * Made the old shell control message handlers use bash. (Closes: #530104) + * Updated control.ctl. + + -- Marco d'Itri Sat, 26 Dec 2009 02:48:13 +0100 + +inn (1:1.7.2q-38) unstable; urgency=medium + + * Backported fixes from 2.4: + + New patch fix_ad_flag: honour the Ad newsfeeds flag. + + Updated patch fix_perl510: use newSVpvn_share to create the article + body SV much more efficiently. + + -- Marco d'Itri Wed, 10 Sep 2008 02:07:47 +0200 + +inn (1:1.7.2q-37) unstable; urgency=medium + + * Clean up /var/lib/news/ in the purge target instead of the remove target. + (Closes: #493824) + + -- Marco d'Itri Thu, 28 Aug 2008 04:08:44 +0200 + +inn (1:1.7.2q-36) unstable; urgency=low + + * Fixed the malformed poison+remember_trash patch which confused the + new dpkg. (Closes: #485368) + * Updated patch 1_perl_filter_patch: added more headers. + * Updated patch fix_perl510 with fixes/cleanups from 2.4.5 (and the + INN::syslog callback). + + -- Marco d'Itri Tue, 01 Jul 2008 02:29:46 +0200 + +inn (1:1.7.2q-35) unstable; urgency=high + + * Fixed a FTBFS Heisenbug. (Closes: #481867) + + -- Marco d'Itri Tue, 20 May 2008 02:51:38 +0200 + +inn (1:1.7.2q-34) unstable; urgency=high + + * Packaging converted to quilt. + * New patch fix_perl510: fixes segfaults with perl 5.10, hopefully + without introducing new bugs. If you know about XS, please help! + + -- Marco d'Itri Tue, 06 May 2008 12:56:04 +0200 + +inn (1:1.7.2debian-33) unstable; urgency=medium + + * Updated control.ctl. + * Fixed the init script to create /var/run/innd/ instead of /var/run/news/. + * New patch newsgroups_whitespace: ignore whitespace in Newsgroups headers + instead of rejecting the article. + * Sanitize the perl ccopts and ldopts to prevent linking nnrpd with -lm. + * Updated patch man_sections: fix some ten years old syntax errors in + the man pages. + * Do not use --stop and --exec in the init script because the on-disk + binary changes after upgrades. + + -- Marco d'Itri Sun, 20 Apr 2008 03:43:16 +0200 + +inn (1:1.7.2debian-32) unstable; urgency=low + + * New patch gnukfreebsd_port: fixes FTBFS on GNU/kFreeBSD. (Closes: #414980) + + -- Marco d'Itri Tue, 07 Aug 2007 18:59:52 +0200 + +inn (1:1.7.2debian-31) unstable; urgency=medium + + * Create /var/run/news in the init script if it does not exist. + * New patch posix_arguments: makes innstat use tail -n. + * Updated control.ctl. + + -- Marco d'Itri Fri, 18 Aug 2006 18:46:30 +0200 + +inn (1:1.7.2debian-30) unstable; urgency=medium + + * Fixed a gcc 4 FTBFS bug. (Closes: #297185) + * Do not fail in postrm if /var/log/news/ does not exist. (Closes: #313354) + * Do not reference rc.news in innwatch(8). (Closes: #286062) + * Updated the control.ctl and moderators files. + + -- Marco d'Itri Sun, 31 Jul 2005 12:54:04 +0200 + +inn (1:1.7.2debian-29) unstable; urgency=medium + + * Conflict with inn2-dev. (Closes: #274787) + * New patch rc_initialise_everything: fixes some uninitialised variables + in rc.c. Patch courtesy of Devin Carraway. (Closes: #277459) + * Fixed a command option in inn-README.gz. (Closes: #267125) + * Fixed the keyring path in pgpverify. + * New patch man_sections: fixes the section of some man pages. + + -- Marco d'Itri Tue, 26 Oct 2004 21:14:51 +0200 + +inn (1:1.7.2debian-28) unstable; urgency=medium + + * Depend on exim4 instead of exim. (Closes: #228585) + * Make postrm not fail if /var/spool/news does not exist. (Closes: #244404) + * New patch use_system_prototypes: fixes FTBFS with gcc-3.4. + (Closes: #258959) + * Updated patch rnews_reject_reason to fix mixed use of buffered and + non-buffered I/O. + + -- Marco d'Itri Mon, 12 Jul 2004 18:33:06 +0200 + +inn (1:1.7.2debian-27) unstable; urgency=high + + * Compiled with new perl. + + -- Marco d'Itri Wed, 29 Oct 2003 11:03:57 +0100 + +inn (1:1.7.2debian-26) unstable; urgency=medium + + * Fix postinst failure on new installs. (Closes: #215586) + * Stop providing inewsinn, other packages should depend on + "inn2-inews | inews" instead. + + -- Marco d'Itri Tue, 14 Oct 2003 20:29:16 +0200 + +inn (1:1.7.2debian-25) unstable; urgency=medium + + * Merge the inewsinn package in the inn package and kill the inn-dev + package. (Closes: #210772) + + -- Marco d'Itri Sat, 27 Sep 2003 00:32:34 +0200 + +inn (1:1.7.2debian-24) unstable; urgency=medium + + * Fixed a bug introduced in 1:1.7.2debian-22 which caused the creation + of broken X-Trace headers. + * Fixed a bug in the recommend_ID patch which caused articles without + a Message-ID to be refused by innd. + * New patch: overlapping_strcpy. + * Stop creating /etc/news/organization if it does not exist, as it's + not even used by this inews. (Closes: #210470) + + -- Marco d'Itri Fri, 12 Sep 2003 13:48:50 +0200 + +inn (1:1.7.2debian-23) unstable; urgency=medium + + * Fixed the bug introduced in 1:1.7.2-14 by the path_audit patch which + caused random segfaults when hosts.nntp was reloaded. + * Fixed the innreport path in scanlogs. + * Added support for a inewsport config file option. (Closes: #54975) + * Remove /etc/news/crontab and add /etc/cron.d/inn. + * Updated the default control.ctl from ftp.isc.org. + + -- Marco d'Itri Wed, 20 Aug 2003 04:46:14 +0200 + +inn (1:1.7.2debian-22) unstable; urgency=medium + + * Package converted to DBS. + * Depends on perlapi-5.8.0. (Closes: #187716) + * inn does not need libgdbm-dev. (Closes: #199591) + * Sub-processes are now niced to 10. + * Moved send-* symlinks from /usr/lib/news/ to /usr/lib/news/bin/. + * Applied the poison patch (from rra's poison+remember_trash patch). + * Updated send-uucp.pl from INN 2.4. + * Updated innreport from INN 2.4. + * Updated default control.ctl. + * Added timer support to the perl filter. + + -- Marco d'Itri Sun, 6 Jul 2003 14:36:14 +0200 + +inn (1:1.7.2-21) unstable; urgency=medium + + * Switch back to custom memrchr() to unbreak XOVER (Closes: #169777). + * Backported controlchan support from INN 2 (Closes: #14677, #149042). + * Backported the INN 2 code to allow modifying headers in the nnrpd + perl filter. Now the body is available in $body. + * Applied two small patches by Olaf Titz to tell clients the recommended + Message-ID and have a more precise timers on usually idle systems. + * Added NNTP-Posting-Date to the list of headers which cannot be set + with POST. + * Make innreport generate valid HTML (see #166372). + * Added support for $INND_BIND_ADDRESS. + * Updated control.ctl. + * Renamed the nntpport inn.conf entry to port. + * Added support for the INN 2 bindaddress entry. + + -- Marco d'Itri Wed, 20 Nov 2002 21:47:35 +0100 + +inn (1:1.7.2-20) unstable; urgency=medium + + * Added a fix for the latest perl (Closes: #158462, #163333). + * Added a #include in lib/perl.c for the the xmalloc() prototype + (Closes: #126101). + * Clear all stamps in debian/rules (Closes: #126102). + * Brand new init script which uses ctlinnd. + + -- Marco d'Itri Thu, 26 Sep 2002 21:13:59 +0200 + +inn (1:1.7.2-19) unstable; urgency=medium + + * Fixed outdated perl dependancy (Closes: #113209). + * Does not Suggests anymore innfeed and news-reader. + * Installs gpgverify instead of pgpverify, Suggests gpg instead of pgp. + + -- Marco d'Itri Sun, 23 Sep 2001 14:02:35 +0200 + +inn (1:1.7.2-18) unstable; urgency=low + + * Fixed build dep. (Closes: #92112). + * Removed suidregister support (Closes: #84383). + + -- Marco d'Itri Fri, 6 Apr 2001 20:10:45 +0200 + +inn (1:1.7.2-17) unstable; urgency=low + + * Compiled against perl 5.6 (Closes: #80699). + * Removed misleading message from postinst (Closes: #63449). + * Start innd only if the user asked for it (Closes: #70738). + * Disabled quoting check (Closes: #58184, #58236). + * pgpverify now correctly sources /etc/news/innshellvars.pl and should + work out of the box. + * Downgraded to priority extra: most people don't need a news server + on their system! + + -- Marco d'Itri Fri, 19 Jan 2001 21:24:26 +0100 + +inn (1:1.7.2-16) frozen unstable; urgency=medium + + * Fixed RC bug in postinst (Closes: #57427, #57534). + + -- Marco d'Itri Wed, 9 Feb 2000 18:53:19 +0100 + +inn (1:1.7.2-15) frozen unstable; urgency=medium + + * README.Debian was not installed. + * A bogus /var/spool/news/\ directory was created. + * Commented description of ident protocol use in hosts.nntp(5). + * Added /t to localhost entry in hosts.nntp. + + -- Marco d'Itri Sun, 6 Feb 2000 20:53:36 +0100 + +inn (1:1.7.2-14) frozen unstable; urgency=medium + + * Comments *.foo.com in nnrp.access (Closes: #56369). + * pgpverify automatically uses GnuPG if pgpgpg is found. + * actived stdin/out/err are not opened to the console anymore. + * RNEWS_LOG_DUPS set to SYSLOG. + * LOCAL_MAX_ARTSIZE set to 2 MB. + * fixed "cant read after 0" bug in rnews. + * articles filed in in.coming/bad/ by rnews gets a X-rnews-Reject-Reason + header. + * Applied Path audit trail patch from Ian Jackson (Closes: 54201). + + -- Marco d'Itri Sat, 29 Jan 2000 17:49:01 +0100 + +inn (1:1.7.2-13) frozen unstable; urgency=medium + + * Converted to debhelper. + * Now everything installed in /etc is a conffile. + * Fixed the bug in the Distribution parsing code. + * Fixed Y2K bug. + * Patches from insync release: DBZ 3.2, bigger hash table in expire, + fastrm symlink bug, perl filter updates, timers, precommit cache, + Path feed, mmapped overview, actived. + * Patches from cleanfeed: mode.patch, messageid.patch, filter.patch. + * Applied X-Trace patch. + * Removed generation of the X-Server-Date header. + * From the BOFH patch: in filter_post() the authenticated user is + available as $user, the article body as $hdr{'__BODY__'}. If the + string returned by filter_post() starts with DROP, the article + is silently dropped. + * Updated pgpverify, control.ctl and moderators. Now pgpgpg can be + used instead of pgp. + * Innreport is used instead of innlog. + * Closes: #54609, #24504, #37737, #43896, #44918, #49673, #51944, #54526. + * Closes: #55062, #11614, #26659, #43895, #31145, #52762, #55467, #37888. + * Closes: #54411, #54759, #25181, #21586, #32416, #48739. + * Now inn is maintained by Marco d'Itri. The following changes have + been made by Bdale: + * reinstate 1.7.2 as package 'inn' and friends, the 2.2.2 bits are being + renamed to inn2, et al, as part of Debian INN peace project. + * reopen *lots* of bugs against the inn package that were closed by the + upgrade to 2.2.2, so that they can be dealt with again for 1.7.2 as + needed. + * update control file texts to point new installations to inn2 + * add a check for inn version 2.2.2 to the preinst, and suggest aborting + to select inn2 instead of inn if the user has already upgraded to 2.2.2. + + -- Marco d'Itri Sat, 22 Jan 2000 20:56:19 +0100 + +inn (1.7.2-12) unstable; urgency=low + + * update to reflect current policy + * inndstart *is* provided setuid root, closes: #51944 + * fix path in nntpsend.ctl.5, closes: #49673 + * if we're upgrading, don't stop to ask user, just use existing config + information, closes: #44918 + * deliver Install.txt instead of Install.ms into the doc directory, + closes: #43898 + + -- Bdale Garbee Sun, 5 Dec 1999 20:46:07 -0700 + +inn (1.7.2-11) unstable; urgency=high + + * patch to inews.c to fix buffer overrun problem from Martin Schulze + + -- Bdale Garbee Mon, 6 Sep 1999 13:35:19 -0600 + +inn (1.7.2-10) unstable; urgency=low + + * rebuild to depend on perl 5.005, closes 41469, 41925, 41943. + * update postinst text to eliminate version bogosity, closes 41585. + * fix sample sendbatch, closes 41596 + * fix source-archive clause in sample newsfeeds file, closes 37862. + * document nntpport, closes 28588. + * fix type of inet_addr to reflect current libc. + + -- Bdale Garbee Mon, 2 Aug 1999 01:22:23 -0600 + +inn (1.7.2-9) unstable; urgency=low + + * fold in Roman Hodek's changes from his 6.1 NMU, closing 38621. This + fixes an ugly i386 dependency in the way inn calls Perl. + * update perl dependency managment to try and cope with new perl policy + + -- Bdale Garbee Sat, 17 Jul 1999 17:13:05 -0600 + +inn (1.7.2-6) unstable; urgency=low + + * new maintainer + * clean up a few lintian complaints + * folding in changes from Christian Kurz that he called -5. We'll call this + -6 even though his changes were not widely distributed, just to avoid any + confusion: + + Removed X-Server-Date-Patch as it's not needed. + default moderation address add to /etc/news/moderators (closes: #24549) + Inn now depends on perl (closes: #27754, #32313) + Added gunbatch for gzipped batches (closes: #29899) + Changed debian/rules so inncheck runs without errors. + Added Perl-Support to Inn (closes: #26254) + Changed the examples + + -- Bdale Garbee Wed, 26 May 1999 15:18:53 -0600 + +inn (1.7.2-4) frozen unstable; urgency=medium + + * Fixes: + #21583: inn: inn must replace inewsinn + #20763: inn sends me `not running' and `now running' each night + #21342: inn: install probs + #21582: inn: incorrect prerm fail-upgrade action + #21584: inn: postinst doesn't know abort-upgrade + #20048: inn: poison and REMEMBER_TRASH patch + #21644: inn: a way to not receive certain groups + * Wrt bug #20763: the ctlinnd timeout in innwatch has been increased + to 300 seconds (5 minutes). Hopefully that is enough.. There is no + good alternative, the fact that INN is slow while renumbering is + a basic design flaw. (Though the abp-scheduler patch might help) + + -- Miquel van Smoorenburg Fri, 22 May 1998 19:52:55 +0200 + +inn (1.7.2-3) frozen unstable; urgency=medium + + * Move moderators from inewsinn to inn. The server should keep the + moderators data, not inews. + * Fix lib/clientactive.c (still yucky, but should work..) + * Include latest pgpverify script, 1.9, and manpage + * Fix security hole (/tmp/pgp$$) in pgpverify script + * Fixes: + #18579: I can't uninstall INN package + #19776: inn.prerm buggy typos bah! + #18724: inn: /etc/init.d/inn contains sed that never terminates + #19206: inn: Crontab modifications not preserved + #20423: inn: error in removing + #20653: inn: Bug in send-uucp.pl, patch included + #20792: INN: Wrong sfnet maintainer + #20436: inn: on line 16 of the prerm script there is "fi" instead of "esac" + + -- Miquel van Smoorenburg Wed, 15 Apr 1998 17:34:23 +0200 + +inn (1.7.2-2) unstable; urgency=low + + * Change over to new crontab -l method + * Fix (pre|post)(inst|rm) scripts in several ways + * Fix inewsinn inn.conf installation + * Set NNRP_DBZINCORE_DELAY to -1 + * Fix lintian warnings + Fixes: + #18120: inn: Inn's crontab file should be a conffile + + -- Miquel van Smoorenburg Thu, 19 Feb 1998 22:46:25 +0100 + +inn (1.7.2-1) unstable; urgency=low + + * New upstream version + * Fix crontab -l | tail +4 + * Fixes bugs: + #15889: /etc/news/inn.conf missing + #16128: manpage uncompressed + #15103: egrep incorrectly searched in /bin by innshellvars* + #14404: /usr/doc/$(PACKAGE)/copyright should not be compressed + + -- Miquel van Smoorenburg Thu, 5 Feb 1998 12:52:14 +0100 + +inn (1.7-1) unstable; urgency=low + + * New upstream version + * Fixed bugs: + #9264: Unresolved dependency report for inn + #9315: inn: /etc/news/innshellvars* add /usr/ucb to the PATH + #9832: INN 1.5.1-1 throttled rmgroup really shreds active file ? + #10196: inn: inews complains about missnig subject header when there is one + #10505: Moderated postings fail + #11042: error in /usr/doc/inn/inn-README + #11057: inn: Confusing/dangerous instructions + #11453: inn: max signature length + #11691: libc6 + #11851: inn: Documentation for send-uucp.pl + #11852: inn: nntpsend looks for wrong config file + #11900: INN creates `local.*' by default + #11948: inn: nntpsend does not works + #12513: inewsinn should insert a linebreak + #13161: inn-makehistory - Bus error + #13425: inn: egrep moved to /bin + #13488: inewsinn: directs user to docs in a package it doesn't require + #13616: /etc/init.d/inn, /etc/news/hosts.nntp.nolimit are not conffiles + #13781: Can't feed by send-uucp.pl with ihave/sendme. + #13831: inn: scanlogs depends on hard coded path for egrep + #13899: inn: inn uses /usr/bin/egrep, grep doesn't provide that any longer + * Added BUFFSET fix + + -- Miquel van Smoorenburg Wed, 22 Oct 1997 14:08:37 +0200 + +inn (1.5.1-5) unstable; urgency=high + + * Fixed sendbatch script (comment in between backtics is illegal) + * libc6 version + + -- Miquel van Smoorenburg Wed, 10 Sep 1997 16:31:37 +0200 + +inn (1.5.1-4) stable unstable; urgency=high + + * Add new security patch (with fixed STRCPY): inn-1.5.1-bufferoverflow.patch4 + * Applied null-pointer.patch from Michael Shields + * Upped SIG_MAXLINES in configdata.h to 8 + * Fix inn-README (perl example). Fixes bug #11042 + * Update inn-README and postinst to fix bug #11057 + * Make ctlinnd addhist work in paused mode, and fail in throttled mode + * Change ID string + + -- Miquel van Smoorenburg Thu, 21 Aug 1997 12:37:48 +0200 + +inn (1.5.1-3) stable unstable; urgency=high + + * Add changelogs to docdir + * innshellvars*: change /usr/ucb -> /usr/sbin (Bug#9315) + * Changed Recommends: pgp to Suggests: (Bug#9264) + * Fix inews to fallback on local moderators file (Bug#10505) + * Fix buffer overruns all over the place + + -- Miquel van Smoorenburg Thu, 24 Jul 1997 18:29:33 +0200 + +inn (1.5.1-2) frozen unstable; urgency=high + + * Added security-patch.05 (mailx tilde exploit) + * inewsinn no longer conflicts: inn so installation should no + longer remove your original inn-1.4 package (and configuration). + Expect some dpkg trouble when upgrading from 1.4unoff4 to 1.5.1-2 though. + * Always create .incoming/.outgoing symlinks for backwards compat. + * Do not change ownerships/modes of existing directories + * Fix ownerships/modes of rnews, innd, inndstart, in.nnrpd + * Fix /etc/init.d/inn to comply with console messages standard + * Fix /usr/lib/news/bin/sendbatch + * Fix scanlogs not to nuke active file if log/news/OLD isn't there + * Console messages are a bit more standard now + * Use start-stop-daemon to kill innwatch in /etc/init.d/inn + * Fixed up inncheck - it almost doesn't complain anymore + + -- Miquel van Smoorenburg Mon, 28 Apr 1997 13:58:16 +0200 + +inn (1.5.1-1) unstable; urgency=low + + * Upgraded to 1.5.1 + * Fixed Bug#6387: expire-with-symlinks problem + * Fixed Bug#6246: inewsinn reconfigures on update + * Moved /var/spool/news,/var/lib/news back into package + * Saves removed conffiles in preinst, restores in postinst + * Set LIKE_PULLERS to DO + * Remove manpage stubs that are now real manpages + * Fix options to sendmail in _PATH_SENDMAIL + * Removed subdirectories from debian/ + * create /var/log/news/OLD in postinst + * Fixed most if not all other outstanding bugs + + -- Miquel van Smoorenburg Wed, 5 Feb 1997 10:58:16 +0100 + +inn (1.5-1) unstable; urgency=low + + * Upgraded to 1.5 + * Undid most patches to 1.4unoff4 because they are in 1.5 proper. + * Added security patch + * Added X-Server-Date: patch + * inn now depends on inewsinn + * Fixed all other outstanding bugs (well, almost). + + -- Miquel van Smoorenburg Tue, 17 Dec 1996 16:56:37 +0100 + +inn (1.4unoff4-2) unstable; urgency=low + + * Added inn-dev package for libinn.a and manpages. + * Increased hash table size in expire.c to 2048 (was 128) + * Moved ctlinnd to /usr/sbin + * Moved to new source packaging scheme + + -- Miquel van Smoorenburg Wed, 06 Oct 1996 15:38:30 +0200 + +INN (1.4unoff4-1) - Miquel van Smoorenburg + + * Took out the Linux 1.2 patches I put in unoff3. + * added the 64 bits patch (for Linux/Alpha) + * There are some other minor patches for Linux/Alpha + * Added "xmode" as alias for "mode" + * Using MMAP and setsockopt() now - NEEDS 1.3 kernel ! + +INN (1.4unoff3-1) - Miquel van Smoorenburg + + * Took inn1.4sec-8 and 1.4unoff3, folded in some Linux and + other patches. + * Changed all makefiles to support a "prefix" variable for install + * Removed the hacks in debian.rules for installation + * Locks are in /var/run/innd + * Rewrote post install script. + +inn (1.4sec-8); priority=MEDIUM + + * postinst configuration completely redone. It now sets up a minimal + local installation for you. + * prerm now exists and shuts the server down. + * init scripts changed to System V scheme. + * Descriptions in control files expanded. + * Package now contains /var/lock/news, and uses /var/log (not /var/adm). + * inewsinn postinst looks at and can write /etc/mailname. + +INN 1.4sec Debian 7 - iwj + +* libinn.a, , inn-sys2nf and inn-feedone installed + (in /usr/lib, /usr/include and /usr/bin). + +INN 1.4sec Debian 6 - iwj + +* innwatch now started by /etc/rc.misc/news. +* inewsinn postinst minor typos fixed. +* Leftover file `t' removed from source and diff distributions. + +INN 1.4sec Debian 5 - iwj + +* Added documentation about making active and history files. +* Added monthly makehistory -ru crontab run. +* Made postinst always do crontab -u news /etc/news/crontab . +* Removed HAVE_UNIX_DOMAIN - AF_UNIX+SOCK_DGRAM still broken in Linux. +* Fixed /usr/lib/news/bin/inncheck to conform to our permissions scheme. +* Added manpage links for makeactive(8), makehistory(8), newsrequeue(8). +* /var/adm/news now part of package. + +INN 1.4sec Debian 4 - iwj + +* Added $|=1 to inewsinn postinst script; a few cosmetic fixes. + +INN 1.4sec Debian 3 - iwj + +* Removed `inet' groups from distrib.pats. +* Put more version number information in ../*.{deb,gz} filenames. +* Added Package_Revision field to `control' file. +* Rationalised debian.rules somewhat, and added `build' stamp file. +* Permissions rationalised. +* Changed /etc/rc.d/rc.news to /etc/rc.misc/news. +* postinst calls Perl as /usr/bin/perl. +* Added this Changelog. + +INN 1.4sec Debian 2 - iwj +* inews moved to /usr/bin; rnews moved to /usr/sbin. +* fixed nntpsend not to use PPID variable (it's a bash builtin). + +INN 1.4sec Debian 1 - iwj +Initial release, completely untested. --- inn-1.7.2q.orig/debian/patches/inewsport +++ inn-1.7.2q/debian/patches/inewsport @@ -0,0 +1,16 @@ +diff -ruN inn-1.7.2.orig/frontends/inews.c inn-1.7.2/frontends/inews.c +--- inn-1.7.2.orig/frontends/inews.c 2003-08-20 03:17:50.000000000 +0200 ++++ inn-1.7.2/frontends/inews.c 2003-08-20 03:17:44.000000000 +0200 +@@ -1306,6 +1306,12 @@ + break; + } + ++ /* Figure the server port. */ ++ if ((p = GetConfigValue("inewsport")) != NULL) { ++ extern char *nntp_port; ++ nntp_port = COPY(p); ++ } ++ + /* Try to open a connection to the server. */ + if (NNTPremoteopen(&FromServer, &ToServer, buff) < 0) { + Spooling = TRUE; --- inn-1.7.2q.orig/debian/patches/use_system_prototypes +++ inn-1.7.2q/debian/patches/use_system_prototypes @@ -0,0 +1,74 @@ +diff -ruNp inn-1.7.2.orig/include/configdata.h inn-1.7.2/include/configdata.h +--- inn-1.7.2.orig/include/configdata.h 2006-08-19 10:34:34.000000000 +0200 ++++ inn-1.7.2/include/configdata.h 2006-08-19 10:34:30.000000000 +0200 +@@ -39,7 +39,7 @@ typedef char *CSTRING; + #else + #if defined(__GNUC__) + /* GCC */ +-#define NORETURN volatile void ++#define NORETURN __attribute__((noreturn)) void + #else + /* Everyone else */ + #define NORETURN void +diff -ruNp inn-1.7.2.orig/include/clibrary.h inn-1.7.2/include/clibrary.h +--- inn-1.7.2.orig/include/clibrary.h 2004-07-12 18:59:24.000000000 +0200 ++++ inn-1.7.2/include/clibrary.h 2004-07-12 18:59:17.000000000 +0200 +@@ -96,6 +96,7 @@ typedef struct _FDSET { + /* =()<#define FREEVAL @@>()= */ + #define FREEVAL void + ++#ifdef THIS_IS_2004_AND_I_HAVE_BROKEN_HEADERS + extern int optind; + extern char *optarg; + #if !defined(__STDC__) +@@ -149,3 +150,4 @@ extern void _exit(); + #if defined(DO_HAVE_SETPROCTITLE) + extern void setproctitle(); + #endif /* defined(DO_HAVE_SETPROCTITLE) */ ++#endif /* THIS_IS_2004_AND_I_HAVE_BROKEN_HEADERS */ +diff -ruNp inn-1.7.2.orig/innd/innd.h inn-1.7.2/innd/innd.h +--- inn-1.7.2.orig/innd/innd.h 2004-07-12 18:59:24.000000000 +0200 ++++ inn-1.7.2/innd/innd.h 2004-07-12 18:58:32.000000000 +0200 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include "nntp.h" + #include "paths.h" +diff -ruNp inn-1.7.2.orig/nnrpd/nnrpd.h inn-1.7.2/nnrpd/nnrpd.h +--- inn-1.7.2.orig/nnrpd/nnrpd.h 2004-07-12 18:59:24.000000000 +0200 ++++ inn-1.7.2/nnrpd/nnrpd.h 2004-07-12 18:59:17.000000000 +0200 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #if defined(DO_NEED_TIME) + #include + #endif /* defined(DO_NEED_TIME) */ +diff -ruNp inn-1.7.2.orig/config/subst.c inn-1.7.2/config/subst.c +--- inn-1.7.2.orig/config/subst.c 2006-08-19 10:42:28.000000000 +0200 ++++ inn-1.7.2/config/subst.c 2006-08-19 10:42:14.000000000 +0200 +@@ -3,6 +3,8 @@ + ** A C version of Henry Spencer's "subst" script. + */ + #include ++#include ++#include + #include + #include + +@@ -33,9 +35,11 @@ static char *argv0; + extern char *optarg; + extern int optind; + ++#ifdef THIS_IS_2004_AND_I_HAVE_BROKEN_HEADERS + extern void exit(); + extern char *malloc(); + extern char *strcpy(); ++#endif + + + --- inn-1.7.2q.orig/debian/patches/wildmat.3 +++ inn-1.7.2q/debian/patches/wildmat.3 @@ -0,0 +1,12 @@ +--- inn-1.7.2.orig/doc/wildmat.3 ++++ inn-1.7.2/doc/wildmat.3 +@@ -10,6 +10,9 @@ + .B " char *pattern;" + .fi + .SH DESCRIPTION ++.I Wildmat is part of ++.B libinn ++(3). + .I Wildmat + compares the + .I text --- inn-1.7.2q.orig/debian/patches/0_insync_overscream +++ inn-1.7.2q/debian/patches/0_insync_overscream @@ -0,0 +1,584 @@ +--- inn-1.7.2.orig/nnrpd/article.c ++++ inn-1.7.2/nnrpd/article.c +@@ -8,6 +8,17 @@ + #include "clibrary.h" + #include "nnrpd.h" + ++/* ++ * OVERSCREAM - to make the overview database screaming fast, and because ++ * I scream in terror about the previous implementation. ++ * See http://www.xs4all.nl/~johnpc/inn/ for more information on this patch. ++ */ ++ ++#ifdef OVERSCREAM ++# include ++# include ++#endif /* OVERSCREAM */ ++ + + /* + ** Data structures for use in ARTICLE/HEAD/BODY/STAT common code. +@@ -61,11 +72,33 @@ + /* + ** Overview state information. + */ ++#ifdef OVERSCREAM ++ ++STATIC caddr_t OVERshm = (caddr_t) NULL; /* location of mmap */ ++STATIC size_t OVERsize; /* size of mmap */ ++STATIC size_t OVERmsize; /* real size of mmap */ ++STATIC int OVERfd; /* fd of file */ ++STATIC ARTNUM OVERfirst, OVERlast; /* first/last entries */ ++STATIC int OVERopens; /* Number of opens done */ ++STATIC char* OVERcache; /* cached position */ ++STATIC ARTNUM OVERprev; /* previous found art */ ++#define LINSEARCH 5 /* linear search range */ ++#define MIDSKEW 0.1 /* 10% bias toward middle */ ++ ++STATIC int mmapsuck; /* did we syslog already */ ++#define YOUR_MMAP_SUCKS if ( ! mmapsuck++ ) \ ++ syslog(L_NOTICE, "Your mmap() implementation sucks.") ++ ++#else /* !OVERSCREAM */ ++ + STATIC QIOSTATE *OVERqp; /* Open overview file */ + STATIC char *OVERline; /* Current line */ + STATIC ARTNUM OVERarticle; /* Current article */ + STATIC int OVERopens; /* Number of opens done */ + ++#endif ++ ++ + + /* + ** Read the overview schema. +@@ -691,6 +724,10 @@ + register int i; + ARTOVERFIELD *fp; + char *next; ++#ifdef OVERSCREAM ++ char* eol = strchr(p, '\n'); ++#endif ++ + + fp = &ARTfields[field - 1]; + +@@ -698,8 +735,13 @@ + field = ARTfirstfullfield; + + /* Skip leading headers. */ +- for (; --field >= 0 && *p; p++) ++ for (; --field >= 0 && *p && *p != '\n'; p++) ++#ifdef OVERSCREAM ++ if ((p = memchr(p, '\t', OVERsize - (p - OVERshm))) == NULL || ++ p > eol ) ++#else + if ((p = strchr(p, '\t')) == NULL) ++#endif + return NULL; + if (*p == '\0') + return NULL; +@@ -717,10 +759,22 @@ + } + + /* Figure out length; get space. */ ++ ++#ifdef OVERSCREAM ++ if ((next = memchr(p, '\t', OVERsize - (p - OVERshm))) != NULL && ++ p < eol ) ++ i = next - p; ++ else ++ i = eol - p; ++ ++#else /* !OVERSCREAM */ ++ + if ((next = strchr(p, '\t')) != NULL) + i = next - p; + else + i = strlen(p); ++#endif ++ + if (buffsize == 0) { + buffsize = i; + buff = NEW(char, buffsize + 1); +@@ -735,6 +789,430 @@ + return buff; + } + ++#ifdef OVERSCREAM ++ ++/* ++ * helper function, search backwards in memory ++ */ ++ ++STATIC char* ++inn_memrchr(p, c, l) ++ register char* p; ++ register char c; ++ register int l; ++{ ++ for (; l--; --p) ++ if ( *p == c ) ++ return(p); ++ return(NULL); ++} ++ ++/* ++ * mmap an OVERVIEW file. ++ */ ++ ++STATIC BOOL ++OVERopen() ++{ ++ char name[SPOOLNAMEBUFF]; ++ struct stat sb; ++ char* p; ++ static int pagesize = 0; ++ ++ /* return true if already mapped */ ++ if ( OVERshm ) { ++ return TRUE; ++ } ++ /* return false if already failed */ ++ if ( OVERopens++ ) { ++ return FALSE; ++ } ++ /* get memory pagesize if we don't have it already */ ++ if ( ! pagesize && ! ++#ifdef _SC_PAGE_SIZE ++ (pagesize = sysconf(_SC_PAGE_SIZE)) ++#else ++# ifdef _SC_PAGESIZE ++ (pagesize = sysconf(_SC_PAGESIZE)) ++# else ++ (pagesize = getpagesize()) ++# endif ++#endif ++ ) { ++ syslog(L_NOTICE, "%s: Can't getpagesize", ClientHost); ++ return FALSE; ++ } ++ /* mmap the file */ ++ (void)sprintf(name, "%s/%s/%s", _PATH_OVERVIEWDIR, GRPlast, _PATH_OVERVIEW); ++ if ( (OVERfd = open(name, O_RDONLY)) < 0 ) { ++ /* no overview file */ ++ syslog(L_NOTICE, "%s can't open %s: %m", ClientHost, name); ++ return FALSE; ++ } ++ if ( fstat(OVERfd, &sb) == -1 ) { ++ syslog(L_NOTICE, "%s can't stat %s: %m", ClientHost, name); ++ (void)close(OVERfd); ++ return FALSE; ++ } ++ if ( (OVERsize = sb.st_size) <= 1 ) { ++ syslog(L_NOTICE, "%s: %s is too small", ClientHost, name); ++ (void)close(OVERfd); ++ return FALSE; ++ } ++ OVERmsize = (OVERsize + pagesize - 1) & ~(pagesize - 1); ++ if ( (OVERshm = mmap(NULL, OVERmsize, PROT_READ, MAP_SHARED, OVERfd, 0)) ++ == (caddr_t) -1 ) ++ { ++ syslog(L_NOTICE, "%s can't mmap %s: %m", ClientHost, name); ++ (void)close(OVERfd); ++ OVERshm = NULL; ++ return FALSE; ++ } ++ /* get first entry */ ++ if ( (OVERfirst = atol((char*) OVERshm)) == 0 ) { ++ syslog(L_NOTICE, "%s: %s: bad format", ClientHost, name); ++ (void)munmap(OVERshm, OVERmsize); ++ (void)close(OVERfd); ++ OVERshm = NULL; ++ return FALSE; ++ } ++ ++ /* get last entry */ ++ if ( *(OVERshm + OVERsize - 1) != '\n' ) { ++ /* ++ * If you get here, then your mmap() implementation sucks. ++ * Go complain with your OS vendor, that their mmap() can't ++ * do mmap()ing of growing files properly. ++ * We try to find a decent record near the end, for the poor ++ * sobs without proper mmap. There are a lot of other places ++ * in the code with hacks for bad mmap(). Mainly because I'm ++ * one of the poor sobs :( ++ */ ++ YOUR_MMAP_SUCKS; ++ } ++ do { ++ /* ++ * Try to find any newline. If there isn't any, the entire file ++ * is crap. Normally this finds the newline right at the end. ++ */ ++ p = inn_memrchr(OVERshm + OVERsize - 1, '\n', OVERsize - 1); ++ if ( p == NULL ) { ++ /* overview file only contains garbage. */ ++ (void)munmap(OVERshm, OVERmsize); ++ (void)close(OVERfd); ++ OVERshm = NULL; ++ return FALSE; ++ } ++ OVERsize = p - OVERshm + 1; ++ if ( (p = inn_memrchr((char*) OVERshm + OVERsize - 2, '\n', ++ OVERsize - 2)) == NULL ) ++ { ++ /* Apparently only 1 (usable) line */ ++ OVERlast = OVERfirst; ++ OVERcache = NULL; ++ return TRUE; ++ } ++ OVERlast = atol(p+1); ++ } ++ while ( OVERlast == 0 && --OVERsize ); ++ ++ if ( !OVERsize ) { ++ (void)munmap(OVERshm, OVERmsize); ++ (void)close(OVERfd); ++ OVERshm = NULL; ++ return FALSE; ++ } ++ ++ OVERcache = NULL; ++ return TRUE; ++} ++ ++/* ++ * Close an overview file, if any. ++ */ ++ ++void ++OVERclose() ++{ ++ if ( OVERshm ) { ++ if ( munmap(OVERshm, OVERmsize) == -1 ) { ++ syslog(L_NOTICE, "%s can't munmap: %m", ClientHost); ++ } ++ (void)close(OVERfd); ++ OVERshm = NULL; ++ } ++ OVERopens = 0; ++} ++ ++/* ++ * find an overview article using binary search in the overview file. ++ * Returns a pointer to the actual line in the overview file (so it's ++ * !!NOT!! null terminated, and can't be written to!!), or NULL on failure. ++ */ ++ ++STATIC char* ++OVERfind(artnum) ++ ARTNUM artnum; ++{ ++ char* bottom; ++ char* top; ++ ARTNUM bottomnr; ++ ARTNUM topnr; ++ char* pos; ++ ARTNUM nr; ++ int i; ++ ++ /* default startpos */ ++ bottom = OVERshm; ++ bottomnr = OVERfirst; ++ top = OVERshm + OVERsize - 1; ++ topnr = OVERlast; ++ ++ if ( OVERcache ) { ++ /* ++ * for speedy sequential access. OVERcache, if non-NULL, points to ++ * the "next" entry. OVERprev is the previous article number found. ++ * Also check for sucking mmap() implementations. ++ */ ++ if ( *OVERcache == '\0' ) { ++ YOUR_MMAP_SUCKS; ++ OVERcache = memchr(OVERcache, '\n', ++ OVERsize - (OVERshm - OVERcache)); ++ if ( OVERcache == NULL || OVERcache == OVERshm + OVERsize - 1 ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ OVERcache++; ++ } ++ nr = atol(OVERcache); ++ if ( nr < OVERfirst || nr > OVERlast ) { ++ /* boo */ ++ OVERcache = NULL; ++ return NULL; ++ } ++ if ( nr == artnum ) { ++ pos = OVERcache; ++ goto bingo; /* calculate next OVERcache + return. (EW! a goto! :) */ ++ } ++ else if ( artnum > nr ) { ++ /* treat cache as first binary search */ ++ bottom = OVERcache; ++ bottomnr = nr; ++ } ++ else { ++ /* cache is first top */ ++ top = OVERcache - 1; ++ topnr = nr - 1; ++ if ( artnum > OVERprev ) { ++ /* ++ * optimization: we're searching for something that isn't ++ * in the database, but we want to keep the cache clean. ++ * this occurs when we think an article is there, but it ++ * really isn't, eg. because NOSCANDIR is on, or simply ++ * because the overview database leaks. ++ */ ++ return(NULL); ++ } ++ } ++ } ++ ++ /* sanity check */ ++ if ( artnum < bottomnr || artnum > topnr ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ ++ for (;;) { ++ /* ++ * This is the binary search loop, there are about a zillion ++ * exits so I found it neater to code it in an endless loop :) ++ * It simply continues until it is either found or it isn't... ++ * ++ * Note that we don't do a real binary search, but we guess ++ * a position using the fact that the overview database usually ++ * contains a reasonably linear range of articles, without any ++ * big leaps, but we skew it a bit towards the middle to prevent ++ * slow convergence in boundary cases (see also below). ++ * ++ * We switch to linear searching when we're "close", ++ * because on short ranges, linear searches are about as fast ++ * (or faster) anyway. LINSEARCH is currently guessed at 5, ++ * because on average it takes 2.5 searches using a linear search, ++ * where it usually takes 3 "straight" binary searches. ++ * ++ * Unfortunately, we can't be sure we get into linear search when ++ * we're close, because the database may have large holes. ++ */ ++ /* test if it's near the bottom */ ++ if ( artnum < bottomnr + LINSEARCH ) { ++ i = 0; ++ while ( artnum > bottomnr && i++ < LINSEARCH ) { ++ /* search next line */ ++ bottom = memchr(bottom, '\n', OVERsize - (bottom - OVERshm)); ++ if ( bottom == NULL || bottom == top + 1 ) { ++ /* reached end of file */ ++ OVERcache = NULL; ++ return NULL; ++ } ++ if ( *++bottom == 0 ) { ++ YOUR_MMAP_SUCKS; ++ continue; ++ } ++ bottomnr = atol(bottom); ++ if ( bottomnr < OVERfirst || bottomnr > OVERlast ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ } ++ if ( artnum == bottomnr ) { ++ pos = bottom; ++ goto bingo; /* calculate next OVERcache + return. */ ++ } ++ else { ++ /* didn't find it, but we came close. still cache position */ ++ OVERcache = bottom; ++ OVERprev = artnum; ++ return NULL; ++ } ++ /*NOTREACHED*/ ++ } ++ /* test if it's near the top */ ++ if ( artnum > topnr - LINSEARCH ) { ++ /* ++ * topnr is frequently guessed, so we must first determine it ++ * correctly. The fun part about searching backwards is that ++ * the next position (OVERcache) follows easily... ++ */ ++ i = 0; ++ do { ++ OVERcache = (top == OVERshm + OVERsize - 1) ? NULL : top + 1; ++ if ( (top = inn_memrchr(--top, '\n', top - OVERshm)) ++ == NULL || top + 1 == bottom ) ++ { ++ /* search hit bottom */ ++ OVERcache = NULL; ++ return NULL; ++ } ++ if ( *(top + 1) == 0 ) { ++ YOUR_MMAP_SUCKS; ++ /* make sure we continue */ ++ topnr = artnum + 1; ++ continue; ++ } ++ topnr = atol(top + 1); ++ if ( topnr < OVERfirst || topnr > OVERlast ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ } ++ while ( artnum < topnr && i++ < LINSEARCH ); ++ if ( artnum == topnr ) { ++ /* bingo. This time we know OVERcache already */ ++ OVERprev = artnum; ++ return(top + 1); ++ } ++ else { ++ /* not found, but close. cache position */ ++ OVERprev = artnum; ++ return NULL; ++ } ++ /*NOTREACHED*/ ++ } ++ ++ /* ++ * now for the real binary search: ++ * Estimate the position of artnum, but with a small offset towards ++ * the middle, for better convergence in case the set of articles ++ * is non-linear (you get a straight binary search if MIDSKEW is 1.0). ++ * MIDSKEW is currently determined using a big thumb, occultism, ++ * astrology, cat /dev/uri-geller and some common sense (but not much) ++ * MIDSKEW == 0.0 makes the search take only 1 iteration in case ++ * the overview database is a monotonous array of lines with equal ++ * length, but can make for really lousy searches in anything not like ++ * the above, which, in the real world, is practically always. ++ * MIDSKEW == 1.0 gives you a true binary search without any guessing ++ * whatsoever. ++ * I thought 10% would be good enough. Only riggid testing can ++ * determine the optimal value, and then it still depends on a lot ++ * of settings, like expire times, user newsgroups preference, ++ * presence of cancelbots or cancelwars, frequency of expireover ++ * runs... need I say more? :) ++ */ ++ if ( topnr <= bottomnr ) { ++ /* Safety net. This REALLY should never happen. */ ++ syslog(L_NOTICE, ++ "%s: ASSERTION FAILED: %d < %d looking for %d in %s", ++ ClientHost, topnr, bottomnr, artnum, GRPlast); ++ } ++ pos = bottom + (int) ((double) (top - bottom) * (MIDSKEW * 0.5) + ++ (top - bottom) * (1.0 - MIDSKEW) * ++ (artnum - bottomnr) / (topnr - bottomnr)); ++ /* search forward for newline */ ++ if ( (pos = memchr(pos, '\n', OVERsize - (pos - OVERshm))) == NULL ) { ++ /* this shouldn't happen */ ++ OVERcache = NULL; ++ return NULL; ++ } ++ if ( pos == top ) { ++ /* hmm... */ ++ if ( (pos = inn_memrchr(--pos, '\n', pos - OVERshm)) ++ == NULL || pos == bottom - 1 ) ++ { ++ /* ++ * This is what happens when there's a large hole and we're ++ * looking for something inside the hole (which isn't there). ++ * still record the position in this case... ++ */ ++ OVERcache = (top == OVERshm + OVERsize - 1) ? NULL : top + 1; ++ OVERprev = artnum; ++ return NULL; ++ } ++ } ++ /* see where we are */ ++ if ( *++pos == 0 ) { ++ YOUR_MMAP_SUCKS; ++ pos = memchr(pos, '\n', OVERsize - (pos - OVERshm)); ++ if ( pos == NULL || pos == OVERshm + OVERsize - 1 || pos == top ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ pos++; ++ } ++ nr = atol(pos); ++ if ( nr < OVERfirst || nr > OVERlast ) { ++ OVERcache = NULL; ++ return NULL; ++ } ++ if ( nr == artnum ) { ++ /* bingo. Set cache to next entry */ ++bingo: ++ OVERcache = memchr(pos, '\n', OVERsize - (pos - OVERshm)); ++ if ( OVERcache == OVERshm + OVERsize - 1 ) ++ OVERcache = NULL; ++ else if ( OVERcache ) ++ OVERcache++; ++ OVERprev = artnum; ++ return (pos); ++ } ++ if ( nr < artnum ) { ++ /* found a new bottom */ ++ bottom = pos; ++ bottomnr = nr; ++ } ++ else /* nr > artnum */ { ++ /* ++ * found a new top. Setting topnr to nr-1 is not entirely ++ * correct, but who cares. (In fact we do care, but adjust ++ * later :) ++ */ ++ top = pos - 1; ++ topnr = nr - 1; ++ } ++ } ++ /*NOTREACHED*/ ++} ++ ++#else /* !OVERSCREAM */ + + /* + ** Open an OVERVIEW file. +@@ -771,7 +1249,7 @@ + if (OVERqp != NULL) { + QIOclose(OVERqp); + OVERqp = NULL; +- OVERopens = 0; ++ OVERopens = 0; /* this is a bug */ + } + } + +@@ -794,7 +1272,7 @@ + } + + for ( ; OVERarticle < artnum; OVERarticle = atol(OVERline)) +- if ((OVERline = QIOread(OVERqp)) == NULL) { ++ while ((OVERline = QIOread(OVERqp)) == NULL) { + if (QIOtoolong(OVERqp)) + continue; + /* Don't close file; we may rewind. */ +@@ -804,6 +1282,8 @@ + return OVERarticle == artnum ? OVERline : NULL; + } + ++#endif ++ + + /* + ** Read an article and create an overview line without the trailing +@@ -1093,12 +1573,22 @@ + if (ARTfind(i) < 0) + continue; + ++ /*OVERVIEWcount++;*/ + if (Opened && (p = OVERfind(i)) != NULL) { ++#ifdef OVERSCREAM ++ char* eol = memchr(p, '\n', OVERsize - (p - OVERshm)); ++ if ( eol == NULL ) ++ continue; /* this should NEVER NEVER EVER NEVER EVER happen */ ++ fwrite(p, 1, eol - p, stdout); ++ fwrite("\r\n", 1, 2, stdout); ++#else + Printf("%s\r\n", p); ++#endif + continue; + } + + (void)sprintf(buff, "%ld", i); ++ /*OVERGENcount++;*/ + if ((p = OVERgen(buff)) != NULL) + Printf("%s\r\n", p); + } --- inn-1.7.2q.orig/debian/patches/sendbatch +++ inn-1.7.2q/debian/patches/sendbatch @@ -0,0 +1,43 @@ +--- inn-1.7.2.orig/samples/sendbatch ++++ inn-1.7.2/samples/sendbatch +@@ -7,7 +7,7 @@ + . /var/news/etc/innshellvars + + ## Place to run a df, and amount of space needed. +-UUSPOOL=/usr/spool/uucp ++UUSPOOL=/var/spool/uucp + SPOOLFREE=20000 + ## Program names and flags. Most can be set on the command-line. + C7= +@@ -143,12 +143,16 @@ + + ## Check free space on the partition? + if [ -n "${UUSPOOL}" ] ; then +- FREE=`(cd ${UUSPOOL}; df . | ${AWK} ' +- $6 == "'${UUSPOOL}'" { print $4 ; exit } +- $1 == "'${UUSPOOL}'" && NF == 7 { print $4 ; exit } +- $2 == "'${UUSPOOL}'" { print $5 ; exit } +- $1 == "'${UUSPOOL}'" { print $3 ; exit } +- ')` ++# FREE=`(cd ${UUSPOOL}; df . | ${AWK} ' ++# $6 == "'${UUSPOOL}'" { print $4 ; exit } ++# $1 == "'${UUSPOOL}'" && NF == 7 { print $4 ; exit } ++# $2 == "'${UUSPOOL}'" { print $5 ; exit } ++# $1 == "'${UUSPOOL}'" { print $3 ; exit } ++# ')` ++## =()< POS=@@>()= ++ POS=4 ++ DOLLAR="$" ++ FREE=`${INNDF} ${UUSPOOL} | ${AWK} "/^\// { print ${DOLLAR}${POS}; exit }"` + if [ -n "${FREE}" -a "${FREE}" -lt ${SPOOLFREE} ] ; then + echo "${PROG}: No space on ${UUSPOOL} for ${SITE} (${FREE})." + rm -f ${LOCK} +@@ -166,7 +170,7 @@ + + else + ## Get queue size from uuq command. +- QUEUE=`uuq -l -s${SITE} | ${AWK} '{print $4; exit }'` ++ QUEUE=`uuq -l -s${SITE} 2>/dev/null | ${AWK} '{print $4; exit }'` + fi + test -z "${QUEUE}" && QUEUE=0 + if [ "${QUEUE}" -gt ${BYTESQUEUED} ] ; then --- inn-1.7.2q.orig/debian/patches/send-uucp +++ inn-1.7.2q/debian/patches/send-uucp @@ -0,0 +1,19 @@ +--- inn-1.7.2.orig/samples/send-uucp ++++ inn-1.7.2/samples/send-uucp +@@ -89,11 +89,12 @@ + ## Get the compression flags. + echo "${PROGNAME}: [$$] begin ${SITE}" + case "${SITE}" in +- esca) +- COMPRESS="compress -b12" +- ;; ++# esca) ++# COMPRESS="compress -b12" ++# ;; + *) +- COMPRESS="compress" ++ # The default is set in innshelvars ++ # COMPRESS="compress" + ;; + esac + --- inn-1.7.2q.orig/debian/patches/0_insync_largerhash +++ inn-1.7.2q/debian/patches/0_insync_largerhash @@ -0,0 +1,11 @@ +--- inn-1.7.2.orig/expire/expire.c ++++ inn-1.7.2/expire/expire.c +@@ -26,7 +26,7 @@ + */ + #define NGH_HASH(Name, p, j) \ + for (p = Name, j = 0; *p; ) j = (j << 5) + j + *p++ +-#define NGH_SIZE 2048 ++#define NGH_SIZE 4096 + #define NGH_BUCKET(j) &NGHtable[j & (NGH_SIZE - 1)] + + typedef struct _BUFFER { --- inn-1.7.2q.orig/debian/patches/rnews_reject_reason +++ inn-1.7.2q/debian/patches/rnews_reject_reason @@ -0,0 +1,19 @@ +diff -ruN inn-1.7.2.orig/frontends/rnews.c inn-1.7.2/frontends/rnews.c +--- inn-1.7.2.orig/frontends/rnews.c 2004-07-12 18:29:17.000000000 +0200 ++++ inn-1.7.2/frontends/rnews.c 2004-07-12 18:29:07.000000000 +0200 +@@ -207,6 +207,15 @@ + syslog(L_ERROR, "cant fopen %s %m", buff); + return; + } ++ { ++ char h[1024], r[1024]; ++ int len; ++ sprintf(r, reason, arg); ++ sprintf(h, "X-rnews-Reject-Reason: %s\n", r); ++ len = strlen(h); ++ if (fwrite(h, 1, len, F) != len) ++ syslog(L_ERROR, "cant fwrite %s %m", buff); ++ } + i = strlen(article); + if (fwrite((POINTER)article, (SIZE_T)1, (SIZE_T)i, F) != i) + syslog(L_ERROR, "cant fwrite %s %m", buff); --- inn-1.7.2q.orig/debian/patches/addhist +++ inn-1.7.2q/debian/patches/addhist @@ -0,0 +1,50 @@ +INN can destroy the history database when paused or throttled, because the +history database is closed when INN is in such a mode. It does try to open +the history database briefly, but that's too late. + +This patch fixes that: it refuses to do an addhist when the server is throttled, +and it does it in the right way when the server is paused. + +Miquel van Smoorenburg , 21-Aug-1997 + +--- /project/tmp/inn-1.5.1/innd/cc.c Sat Nov 30 00:32:18 1996 ++++ inn-1.5.1/innd/cc.c Thu Aug 21 12:36:58 1997 +@@ -232,8 +232,19 @@ + /* Check the fields. */ + if ((p = CCgetid(av[0], &Data.MessageID)) != NULL) + return p; +- if (HIShavearticle(Data.MessageID)) ++ ++ /* If throttled, don't try to use the history database. */ ++ if (Mode == OMthrottled) ++ return "1 Server throttled"; ++ ++ /* If paused, briefly open the history database. */ ++ if (Mode != OMrunning) ++ HISsetup(); ++ ++ if (HIShavearticle(Data.MessageID)) { ++ if (Mode != OMrunning) HISclose(); + return "1 Duplicate"; ++ } + if (strspn(av[1], DIGITS) != strlen(av[1])) + return "1 Bad arrival date"; + Data.Arrived = atol(av[1]); +@@ -244,14 +255,10 @@ + return "1 Bad posted date"; + Data.Posted = atol(av[3]); + +- if (Mode == OMrunning) +- ok = HISwrite(&Data, av[4]); +- else { +- /* Possible race condition, but documented in ctlinnd manpage. */ +- HISsetup(); +- ok = HISwrite(&Data, av[4]); ++ ok = HISwrite(&Data, av[4]); ++ if (Mode != OMrunning) + HISclose(); +- } ++ + return ok ? NULL : "1 Write failed"; + } + --- inn-1.7.2q.orig/debian/patches/clientactive.c +++ inn-1.7.2q/debian/patches/clientactive.c @@ -0,0 +1,23 @@ +When posting an article with inews, first the active file is gotten from +the server. Then inews tries to read the distrib.pats file from the server +using CA_listopen. If that _fails_ (no remote copy and no local copy) CAclose +is called by CA_listopen, and CApathname is removed and CAfp closed. Ofcourse +those static variables are references to the active file opened with CAopen().. + +The following patch fixes this, but IMO CApathname and CAfp should not +be used at all. + +Miquel van Smoorenburg , 23-Mar-1998 + +--- inn-1.7.2/lib/clientactive.c.orig Mon Mar 23 17:15:54 1998 ++++ inn-1.7.2/lib/clientactive.c Mon Mar 23 17:15:56 1998 +@@ -67,7 +67,8 @@ + if (fgets(buff, sizeof buff, FromServer) == NULL + || !EQn(buff, NNTP_LIST_FOLLOWS, STRLEN(NNTP_LIST_FOLLOWS))) { + oerrno = errno; +- CAclose(); ++ /* Only call CAclose if opened through CAopen() */ ++ if (strcmp(CApathname, pathname) == 0) CAclose(); + errno = oerrno; + return NULL; + } --- inn-1.7.2q.orig/debian/patches/parsedate_y2k +++ inn-1.7.2q/debian/patches/parsedate_y2k @@ -0,0 +1,35 @@ +--- inn-1.7.2.orig/lib/parsedate.y ++++ inn-1.7.2/lib/parsedate.y +@@ -512,10 +512,11 @@ + + if (Year < 0) + Year = -Year; +- if (Year < 100) ++ if (Year < 100) { + Year += 1900; +- if (Year < EPOCH) +- Year += 100; ++ if (Year < EPOCH) ++ Year += 100; ++ } + for (mp = DaysNormal, yp = LeapYears; yp < ENDOF(LeapYears); yp++) + if (Year == *yp) { + mp = DaysLeap; +@@ -570,7 +571,7 @@ + + tm = localtime(&Start); + Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; +- Year = Month / 12; ++ Year = Month / 12 + 1900; + Month = Month % 12 + 1; + return DSTcorrect(Start, + Convert(Month, (time_t)tm->tm_mday, Year, +@@ -751,7 +752,7 @@ + } + + tm = localtime(&now->time); +- yyYear = tm->tm_year; ++ yyYear = tm->tm_year + 1900; + yyMonth = tm->tm_mon + 1; + yyDay = tm->tm_mday; + yyTimezone = now->tzone; --- inn-1.7.2q.orig/debian/patches/recommend_ID +++ inn-1.7.2q/debian/patches/recommend_ID @@ -0,0 +1,78 @@ +Purpose: Make the server tell the client a recommended Message-ID before POST. + +Reasoning: Many clients need to know the Message-IDs of their own +postings for bookkeeping or other purposes, so they generate them +themselves. But the better place for devising Message-IDs is the +server to guarantee unambiguity. This is a simple NNTP protocol +extension: in the 340 response to POST, the server gives a recommended +Message-ID. It can be recognized by the <...@...> syntax. +To utilize this feature, we need better clients, of course. + +Patch against: snapshot 19981013 + +--- inn-1.7.2.orig/nnrpd/post.c ++++ inn-1.7.2/nnrpd/post.c +@@ -306,8 +309,9 @@ + ** Return NULL if okay, or an error message. + */ + STATIC STRING +-ProcessHeaders(linecount) ++ProcessHeaders(linecount, idbuff) + int linecount; ++ char *idbuff; + { + static char MONTHS[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; + static char datebuff[40]; +@@ -394,12 +399,7 @@ + + /* Set Message-ID */ + if (HDR(_messageid) == NULL) { +- if ((p = GenerateMessageID()) == NULL) { +- (void)sprintf(Error, "Can't generate Message-ID, %s", +- strerror(errno)); +- return Error; +- } +- HDR(_messageid) = p; ++ HDR(_messageid) = COPY(idbuff); /* XXX leak? valgrind says no */ + } + + /* Set Path */ +@@ -846,7 +853,7 @@ + if ((error = CheckIncludedText(article, i)) != NULL) + return error; + #endif /* defined(DO_CHECK_INCLUDED_TEXT) */ +- if ((error = ProcessHeaders(i)) != NULL) ++ if ((error = ProcessHeaders(i, idbuff)) != NULL) + return error; + if (i == 0 && HDR(_control) == NULL) + return "Article is empty"; +--- inn-1.7.2.orig/nnrpd/commands.c ++++ inn-1.7.2/nnrpd/commands.c +@@ -567,12 +567,15 @@ + size = 4096; + article = NEW(char, size); + } ++ idbuff[0] = 0; ++ if ((p = GenerateMessageID()) != NULL) ++ strcpy(idbuff, p); ++ Reply("%d Ok, recommended ID %s\r\n", NNTP_START_POST_VAL, idbuff); ++ (void)fflush(stdout); ++ + p = article; + end = &article[size]; + +- Reply("%d Ok\r\n", NNTP_START_POST_VAL); +- (void)fflush(stdout); +- + for (l = 0, longline = 0; ; l++) { + /* Need more room? */ + if (end - p < ART_LINE_MALLOC) { +@@ -638,7 +641,7 @@ + response = ARTpost(article, idbuff); + if (response == NULL) { + syslog(L_NOTICE, "%s post ok %s", ClientHost, idbuff); +- Reply("%s\r\n", NNTP_POSTEDOK); ++ Reply("%s %s\r\n", NNTP_POSTEDOK, idbuff); + POSTreceived++; + } + else { --- inn-1.7.2q.orig/debian/patches/misc_makefiles +++ inn-1.7.2q/debian/patches/misc_makefiles @@ -0,0 +1,108 @@ +--- inn-1.7.2.orig/Makefile ++++ inn-1.7.2/Makefile +@@ -48,7 +48,7 @@ + ## Directories where files get put. + directories: + chmod +x ./makedirs.sh +- DESTDIR=$(DESTDIR) ./makedirs.sh; ++ DESTDIR=$(DESTDIR) ./makedirs.sh -p + + ## Other generic targets. + lint depend tags ctags profiled: +@@ -75,7 +75,8 @@ + echo "" ; \ + echo "cd $$D ; $(MAKE) $(FLAGS) install ; cd .." ; \ + cd $$D; $(MAKE) $(FLAGS) install || exit 1 ; cd .. ; \ +- done ++ done ; \ ++ cd site; $(MAKE) $(FLAGS) update + + ## Build subst (for configuration). + subst c sh quiet sedtest: +@@ -94,7 +95,7 @@ + rm -rf inews.* rnews.* nntplib.* + rm -f lib/dbz.c include/dbz.h doc/dbz.3z + rm -f tags */tags core */core a.out */a.out foo */foo +- rm -f CHANGES *~ ++ rm -f *~ + rm -fr $(TARDIR) + @echo "" + cd site ; make clobber ; cd .. +--- inn-1.7.2.orig/makedirs.sh ++++ inn-1.7.2/makedirs.sh +@@ -95,7 +95,7 @@ + ${NEWSBIN} ${CONTROLPROGS} ${RNEWSPROGS} \ + ${PATH_AUTHDIR} ; do + +- if [ ! -d ${F} ] ; then ++ if [ ! -d ${DESTDIR}${F} ] ; then + mkdir ${PFLAG} ${DESTDIR}${F} || exit 1 + ${CHOWN} ${NEWSUSER} ${DESTDIR}${F} || exit 1 + chgrp ${NEWSGROUP} ${DESTDIR}${F} || exit 1 +--- inn-1.7.2.orig/frontends/Makefile ++++ inn-1.7.2/frontends/Makefile +@@ -48,10 +48,10 @@ + all: $(ALL) + date >$@ + +-install: $(INEWS) $(RNEWS) \ +- $(NEWSBIN)/ctlinnd $(NEWSBIN)/getlist $(NEWSBIN)/innconfval \ +- $(RNEWSPROGS)/c7unbatch \ +- $(RNEWSPROGS)/decode $(RNEWSPROGS)/encode ++install: $D$(INEWS) $D$(RNEWS) \ ++ $D$(NEWSBIN)/ctlinnd $D$(NEWSBIN)/getlist \ ++ $D$(NEWSBIN)/innconfval $D$(RNEWSPROGS)/c7unbatch \ ++ $D$(RNEWSPROGS)/decode $D$(RNEWSPROGS)/encode + + clobber clean: + rm -f *.o $(ALL) +@@ -104,21 +104,21 @@ + #load $(CFLAGS) $< + + ## Low-level install actions. +-$(INEWS): inews ++$D$(INEWS): inews + $(SHELL) ../installit.sh $(OWNER) -m 02555 -b .OLD $? $@ +-$(RNEWS): rnews ++$D$(RNEWS): rnews + $(SHELL) ../installit.sh $(ROWNER) -m 04550 -b .OLD $? $@ +-$(NEWSBIN)/ctlinnd: ctlinnd ++$D$(NEWSBIN)/ctlinnd: ctlinnd + $(SHELL) ../installit.sh $(OWNER) -m 0550 -b .OLD $? $@ +-$(NEWSBIN)/getlist: getlist ++$D$(NEWSBIN)/getlist: getlist + $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ +-$(NEWSBIN)/innconfval: innconfval ++$D$(NEWSBIN)/innconfval: innconfval + $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ +-$(RNEWSPROGS)/c7unbatch: c7unbatch.sh ++$D$(RNEWSPROGS)/c7unbatch: c7unbatch.sh + $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ +-$(RNEWSPROGS)/decode: decode ++$D$(RNEWSPROGS)/decode: decode + $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ +-$(RNEWSPROGS)/encode: encode ++$D$(RNEWSPROGS)/encode: encode + $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD $? $@ + + ## Dependencies. Default list, below, is probably good enough. +--- inn-1.7.2.orig/site/Makefile ++++ inn-1.7.2/site/Makefile +@@ -95,7 +95,7 @@ + actsync.cfg actsync.ign scanspool + + MOST_INSTALLED = \ +- $D$(PATH_NEWSBOOT) $D$(PATH_SCHEMA) \ ++ $D$(PATH_NEWSBOOT) \ + $D$(CTLBIN)/checkgroups $D$(CTLBIN)/default $D$(CTLBIN)/ihave \ + $D$(CTLBIN)/newgroup $D$(CTLBIN)/rmgroup $D$(CTLBIN)/sendme \ + $D$(CTLBIN)/sendsys $D$(CTLBIN)/senduuname $D$(CTLBIN)/version \ +@@ -133,7 +133,7 @@ + $D$(PATH_NNRPACCESS) $D$(PATH_NNTPPASS) \ + $D$(PATH_CONFIG) $D$(PATH_MODERATORS) \ + $D$(PATH_CONTROLCTL) $D$(PATH_EXPIRECTL) $D$(NEWSLIB)/nntpsend.ctl \ +- $D$(PATH_CTLWATCH) $D$(PATH_DISTPATS) \ ++ $D$(PATH_CTLWATCH) $D$(PATH_DISTPATS) $D$(PATH_SCHEMA) \ + $D$(PATH_ACTSYNC_CFG) $D$(PATH_ACTSYNC_IGN) \ + $D$(CTLBIN)/sample.control + --- inn-1.7.2q.orig/debian/patches/fix_perl510 +++ inn-1.7.2q/debian/patches/fix_perl510 @@ -0,0 +1,368 @@ +--- a/innd/perl.c ++++ b/innd/perl.c +@@ -45,6 +45,7 @@ char *artBody; + int rc; + char *p; + static char buf[256]; ++ char *argv[] = { NULL }; + + if (!PerlFilterActive || perl_filter_cv == NULL) + return NULL; +@@ -59,7 +60,11 @@ char *artBody; + + /* store article body */ + if (artBody != NULL) ++#if (PERL_VERSION < 7) || ((PERL_VERSION == 7) && (PERL_SUBVERSION < 1)) + hv_store(hdr, (char *) "__BODY__", 8, newSVpv(artBody, 0), 0) ; ++#else ++ hv_store(hdr, "__BODY__", 8, newSVpvn_share(artBody, 0, 42), 0); ++#endif /* Perl < 5.7.1 */ + + if (pathForPerl != NULL) + { +@@ -73,7 +78,7 @@ char *artBody; + ENTER ; + SAVETMPS ; + +- rc = perl_call_argv ("filter_art", G_EVAL|G_SCALAR,NULL); ++ rc = perl_call_argv ("filter_art", G_EVAL|G_SCALAR, argv); + + SPAGAIN; + +@@ -168,6 +173,7 @@ char *reason; + { + dSP ; + HV *hdr; ++ char *argv[] = { NULL }; + + ENTER ; + SAVETMPS ; +@@ -191,7 +197,7 @@ char *reason; + hv_store(hdr, "reason", 6, newSVpv(reason, 0), 0); + + if (perl_get_cv("filter_mode", FALSE) != NULL) { +- perl_call_argv("filter_mode", G_EVAL|G_DISCARD|G_NOARGS, NULL); ++ perl_call_argv("filter_mode", G_EVAL|G_DISCARD|G_NOARGS, argv); + if (SvTRUE(ERRSV)) { /* check $@ */ + syslog (L_ERROR,"Perl function filter_mode died: %s", + SvPV(ERRSV, PL_na)) ; +--- a/lib/perl.c ++++ b/lib/perl.c +@@ -35,9 +35,12 @@ static void use_rcsid (const char *rid) + extern void xs_init _((pTHX)); + extern void boot_DynaLoader _((CV* cv)); + ++void PerlSilence(void); ++void PerlUnSilence(void); ++ + int PerlFilterActive = FALSE; + +-PerlInterpreter *PerlCode; ++PerlInterpreter *PerlCode = NULL; + CV *perl_filter_cv ; /* filter_art or filter_post holder */ + extern char LogName[]; + +@@ -52,6 +55,7 @@ PerlFilter(value) + BOOL value ; + { + dSP; ++ char *argv[] = { NULL }; + + ENTER ; + SAVETMPS ; +@@ -59,7 +63,7 @@ PerlFilter(value) + /* Execute an end function */ + if (PerlFilterActive && !value) { + if (perl_get_cv("filter_end", FALSE) != NULL) { +- perl_call_argv("filter_end", G_EVAL|G_DISCARD|G_NOARGS, NULL); ++ perl_call_argv("filter_end", G_EVAL|G_DISCARD|G_NOARGS, argv); + if (SvTRUE(ERRSV)) /* check $@ */ { + syslog (L_ERROR,"%s perl function filter_end died: %s", + LogName, SvPV(ERRSV, PL_na)) ; +@@ -110,23 +114,36 @@ PERLsetup (startupfile, filterfile, func + char *startupfile, *filterfile, *function; + { + if (PerlCode == NULL) { ++ /* Perl waits on standard input if not called with '-e'. */ ++ int argc = 3; ++ const char *argv_innd[] = { "innd", "-e", "0", NULL }; ++ char **argv = (char **)argv_innd; /* Cast required by Perl 5.10. */ ++ char **env = { NULL }; ++#ifdef PERL_SYS_INIT3 ++ PERL_SYS_INIT3(&argc, &argv, &env); ++#endif + PerlCode = perl_alloc(); + perl_construct(PerlCode); +- PerlParse () ; ++ PL_exit_flags |= PERL_EXIT_DESTRUCT_END; ++ perl_parse(PerlCode, xs_init, argc, argv, env) ; + } + + if (startupfile != NULL && filterfile != NULL) { +- char *argv[2] ; +- int rc ; ++ char *evalfile = NULL; ++ size_t length; + dSP; + + ENTER ; + SAVETMPS ; + +- argv[0] = startupfile ; +- argv[1] = NULL ; +- +- rc = perl_call_argv ("_load_",G_DISCARD, argv) ; ++ /* The Perl expression which will be evaluated. */ ++ length = strlen("do '%s'") + strlen(startupfile); ++ evalfile = xmalloc(length); ++ snprintf(evalfile, length, "do '%s'", startupfile); ++ ++ PerlSilence(); ++ perl_eval_pv(evalfile, TRUE); ++ PerlUnSilence(); + + SPAGAIN ; + +@@ -157,16 +174,15 @@ PERLreadfilter(filterfile, function) + char *filterfile, *function ; + { + dSP ; +- char *argv [3] ; ++ char *argv[] = { NULL }; ++ char *evalfile = NULL; ++ size_t length; + + ENTER ; + SAVETMPS ; + +- argv[0] = filterfile ; +- argv[1] = NULL ; +- + if (perl_get_cv("filter_before_reload", FALSE) != NULL) { +- perl_call_argv("filter_before_reload",G_EVAL|G_DISCARD|G_NOARGS,NULL); ++ perl_call_argv("filter_before_reload",G_EVAL|G_DISCARD|G_NOARGS,argv); + if (SvTRUE(ERRSV)) /* check $@ */ { + syslog (L_ERROR,"%s perl function filter_before_reload died: %s", + LogName, SvPV(ERRSV, PL_na)) ; +@@ -175,7 +191,17 @@ PERLreadfilter(filterfile, function) + } + } + +- perl_call_argv ("_load_", 0, argv) ; ++ /* The Perl expression which will be evaluated. */ ++ length = strlen("do '%s'") + strlen(filterfile); ++ evalfile = xmalloc(length); ++ snprintf(evalfile, length, "do '%s'", filterfile); ++ ++ PerlSilence(); ++ perl_eval_pv(evalfile, TRUE); ++ PerlUnSilence(); ++ ++ free(evalfile); ++ evalfile = NULL; + + if (SvTRUE(ERRSV)) /* check $@ */ { + syslog (L_ERROR,"%s perl loading %s failed: %s", +@@ -184,21 +210,21 @@ PERLreadfilter(filterfile, function) + + /* If the reload failed we don't want the old definition hanging + around. */ +- argv[0] = NEW (char,strlen (function) + strlen ("undef &%s")) ; +- sprintf (argv[0],"undef &%s",function) ; +- perl_call_argv ("_eval_",0,argv) ; ++ length = strlen("undef &%s") + strlen(function); ++ evalfile = xmalloc(length); ++ snprintf(evalfile, length, "undef &%s", function); ++ perl_eval_pv(evalfile, TRUE); + + if (SvTRUE(ERRSV)) /* check $@ */ { + syslog (L_ERROR,"%s perl undef &%s failed: %s", + LogName, function, SvPV(ERRSV, PL_na)) ; + } +- DISPOSE (argv[0]) ; + } else if ((perl_filter_cv = perl_get_cv(function, FALSE)) == NULL) { + PerlFilter (FALSE) ; + } + + if (perl_get_cv("filter_after_reload", FALSE) != NULL) { +- perl_call_argv("filter_after_reload", G_EVAL|G_DISCARD|G_NOARGS, NULL); ++ perl_call_argv("filter_after_reload", G_EVAL|G_DISCARD|G_NOARGS, argv); + if (SvTRUE(ERRSV)) /* check $@ */ { + syslog (L_ERROR,"%s perl function filter_after_reload died: %s", + LogName, SvPV(ERRSV, PL_na)) ; +@@ -220,17 +246,126 @@ PERLreadfilter(filterfile, function) + void + PerlClose() + { +- perl_destruct(PerlCode); +- perl_free(PerlCode); ++ if (PerlCode != NULL) { ++ perl_destruct(PerlCode); ++ perl_free(PerlCode); ++#ifdef PERL_SYS_TERM ++ PERL_SYS_TERM(); ++#endif ++ } + PerlFilterActive = FALSE; + } + ++/* ++** Redirects STDOUT/STDERR briefly (otherwise PERL complains to the net ++** connection for NNRPD and that just won't do) -- dave@jetcafe.org ++*/ ++static int savestdout = 0; ++static int savestderr = 0; ++void PerlSilence(void) ++{ ++ int newfd; ++ ++ /* Save the descriptors */ ++ if ( (savestdout = dup(1)) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant redirect stdout: %m"); ++ savestdout = 0; ++ return; ++ } ++ if ( (savestderr = dup(2)) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant redirect stderr: %m"); ++ savestdout = 0; ++ savestderr = 0; ++ return; ++ } ++ ++ /* Open /dev/null */ ++ if ((newfd = open("/dev/null",O_WRONLY)) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant open /dev/null: %m"); ++ savestdout = 0; ++ savestderr = 0; ++ return; ++ } ++ ++ /* Redirect descriptors */ ++ if (dup2(newfd,1) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant redirect stdout: %m"); ++ savestdout = 0; ++ return; ++ } ++ ++ if (dup2(newfd,2) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant redirect stderr: %m"); ++ savestderr = 0; ++ return; ++ } ++ close(newfd); ++} ++ ++void PerlUnSilence(void) { ++ if (savestdout != 0) { ++ if (dup2(savestdout,1) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant restore stdout: %m"); ++ } ++ close(savestdout); ++ savestdout = 0; ++ } ++ ++ if (savestderr != 0) { ++ if (dup2(savestderr,2) < 0) { ++ syslog(L_ERROR,"SERVER perl silence cant restore stderr: %m"); ++ } ++ close(savestderr); ++ savestderr = 0; ++ } ++} ++ ++/* ++** The remainder of this file consists of XS callbacks usable by either ++** innd or nnrpd and initialized automatically when the Perl filter is ++** initialized, as well as the function that initializes them. ++*/ ++ ++/* ++** Log a message via syslog. Only the first letter of the priority ++** matters, and this function assumes that the controlling program has ++** already done an openlog(). The argument must be a complete message, not ++** a printf-style format. ++*/ ++XS(XS_INN_syslog) ++{ ++ dXSARGS; ++ const char *loglevel; ++ const char *logmsg; ++ int priority; ++ ++ if (items != 2) ++ croak("Usage: INN::syslog(level, message)"); ++ ++ loglevel = (const char *) SvPV(ST(0), PL_na); ++ logmsg = (const char *) SvPV(ST(1), PL_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; ++} ++ + extern void xs_init(pTHX) + { + char * file = __FILE__; + dXSUB_SYS; + + newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); ++ newXS("INN::syslog", XS_INN_syslog, file); + } + + #endif /* defined(DO_PERL) */ +--- a/nnrpd/perl.c ++++ b/nnrpd/perl.c +@@ -52,6 +52,7 @@ char *artBody; + int rc; + char *p; + static char buf[256]; ++ char *args[] = { NULL }; + register int i; + register char *s,*t; + HE *scan; +@@ -96,7 +97,7 @@ char *artBody; + sv_setpv(body, artBody); + + /* Call the filtering function */ +- rc = perl_call_argv("filter_post", G_EVAL|G_SCALAR, NULL); ++ rc = perl_call_argv("filter_post", G_EVAL|G_SCALAR, args); + + SPAGAIN; + +@@ -139,7 +140,7 @@ char *artBody; + } + + hv_undef (hdr); +- sv_setsv (body, &PL_sv_undef); ++ body = &PL_sv_undef; + + buf [0] = '\0' ; + +--- a/innd/cc.c ++++ b/innd/cc.c +@@ -860,13 +860,15 @@ CCmode(av) + /* perl filter status */ + + if (perl_get_cv("filter_stats", FALSE) != NULL) { ++ char *argv[] = { NULL }; ++ + *p++ = '\n'; + p += strlen(strcpy(p, "Perl filter stats: ")); + + ENTER ; + SAVETMPS; + +- perl_call_argv("filter_stats", G_EVAL|G_NOARGS, NULL); ++ perl_call_argv("filter_stats", G_EVAL|G_NOARGS, argv); + + SPAGAIN; + --- inn-1.7.2q.orig/debian/patches/fix_perl514 +++ inn-1.7.2q/debian/patches/fix_perl514 @@ -0,0 +1,76 @@ +--- a/config/fixinterps.pl ++++ b/config/fixinterps.pl +@@ -15,13 +15,13 @@ + # use the one in the samples directory) + # + +-require 'getopts.pl' ; ++use Getopt::Std; + + $0 =~ s!.*/!! ; + + $usage = "$0 [ -v -n -q ][ -d dir ][ -f innshellvars.pl ][ -t topdir ] file...\n" ; + +-&Getopts ("vnqd:f:h") || die $usage ; ++getopts("vnqd:f:h") || die $usage ; + + die $usage if $opt_h ; + +@@ -151,20 +151,10 @@ sub perlVersion { + + return 0 if (! -x $perl) ; + +- open (PERL,"$perl -v|") || die "Can't check version of perl ($perl)\n"; +- while () { +- if (/^this\s+is\s+perl,\s+v(\d+\.\d+\.\d+)/i) { +- $rval = $1; last; +- } +- if (/^this\s+is\s+perl,\s+version\s+(\S+)/i) { +- $rval = $1; +- } +- } +- close (PERL); +- return $rval; ++ $rval = `$perl -MConfig -e 'print \$Config{version}'`; + +- if ($rval !~ /^\d+\.\d+(_\d+|)$/) { +- warn "perl version from $perl looks suspicious: $rval\n"; ++ if ($rval !~ /^\d+\.\d+(\.\d+|)$/) { ++ die "perl version from $perl looks suspicious: $rval\n"; + } + + return $rval; +--- a/samples/innlog.pl ++++ b/samples/innlog.pl +@@ -25,9 +25,9 @@ $[ = 1; # set array base to 1 (hangove + + ($PROGNAME = $0) =~ s#.*/##; # basename of what we're invoked as + +-require "getopts.pl"; ++use Getopt::Std; + +-&Getopts("acdghn") || die("Usage $PROGNAME [-a] [-c] [-d] [-g] [-h] [-n]\ ++getopts("acdghn") || die("Usage $PROGNAME [-a] [-c] [-d] [-g] [-h] [-n]\ + -a Print nnrp gethostbyaddr failures\ + -c Print nnrp newsgroup requests by category\ + -d Print nnrp summary by domain\ +--- a/samples/scanspool ++++ b/samples/scanspool +@@ -94,7 +94,7 @@ + + # perl requirements + # +-require "getopts.pl"; ++use Getopt::Std; + + # setup non-buffered stdout and stderr + # +@@ -116,7 +116,7 @@ $reason = "running scanspool"; # thrott + + # parse args + # +-&Getopts("a:s:vcn"); ++getopts("a:s:vcn"); + $active = $opt_a if (defined($opt_a)); + $spool = $opt_s if (defined($opt_s)); + --- inn-1.7.2q.orig/debian/patches/misc_rc.news +++ inn-1.7.2q/debian/patches/misc_rc.news @@ -0,0 +1,55 @@ +--- inn-1.7.2.orig/samples/rc.news ++++ inn-1.7.2/samples/rc.news +@@ -11,7 +11,8 @@ + ## Pick ${INND} or ${INNDSTART} + WHAT=${INNDSTART} + ## Set to true or false +-DOINNWATCH=true ++DOINNWATCH=false ++DOACTIVED=false + MAIL="${MAILCMD} -s 'Boot-time Usenet warning on `hostname`' ${NEWSMASTER}" + + ## RFLAG is set below; set FLAGS as appropriate. +@@ -63,18 +64,27 @@ + rm -f ${NEWSCONTROL} ${NNTPCONNECT} ${SERVERPID} + + ## Start the show. +-echo 'Starting innd.' ++echo -n 'Starting news server:' + eval ${WHAT} ${RFLAG} ${FLAGS} ++echo -n ' innd' ++ ++${DOACTIVED} && { ++ echo -n ' actived' ++ ${NEWSBIN}/actived > $ERRLOG 2>&1 ++} + + # Gee, looks like lisp, doesn't it? + ${DOINNWATCH} && { +- ( sleep 60 ; ${INNWATCH} ) & ++ echo -n ' innwatch' ++ ( sleep 60 ; exec ${INNWATCH} > $ERRLOG 2>&1 ) & + } + ++echo '.' ++ + RMFILE=${MOST_LOGS}/expire.rm + for F in ${RMFILE} ${RMFILE}.*; do + if [ -f $F -a -s $F ] ; then +- echo "Removing articles from pre-downtime expire run (${F})." ++ echo "INND: Removing articles from pre-downtime expire run (${F})." + ( + echo 'System shut down during expire.' \ + 'Unlinking articles listed in' +diff -ruNp inn-1.7.2.orig/doc/innwatch.8 inn-1.7.2/doc/innwatch.8 +--- inn-1.7.2.orig/doc/innwatch.8 1997-12-09 00:48:50.000000000 +0100 ++++ inn-1.7.2/doc/innwatch.8 2005-07-31 12:49:25.000000000 +0200 +@@ -12,7 +12,7 @@ innwatch \- monitor innd. + .SH DESCRIPTION + .I Innwatch + is normally started by +-.IR rc.news . ++.IR /etc/news/boot . + It periodically \(em every + .\" =()<.I (@@)>()= + .I (600) --- inn-1.7.2q.orig/debian/patches/fastrm_allow_symlinks +++ inn-1.7.2q/debian/patches/fastrm_allow_symlinks @@ -0,0 +1,11 @@ +--- inn-1.7.2.orig/samples/expirerm ++++ inn-1.7.2/samples/expirerm +@@ -8,7 +8,7 @@ + MAIL="${MAILCMD} -s 'Problem removing expired files' ${NEWSMASTER}" + + #RMPROC="xargs rm" +-RMPROC="fastrm -e -u -s ${SPOOL}" ++RMPROC="fastrm -e -s ${SPOOL}" + + if [ -z "$1" ] ; then + echo "Expire called with zero list of files on `hostname`" \ --- inn-1.7.2q.orig/debian/patches/rnews_unknown +++ inn-1.7.2q/debian/patches/rnews_unknown @@ -0,0 +1,18 @@ +Maybe: + +inn (1:1.7.2-14) frozen unstable; urgency=medium + + * fixed "cant read after 0" bug in rnews. + + +--- inn-1.7.2.orig/frontends/rnews.c ++++ inn-1.7.2/frontends/rnews.c +@@ -901,7 +904,7 @@ + if (mode == 'U') + Unspool(); + else { +- if (!UnpackOne(&fd, &i)) ++ if (!UnpackOne(&fd, &i) && fd != 0) /* fd is closed by ReadRemainder */ + Spool(fd, mode); + WaitForChildren(i); + } --- inn-1.7.2q.orig/debian/patches/poison+remember_trash +++ inn-1.7.2q/debian/patches/poison+remember_trash @@ -0,0 +1,179 @@ +Subject: INN poison and REMEMBER_TRASH patch +From: Russ Allbery +Date: 1998/03/21 +Newsgroups: net.config + +I posted this here once before, but now it's been tested and I believe I +can recommend it as stable. This is a merger of Panix's poison patch and +Odd Einar's REMEMBER_TRASH patch. It adds the @pattern syntax for the +hosts.nntp file, so that you can reject U2 postings from unsound peers +with: + + peer.name::*,@net.* + +entries in hosts.nntp. Posts rejected due to @ or ! entries in hosts.nntp +do not get added to the history file even if REMEMBER_TRASH is set, so if +you later get the same article via a sound path, you'll accept it. + +Note: There have been reports that Panix's patch, on which this is based, +interprets the syntax: + + peer.name::@net.* + +as rejecting all articles. Be sure to include the initial * in there. + +This is a patch against INN 1.7.2-insync-1.1d. + +--- inn-1.7.2.orig/innd/art.c.orig Tue Dec 16 21:33:16 1997 ++++ inn-1.7.2/innd/art.c Sun Jan 4 17:40:15 1998 +@@ -1747,6 +1747,7 @@ + ARTDATA Data; + BOOL Approved; + BOOL Accepted; ++ BOOL DontRemember; + BOOL LikeNewgroup; + BOOL ToGroup; + BOOL GroupMissing; +@@ -1760,6 +1761,7 @@ + char ControlWord[SMBUF]; + int ControlHeader; + int oerrno; ++ int canpost; + #if defined(DO_PERL) + char *perlrc; + #endif /* DO_PERL */ +@@ -2004,8 +2006,20 @@ + ngptr = GroupPointers; + j = 0; + for (GroupMissing = Accepted = FALSE; (p = *groups) != NULL; groups++) { +- if (!RCcanpost(cp, p)) ++ canpost = RCcanpost(cp, p); ++ if (!canpost) { ++ DontRemember = TRUE; + continue; ++ } ++ else if (canpost < 0) { ++ (void)sprintf(buff, "%d Won't accept posts in \"%s\"", ++ NNTP_REJECTIT_VAL, p); ++ ARTlog(&Data, ART_REJECT, buff); ++ if (distributions) ++ DISPOSE(distributions); ++ ARTreject(buff, article); ++ return buff; ++ } + if ((ngp = NGfind(p)) == NULL) { + GroupMissing = TRUE; + if (LikeNewgroup && Approved) { +@@ -2113,7 +2127,7 @@ + ARTlog(&Data, ART_REJECT, buff); + #if defined(DONT_WANT_TRASH) + #if defined(DO_REMEMBER_TRASH) +- if (Mode == OMrunning && !HISwrite(&Data, "")) ++ if (!DontRemember && Mode == OMrunning && !HISwrite(&Data, "")) + syslog(L_ERROR, "%s cant write history %s %m", + LogName, Data.MessageID); + #endif /* defined(DO_REMEMBER_TRASH) */ +@@ -2129,7 +2143,7 @@ + * you explicitly excluded in your active file. */ + if (!GroupMissing) { + #if defined(DO_REMEMBER_TRASH) +- if (Mode == OMrunning && !HISwrite(&Data, "")) ++ if (!DontRemember && Mode == OMrunning && !HISwrite(&Data, "")) + syslog(L_ERROR, "%s cant write history %s %m", + LogName, Data.MessageID); + #endif /* defined(DO_REMEMBER_TRASH) */ +--- inn-1.7.2.orig/innd/innd.h.orig Fri Dec 12 09:26:10 1997 ++++ inn-1.7.2/innd/innd.h Sun Jan 4 17:36:12 1998 +@@ -539,7 +539,7 @@ + + extern BOOL RCnolimit(); + extern BOOL RCauthorized(); +-extern BOOL RCcanpost(); ++extern int RCcanpost(); + extern char *RChostname(); + extern int RCismaster(); + extern void RCclose(); +--- inn-1.7.2.orig/innd/rc.c.orig Mon Dec 8 15:48:50 1997 ++++ inn-1.7.2/innd/rc.c Sun Jan 4 17:36:12 1998 +@@ -586,14 +586,14 @@ + /* + ** Is the remote site allowed to post to this group? + */ +-BOOL ++int + RCcanpost(cp, group) + register CHANNEL *cp; + register char *group; + { + register REMOTEHOST *rp; +- register BOOL match; +- register BOOL subvalue; ++ register char match; ++ register char subvalue; + register char **argv; + register char *pat; + register int i; +@@ -604,16 +604,20 @@ + continue; + if (rp->Patterns == NULL) + break; +- for (match = TRUE, argv = rp->Patterns; (pat = *argv++) != NULL; ) { +- subvalue = *pat != SUB_NEGATE; +- if (!subvalue) ++ for (match = 0, argv = rp->Patterns; (pat = *argv++) != NULL; ) { ++ subvalue = (*pat != SUB_NEGATE) && (*pat != SUB_POISON) ? ++ 0 : *pat; ++ if (subvalue) + pat++; +- if ((match != subvalue) && wildmat(group, pat)) ++ if ((match != subvalue) && wildmat(group, pat)) { ++ if (subvalue == SUB_POISON) ++ return -1; + match = subvalue; ++ } + } +- return match; ++ return !match; + } +- return TRUE; ++ return 1; + } + + +#-- +#Russ Allbery (rra@stanford.edu) +# + + + + + + + + + + +--- inn-1.7.2.orig/doc/hosts.nntp.5 ++++ inn-1.7.2/doc/hosts.nntp.5 +@@ -39,17 +39,20 @@ + the host may send articles. + This list is parsed as a + .IR newsfeeds (5) +-subscription list; groups not in the list are ignored. ++subscription list; groups not in the list are ignored. Posts crossposted ++in groups matched by a @group.* entry are dropped. + .PP + For example: + .RS + .nf + ## FOO has a password, UUNET and VIX dont. + ## UUNET cannot post to local groups. ++## Example is not part of Usenet II. + ## These are comment lines. + news.foo.com:magic + uunet.uu.net::!foo.* + data.ramona.vix.com: ++newspeer.example.com::*,@net.* + .fi + .RE + .PP --- inn-1.7.2q.orig/debian/patches/fixinterps +++ inn-1.7.2q/debian/patches/fixinterps @@ -0,0 +1,18 @@ +--- inn-1.7.2.orig/config/fixinterps.pl ++++ inn-1.7.2/config/fixinterps.pl +@@ -153,11 +153,15 @@ + + open (PERL,"$perl -v|") || die "Can't check version of perl ($perl)\n"; + while () { ++ if (/^this\s+is\s+perl,\s+v(\d+\.\d+\.\d+)/i) { ++ $rval = $1; last; ++ } + if (/^this\s+is\s+perl,\s+version\s+(\S+)/i) { + $rval = $1; + } + } + close (PERL); ++ return $rval; + + if ($rval !~ /^\d+\.\d+(_\d+|)$/) { + warn "perl version from $perl looks suspicious: $rval\n"; --- inn-1.7.2q.orig/debian/patches/posix_arguments +++ inn-1.7.2q/debian/patches/posix_arguments @@ -0,0 +1,18 @@ +diff -ruNp inn-1.7.2.orig/samples/innstat inn-1.7.2/samples/innstat +--- inn-1.7.2.orig/samples/innstat 1997-12-09 00:48:50.000000000 +0100 ++++ inn-1.7.2/samples/innstat 2006-08-18 17:32:56.000000000 +0200 +@@ -32,12 +32,12 @@ ctlinnd mode 2>&1 + echo '' + echo 'Disk usage:' + ${INNDF} ${SPOOL} ${OVERVIEWDIR} ${NEWSLIB} ${INCOMING} ${BATCH} ${MOST_LOGS} | +- grep '/dev/' | sort -u ++ grep '^/' | sort -u + + ## Show size of batch files. + echo '' + echo 'Batch file sizes:' +-( cd ${BATCH}; ls -Cs | tail +2 ) ++( cd ${BATCH}; ls -Cs | tail -n +2 ) + + ## Show size of log files. + echo '' --- inn-1.7.2q.orig/debian/patches/0_insync_dbz_3.3 +++ inn-1.7.2q/debian/patches/0_insync_dbz_3.3 @@ -0,0 +1,745 @@ +--- inn-1.7.2.orig/dbz/dbz.c ++++ inn-1.7.2/dbz/dbz.c +@@ -1,6 +1,6 @@ + /* + +-dbz.c V3.2 ++dbz.c V3.3 + + Copyright 1988 Jon Zeeff (zeeff@b-tech.ann-arbor.mi.us) + You can use this code in any manner, as long as you leave my name on it +@@ -19,6 +19,22 @@ + Merged in MMAP code by David Robinson, formerly + now (January, 1993). + ++Introduced "offset fuzzy", i.e., dropping several least significant bits ++of the offset value, to allocate more bits on hash and named as ++dbz v3.3 by Sang-yong Suh (October, 1997) ++ ++Increased the table size factor from 1.5 to 2.0, to make more holes ++in the table. The extra holes will speed up history lookup. ++The base file usage is added at the third .dir line. ++Sang-yong Suh (October, 1997) ++ ++Keeps from too many identical "can't tag" error messages which occurred ++some news servers started with fresh history. Also added more ++sofisticated prediction of the future history size hoping that no_tagging ++situation occur. If this succeeds, we have another bit for hash tagging! ++Currently, the bit is used to record the flag whether the offset is tagged ++or not. Sang-yong Suh (December, 1997) ++ + These routines replace dbm as used by the usenet news software + (it's not a full dbm replacement by any means). It's fast and + simple. It contains no AT&T code. +@@ -39,7 +55,7 @@ + #ifndef __STDC__ + extern int errno; + #endif +-#include ++#include "dbz.h" + + /* + * #ifdef index. "LIA" = "leave it alone unless you know what you're doing". +@@ -74,6 +90,26 @@ + + static int dbzversion = 3; /* for validating .dir file format */ + ++/******************************************************************* ++ Start of dbz version 3.3 specific definitions ++ ******************************************************************/ ++ ++/* MAXDROPBITS is the maximum number of bits in the offset value. ++ The least significant bits are dropped. The space is used to ++ store hash bits, thereby increasing the possibility of the ++ hash conflict */ ++#define MAXDROPBITS 4 /* max # of bits to drop from the offset */ ++ ++/* MAXDROPBYTES must be derived from MAXDROPBITS as ((1 << MAXDROPBITS) - 1) */ ++#define MAXDROPBYTES ((1 << MAXDROPBITS) - 1) ++ ++/* START_OF_KEY is the last character of an entry, and it must be unique. */ ++#define START_OF_KEY '<' ++ ++/******************************************************************* ++ End of dbz version 3.3 sepecific definitions ++ ******************************************************************/ ++ + /* + * The dbz database exploits the fact that when news stores a + * tuple, the `value' part is a seek offset into a text file, pointing to +@@ -147,6 +183,7 @@ + static of_t tagbits; /* pre-shifted tag mask */ + static of_t taghere; /* pre-shifted tag-enable bit */ + static of_t tagboth; /* tagbits|taghere */ ++static int notag_warned=0; /* a switch to keep from repeated err msges */ + #define HASTAG(o) ((o)&taghere) + #define TAG(o) ((o)&tagbits) + #define NOTAG(o) ((o)&~tagboth) +@@ -159,7 +196,10 @@ + * the user supplies this info, but there have to be defaults. + */ + #ifndef DEFSIZE +-#define DEFSIZE 120011 /* 300007 might be better */ ++#define DEFSIZE 1000003 /* receiving 500K messsages in the 1st day. */ ++#endif ++#ifndef DEFSIZE_BASE ++#define DEFSIZE_BASE 100000000 /* history will not grow this much 1st day */ + #endif + #ifdef OLDBNEWS + #define DEFCASE '0' /* B2.10 -- no mapping */ +@@ -199,6 +239,7 @@ + # endif + # define NUSEDS (1+NMEMORY) + of_t used[NUSEDS]; /* entries used today, yesterday, ... */ ++ of_t vused[NUSEDS]; /* max values used today, yesterday, ... */ + int valuesize; /* size of table values, == SOF */ + int bytemap[SOF]; /* byte-order map */ + char casemap; /* case-mapping algorithm (see cipoint()) */ +@@ -206,6 +247,8 @@ + of_t tagenb; /* unshifted tag-enable bit */ + of_t tagmask; /* unshifted tag mask */ + int tagshift; /* shift count for tagmask and tagenb */ ++ int dropbits; /* number of bits to discard from offset */ ++ int offsetfuzzy; /* number of fuzzy bytes in offset */ + }; + static struct dbzconfig conf; + static int getconf(); +@@ -355,7 +398,6 @@ + extern void CloseOnExec(); + + /* misc. forwards */ +-static long hash(); + static void crcinit(); + static char *cipoint(); + static char *mapcase(); +@@ -384,11 +426,78 @@ + static int written; /* has a store() been done? */ + + /* ++ - dbzconfbase - reconfigure dbzconf from base file size. ++ */ ++static void dbzconfbase(c, bsize) ++struct dbzconfig *c; ++of_t bsize; /* base file size */ ++{ ++ int i; ++ register of_t m; ++ ++ /* if no tag requested, just return. */ ++ if ((c->tagmask | c->tagenb) == 0) ++ return; ++ ++ /* ++ * The base file will grow until the next dbz rebuild. ++ * Therefore the prediction of correct size is important. ++ * If the predicted size is too small, the "can't tag" occurs. ++ * If the prediction is too big, we'll waste tag bits. ++ */ ++ ++ /* History of a fresh news server will not grow this much in a day */ ++ if (bsize < 1000) ++ bsize = DEFSIZE_BASE; ++ ++ /* This must be a small server. It may grow 50% in a day. */ ++ else if (bsize < DEFSIZE_BASE) ++ bsize += bsize / 2; ++ ++ /* This is a midsize server. It can grow 20% in a day. */ ++ else if (bsize < 2 * DEFSIZE_BASE) ++ bsize += bsize / 5; ++ ++ /* This must be a big server. It can grow 10% in a day. */ ++ else ++ bsize += bsize / 10; ++ ++ /* calculate tagging from old file */ ++ for (m = 1, i = 0; m < bsize; i++, m <<= 1) ++ continue; ++ ++ /* if we had more tags than the default, use the new data */ ++ c->dropbits = 0; ++ while (m > (1 << TAGSHIFT)) { ++ if (c->dropbits >= MAXDROPBITS) ++ break; ++ c->dropbits++; ++ m >>= 1; ++ i--; ++ } ++ c->tagenb = TAGENB; ++ c->tagmask = TAGMASK; ++ c->tagshift = TAGSHIFT; ++ if ((c->tagmask | c->tagenb) && m > (1 << TAGSHIFT)) { ++ c->tagshift = i; ++ c->tagmask = (~(unsigned long)0) >> (i + 1); ++ c->tagenb = (c->tagmask << 1) & ~c->tagmask; ++ } ++ c->offsetfuzzy = (int)(1 << c->dropbits) - 1; ++ ++ m = (c->tagmask | c->tagenb) << c->tagshift; ++ if (m & (bsize >> c->dropbits)) { ++ fprintf(stderr, "m 0x%lx size 0x%lx\n", m, bsize); ++ exit(1); ++ } ++} ++ ++/* + - dbzfresh - set up a new database, no historical info + */ + int /* 0 success, -1 failure */ + dbzfresh(name, size, fs, cmap, tagmask) +-char *name; /* base name; .dir and .pag must exist */ ++char *name; /* base name; base file must exist */ + long size; /* table size (0 means default) */ + int fs; /* field-separator character in base file */ + int cmap; /* case-map algorithm (0 means default) */ +@@ -398,6 +507,7 @@ + struct dbzconfig c; + register of_t m; + register FILE *f; ++ struct stat sb; + + if (pagf != NULL) { + DEBUG(("dbzfresh: database already open\n")); +@@ -443,6 +553,8 @@ + c.tagshift = 0; + c.tagmask = 0; + c.tagenb = 0; ++ c.dropbits = 0; ++ c.offsetfuzzy = 0; + break; + default: + m = tagmask; +@@ -453,9 +565,16 @@ + } + c.tagmask = m; + c.tagenb = (m << 1) & ~m; ++ c.dropbits = 0; ++ c.offsetfuzzy = 0; + break; + } + ++ /* if big enough base file exists, update config */ ++ if (stat(name, &sb) == -1) ++ sb.st_size = 0; ++ dbzconfbase(&c, sb.st_size); ++ + /* write it out */ + fn = enstring(name, dir); + if (fn == NULL) +@@ -504,7 +623,7 @@ + DEBUG(("dbzsize: preposterous input (%ld)\n", contents)); + return(DEFSIZE); + } +- n = (contents/2)*3; /* try to keep table at most 2/3 full */ ++ n = contents*2; /* try to keep table at most 1/2 full */ + if (!(n&01)) /* make it odd */ + n++; + DEBUG(("dbzsize: tentative size %ld\n", n)); +@@ -561,12 +680,11 @@ + register char *fn; + struct dbzconfig c; + register int i; +- register long top; ++ register long top, vtop; + register FILE *f; + register int newtable; + register of_t newsize; + struct stat sb; +- register of_t m; + + if (pagf != NULL) { + DEBUG(("dbzagain: database already open\n")); +@@ -590,35 +708,34 @@ + return(-1); + } + +- /* calculate tagging from old file */ +- if (stat(oldname, &sb) != -1) { +- for (m = 1, i = 0; m < sb.st_size; i++, m <<= 1) +- continue; +- +- /* if we had more tags than the default, use the new data */ +- if ((c.tagmask | c.tagenb) && m > (1 << TAGSHIFT)) { +- c.tagshift = i; +- c.tagmask = (~(unsigned long)0) >> (i + 1); +- c.tagenb = (c.tagmask << 1) & ~c.tagmask; +- } +- } +- + /* tinker with it */ + top = 0; ++ vtop = 0; + newtable = 0; + for (i = 0; i < NUSEDS; i++) { + if (top < c.used[i]) + top = c.used[i]; +- if (c.used[i] == 0) ++ if (vtop < c.vused[i]) ++ vtop = c.vused[i]; ++ if (c.used[i] == 0 || c.vused[i] == 0) + newtable = 1; /* hasn't got full usage history yet */ + } +- if (top == 0) { ++ if (top == 0 || vtop == 0) { + DEBUG(("dbzagain: old table has no contents!\n")); + newtable = 1; + } +- for (i = NUSEDS-1; i > 0; i--) ++ for (i = NUSEDS-1; i > 0; i--) { + c.used[i] = c.used[i-1]; ++ c.vused[i] = c.vused[i-1]; ++ } + c.used[0] = 0; ++ c.vused[0] = 0; ++ ++ /* calculate tagging from old file */ ++ if (stat(oldname, &sb) != -1 && vtop < sb.st_size) ++ vtop = sb.st_size; ++ dbzconfbase(&c, vtop); ++ + newsize = dbzsize(top); + if (!newtable || newsize > c.tsize) /* don't shrink new table */ + c.tsize = newsize; +@@ -790,6 +907,7 @@ + /* misc. setup */ + crcinit(); + written = 0; ++ notag_warned = 0; + prevp = FRESH; + DEBUG(("dbminit: succeeded\n")); + return(0); +@@ -861,7 +979,6 @@ + DEBUG(("dbmclose: fclose(dirf) failed\n")); + ret = -1; + } +- + DEBUG(("dbmclose: %s\n", (ret == 0) ? "succeeded" : "failed")); + return(ret); + } +@@ -953,12 +1070,13 @@ + fetch(key) + datum key; + { +- char buffer[DBZMAXKEY + 1]; ++ char buffer[DBZMAXKEY + MAXDROPBYTES + 1]; + static of_t key_ptr; /* return value points here */ + datum output; + register size_t keysize; + register size_t cmplen; +- register char *sepp; ++ int j, nb2r; ++ char *bp; + + DEBUG(("fetch: (%s)\n", key.dptr)); + output.dptr = NULL; +@@ -982,33 +1100,41 @@ + } + + cmplen = keysize; +- sepp = &conf.fieldsep; + if (key.dptr[keysize-1] == '\0') { + cmplen--; +- sepp = &buffer[keysize-1]; + } ++ nb2r = keysize + conf.offsetfuzzy; + start(&srch, &key, FRESH); + while ((key_ptr = search(&srch)) != NOTFOUND) { + DEBUG(("got 0x%lx\n", key_ptr)); + + /* fetch the key */ ++ key_ptr <<= conf.dropbits; + if (fseek(basef, key_ptr, SEEK_SET) != 0) { + DEBUG(("fetch: seek failed\n")); + return(output); + } +- if (fread((POINTER)buffer, 1, keysize, basef) != keysize) { ++ if (fread((POINTER)buffer, 1, nb2r, basef) < keysize) { + DEBUG(("fetch: read failed\n")); + return(output); + } ++ for (j=0,bp=buffer; j conf.vused[0]) ++ conf.vused[0] = value; ++ value >>= conf.dropbits; + DEBUG(("store: (%s, %ld)\n", key.dptr, (long)value)); + if (!okayvalue(value)) { + DEBUG(("store: reserved bit or overflow in 0x%lx\n", value)); +@@ -1166,7 +1295,7 @@ + { + register long m; + register long tagmask; +- register int i; ++ register int i, j; + + if (size <= 0) + return(0L); /* silly size */ +@@ -1174,6 +1303,10 @@ + for (m = 1, i = 0; m < size; i++, m <<= 1) + continue; + ++ for (j=0; m < (1 << TAGSHIFT) && j<=MAXDROPBITS; j++) { ++ m <<= 1; ++ i--; ++ } + if (m < (1 << TAGSHIFT)) + return(0L); /* not worth tagging */ + +@@ -1204,15 +1337,19 @@ + cp->fieldsep = '\t'; + for (i = 0; i < NUSEDS; i++) + cp->used[i] = 0; ++ for (i = 0; i < NUSEDS; i++) ++ cp->vused[i] = 0; + cp->valuesize = SOF; + mybytemap(cp->bytemap); + cp->casemap = DEFCASE; + cp->tagenb = TAGENB; + cp->tagmask = TAGMASK; + cp->tagshift = TAGSHIFT; +- DEBUG(("getconf: defaults (%ld, %c, (0x%lx/0x%lx<<%d))\n", ++ cp->dropbits = 0; ++ cp->offsetfuzzy = 0; ++ DEBUG(("getconf: defaults (%ld, %c, (0x%lx/0x%lx<<%d %d))\n", + cp->tsize, cp->casemap, cp->tagenb, +- cp->tagmask, cp->tagshift)); ++ cp->tagmask, cp->tagshift, cp->dropbits)); + return(0); + } + (void) ungetc(c, df); +@@ -1238,8 +1375,22 @@ + } + for (i = 0; i < cp->valuesize; i++) + cp->bytemap[i] = getno(df, &err); +- if (getc(df) != '\n') +- err = -1; ++ ++ /* dbz v3.3 has one more parameter, dropbits, at the end. */ ++ cp->dropbits = 0; ++ if ((c = getc(df)) != '\n') { ++ (void) ungetc(c, df); ++ cp->dropbits = getno(df, &err); ++ if (cp->dropbits < 0 || cp->dropbits > MAXDROPBITS) { ++ DEBUG(("getconf: invalid dropbits (%d)\n", cp->dropbits)); ++ err = -1; ++ cp->dropbits = 0; ++ } ++ if (getc(df) != '\n') ++ err = -1; ++ } ++ cp->offsetfuzzy = (1 << cp->dropbits) - 1; ++ + #ifdef DBZDEBUG + DEBUG(("size %ld, sep %d, cmap %c, tags 0x%lx/0x%lx<<%d, ", cp->tsize, + cp->fieldsep, cp->casemap, cp->tagenb, cp->tagmask, +@@ -1248,16 +1399,32 @@ + for (i = 0; i < cp->valuesize; i++) { + DEBUG((" %d", cp->bytemap[i])); + } ++ DEBUG((" dbit %d", cp->dropbits)); + DEBUG(("\n")); + #endif + + /* second line, the usages */ + for (i = 0; i < NUSEDS; i++) + cp->used[i] = getno(df, &err); +- if (getc(df) != '\n') ++ if ((c = getc(df)) != '\n') { ++ DEBUG(("getconf: unexpected char %c detected on 2nd line\n", c)); + err = -1; ++ } + DEBUG(("used %ld %ld %ld...\n", cp->used[0], cp->used[1], cp->used[2])); + ++ /* third line, the base file sizes. handle earlier format as well */ ++ if ((c = getc(df)) != EOF) { ++ (void) ungetc(c, df); ++ for (i = 0; i < NUSEDS; i++) ++ cp->vused[i] = getno(df, &err); ++ if (getc(df) != '\n') ++ err = -1; ++ DEBUG(("used %ld %ld %ld...\n", cp->vused[0], cp->vused[1], cp->vused[2])); ++ } else { ++ for (i = 0; i < NUSEDS; i++) ++ cp->vused[i] = 0; ++ } ++ + if (err < 0) { + DEBUG(("getconf error\n")); + return(-1); +@@ -1324,9 +1491,12 @@ + cp->tagmask, cp->tagshift, cp->valuesize); + for (i = 0; i < cp->valuesize; i++) + (void) fprintf(f, " %d", cp->bytemap[i]); ++ (void) fprintf(f, " %d", cp->dropbits); + (void) fprintf(f, "\n"); + for (i = 0; i < NUSEDS; i++) + (void) fprintf(f, "%ld%c", cp->used[i], (i < NUSEDS-1) ? ' ' : '\n'); ++ for (i = 0; i < NUSEDS; i++) ++ (void) fprintf(f, "%ld%c", cp->vused[i], (i < NUSEDS-1) ? ' ' : '\n'); + + (void) fflush(f); + if (ferror(f)) +@@ -1343,13 +1513,16 @@ + getcore(f) + FILE *f; + { ++ register char *it; ++#ifndef MMAP + register of_t *p; + register size_t i; + register size_t nread; +- register char *it; +-#ifdef MMAP ++#else + struct stat st; ++#endif + ++#ifdef MMAP + if (fstat(fileno(f), &st) == -1) { + DEBUG(("getcore: fstat failed\n")); + return(NULL); +@@ -1368,7 +1541,7 @@ + DEBUG(("getcore: mmap failed\n")); + return(NULL); + } +-#if defined (MADV_RANDOM) ++#if defined (MADV_RANDOM) + /* not present in all versions of mmap() */ + madvise(it, (size_t)conf.tsize * SOF, MADV_RANDOM); + #endif +@@ -1426,7 +1599,7 @@ + { + register long h; + +- h = hash(kp->dptr, kp->dsize); ++ h = dbzhash(kp->dptr, kp->dsize); + if (osp != FRESH && osp->hash == h) { + if (sp != osp) + *sp = *osp; +@@ -1434,8 +1607,9 @@ + } else { + sp->hash = h; + sp->tag = MKTAG(h / conf.tsize); +- DEBUG(("tag 0x%lx\n", sp->tag)); + sp->place = h % conf.tsize; ++ DEBUG(("hash %8.8lx tag %8.8lx place %ld\n", ++ sp->hash, sp->tag, sp->place)); + sp->tabno = 0; + sp->run = (conf.olddbz) ? conf.tsize : MAXRUN; + sp->aborted = 0; +@@ -1564,6 +1738,10 @@ + if (v != LONG_MAX) /* and it won't overflow */ + #endif + value = v; ++ } else if (notag_warned == 0) { ++ notag_warned = 1; ++ fprintf(stderr, "can't tag value 0x%lx", v); ++ fprintf(stderr, " tagboth = 0x%lx\n", tagboth); + } + DEBUG(("tagged value is 0x%lx\n", value)); + value = BIAS(value); +@@ -1716,10 +1894,10 @@ + } + + /* +- - hash - Honeyman's nice hashing function ++ - dbzhash - Honeyman's nice hashing function + */ +-static long +-hash(name, size) ++long ++dbzhash(name, size) + register char *name; + register int size; + { +@@ -1728,11 +1906,44 @@ + while (size--) { + sum = (sum >> 7) ^ CrcTable[(sum ^ (*name++)) & 0x7f]; + } +- DEBUG(("hash: returns (%ld)\n", sum)); ++ DEBUG(("hash: returns (%8.8lx)\n", sum)); + return(sum); + } + + /* ++ - dbzhash64 - 64-bit extended hashing function ++ */ ++ ++void ++dbzhash64(name_in, size_in, hash) ++register char *name_in; ++register int size_in; ++long hash[2]; ++{ ++ char *name; ++ int size; ++ long sum = 0L; ++ char buffer[DBZMAXKEY + 1]; ++ ++ if (size_in > DBZMAXKEY) ++ size_in = DBZMAXKEY; ++ name = mapcase(buffer, name_in, size_in); ++ ++ size = size_in; ++ while (size--) { ++ sum = (sum >> 7) ^ CrcTable[(sum ^ (*name++)) & 0x7f]; ++ } ++ hash[0] = sum; ++ ++ size = size_in; ++ while (size--) { ++ sum = (sum >> 7) ^ CrcTable[(sum ^ (*--name)) & 0x7f]; ++ } ++ /* set bit 31 from the number of characters in name */ ++ hash[1] = sum; ++} ++ ++/* + * case-mapping stuff + * + * Borrowed from C News, by permission of the authors. Somewhat modified. +@@ -1891,7 +2102,7 @@ + /* crazy -- "postmaster" is case-insensitive */ + return(s); + } +- return(p); ++ return(p); + case '=': /* 2.11, neither sensible nor conformant */ + return(s); /* all case-insensitive */ + } +@@ -1914,3 +2125,95 @@ + return(old); + } + #endif ++ ++#ifdef DBZTEST ++void CloseOnExec(int i, int j) {} ++ ++usage() ++{ ++ fprintf(stderr, "usage: dbztest [-r] [-s size] \n"); ++ fprintf(stderr, " -r rebuild history. deletes .dir .pag files\n"); ++ fprintf(stderr, " -s size number of history lines[500000]\n"); ++ fprintf(stderr, " history history text file\n"); ++ exit(1); ++} ++ ++int main(argc, argv) ++int argc; ++char *argv[]; ++{ ++ int i, line; ++ FILE *fpi; ++ char ibuf[2048], *p; ++ datum key, val, data; ++ long where; ++ int initialize = 0, size = 500000; ++ char *history = NULL; ++ ++ for (i=1; i + + * Added "xmode" as alias for "mode" + + +--- inn-1.7.2.orig/innd/nc.c ++++ inn-1.7.2/innd/nc.c +@@ -80,6 +80,7 @@ + { "takethis", NCtakethis }, + { "list", NClist }, + { "mode", NCmode }, ++ { "xmode", NCmode }, + { "quit", NCquit }, + { "head", NChead }, + { "stat", NCstat }, +@@ -735,7 +796,10 @@ + HANDOFF h; + + /* Skip the first word, get the argument. */ +- for (p = cp->In.Data + STRLEN("mode"); ISWHITE(*p); p++) ++ p = cp->In.Data; ++ if (*p == 'x') p++; ++ p += STRLEN("mode"); ++ for (; ISWHITE(*p); p++) + continue; + + if (caseEQ(p, "reader")) +@@ -993,7 +1057,8 @@ + } + + if (cp->State == CSgetauth) { +- if (caseEQn(bp->Data, "mode", 4)) ++ if (caseEQn(bp->Data, "mode", 4) || ++ caseEQn(bp->Data, "xmode", 5)) + NCmode(cp); + else + NCauthinfo(cp); --- inn-1.7.2q.orig/debian/patches/2_perl_timer +++ inn-1.7.2q/debian/patches/2_perl_timer @@ -0,0 +1,43 @@ +diff -ruN inn-1.7.2.orig/innd/art.c inn-1.7.2/innd/art.c +--- inn-1.7.2.orig/innd/art.c 2003-07-06 14:34:10.000000000 +0200 ++++ inn-1.7.2/innd/art.c 2003-07-06 14:32:05.000000000 +0200 +@@ -1892,7 +1892,9 @@ + + #if defined(DO_PERL) + pathForPerl = HeaderFind(article->Data, "Path", 4) ; ++ TMRstart(TMR_PERL); + if ((perlrc = (char *)HandleArticle(Data.Body)) != NULL) { ++ TMRstop(TMR_PERL); + (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); +@@ -1904,6 +1906,7 @@ + ARTreject(buff, article); + return buff; + } ++ TMRstop(TMR_PERL); + #endif /* DO_PERL */ + + /* I suppose some masochist will run with both TCP and PERL in together */ +diff -ruN inn-1.7.2.orig/innd/timer.c inn-1.7.2/innd/timer.c +--- inn-1.7.2.orig/innd/timer.c 2003-07-06 14:34:08.000000000 +0200 ++++ inn-1.7.2/innd/timer.c 2003-07-06 14:28:03.000000000 +0200 +@@ -100,6 +100,7 @@ + case TMR_ARTCNCL: str = "artcncl"; break; + case TMR_HISHAVE: str = "hishave"; break; + case TMR_HISGREP: str = "hisgrep"; break; ++ case TMR_PERL: str = "perl"; break; + } + sprintf(buf, "%s %d(%d) ", str, cumulative[i], count[i]); + cumulative[i] = count[i] = 0; +diff -ruN inn-1.7.2.orig/innd/timer.h inn-1.7.2/innd/timer.h +--- inn-1.7.2.orig/innd/timer.h 2003-07-06 14:34:08.000000000 +0200 ++++ inn-1.7.2/innd/timer.h 2003-07-06 14:28:27.000000000 +0200 +@@ -12,6 +12,7 @@ + #define TMR_ARTCNCL 7 + #define TMR_HISHAVE 8 + #define TMR_HISGREP 9 ++#define TMR_PERL 10 + + extern void TMRinit(); + extern int TMRmainloophook(); --- inn-1.7.2q.orig/debian/patches/use_controlchan +++ inn-1.7.2q/debian/patches/use_controlchan @@ -0,0 +1,16 @@ +--- inn-1.7.2.orig/innd/art.c ++++ inn-1.7.2/innd/art.c +@@ -1280,6 +1316,13 @@ + } + } + ++ { ++ char *UseControlchan; ++ if ((UseControlchan = GetConfigValue(_CONF_USECONTROLCHAN)) != NULL) ++ if (EQ(UseControlchan, "true") || EQ(UseControlchan, "yes")) ++ return; ++ } ++ + /* Build the command vector and execute it. */ + av[0] = buff; + av[1] = COPY(Data->Poster); --- inn-1.7.2q.orig/debian/patches/no_throttled_rmgroups +++ inn-1.7.2q/debian/patches/no_throttled_rmgroups @@ -0,0 +1,16 @@ +--- inn-1.7.2.orig/innd/cc.c ++++ inn-1.7.2/innd/cc.c +@@ -1387,6 +1429,13 @@ + if ((ngp = NGfind(av[0])) == NULL) + return CCnogroup; + ++ /* ++ * See FAQ Q 6.3: INN shreds the active file when doing multiple ++ * rmgroups if the server is throttled. So disallow that for now. ++ */ ++ if (Mode == OMthrottled) ++ return "1 server throttled"; ++ + /* Update the in-core data. */ + if (!ICDrmgroup(ngp)) + return "1 Failed"; --- inn-1.7.2q.orig/debian/patches/parsedate_gcc4 +++ inn-1.7.2q/debian/patches/parsedate_gcc4 @@ -0,0 +1,14 @@ +Fixes a FTBFS bug with gcc 4. + +diff -ruNp inn-1.7.2.orig/lib/parsedate.y inn-1.7.2/lib/parsedate.y +--- inn-1.7.2.orig/lib/parsedate.y 2005-07-31 12:58:53.000000000 +0200 ++++ inn-1.7.2/lib/parsedate.y 2005-07-31 12:58:50.000000000 +0200 +@@ -672,7 +672,7 @@ LookupWord(buff, length) + } + + +-static int ++int + date_lex() + { + register char c; --- inn-1.7.2q.orig/debian/patches/path_audit_fix +++ inn-1.7.2q/debian/patches/path_audit_fix @@ -0,0 +1,11 @@ +diff -urN inn-1.7.2.orig/innd/rc.c inn-1.7.2/innd/rc.c +--- inn-1.7.2.orig/innd/rc.c 2003-07-08 17:25:21.000000000 +0200 ++++ inn-1.7.2/innd/rc.c 2003-08-20 02:21:04.000000000 +0200 +@@ -542,6 +542,7 @@ + i++; + *count = i; + rp = *list = NEW(REMOTEHOST, *count); ++ memset(rp, 0, *count * sizeof(REMOTEHOST)); + #if !defined(DO_HAVE_UNIX_DOMAIN) + rp->Address.s_addr = inet_addr(LOOPBACK_HOST); + rp->Name = COPY("localhost"); --- inn-1.7.2q.orig/debian/patches/0_insync_fastrm_symlink +++ inn-1.7.2q/debian/patches/0_insync_fastrm_symlink @@ -0,0 +1,11 @@ +--- inn-1.7.2.orig/expire/fastrm.c ++++ inn-1.7.2/expire/fastrm.c +@@ -266,7 +266,7 @@ + } + + if (AmRoot) { +- if (stat(p, &sb) < 0) { ++ if (lstat(p, &sb) < 0) { + if (errno != ENOENT) { + oerrno = errno; + (void)fprintf(stderr, "%s: stat %s ", MyName, p); --- inn-1.7.2q.orig/debian/patches/0_insync_pathfeed +++ inn-1.7.2q/debian/patches/0_insync_pathfeed @@ -0,0 +1,44 @@ +--- inn-1.7.2.orig/doc/newsfeeds.5 ++++ inn-1.7.2/doc/newsfeeds.5 +@@ -304,6 +304,7 @@ + N Value of the Newsgroups header + O Overview data + R Information needed for replication ++ P Path header information needed for inpaths + .fi + More than one letter can be used; the entries will be separated by a + space, and written in the order in which they are specified. +--- inn-1.7.2.orig/include/configdata.h ++++ inn-1.7.2/include/configdata.h +@@ -383,6 +389,7 @@ + #define FEED_MAXFLAGS 20 + #define FEED_BYTESIZE 'b' + #define FEED_FULLNAME 'f' ++#define FEED_PATH 'P' + #define FEED_HDR_DISTRIB 'D' + #define FEED_HDR_NEWSGROUP 'N' + #define FEED_MESSAGEID 'm' +--- inn-1.7.2.orig/innd/newsfeeds.c ++++ inn-1.7.2/innd/newsfeeds.c +@@ -339,6 +339,7 @@ + NeedOverview = TRUE; /* Overview data */ + break; + case FEED_BYTESIZE: /* Size in bytes */ ++ case FEED_PATH: /* Pathline header */ + case FEED_FULLNAME: /* Full filename */ + case FEED_HDR_DISTRIB: /* Distribution header */ + case FEED_HDR_NEWSGROUP: /* Newsgroup header */ +--- inn-1.7.2.orig/innd/site.c ++++ inn-1.7.2/innd/site.c +@@ -445,6 +445,11 @@ + BUFFappend(bp, ITEMSEP, STRLEN(ITEMSEP)); + BUFFappend(bp, Data->Feedsite, Data->FeedsiteLength); + break; ++ case FEED_PATH: ++ if (Dirty) ++ BUFFappend(bp, ITEMSEP, STRLEN(ITEMSEP)); ++ BUFFappend(bp, Data->Path, Data->PathLength); ++ break; + } + Dirty = TRUE; + } --- inn-1.7.2q.orig/debian/patches/misc_paths.h +++ inn-1.7.2q/debian/patches/misc_paths.h @@ -0,0 +1,18 @@ +--- inn-1.7.2.orig/include/paths.h ++++ inn-1.7.2/include/paths.h +@@ -177,7 +177,14 @@ + #define _CONF_CONTENTTYPE "mime-contenttype" + /* Default encoding */ + #define _CONF_ENCODING "mime-encoding" +- ++ /* Default listening address */ ++#define _CONF_BINDADDRESS "bindaddress" ++ /* Default NNTP port */ ++#define _CONF_PORT "port" ++ /* Try using actived */ ++#define _CONF_USEACTIVED "useactived" ++ /* Disable internal control messages processing */ ++#define _CONF_USECONTROLCHAN "usecontrolchan" + + /* + ** 13. TCL Support --- inn-1.7.2q.orig/debian/patches/rc_initialise_everything +++ inn-1.7.2q/debian/patches/rc_initialise_everything @@ -0,0 +1,14 @@ +diff -ruNp inn-1.7.2.orig/innd/rc.c inn-1.7.2/innd/rc.c +--- inn-1.7.2.orig/innd/rc.c 2004-10-26 19:17:43.000000000 +0200 ++++ inn-1.7.2/innd/rc.c 2004-10-26 19:17:37.000000000 +0200 +@@ -727,6 +727,10 @@ RCreadfile(list, count, filename) + rp->Password = COPY(pass); + rp->Patterns = (pats && *pats) ? CommaSplit(COPY(pats)) : NULL; + rp->Streaming = (*list + j)->Streaming ; ++ rp->RequirePathHostForPath = COPY(hp->h_name); ++ rp->PathAddr = (*list + j)->PathAddr; ++ rp->PathIdent = (*list + j)->PathIdent; ++ rp->PathNoIdentIdents = NULL; + rp++; + } + #else --- inn-1.7.2q.orig/debian/patches/misc_config_files +++ inn-1.7.2q/debian/patches/misc_config_files @@ -0,0 +1,67 @@ +--- inn-1.7.2.orig/samples/hosts.nntp.nolimit ++++ inn-1.7.2/samples/hosts.nntp.nolimit +@@ -2,5 +2,6 @@ + ## + ## Any hosts listed in this file will be permitted to connect past the + ## limits set up by the `-i' and `-X' flags to innd. ++## Listed hosts must be present in hosts.nntp too! + ## + localhost +--- inn-1.7.2.orig/samples/nnrp.access ++++ inn-1.7.2/samples/nnrp.access +@@ -15,7 +15,8 @@ + ## 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:::* ++#*.foo.com:Read Post:::* ++ + stdin:Read Post:::* + localhost:Read Post:::* + 127.0.0.1:Read Post:::* +--- inn-1.7.2.orig/samples/nntpsend.ctl ++++ inn-1.7.2/samples/nntpsend.ctl +@@ -10,6 +10,6 @@ + ## 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: ++#nsavax:erehwon.nsavax.gov::-S -t60 ++#walldrug:walldrug.com:4m-1m:-T1800 -t300 ++#kremvax:kremvax.cis:2m: +--- inn-1.7.2.orig/samples/passwd.nntp ++++ inn-1.7.2/samples/passwd.nntp +@@ -11,4 +11,4 @@ + ##