Date: Tue, 11 Jan 2000 22:07:34 +0100 (CET) From: dirk.meyer@dinoex.sub.org To: FreeBSD-gnats-submit@freebsd.org Subject: ports/16073: news/nntp fix for y2k Message-ID: <200001112107.WAA13328@home.dinoex.sub.org>
next in thread | raw e-mail | index | archive | help
>Number: 16073 >Category: ports >Synopsis: news/nntp fix for y2k >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 11 17:20:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Dirk Meyer >Release: FreeBSD 3.3-RELEASE i386 >Organization: privat >Environment: ports news/cnews installed >Description: updated port to newer version. - newer Master-Site - supports seperated overview dirs. - updated configuration - added y2k patch New rework of configuration >How-To-Repeat: >Fix: apply this patches diff nntp/Makefile nntp-1.5.12.2/Makefile --- nntp/Makefile Fri Dec 3 08:35:58 1999 +++ nntp-1.5.12.2/Makefile Sun Jan 9 11:17:01 2000 @@ -6,21 +6,25 @@ # $FreeBSD: ports/news/nntp/Makefile,v 1.17 1999/11/26 18:22:26 steve Exp $ # -DISTNAME= nntp-t5 -PKGNAME= nntp-1.5.11.5 +DISTNAME= nntp.1.5.12.2 +PKGNAME= nntp-1.5.12.2 CATEGORIES= news -MASTER_SITES= ftp://ftp.abs.net/unix/ \ - ftp://ftp.ww.net/pub/unix/news/nntp/ +MASTER_SITES= ftp://ftp.academ.com/pub/nntp/server/ + +PATCH_SITES= ftp://ftp.lan-ks.de/pub/c-news/ \ + ftp://ftp.dinoex.org/pub/c-news/ +PATCHFILES= nntp-patch-y2k MAINTAINER= adam@veda.is BUILD_DEPENDS= ${LOCALBASE}/lib/libcnews.a:${PORTSDIR}/news/cnews +NO_WRKSUBDIR= yes MAN1= nntpxmit.1 -MAN8= nntpd.8c mkgrdates.8c +MAN8= nntpd.8c acttimes.8c PLIST= ${WRKDIR}/.PLIST.sed -MODIFY= conf.h xfer/Makefile xmit/Makefile +MODIFY= conf.h Makefile NEWSBIN?= ${PREFIX}/news/cnewsbin NEWSCTL?= ${PREFIX}/news/lib @@ -40,10 +44,15 @@ -e "s=/var/news/over.view=${NEWSOV}=" \ -e "s=/var/news=${NEWSARTS}=" \ -e "s=/usr/local/bin=${PREFIX}/bin=" \ + -e "s=/usr/local/sbin=${PREFIX}/sbin=" \ + -e "s=/usr/local/man=${PREFIX}/man=" \ ${WRKSRC}/${i}.sed >${WRKSRC}/${i} .endfor @${SED} \ -e "s=news/cnewsbin=${NEWSBIN:S=${PREFIX}/==}=" \ ${PKGDIR}/PLIST >${PLIST} + +post-install: + ${INSTALL_DATA} ${WRKSRC}/overview.fmt ${NEWSCTL}/overview.fmt .include <bsd.port.mk> diff nntp/files/md5 nntp-1.5.12.2/files/md5 --- nntp/files/md5 Wed Jan 4 02:44:04 1995 +++ nntp-1.5.12.2/files/md5 Sun Jan 9 10:50:30 2000 @@ -1 +1,2 @@ -MD5 (nntp-t5.tar.gz) = eb5a033e21b5443640b4161f4b39f0a7 +MD5 (nntp.1.5.12.2.tar.gz) = 85f344ee760462719e4fa80e364a8098 +MD5 (nntp-patch-y2k) = ec2d3fc974559b3f6f8f4a4bfc8dcb44 diff nntp/patches/patch-aa nntp-1.5.12.2/patches/patch-aa --- nntp/patches/patch-aa Tue Jun 22 19:06:07 1999 +++ nntp-1.5.12.2/patches/patch-aa Sun Jan 9 11:17:56 2000 @@ -1,899 +1,386 @@ -*** ../nntp-t5.orig/Makefile Fri Aug 13 00:27:44 1993 ---- ./Makefile Mon Mar 18 18:52:31 1996 -*************** -*** 4,14 **** - # The program that knows how to deal with makefiles. [Uncomment if needed.] - # MAKE=make - # set CFLAGS to be -Ipath/to/special/includes if needed -! CFLAGS= -O - # set LIBS to be -lneededlibrary if needed - #LIBS = -ldbz -! #LIBS = /usr/local/lib/dbz.o -! LIBS = -ldbm - - DISTFILES = Makefile README CHANGES - ---- 4,14 ---- - # The program that knows how to deal with makefiles. [Uncomment if needed.] - # MAKE=make - # set CFLAGS to be -Ipath/to/special/includes if needed -! CFLAGS= -O2 -I/usr/local/include - # set LIBS to be -lneededlibrary if needed - #LIBS = -ldbz -! LIBS = /usr/local/lib/libcnews.a -lcrypt -lutil -! #LIBS = -ldbm - - DISTFILES = Makefile README CHANGES - -*************** -*** 24,30 **** - - make_server: /nowhere - cd server; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" -! cd support; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd doc; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd xmit; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd xfer; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" ---- 24,30 ---- - - make_server: /nowhere - cd server; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" -! # cd support; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd doc; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd xmit; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" - cd xfer; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}" -*************** -*** 41,48 **** - - install_server: - cd server; make install -! cd support; make install - cd doc; make install - - clean: - rm -f .[a-z]* ; for i in $(DISTDIRS); do cd $$i; $(MAKE) $(MFLAGS) clean; cd ..; done ---- 41,50 ---- - - install_server: - cd server; make install -! # cd support; make install - cd doc; make install -+ cd xmit; make install -+ cd xfer; make install - - clean: - rm -f .[a-z]* ; for i in $(DISTDIRS); do cd $$i; $(MAKE) $(MFLAGS) clean; cd ..; done -*** ../nntp-t5.orig/conf.h Tue Mar 19 22:55:58 1996 ---- ./conf.h Tue Mar 19 23:48:26 1996 -*************** -*** 8,32 **** - */ - - -! #undef ALONE /* True if we're running without inetd */ - - #ifdef ALONE -! #undef FASTFORK /* True if we don't want to read active file on start*/ - #endif - -! #define LOAD 5 /* Loadav above which server refuses connections */ - /* - * If you want to experiment with the dynamic allocation of the article - * array, define DYNAMIC_ART_ARRAY. - * This code came to beta too late for through testing, but it is a problem - * at some sites, so it is an option. Please report problems to "nntp@tmc.edu" - */ -! #undef DYNAMIC_ART_ARRAY - - #undef BSD_42 /* 4.2 compatability code -- if this is defined, */ - /* DBM probably wants to be defined as well. */ - -! #define BSD_43 /* Define if you are running on BSD 4.3 */ - - #undef CMU_MACH /* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */ - ---- 8,37 ---- - */ - - -! #define ALONE /* True if we're running without inetd */ - - #ifdef ALONE -! #define FASTFORK /* True if we don't want to read active file on start*/ -! #define NEWS_GID 8 -! #define NEWS_UID 8 - #endif - -! #undef LOAD 5 /* Loadav above which server refuses connections */ - /* - * If you want to experiment with the dynamic allocation of the article - * array, define DYNAMIC_ART_ARRAY. - * This code came to beta too late for through testing, but it is a problem - * at some sites, so it is an option. Please report problems to "nntp@tmc.edu" - */ -! #define DYNAMIC_ART_ARRAY - - #undef BSD_42 /* 4.2 compatability code -- if this is defined, */ - /* DBM probably wants to be defined as well. */ - -! #undef BSD_43 /* Define if you are running on BSD 4.3 */ -! #define BSD_44 /* or this for BSD 4.4 */ -! -! #define BSD_STDIO /* Use BSD FILE* struct */ - - #undef CMU_MACH /* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */ - -*************** -*** 35,57 **** - #undef TLI /* Define this if you want to use TLI instead of */ - /* sockets */ - -! #define NDBM /* Use new-style (4.3) ndbm(3x) libraries */ - - #undef DBM /* True if we want to use the old dbm(3x) libraries */ - /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ - /* be -ldbm */ - -! #undef DBZ /* True if we want to use dbz libraries */ - /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ - /* be /usr/lib/dbz.o and install dbz.h */ - - #undef USGHIST /* Use USG style history file (no DBM) */ - /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/ - -! #undef CNEWS /* define this if you are running C News */ -! #undef CNEWS_CLEARTEXT /* define this if you have a modern C News that handles - input files ending in ".t" as cleartext */ -! #undef BATCHED_INPUT /* define if you want to support C News style - batched input (not supported by B-NEWS) */ - #undef MSGID /* define this if you want to run msgidd to keep - track of recent msgids via daemon */ ---- 40,62 ---- - #undef TLI /* Define this if you want to use TLI instead of */ - /* sockets */ - -! #undef NDBM /* Use new-style (4.3) ndbm(3x) libraries */ - - #undef DBM /* True if we want to use the old dbm(3x) libraries */ - /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ - /* be -ldbm */ - -! #define DBZ /* True if we want to use dbz libraries */ - /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ - /* be /usr/lib/dbz.o and install dbz.h */ - - #undef USGHIST /* Use USG style history file (no DBM) */ - /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/ - -! #define CNEWS /* define this if you are running C News */ -! #define CNEWS_CLEARTEXT /* define this if you have a modern C News that handles - input files ending in ".t" as cleartext */ -! #define BATCHED_INPUT /* define if you want to support C News style - batched input (not supported by B-NEWS) */ - #undef MSGID /* define this if you want to run msgidd to keep - track of recent msgids via daemon */ -*************** -*** 66,78 **** - /* typedefs for u_long */ - #define VOIDSIG /* Newfangled signal() returns void, old returns int */ - -! #define GHNAME /* Define if you have gethostname() */ - #undef UUNAME /* Define to use /etc/uucpname */ - /* If neither of these are defined, */ - /* inews will use the contents of */ - /* /usr/include/whoami.h */ - -! #undef MMAP /* if your OS supports mmap() */ - - /* - * If you DON'T have vfork, make this "#define vfork fork" ---- 71,83 ---- - /* typedefs for u_long */ - #define VOIDSIG /* Newfangled signal() returns void, old returns int */ - -! #undef GHNAME /* Define if you have gethostname() */ - #undef UUNAME /* Define to use /etc/uucpname */ - /* If neither of these are defined, */ - /* inews will use the contents of */ - /* /usr/include/whoami.h */ - -! #define MMAP /* if your OS supports mmap() */ - - /* - * If you DON'T have vfork, make this "#define vfork fork" -*************** -*** 89,95 **** - #undef MINFILES MINFREE/4 - /* NNTP will not allow an XFER if there is less */ - /* than this many inodes on the SPOOLDIR filesystem */ -! #undef SETPROCTITLE /* if you want status visable via ps */ - - #undef IHAVE_DEBUG /* Copious debugging output from ihave */ - ---- 94,101 ---- - #undef MINFILES MINFREE/4 - /* NNTP will not allow an XFER if there is less */ - /* than this many inodes on the SPOOLDIR filesystem */ -! #define SETPROCTITLE /* if you want status visable via ps */ -! #define HAVE_PROCTITLE /* if the OS has setproctitle() */ - - #undef IHAVE_DEBUG /* Copious debugging output from ihave */ - -*************** -*** 112,118 **** - * if you are running BNEWS. At least, not yet. :-) - */ - -! /* #define UMASK 022 */ - - /* - * If you have the syslog library routine, define SYSLOG to ---- 118,124 ---- - * if you are running BNEWS. At least, not yet. :-) - */ - -! #define UMASK 022 - - /* - * If you have the syslog library routine, define SYSLOG to -*************** -*** 182,188 **** - * e.g. #define DOMAIN "berkeley.edu" - */ - -! #define DOMAIN "uucp" - #undef HIDDENNET - - /* ---- 188,194 ---- - * e.g. #define DOMAIN "berkeley.edu" - */ - -! #undef DOMAIN "uucp" - #undef HIDDENNET - - /* -*************** -*** 210,216 **** - /* loaded already, defining this may be a bad idea */ - - #define XOVER /* xover -- Return .overview data */ -! #undef OVER_XREFS /* overview files have xref data in them */ - #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */ - - #undef XINDEX /* Optional support for tin's index files */ ---- 216,222 ---- - /* loaded already, defining this may be a bad idea */ - - #define XOVER /* xover -- Return .overview data */ -! #define OVER_XREFS /* overview files have xref data in them */ - #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */ - - #undef XINDEX /* Optional support for tin's index files */ -*************** -*** 237,243 **** - * too. - */ - -! #define SERVER_FILE "/usr/local/lib/rn/server" - - /* - * Person (user name) to post news as. ---- 243,249 ---- - * too. - */ - -! #define SERVER_FILE "/usr/local/etc/nntpserver" - - /* - * Person (user name) to post news as. -*************** -*** 261,286 **** - /* - * This file is where access information is stored - */ -! #define ACCESS_FILE "/usr/lib/news/nntp_access" - - /* - * But if you don't have C News or INN, you can run acttimes (see the support - * directory) to maintain an active.times file. - */ -! #define ACTIVE_TIMES_FILE "/usr/lib/news/active.times" - - /* - * Some commonly used programs and files. - */ - -! #define ACTIVE_FILE "/usr/lib/news/active" -! #define DISTRIBUTIONS_FILE "/usr/lib/news/distributions" -! #define SUBSCRIPTIONS_FILE "/usr/lib/news/subscriptions" -! #define NEWSGROUPS_FILE "/usr/lib/news/newsgroups" -! #define HISTORY_FILE "/usr/lib/news/history" -! #define SPOOLDIR "/usr/spool/news" -! #define INEWS "/usr/lib/news/inews" -! #define RNEWS "/usr/bin/rnews" /* Link to inews? */ - - /* - * Support for C News style batching ---- 267,292 ---- - /* - * This file is where access information is stored - */ -! #define ACCESS_FILE "/usr/local/news/lib/nntp_access" - - /* - * But if you don't have C News or INN, you can run acttimes (see the support - * directory) to maintain an active.times file. - */ -! #define ACTIVE_TIMES_FILE "/usr/local/news/lib/active.times" - - /* - * Some commonly used programs and files. - */ - -! #define ACTIVE_FILE "/usr/local/news/lib/active" -! #define DISTRIBUTIONS_FILE "/usr/local/news/lib/distributions" -! #define SUBSCRIPTIONS_FILE "/usr/local/news/lib/subscriptions" -! #define NEWSGROUPS_FILE "/usr/local/news/lib/newsgroups" -! #define HISTORY_FILE "/usr/local/news/lib/history" -! #define SPOOLDIR "/var/news" -! #define INEWS "/usr/local/news/lib/inews" -! #define RNEWS "/usr/local/bin/rnews" /* Link to inews? */ - - /* - * Support for C News style batching -*************** -*** 293,307 **** - #else - #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */ - #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */ -! #define NEWSRUN "/usr/lib/newsbin/input/newsrun" - #endif - #define TOOOLD (5*60) /* batch > TOOOLD seconds old, kick rnews */ - #define COPYSIZE 8192 /* bytes to copy at one time */ - #define MAXDIGITS 25 /* lg(maxlongint) + epsilon */ - #define MAXSTR 1024 -! #define INDIR "/usr/spool/news/in.coming" - /* You may wish to delete the pathname from the front of BATCH_FILE */ -! #define BATCH_FILE "/usr/spool/news/in.coming/nntp.XXXXXX" - - /************************************************************************/ - /* We don't recommend that you make changes in anything after this line */ ---- 299,313 ---- - #else - #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */ - #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */ -! #define NEWSRUN "/usr/local/news/cnewsbin/input/newsrun" - #endif - #define TOOOLD (5*60) /* batch > TOOOLD seconds old, kick rnews */ - #define COPYSIZE 8192 /* bytes to copy at one time */ - #define MAXDIGITS 25 /* lg(maxlongint) + epsilon */ - #define MAXSTR 1024 -! #define INDIR "/var/news/in.coming" - /* You may wish to delete the pathname from the front of BATCH_FILE */ -! #define BATCH_FILE "/var/news/in.coming/nntp.XXXXXX" - - /************************************************************************/ - /* We don't recommend that you make changes in anything after this line */ -*************** -*** 345,352 **** - # ifndef ultrix /* Ultrix 4.0 or greater */ - # ifndef mips /* MIPS RISC/os */ - # ifndef __osf__ /* DEC Alpha OSF1 */ -! # ifndef READ_SUPER -! # define READ_SUPER - # endif - # endif - # endif ---- 351,360 ---- - # ifndef ultrix /* Ultrix 4.0 or greater */ - # ifndef mips /* MIPS RISC/os */ - # ifndef __osf__ /* DEC Alpha OSF1 */ -! # ifndef __FreeBSD__ -! # ifndef READ_SUPER -! # define READ_SUPER -! # endif - # endif - # endif - # endif -*** ../nntp-t5.orig/doc/Makefile Sat Jan 12 18:28:15 1991 ---- ./doc/Makefile Mon Mar 18 15:15:48 1996 -*************** -*** 7,13 **** - # change these to suit your system - ROFF = ditroff - PRINTER = lw301 -! MANDIR = /usr/man - - # from here down should be constant - SHELL = /bin/sh ---- 7,13 ---- - # change these to suit your system - ROFF = ditroff - PRINTER = lw301 -! MANDIR = /usr/local/man - - # from here down should be constant - SHELL = /bin/sh -*** ../nntp-t5.orig/doc/config.sh Fri Oct 16 04:24:00 1987 ---- ./doc/config.sh Tue Mar 19 10:22:55 1996 -*************** -*** 11,21 **** - # (modify these lines to suit your system) - # - # the location of inetd on your system (usually /etc/inetd) -! MINETD=/etc/inetd - # the location of the inetd configuration file (usually /etc/inetd.conf) - MINETDCONFIG=/etc/inetd.conf - # the location of nntpd following installation (usually /etc/nntpd) -! MNNTPD=/etc/nntpd - # the location of the hosts file (usually /etc/hosts) - MHOSTFILE=/etc/hosts - # the location of the services file (usually /etc/services) ---- 11,21 ---- - # (modify these lines to suit your system) - # - # the location of inetd on your system (usually /etc/inetd) -! MINETD=/usr/sbin/inetd - # the location of the inetd configuration file (usually /etc/inetd.conf) - MINETDCONFIG=/etc/inetd.conf - # the location of nntpd following installation (usually /etc/nntpd) -! MNNTPD=/usr/local/sbin/nntpd - # the location of the hosts file (usually /etc/hosts) - MHOSTFILE=/etc/hosts - # the location of the services file (usually /etc/services) -*************** -*** 23,34 **** - # the location of the networks file (usually /etc/networks) - MNETWORKFILE=/etc/networks - # The location of the news spool directory (usually /usr/spool/news) -! MNEWSSPOOL=/usr/spool/news - # The location of the news library directory (usually /usr/lib/news) -! MNEWSLIB=/usr/lib/news - # The location of the file containing the name of the nntp server machine - # (usually /usr/local/lib/rn/server) -! MSERVERFILE=/usr/local/lib/rn/server - # The location of rn's local library (usually /usr/local/lib/rn) - MRNLIB=/usr/local/lib/rn - # ---- 23,34 ---- - # the location of the networks file (usually /etc/networks) - MNETWORKFILE=/etc/networks - # The location of the news spool directory (usually /usr/spool/news) -! MNEWSSPOOL=/var/news - # The location of the news library directory (usually /usr/lib/news) -! MNEWSLIB=/usr/local/news/lib - # The location of the file containing the name of the nntp server machine - # (usually /usr/local/lib/rn/server) -! MSERVERFILE=/usr/local/etc/nntpserver - # The location of rn's local library (usually /usr/local/lib/rn) - MRNLIB=/usr/local/lib/rn - # -*** ../nntp-t5.orig/server/Makefile Sat Oct 9 18:21:24 1993 ---- ./server/Makefile Tue Mar 19 10:15:31 1996 -*************** -*** 20,33 **** - - # if you've #define'ed DBM in conf.h put -ldbm here or your dbz lib/object - #LIBS = -ldbz -! #LIBS = /usr/local/lib/dbz.o -! LIBS = -ldbm - -! CFLAGS = -O - - # Where nntpd is going to live - -! DESTDIR = /etc - - all: nntpd msgidd - ---- 20,33 ---- - - # if you've #define'ed DBM in conf.h put -ldbm here or your dbz lib/object - #LIBS = -ldbz -! LIBS = /usr/local/lib/libcnews.a -! #LIBS = -ldbm - -! CFLAGS = -O2 -I/usr/local/include - - # Where nntpd is going to live - -! DESTDIR = /usr/local/sbin - - all: nntpd msgidd - -*** ../nntp-t5.orig/server/common.h Mon Aug 2 23:38:56 1993 ---- ./server/common.h Tue Mar 19 17:56:42 1996 -*************** -*** 155,161 **** ---- 155,165 ---- - void debugup(), debugdown(); - #endif - #ifdef SETPROCTITLE -+ #ifdef HAVE_PROCTITLE -+ #include <libutil.h> -+ #else - void setproctitle(); -+ #endif - #endif - - extern char spooldir[]; -*** ../nntp-t5.orig/server/main.c Sat Oct 9 18:21:26 1993 ---- ./server/main.c Tue Mar 19 18:33:27 1996 -*************** -*** 28,35 **** ---- 28,37 ---- - #endif - - #ifdef SETPROCTITLE -+ #ifndef HAVE_PROCTITLE - char **Argv = NULL; /* pointer to argument vector */ - char *LastArgv = NULL; /* end of argv */ -+ #endif - #endif /* SETPROCTITLE */ - - int -*************** -*** 74,79 **** ---- 76,97 ---- - - #ifndef EXCELAN - sockt = get_socket(); /* should be fd 4 or 5 */ -+ if ( getuid() == 0 ) { /* Running as root */ -+ -+ if (setgid((gid_t) NEWS_GID) == -1) { -+ #ifdef SYSLOG -+ syslog(LOG_ERR, "setgid: %m"); -+ #endif -+ exit(1); -+ } -+ -+ if (setuid((uid_t) NEWS_UID) == -1) { -+ #ifdef SYSLOG -+ syslog(LOG_ERR, "setuid: %m"); -+ #endif -+ exit(1); -+ } -+ } - #ifdef USG - (void) signal(SIGCLD, SIG_IGN); - #else /* !USG */ -*************** -*** 94,99 **** ---- 112,118 ---- - #endif /* EXCELAN */ - - #ifdef SETPROCTITLE -+ #ifndef HAVE_PROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ -*************** -*** 106,111 **** ---- 125,131 ---- - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); - #endif /*SDD*/ -+ #endif - #endif /* SETPROCTITLE */ - #if defined(LOAD) && defined(SETPROCTITLE) - /* If LOAD and SETPROCTITLE, display load before first accept() */ -*************** -*** 242,247 **** ---- 262,268 ---- - } - #endif /* LOAD */ - #ifdef SETPROCTITLE -+ #ifndef HAVE_PROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ -*************** -*** 254,259 **** ---- 275,281 ---- - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); - #endif /*SDD*/ -+ #endif - #endif /* SETPROCTITLE */ - - #ifdef USG -*************** -*** 270,275 **** ---- 292,298 ---- - * stolen from sendmail - */ - #ifdef SETPROCTITLE -+ #ifndef HAVE_PROCTITLE - #if defined(sun) || defined(hpux) - /*VARARGS*/ - void -*************** -*** 329,332 **** ---- 352,356 ---- - *p++ = ' '; - } - #endif /* hpux */ -+ #endif - #endif /* SETPROCTITLE */ -*** ../nntp-t5.orig/server/misc.c Fri Aug 13 00:14:15 1993 ---- ./server/misc.c Mon Mar 18 15:15:49 1996 -*************** -*** 723,730 **** - * A negative value is returned on error. - */ - #ifndef READ_SUPER -! #if defined(sun) || defined(hpux) || defined(pyr) || defined(hp300) || defined(NeXT) - #include <sys/vfs.h> - #define statfilesys statfs /* routine to call when trying to */ - /* stat a file system to get the # */ - /* of free blocks available */ ---- 723,734 ---- - * A negative value is returned on error. - */ - #ifndef READ_SUPER -! #if defined(sun) || defined(hpux) || defined(pyr) || defined(hp300) || defined(NeXT) || defined(__FreeBSD__) -! #ifdef __FreeBSD__ -! #include <sys/mount.h> -! #else - #include <sys/vfs.h> -+ #endif - #define statfilesys statfs /* routine to call when trying to */ - /* stat a file system to get the # */ - /* of free blocks available */ -*** ../nntp-t5.orig/server/msgidd.c Sat Oct 9 18:21:27 1993 ---- ./server/msgidd.c Mon Mar 18 15:15:49 1996 -*************** -*** 78,83 **** ---- 78,84 ---- - return hash; - } - -+ #ifdef NO_STRDUP - static char * - strdup(x) - char *x; -*************** -*** 88,93 **** ---- 89,95 ---- - strcpy(y, x); - return y; - } -+ #endif - - static void - savepid () -*** ../nntp-t5.orig/server/timer.c Thu Aug 12 23:57:16 1993 ---- ./server/timer.c Tue Mar 19 21:31:16 1996 -*************** -*** 28,34 **** ---- 28,38 ---- - #endif - #endif - /* non-portable */ -+ #ifdef BSD_STDIO -+ #define BUFFERED_DATA(f) ((f)->_r > 0) -+ #else - #define BUFFERED_DATA(f) ((f)->_cnt > 0) -+ #endif - - #ifdef WIN_TCP - #include <signal.h> -*** ../nntp-t5.orig/support/Makefile Mon Aug 2 21:59:01 1993 ---- ./support/Makefile Mon Mar 18 15:15:50 1996 -*************** -*** 12,18 **** - - # Where these support programs will live - -! DESTDIR = /usr/lib/news - - all: acttimes - ---- 12,18 ---- - - # Where these support programs will live - -! DESTDIR = /usr/local/bin - - all: acttimes - -*** ../nntp-t5.orig/xfer/Makefile Fri Aug 13 00:22:51 1993 ---- ./xfer/Makefile Mon Mar 18 15:15:50 1996 -*************** -*** 5,13 **** - - SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o - -! LIBS= -ldbm - -! CFLAGS= -O - - nntpxfer: ${SRVROBJ} - ${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS} ---- 5,16 ---- - - SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o - -! #LIBS= -ldbm -! LIBS= /usr/local/lib/libcnews.a - -! CFLAGS= -O2 -I/usr/local/include -! -! DESTDIR= /usr/local/news/cnewsbin - - nntpxfer: ${SRVROBJ} - ${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS} -*************** -*** 19,24 **** ---- 22,31 ---- - ${CC} ${CFLAGS} ${DEFS} -c ../server/fakesyslog.c - - nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h -+ -+ install: nntpxfer -+ cp nntpxfer ${DESTDIR}/nntpxfer -+ chmod 755 ${DESTDIR}/nntpxfer - - clean: - -rm -f *.o nntpxfer make*.out -*** ../nntp-t5.orig/xfer/nntpxfer.c Fri Aug 13 00:23:21 1993 ---- ./xfer/nntpxfer.c Tue Mar 19 22:17:46 1996 -*************** -*** 43,48 **** ---- 43,51 ---- - #include <sys/time.h> - #endif - -+ #ifdef BSD_44 -+ #define _ANSI_SOURCE -+ #endif - #include <stdio.h> - #include <errno.h> - #include <ctype.h> -*************** -*** 86,92 **** - char *strcpy(); - char *strcat(); - char *rindex(); -! long time(); - u_long inet_addr(); - - extern int errno; ---- 89,95 ---- - char *strcpy(); - char *strcat(); - char *rindex(); -! time_t time(); - u_long inet_addr(); - - extern int errno; -*************** -*** 448,454 **** ---- 451,461 ---- - if (setjmp(SFGstack)) { - (void) alarm(0); /* reset alarm clock */ - (void) signal(SIGALRM, SIG_DFL); -+ #ifdef BSD_STDIO -+ rd_fp->_flags |= __SERR; -+ #else - rd_fp->_flag |= _IOERR; /* set stdio error */ -+ #endif - #ifndef ETIMEDOUT - errno = EPIPE; /* USG doesn't have ETIMEDOUT */ - #else -*** ../nntp-t5.orig/xmit/Makefile Mon Aug 2 23:57:20 1993 ---- ./xmit/Makefile Mon Mar 18 15:15:51 1996 -*************** -*** 11,23 **** - - SRCS = ${SRVRSRC} - -! LIBS = - -! CFLAGS = -O - - # Where nntpxmit is going to live - -! DESTDIR = /usr/lib/news - - all: nntpxmit shlock - ---- 11,23 ---- - - SRCS = ${SRVRSRC} - -! LIBS = /usr/local/lib/libcnews.a - -! CFLAGS = -O2 -I/usr/local/include - - # Where nntpxmit is going to live - -! DESTDIR = /usr/local/news/cnewsbin - - all: nntpxmit shlock - -*** ../nntp-t5.orig/xmit/nntpxmit.c Sat Oct 9 18:21:29 1993 ---- ./xmit/nntpxmit.c Tue Mar 19 21:27:27 1996 -*************** -*** 65,70 **** ---- 65,73 ---- - - #include "../conf.h" - #include "nntpxmit.h" -+ #ifdef BSD_44 -+ #define _ANSI_SOURCE -+ #endif - #include <stdio.h> - #include <errno.h> - #include <ctype.h> -*** ../nntp-t5.orig/xmit/nntpxmit.h Sat Oct 9 18:21:30 1993 ---- ./xmit/nntpxmit.h Tue Mar 19 10:11:06 1996 -*************** -*** 7,12 **** ---- 7,13 ---- +--- xfer/Makefile.orig Thu Nov 17 19:15:22 1994 ++++ xfer/Makefile Sun Jan 9 10:21:54 2000 +@@ -28,7 +28,8 @@ + nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h + + install: nntpxfer +- cp nntpxfer ${BINDIR} ++ cp nntpxfer ${BINDIR}/nntpxfer ++ chmod 755 ${BINDIR}/nntpxfer + + clean: + -rm -f *.o nntpxfer make*.out *.BAK *.CKP *~ +--- Makefile.orig Tue Jan 9 08:30:24 1996 ++++ Makefile Sun Jan 9 09:35:59 2000 +@@ -4,7 +4,7 @@ + # The program that knows how to deal with makefiles. [Uncomment if needed.] + # MAKE=make + # set CFLAGS to be -Ipath/to/special/includes if needed +-CFLAGS= -O ++CFLAGS= -O -I/usr/local/include + #Uncomment the following for Solaris (and similiar SVR4 systems) + #NETLIBS = -lsocket -lnsl + #Uncomment the following if the previous one does not work +@@ -13,6 +13,7 @@ + #DBLIBS = -ldbz + #DBLIBS = /usr/local/lib/dbz.o #/usr/local/lib/dbzdbm.o + #DBLIBS = -ldbm ++DBLIBS = /usr/local/lib/libcnews.a -lcrypt -lutil + # add the resolver library if needed + #RESLIB = -lresolv + # add the kmem library if needed +@@ -21,9 +21,9 @@ + #Uncomment the following for Solaris (and similiar SVR4 systems) + #KVMLIB = -lelf + # Where nntpd is going to live +-ETCDIR = /etc ++ETCDIR = /usr/local/sbin + # Where nntpxmit and nntpxfer is going to live +-BINDIR = /usr/local/bin ++BINDIR = /usr/local/news/cnewsbin + # Where manual pages live + MANDIR = /usr/local/man + # +--- server/common.h.orig Thu Nov 17 19:15:18 1994 ++++ server/common.h Sun Jan 9 09:30:03 2000 +@@ -161,7 +161,11 @@ + void debugup(), debugdown(); + #endif + #ifdef SETPROCTITLE ++#ifdef HAVE_PROCTITLE ++#include <libutil.h> ++#else + void setproctitle(); ++#endif + #endif + + extern char spooldir[]; +--- conf.h.orig Sun Jan 9 09:30:02 2000 ++++ conf.h Sun Jan 9 10:02:19 2000 +@@ -8,10 +8,12 @@ */ - - #ifdef MMAP -+ #include <sys/types.h> - #include <sys/mman.h> - #include <sys/stat.h> - #endif ---- xmit/remote.c.orig Mon Aug 2 18:58:03 1993 -+++ xmit/remote.c Mon Jan 4 17:42:22 1999 -@@ -42,7 +42,9 @@ - #include "../conf.h" - #include "nntpxmit.h" - #include <sys/types.h> -+#if defined(__FreeBSD__) && __FreeBSD__ < 3 - #include <sys/socket.h> + + +-#undef ALONE /* True if we're running without inetd */ ++#define ALONE /* True if we're running without inetd */ + + #ifdef ALONE +-#undef FASTFORK /* True if we don't want to read active file on start*/ ++#define FASTFORK /* True if we don't want to read active file on start*/ ++#define NEWS_GID 8 ++#define NEWS_UID 8 + #endif + + #define LOAD 5 /* Loadav above which server refuses connections */ +@@ -40,23 +42,23 @@ + #undef TLI /* Define this if you want to use TLI instead of */ + /* sockets */ + +-#define NDBM /* Use new-style (4.3) ndbm(3x) libraries */ ++#undef NDBM /* Use new-style (4.3) ndbm(3x) libraries */ + + #undef DBM /* True if we want to use the old dbm(3x) libraries */ + /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ + /* be -ldbm */ + +-#undef DBZ /* True if we want to use dbz libraries */ ++#define DBZ /* True if we want to use dbz libraries */ + /* IF YOU DEFINE THIS, change CFLAGS in makefile to */ + /* be /usr/lib/dbz.o and install dbz.h */ + + #undef USGHIST /* Use USG style history file (no DBM) */ + /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/ + +-#undef CNEWS /* define this if you are running C News */ +-#undef CNEWS_CLEARTEXT /* define this if you have a modern C News that handles ++#define CNEWS /* define this if you are running C News */ ++#define CNEWS_CLEARTEXT /* define this if you have a modern C News that handles + input files ending in ".t" as cleartext */ +-#undef BATCHED_INPUT /* define if you want to support C News style ++#define BATCHED_INPUT /* define if you want to support C News style + batched input (not supported by B-NEWS) */ + #undef MSGID /* define this if you want to run msgidd to keep + track of recent msgids via daemon */ +@@ -70,7 +72,7 @@ + /* typedefs for u_long */ + #define VOIDSIG /* Newfangled signal() returns void, old returns int */ + +-#undef MMAP /* if your OS supports mmap() */ ++#define MMAP /* if your OS supports mmap() */ + + #undef DIRENT /* If you have <dirent.h> define this */ + +@@ -89,7 +91,8 @@ + /*#define MINFILES MINFREE/4*/ + /* NNTP will not allow an XFER if there is less */ + /* than this many inodes on the SPOOLDIR filesystem */ +-#undef SETPROCTITLE /* if you want status visable via ps */ ++#define SETPROCTITLE /* if you want status visable via ps */ ++#define HAVE_PROCTITLE /* if the OS has setproctitle() */ + + #undef IHAVE_DEBUG /* Copious debugging output from ihave */ + +@@ -110,7 +113,7 @@ + * if you are running BNEWS. At least, not yet. :-) + */ + +-/* #define UMASK 022 */ ++#define UMASK 022 + + /* + * If you have the syslog library routine, define SYSLOG to +@@ -177,13 +180,13 @@ + #define XOVER /* xover -- Return .overview data */ + #define OVER_XREFS /* overview files have xref data in them */ + #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */ +-#define OVER_FMT_FILE "/usr/lib/news/overview.fmt" ++#define OVER_FMT_FILE "/usr/local/news/lib/overview.fmt" + + /* Leave this undefined to indicate that overview files go in the spool + * directory. However, if you want a separate hierarchy of overview + * files, define it here. + */ +-/*#define OVERVIEW_DIR "/usr/spool/overviews" /* base directory */ ++#define OVERVIEW_DIR "/var/news/over.view" /* base directory */ + + #define XROVER /* xrover -- Return reference overview data */ + +@@ -191,10 +194,10 @@ + * spool directory. However, if you want a separate hierarchy of rover + * files, define it here. + */ +-/*#define ROVER_DIR "/usr/spool/overviews" /* base directory */ ++/*define ROVER_DIR "/var/news/r.over" /* base directory */ + + #undef XINDEX /* Optional support for tin's index files */ +-#define XINDEX_DIR "/usr/spool/news/.index" ++#define XINDEX_DIR "/var/news/.index" + + /* XTHREAD defines: if XTHREAD is defined, THREAD_DIR controls where the + * thread files will be read from. +@@ -244,27 +247,27 @@ + /* + * This file is where access information is stored + */ +-#define ACCESS_FILE "/usr/lib/news/nntp_access" ++#define ACCESS_FILE "/usr/local/news/lib/nntp_access" + + /* + * The file where the newgroup creation times are kept. If you don't + * have C News or INN, you can run acttimes (see the support directory) + * to maintain an active.times file. + */ +-#define ACTIVE_TIMES_FILE "/usr/lib/news/active.times" ++#define ACTIVE_TIMES_FILE "/usr/local/news/lib/active.times" + + /* + * Some commonly used programs and files. + */ + +-#define ACTIVE_FILE "/usr/lib/news/active" +-#define DISTRIBUTIONS_FILE "/usr/lib/news/distributions" +-#define SUBSCRIPTIONS_FILE "/usr/lib/news/subscriptions" +-#define NEWSGROUPS_FILE "/usr/lib/news/newsgroups" +-#define HISTORY_FILE "/usr/lib/news/history" +-#define SPOOLDIR "/usr/spool/news" +-#define INEWS "/usr/lib/news/inews" +-#define RNEWS "/usr/bin/rnews" /* Link to inews? */ ++#define ACTIVE_FILE "/usr/local/news/lib/active" ++#define DISTRIBUTIONS_FILE "/usr/local/news/lib/distributions" ++#define SUBSCRIPTIONS_FILE "/usr/local/news/lib/subscriptions" ++#define NEWSGROUPS_FILE "/usr/local/news/lib/newsgroups" ++#define HISTORY_FILE "/usr/local/news/lib/history" ++#define SPOOLDIR "/var/news" ++#define INEWS "/usr/local/news/lib/inews" ++#define RNEWS "/usr/local/bin/rnews" /* Link to inews? */ + + /* + * Support for C News style batching +@@ -277,15 +280,15 @@ + #else + #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */ + #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */ +-#define NEWSRUN "/usr/lib/newsbin/input/newsrun" ++#define NEWSRUN "/usr/local/news/cnewsbin/input/newsrun" + #endif + #define TOOOLD (5*60) /* batch > TOOOLD seconds old, kick rnews */ + #define COPYSIZE 8192 /* bytes to copy at one time */ + #define MAXDIGITS 25 /* lg(maxlongint) + epsilon */ + #define MAXSTR 1024 +-#define INDIR "/usr/spool/news/in.coming" ++#define INDIR "/var/news/in.coming" + /* You may wish to delete the pathname from the front of BATCH_FILE */ +-#define BATCH_FILE "/usr/spool/news/in.coming/nntp.XXXXXX" ++#define BATCH_FILE "/var/news/in.coming/nntp.XXXXXX" + + /************************************************************************/ + /* We don't recommend that you make changes in anything after this line */ +--- doc/config.sh.orig Tue Nov 1 06:36:57 1994 ++++ doc/config.sh Sun Jan 9 09:30:03 2000 +@@ -11,11 +11,11 @@ + # (modify these lines to suit your system) + # + # the location of inetd on your system (usually /etc/inetd) +-MINETD=/etc/inetd ++MINETD=/usr/sbin/inetd + # the location of the inetd configuration file (usually /etc/inetd.conf) + MINETDCONFIG=/etc/inetd.conf + # the location of nntpd following installation (usually /etc/nntpd) +-MNNTPD=/etc/nntpd ++MNNTPD=/usr/local/sbin/nntpd + # the location of the hosts file (usually /etc/hosts) + MHOSTFILE=/etc/hosts + # the location of the services file (usually /etc/services) +@@ -23,12 +23,12 @@ + # the location of the networks file (usually /etc/networks) + MNETWORKFILE=/etc/networks + # The location of the news spool directory (usually /usr/spool/news) +-MNEWSSPOOL=/usr/spool/news ++MNEWSSPOOL=/var/news + # The location of the news library directory (usually /usr/lib/news) +-MNEWSLIB=/usr/lib/news ++MNEWSLIB=/usr/local/news/lib + # The location of the file containing the name of the nntp server machine + # (usually /usr/local/lib/rn/server) +-MSERVERFILE=/usr/local/lib/rn/server ++MSERVERFILE=/usr/local/etc/nntpserver + # The location of rn's local library (usually /usr/local/lib/rn) + MRNLIB=/usr/local/lib/rn + # +--- server/main.c.orig Thu Nov 17 19:15:19 1994 ++++ server/main.c Sun Jan 9 09:30:03 2000 +@@ -35,8 +35,10 @@ + #endif + + #ifdef SETPROCTITLE ++#ifndef HAVE_PROCTITLE + char **Argv = NULL; /* pointer to argument vector */ + char *LastArgv = NULL; /* end of argv */ ++#endif + #endif /* SETPROCTITLE */ + + int +@@ -81,6 +83,22 @@ + + #ifndef EXCELAN + sockt = get_socket(); /* should be fd 4 or 5 */ ++ if ( getuid() == 0 ) { /* Running as root */ ++ ++ if (setgid((gid_t) NEWS_GID) == -1) { ++#ifdef SYSLOG ++ syslog(LOG_ERR, "setgid: %m"); ++#endif ++ exit(1); ++ } ++ ++ if (setuid((uid_t) NEWS_UID) == -1) { ++#ifdef SYSLOG ++ syslog(LOG_ERR, "setuid: %m"); +#endif ++ exit(1); ++ } ++ } + #ifdef USG + (void) signal(SIGCLD, SIG_IGN); + #else /* !USG */ +@@ -101,6 +119,7 @@ + #endif /* EXCELAN */ + + #ifdef SETPROCTITLE ++#ifndef HAVE_PROCTITLE + /* + * Save start and extent of argv for setproctitle. + */ +@@ -113,6 +132,7 @@ + envp++; + LastArgv = envp[-1] + strlen(envp[-1]); + #endif /*SDD*/ ++#endif + #endif /* SETPROCTITLE */ + #if defined(LOAD) && defined(SETPROCTITLE) + /* If LOAD and SETPROCTITLE, display load before first accept() */ +@@ -243,6 +263,7 @@ + } + #endif /* LOAD */ + #ifdef SETPROCTITLE ++#ifndef HAVE_PROCTITLE + /* + * Save start and extent of argv for setproctitle. + */ +@@ -255,6 +276,7 @@ + envp++; + LastArgv = envp[-1] + strlen(envp[-1]); + #endif /*SDD*/ ++#endif + #endif /* SETPROCTITLE */ + + #ifdef USG +@@ -271,6 +293,7 @@ + * stolen from sendmail + */ + #ifdef SETPROCTITLE ++#ifndef HAVE_PROCTITLE + #if defined(sun) || defined(hpux) + /*VARARGS*/ + void +@@ -330,4 +353,5 @@ + *p++ = ' '; + } + #endif /* hpux */ ++#endif + #endif /* SETPROCTITLE */ +--- xfer/nntpxfer.c.orig Tue Jan 9 08:28:03 1996 ++++ xfer/nntpxfer.c Sun Jan 9 09:30:03 2000 +@@ -60,6 +60,9 @@ + #include <sys/time.h> + #endif + ++#ifdef BSD_44 ++#define _ANSI_SOURCE ++#endif + #include <stdio.h> #include <errno.h> + #include <ctype.h> +--- xmit/nntpxmit.c.orig Sat Dec 3 23:37:58 1994 ++++ xmit/nntpxmit.c Sun Jan 9 10:13:10 2000 +@@ -64,6 +64,9 @@ + */ + + #include "../conf.h" ++#ifdef BSD_44 ++#define _ANSI_SOURCE ++#endif #include <stdio.h> + #include <errno.h> #include <ctype.h> -@@ -51,6 +53,9 @@ - #ifdef dgux - #define _IOERR _IO_ERR +--- xmit/nntpxmit.h.orig Thu Nov 3 04:51:34 1994 ++++ xmit/nntpxmit.h Sun Jan 9 09:30:04 2000 +@@ -7,6 +7,7 @@ + */ + + #ifdef MMAP ++#include <sys/types.h> + #include <sys/mman.h> + #include <sys/stat.h> #endif -+#ifdef apollo -+#define _IOERR _SIERR -+#endif - #ifdef SYSLOG - #ifdef FAKESYSLOG - #include "../server/fakesyslog.h" -@@ -329,8 +334,8 @@ - if (setjmp(SFGstack)) { - (void) alarm(0); /* reset alarm clock */ - (void) signal(SIGALRM, SIG_DFL); --#ifdef apollo -- fp->_flag |= _SIERR; -+#ifdef BSD_STDIO -+ fp->_flags |= __SERR; - #else - fp->_flag |= _IOERR; /* set stdio error */ +--- xmit/shlock.c.orig Tue Nov 1 06:54:32 1994 ++++ xmit/shlock.c Sun Jan 9 09:30:04 2000 +@@ -28,7 +28,6 @@ + ** Erik E. Fair <fair@apple.com>, November 12, 1989 + */ + +-#include <stdio.h> + #include <sys/types.h> + #include <fcntl.h> /* Needed on hpux */ + #include <sys/file.h> +@@ -36,6 +35,10 @@ + #ifdef NNTPSRC + #include "../conf.h" #endif -*** ../nntp-t5.orig/xmit/shlock.c Mon Aug 2 23:58:08 1993 ---- ./xmit/shlock.c Tue Mar 19 22:33:01 1996 -*************** -*** 28,34 **** - ** Erik E. Fair <fair@apple.com>, November 12, 1989 - */ - -- #include <stdio.h> - #include <sys/types.h> - #include <fcntl.h> /* Needed on hpux */ - #include <sys/file.h> ---- 28,33 ---- -*************** -*** 36,41 **** ---- 35,44 ---- - #ifdef NNTPSRC - #include "../conf.h" - #endif -+ #ifdef BSD_44 -+ #define _ANSI_SOURCE -+ #endif -+ #include <stdio.h> - - #define LOCK_SET 0 - #define LOCK_FAIL 1 ++#ifdef BSD_44 ++#define _ANSI_SOURCE ++#endif ++#include <stdio.h> + + #define LOCK_SET 0 + #define LOCK_FAIL 1 diff nntp/patches/patch-ab nntp-1.5.12.2/patches/patch-ab --- nntp/patches/patch-ab Sun Dec 29 04:41:44 1996 +++ nntp-1.5.12.2/patches/patch-ab Sun Jan 9 10:39:13 2000 @@ -1,12 +1,22 @@ -*** server/subnet.c.old Sun Dec 29 03:34:41 1996 ---- server/subnet.c Sun Dec 29 03:35:06 1996 -*************** -*** 10,15 **** ---- 10,16 ---- - #include <sys/socket.h> - #include <netinet/in.h> - #ifndef NETMASK -+ #include <sys/time.h> - #include <net/if.h> - #endif - #include <sys/ioctl.h> +--- xmit/nntpxmit.c.orig Sun Jan 9 10:36:02 2000 ++++ xmit/nntpxmit.c Sun Jan 9 10:37:50 2000 +@@ -448,7 +448,7 @@ + /* Hmph. The file didn't exist. */ + error = sendcmd("."); + } else { +- error = !sendfile(fp); ++ error = !my_sendfile(fp); + /* Leave this open in case we need to requeue it. */ + } + if (error) { +--- xmit/remote.c.orig Tue Jan 9 08:28:03 1996 ++++ xmit/remote.c Sun Jan 9 10:37:03 2000 +@@ -403,7 +403,7 @@ + ** with appropriate RFC822 filtering (e.g. CRLF line termination, + ** and dot escaping). Return FALSE if something went wrong. + */ +-sendfile(fp) ++my_sendfile(fp) + FILE *fp; + { + register int c; diff nntp/patches/patch-ac nntp-1.5.12.2/patches/patch-ac --- nntp/patches/patch-ac Wed Oct 25 16:31:34 1995 +++ nntp-1.5.12.2/patches/patch-ac Thu Jan 1 01:00:00 1970 @@ -1,32 +0,0 @@ -*** server/list.c.old Wed Oct 25 00:48:21 1995 ---- server/list.c Wed Oct 25 00:59:36 1995 -*************** -*** 39,44 **** ---- 39,48 ---- - filename = activefile; - items = "active newsgroups"; - format = "Newsgroups in form \"group high low y/n/m\"."; -+ } else if (argc == 2 && !strcasecmp(argv[1],"active.times")){ -+ filename = ngdatefile; -+ items = "newsgroup times of creation"; -+ format = "Newsgroups in form \"group time creator\"."; - } else if (argc == 2 && !strcasecmp(argv[1],"distributions")){ - filename = distributionsfile; - items = "newsgroup distributions"; -*************** -*** 52,58 **** - items = "group subscription list"; - format = "New-user subscription list in form \"group\"."; - } else { -! printf("%d Usage: LIST [ACTIVE|NEWSGROUPS|DISTRIBUTIONS|SUBSCRIPTIONS]\r\n", - ERR_CMDSYN); - (void) fflush(stdout); - return; ---- 56,62 ---- - items = "group subscription list"; - format = "New-user subscription list in form \"group\"."; - } else { -! printf("%d Usage: LIST [ACTIVE|ACTIVE.TIMES|NEWSGROUPS|DISTRIBUTIONS|SUBSCRIPTIONS]\r\n", - ERR_CMDSYN); - (void) fflush(stdout); - return; diff nntp/patches/patch-ad nntp-1.5.12.2/patches/patch-ad --- nntp/patches/patch-ad Tue Jan 5 02:02:02 1999 +++ nntp-1.5.12.2/patches/patch-ad Thu Jan 1 01:00:00 1970 @@ -1,11 +0,0 @@ ---- server/date.c.orig Mon Jan 4 17:37:06 1999 -+++ server/date.c Mon Jan 4 17:37:34 1999 -@@ -159,7 +159,7 @@ - tp = gmtime(&date); - - (void) sprintf(timebuf, "%02d%02d%02d%02d%02d%02d", -- tp->tm_year, -+ tp->tm_year % 100, - tp->tm_mon + 1, /* 0 to 11??? How silly. */ - tp->tm_mday, - tp->tm_hour, diff nntp/patches/patch-ae nntp-1.5.12.2/patches/patch-ae --- nntp/patches/patch-ae Fri Nov 26 19:22:39 1999 +++ nntp-1.5.12.2/patches/patch-ae Thu Jan 1 01:00:00 1970 @@ -1,20 +0,0 @@ ---- conf.h.orig Tue Oct 19 14:19:21 1999 -+++ conf.h Tue Oct 19 14:21:08 1999 -@@ -267,7 +267,7 @@ - /* - * This file is where access information is stored - */ --#define ACCESS_FILE "/usr/local/news/lib/nntp_access" -+#define ACCESS_FILE "/usr/local/etc/nntp_access" - - /* - * But if you don't have C News or INN, you can run acttimes (see the support -@@ -285,7 +285,7 @@ - #define NEWSGROUPS_FILE "/usr/local/news/lib/newsgroups" - #define HISTORY_FILE "/usr/local/news/lib/history" - #define SPOOLDIR "/var/news" --#define INEWS "/usr/local/news/lib/inews" -+#define INEWS "/usr/local/bin/inews" - #define RNEWS "/usr/local/bin/rnews" /* Link to inews? */ - - /* diff nntp/pkg/PLIST nntp-1.5.12.2/pkg/PLIST --- nntp/pkg/PLIST Wed Aug 19 20:38:06 1998 +++ nntp-1.5.12.2/pkg/PLIST Sun Jan 9 11:15:01 2000 @@ -1,4 +1,5 @@ sbin/nntpd +news/cnewsbin/acttimes news/cnewsbin/nntpxmit news/cnewsbin/nntpxfer @comment just in case anyone wants it >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001112107.WAA13328>