|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U
Length: 876839 (0xd6127) Types: TextFile Notes: Uncompressed file
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦bf1dc3164⟧ »EurOpenD3/news/bnews.2.11/patches.shar.Z« └─⟦this⟧
This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.1... ' sed 's/^P//' >patch.1 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: Patch #1 for news 2.11 source P PDescription: P This is patch #1 for news 2.11 source. It addresses the following P problems: P P vnews/readnews does not correctly identify when an article has P been cancelled. P vnews redraws the screen twice on ^Z. P followups from readnews incorrectly seperate references with ",". P The options line to vnews/readnews can only be BUFSIZ chars long. P logerr() in batch/unbatch mishandles arguments on machines with P 16bit ints and 32 bit char *. P There was no way to have moderated local groups. P The test for included text should be more generous. P The code to make directories on USG machines was not quite correct. P System 5 machines with the broken stdio couldn't process newgroup P control messages correctly. P You couldn't use LOCKF with BSD4_2. (e.g. Ultrix). P You couldn't specify the complete domain name with gethostbyname P and set MYDOMAIN to "". P uurec core dumped in certain cases. P getdate() didn't handle timezones of +-HHMM quite right. P getdate() cared what case the month and day of week was. P postnews didn't understand the new newsgroup names very well. P (It still doesn't handle distributions very well. Next patch...) P checkgroups didn't work on machines with 14 character file names. P The makefile line with #NOTVMS screwed up some makes. P The HIDDENNET code didn't quite figure out its own hostname when P forwarding articles. P MULTICASTING was broken with addition of the I flag. P A line was written into the history file twice in some cases. P Various cosmetic changes. P PFix: P cd to the src directory and apply the following patch P PIndex: visual.c PPrereq: 1.32 P*** .d/visual.c Thu Oct 30 16:08:02 1986 P--- visual.c Fri Nov 21 14:05:26 1986 P*************** P*** 4,10 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.32 10/23/86"; P #endif /* SCCSID */ P P #include "rparams.h" P--- 4,10 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.33 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P*************** P*** 793,799 **** P *ptr2 = '\0'; P ptr2 = index(ptr3, '/'); P if (!ptr2) { P! if (strcmp(++ptr3, "cancelled") == 0) P msg("%s has been cancelled", linebuf); P else P msg("%s has expired", linebuf); P--- 793,799 ---- P *ptr2 = '\0'; P ptr2 = index(ptr3, '/'); P if (!ptr2) { P! if (strcmp(ptr3, "cancelled") == 0) P msg("%s has been cancelled", linebuf); P else P msg("%s has expired", linebuf); P*************** P*** 2436,2444 **** P ttyraw(); P #ifdef TIOCGWINSZ P winch(); /* get current window size and redraw screen */ P! #endif /* TIOCGWINSZ */ P clearok(curscr, 1); P updscr(); P #ifdef BSD4_2 P (void) sigsetmask(sigblock(0) & ~(sigmask(SIGALRM)|sigmask(SIGINT))); P #else /* BSD4_1 */ P--- 2436,2445 ---- P ttyraw(); P #ifdef TIOCGWINSZ P winch(); /* get current window size and redraw screen */ P! #else /* !TIOCGWINSZ */ P clearok(curscr, 1); P updscr(); P+ #endif /* !TIOCGWINSZ */ P #ifdef BSD4_2 P (void) sigsetmask(sigblock(0) & ~(sigmask(SIGALRM)|sigmask(SIGINT))); P #else /* BSD4_1 */ P PIndex: iparams.h PPrereq: 2.16 P*** .d/iparams.h Thu Oct 30 16:12:13 1986 P--- iparams.h Fri Nov 21 14:05:11 1986 P*************** P*** 2,10 **** P * iparams - parameters for inews. P */ P P! /* @(#)iparams.h 2.16 10/23/86 */ P P #include "params.h" P P /* external declarations specific to inews */ P extern char nbuf[LBUFLEN], *ARTICLE, *INFILE, *ALIASES, *PARTIAL; P--- 2,12 ---- P * iparams - parameters for inews. P */ P P! /* @(#)iparams.h 2.17 11/21/86 */ P P #include "params.h" P+ #include <errno.h> P+ extern int errno; P P /* external declarations specific to inews */ P extern char nbuf[LBUFLEN], *ARTICLE, *INFILE, *ALIASES, *PARTIAL; P PIndex: readr.c PPrereq: 2.58 P*** .d/readr.c Thu Oct 30 16:09:49 1986 P--- readr.c Fri Nov 21 14:05:19 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.58 10/23/86"; P #endif /* SCCSID */ P P #include "rparams.h" P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.59 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P*************** P*** 517,523 **** P ptr2 = index(ptr3, '/'); P if (!ptr2) { P *ptr3 = '\0'; P! if (strcmp(++ptr3, "cancelled") == 0) { P fprintf(ofp, "Article %s has been cancelled.\n", P bptr); P break; P--- 517,523 ---- P ptr2 = index(ptr3, '/'); P if (!ptr2) { P *ptr3 = '\0'; P! if (strcmp(ptr3, "cancelled") == 0) { P fprintf(ofp, "Article %s has been cancelled.\n", P bptr); P break; P*************** P*** 579,585 **** P (void) strcpy(bfr, groupdir); P selectng(ogroupdir, FALSE, PERHAPS); P set(oobit); P! fprintf(ofp,"Holding article %ld newsgroup %s\n", oobit, ogroupdir), P (void) strcpy(groupdir, ogroupdir); P selectng(bfr, FALSE, FALSE); P bit = i; P--- 579,586 ---- P (void) strcpy(bfr, groupdir); P selectng(ogroupdir, FALSE, PERHAPS); P set(oobit); P! fprintf(ofp,"Holding article %ld newsgroup %s\n" P! ,oobit, ogroupdir); P (void) strcpy(groupdir, ogroupdir); P selectng(bfr, FALSE, FALSE); P bit = i; P*************** P*** 729,735 **** P fbp = index(fbp + 1, '<'); P if (fbp != NULL) { P (void) strcpy(folbuf, fbp); P! (void) strcat(folbuf, ", "); P } P } P (void) strcat(folbuf, hptr->ident); P--- 730,736 ---- P fbp = index(fbp + 1, '<'); P if (fbp != NULL) { P (void) strcpy(folbuf, fbp); P! (void) strcat(folbuf, " "); P } P } P (void) strcat(folbuf, hptr->ident); P PIndex: process.c PPrereq: 2.15 P*** .d/process.c Thu Oct 30 16:16:54 1986 P--- process.c Fri Nov 21 14:05:17 1986 P*************** P*** 16,26 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.15 9/16/86"; P #endif /* SCCSID */ P P #include "rparams.h" P P #define OPTION 0 /* pick up an option string */ P #define STRING 1 /* pick up a string of arguments */ P P--- 16,29 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.16 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P P+ char coptbuf[LBUFLEN], datebuf[LBUFLEN]; P+ struct hbuf header; P+ P #define OPTION 0 /* pick up an option string */ P #define STRING 1 /* pick up a string of arguments */ P P*************** P*** 55,61 **** P register int state = STRING; P register char *ptr = header.nbuf; P char filchar = NGDELIM; P! int len = BUFLEN, tlen; P P /* loop once per arg. */ P P--- 58,64 ---- P register int state = STRING; P register char *ptr = header.nbuf; P char filchar = NGDELIM; P! int len = LBUFLEN, tlen; P P /* loop once per arg. */ P P*************** P*** 92,98 **** P optpt->flag = TRUE; P state = optpt->newstate; P ptr = optpt->buf; P! len = BUFLEN; P } P P argv++; /* done with this option arg. */ P--- 95,101 ---- P optpt->flag = TRUE; P state = optpt->newstate; P ptr = optpt->buf; P! len = LBUFLEN; P } P P argv++; /* done with this option arg. */ P PIndex: batch.c PPrereq: 1.15 P*** .d/batch.c Thu Oct 30 16:16:52 1986 P--- batch.c Fri Nov 21 14:04:58 1986 P*************** P*** 32,38 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.15 1/17/86"; P #endif /* SCCSID */ P P #include <stdio.h> P--- 32,38 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.17 11/21/86"; P #endif /* SCCSID */ P P #include <stdio.h> P*************** P*** 171,176 **** P--- 171,177 ---- P /* VARARGS1 */ P logerror(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) P char *fmt; P+ long a1, a2, a3, a4, a5, a6, a7, a8, a9; P { P FILE *logfile; P char lfname[BUFLEN]; /* the log file */ P PIndex: inews.c PPrereq: 2.69 P*** .d/inews.c Thu Oct 30 16:08:50 1986 P--- inews.c Fri Nov 21 14:05:10 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.69 10/30/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.70 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 530,537 **** P * Only certain users are allowed to create newsgroups P */ P if (uid != ROOTID && uid != duid && uid) { P! fprintf(stderr, "Please contact one of the local netnews people\n\tto create this group for you"); P! xxit(1); P } P if (header.distribution[0] == '\0') P #ifdef ORGDISTRIB P--- 530,537 ---- P * Only certain users are allowed to create newsgroups P */ P if (uid != ROOTID && uid != duid && uid) { P! logerr("Please contact one of the local netnews people"); P! xerror("to create group \"%s\" for you", header.ctlmsg); P } P if (header.distribution[0] == '\0') P #ifdef ORGDISTRIB P*************** P*** 648,653 **** P--- 648,658 ---- P (void) rewind(actfp); P P (void) fseek(actfp, fpos, 0); P+ /* P+ * Has to be same size as old because of %05d. P+ * This will overflow with 99999 articles. P+ */ P+ fprintf(actfp, "%s %05ld", ngname, ngsize+1); P #ifdef USG P /* P * U G L Y K L U D G E P*************** P*** 662,671 **** P */ P actfp->_flag |= _IOWRT; P #endif /* USG */ P- /* Has to be same size as old because of %05d. P- * This will overflow with 99999 articles. P- */ P- fprintf(actfp, "%s %05ld", ngname, ngsize+1); P (void) fflush(actfp); P if (ferror(actfp)) P xerror("Active file write failed"); P--- 667,672 ---- P*************** P*** 765,776 **** P sprintf(bfr, "%s/mailpaths", LIBDIR); P mfd = xfopen(bfr, "r"); P do { P! if (fgets(bfr, sizeof bfr, mfd) == NULL) P xerror("Can't find backbone in %s/mailpaths", P LIBDIR); P! } while (!prefix(bfr, "backbone")); P! if (sscanf(bfr, "%*s %s", modadd) != 1) P! xerror("backbone address corrupted"); P /* fake a header for mailhdr */ P mhdr.from[0] = '\0'; P mhdr.replyto[0] = '\0'; P--- 766,776 ---- P sprintf(bfr, "%s/mailpaths", LIBDIR); P mfd = xfopen(bfr, "r"); P do { P! if (fscanf(mfd, "%s %s", bfr, modadd) != 2) P xerror("Can't find backbone in %s/mailpaths", P LIBDIR); P! } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P! (void) fclose(mfd); P /* fake a header for mailhdr */ P mhdr.from[0] = '\0'; P mhdr.replyto[0] = '\0'; P*************** P*** 942,952 **** P } P if (bfr[0] == '>') P linserted++; P empty = FALSE; P } P if (*filename) P (void) fclose(infp); P! if (mode != PROC && linserted > (linecount-linserted)) P error("Article rejected: %s included more text than new text", P username); P P--- 942,955 ---- P } P if (bfr[0] == '>') P linserted++; P+ if (bfr[0] == '<') /* kludge to allow diff's to be posted */ P+ linserted--; P empty = FALSE; P } P if (*filename) P (void) fclose(infp); P! if (mode != PROC && P! linecount > LNCNT && linserted > (linecount-linserted)) P error("Article rejected: %s included more text than new text", P username); P P*************** P*** 1042,1096 **** P char *fulldir; P char *ngname; P { P- #ifdef USG P- register char *p; P- char parent[200]; P- char sysbuf[200]; P- struct stat sbuf; P- #endif /* USG */ P- P if (ngname == NULL || !isalpha(ngname[0])) P xerror("Tried to make illegal newsgroup %s", ngname); P P- #ifdef USG P- /* P- * If the parent is 755 the setuid(getuid) P- * will fail, and since mkdir is suid, and our real uid is random, P- * the mkdir will fail. So we have to temporarily chmod it to 777. P- */ P- (void) strcpy(parent, fulldir); P- while (p = rindex(parent, '/')) { P- *p = '\0'; P- if (stat(parent, &sbuf) == 0) { P- (void) chmod(parent, 0777); P- break; P- } P- } P- #endif /* USG */ P- P /* Create the directory */ P mkparents(fulldir); P if (mkdir(fulldir, 0777) < 0) P xerror("Cannot mkdir %s: %s", fulldir, errmsg(errno)); P- P- #ifdef USG P- (void) chmod(parent, (int)sbuf.st_mode); /* put it back */ P- /* P- * Give away the directories we just created which were assigned P- * our real uid. P- */ P- (void) setuid(uid); P- (void) chown(fulldir, duid, dgid); P- (void) strcpy(sysbuf, fulldir); P- while (p = rindex(sysbuf, '/')) { P- *p = '\0'; P- /* stop when get to last known good parent */ P- if (strcmp(sysbuf, parent) == 0) P- break; P- (void) chown(sysbuf, duid, dgid); P- } P- (void) setuid(duid); P- #endif /* USG */ P P log("make newsgroup %s in dir %s", ngname, fulldir); P } P--- 1045,1058 ---- P char *fulldir; P char *ngname; P { P if (ngname == NULL || !isalpha(ngname[0])) P xerror("Tried to make illegal newsgroup %s", ngname); P P /* Create the directory */ P mkparents(fulldir); P+ P if (mkdir(fulldir, 0777) < 0) P xerror("Cannot mkdir %s: %s", fulldir, errmsg(errno)); P P log("make newsgroup %s in dir %s", ngname, fulldir); P } P PIndex: checknews.c PPrereq: 2.25 P*** .d/checknews.c Thu Oct 30 16:11:17 1986 P--- checknews.c Fri Nov 21 14:36:10 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.25 5/27/86"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.26 11/21/86"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P*************** P*** 31,38 **** P char narggrp[BUFLEN]; /* spec newsgroup */ P FILE *rcfp, *actfp; P char newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES]; P- struct hbuf header; P- char coptbuf[BUFLEN],datebuf[BUFLEN]; P int mode = 1; P #ifndef SHELL P char *SHELL; P--- 31,36 ---- P PIndex: control.c PPrereq: 2.48 P*** .d/control.c Thu Oct 30 16:09:26 1986 P--- control.c Fri Nov 21 14:36:09 1986 P*************** P*** 19,25 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.48 10/30/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 19,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.48 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 188,194 **** P inpos = ftell(infp); P while (ftell(infp) < outpos) { P if (fgets(myid, sizeof myid, infp) != myid) P! error("iline: Can't rerear article"); P myid[strlen(myid) - 1] = '\0'; P if (findhist(myid) == NULL) P (void) fprintf(outfp, "%s\n", myid); P--- 188,194 ---- P inpos = ftell(infp); P while (ftell(infp) < outpos) { P if (fgets(myid, sizeof myid, infp) != myid) P! error("iline: Can't reread article"); P myid[strlen(myid) - 1] = '\0'; P if (findhist(myid) == NULL) P (void) fprintf(outfp, "%s\n", myid); P*************** P*** 221,226 **** P--- 221,227 ---- P ** What else of this kind should be done? P */ P header.organization[0] = header.distribution[0] = '\0'; P+ header.numlines[0] = '\0'; P for (i = 0; i < NUNREC && header.unrec[i] != NULL; ++i) { P free(header.unrec[i]); P header.unrec[i] = NULL; P*************** P*** 418,438 **** P * group. Rewrite the active file P */ P (void) fseek(actfp, -2L, 1); /* back up 2 characters */ P- #ifdef USG P- /* P- * U G L Y K L U D G E P- * This utter piece of tripe is the only way I know of P- * to get around the fact that ATT BROKE standard IO P- * in System 5.2. Basically, you can't open a file for P- * "r+" and then try and write to it. This hack works P- * on all "real" USG Unix systems, It will probably P- * break on some obscure look alike that doesnt use the P- * real ATT stdio.h P- * Don't blame me, blame ATT. stdio should have P- * already done the following line for us, but it didn't P- */ P- actfp->_flag |= _IOWRT; P- #endif /* USG */ P putc(*p, actfp); P fflush(actfp); P if (*p != 'm') P--- 419,424 ---- P*************** P*** 453,458 **** P--- 439,459 ---- P fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P (argc > 2 && strcmp(argv[2], "moderated") == 0) P ? 'm' : 'y'); P+ #ifdef USG P+ /* P+ * U G L Y K L U D G E P+ * This utter piece of tripe is the only way I know of P+ * to get around the fact that ATT BROKE standard IO P+ * in System 5.2. Basically, you can't open a file for P+ * "r+" and then try and write to it. This hack works P+ * on all "real" USG Unix systems, It will probably P+ * break on some obscure look alike that doesnt use the P+ * real ATT stdio.h P+ * Don't blame me, blame ATT. stdio should have P+ * already done the following line for us, but it didn't P+ */ P+ actfp->_flag |= _IOWRT; P+ #endif /* USG */ P fflush(actfp); P } P P*************** P*** 612,618 **** P (void) strcpy(nfilename, dirname(p)); P fp = fopen(nfilename, "r"); P if (fp == NULL) { P! log("Already Cancelled %s", line); P return 1; P } P htmp.unrec[0] = NULL; P--- 613,619 ---- P (void) strcpy(nfilename, dirname(p)); P fp = fopen(nfilename, "r"); P if (fp == NULL) { P! log("Can't cancel %s: %s", line, errmsg(errno)); P return 1; P } P htmp.unrec[0] = NULL; P*************** P*** 950,957 **** P register char *p; P P if (sendto[0] <= ' ') { P! log("nasty mail name %s from %s", sendto, header.path); P! xxit(1); P } P for (p=sendto; *p; p++) { P if (*p == ' ') { P--- 951,957 ---- P register char *p; P P if (sendto[0] <= ' ') { P! xerror("nasty mail name %s from %s", sendto, header.path); P } P for (p=sendto; *p; p++) { P if (*p == ' ') { P*************** P*** 1007,1018 **** P return; /* no restrictions at this level */ P } else if (strcmp(msg, "delsub") == 0) { P if (!prefix(header.nbuf, "to.")) { P! printf("Must be in a 'to.system' newsgroup."); P xxit(0); P } P return; P } else { P! printf("Unrecognized control message - %s\n", msg); P xxit(0); P } P } P--- 1007,1018 ---- P return; /* no restrictions at this level */ P } else if (strcmp(msg, "delsub") == 0) { P if (!prefix(header.nbuf, "to.")) { P! log("Must be in a 'to.system' newsgroup."); P xxit(0); P } P return; P } else { P! log("Unrecognized control message - %s\n", msg); P xxit(0); P } P } P PIndex: expire.c PPrereq: 2.47 P*** .d/expire.c Thu Oct 30 16:09:39 1986 P--- expire.c Fri Nov 21 14:05:03 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.47 10/23/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.48 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 27,37 **** P # include <sys/file.h> P #else P # include "ndir.h" P- # ifdef LOCKF P- # include <unistd.h> P- # endif /* LOCKF */ P #endif P P char *Progname = "expire"; /* used by xerror to identify failing program */ P P /* Number of array entries to allocate at a time. */ P--- 27,38 ---- P # include <sys/file.h> P #else P # include "ndir.h" P #endif P P+ #ifdef LOCKF P+ #include <unistd.h> P+ #endif /* LOCKF */ P+ P char *Progname = "expire"; /* used by xerror to identify failing program */ P P /* Number of array entries to allocate at a time. */ P*************** P*** 1025,1031 **** P register char *p; P long fpos; P P- (void) umask(0); P (void) sprintf(namebuf, "%s.dir", ARTFILE); P (void) close(creat(namebuf, 0666)); P (void) sprintf(namebuf, "%s.pag", ARTFILE); P--- 1026,1031 ---- PIndex: rextern.c PPrereq: 2.15 P*** .d/rextern.c Thu Oct 30 16:11:21 1986 P--- rextern.c Fri Nov 21 14:05:20 1986 P*************** P*** 3,9 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rextern.c 2.15 4/16/85"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 3,9 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rextern.c 2.17 11/21/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 26,32 **** P char *infile = "/tmp/M2XXXXXX"; /* -T output from Mail */ P int ngrp, line = -1; P P! char filename[BUFLEN], coptbuf[BUFLEN], datebuf[BUFLEN]; P char afline[BUFLEN]; P FILE *rcfp, *actfp; P time_t atime; P--- 26,32 ---- P char *infile = "/tmp/M2XXXXXX"; /* -T output from Mail */ P int ngrp, line = -1; P P! char filename[BUFLEN]; P char afline[BUFLEN]; P FILE *rcfp, *actfp; P time_t atime; P PIndex: uname.c PPrereq: 2.11 P*** .d/uname.c Thu Oct 30 16:11:56 1986 P--- uname.c Fri Nov 21 14:05:20 1986 P*************** P*** 21,27 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.11 10/23/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 21,27 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.12 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 36,41 **** P--- 36,43 ---- P { P char *cp; P gethostname(uptr->nodename, sizeof (uptr->nodename)); P+ if (MYDOMAIN[0] == '\0') /* get domain name from hostname */ P+ return; P cp = index(uptr->nodename, '.'); P if (cp) P *cp = '\0'; PIndex: unbatch.c PPrereq: 1.22 P*** .d/unbatch.c Thu Oct 30 16:09:28 1986 P--- unbatch.c Fri Nov 21 14:05:21 1986 P*************** P*** 13,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.22 10/23/86"; P #endif /* SCCSID */ P P! #define MAXARGS 20 P P #include "defs.h" P #include <stdio.h> P--- 13,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.23 11/21/86"; P #endif /* SCCSID */ P P! #define MAXARGS 32 P P #include "defs.h" P #include <stdio.h> P*************** P*** 179,184 **** P--- 179,185 ---- P /* VARARGS1 */ P logerr(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) P char *fmt; P+ long a1, a2, a3, a4, a5, a6, a7, a8, a9; P { P FILE *logfile; P char lfname[BUFSIZ]; /* the log file */ P PIndex: uurec.c PPrereq: 2.9 P*** .d/uurec.c Thu Oct 30 16:16:56 1986 P--- uurec.c Fri Nov 21 14:05:22 1986 P*************** P*** 3,9 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.9 4/16/85"; P #endif /* SCCSID */ P P #include "defs.h" P--- 3,9 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.10 11/21/86"; P #endif /* SCCSID */ P P #include "defs.h" P*************** P*** 126,132 **** P mode = SKIPPING; P } P } P! if (pipe) P pclose(pipe); P exit(0); P } P--- 126,132 ---- P mode = SKIPPING; P } P } P! if (pipe && pipe != stdout) P pclose(pipe); P exit(0); P } P PIndex: funcs.c PPrereq: 2.33 P*** .d/funcs.c Thu Oct 30 16:11:13 1986 P--- funcs.c Fri Nov 21 14:05:04 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.33 10/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.34 11/21/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 321,327 **** P char *lfsuffix[] = { P "log", P "errlog", P! 0 P }; P P /* P--- 321,327 ---- P char *lfsuffix[] = { P "log", P "errlog", P! NULL, P }; P P /* P*************** P*** 471,477 **** P--- 471,497 ---- P int perm; P { P int pid, status; P+ #ifdef USG P+ char parent[200]; P+ char *p; P+ struct stat sbuf; P P+ /* P+ * Make parent directory writable, because we will P+ * be creating a directory owned by the real user, P+ * rather than by news. P+ */ P+ (void) strcpy(parent, path); P+ if (p = rindex(parent, '/')) { P+ *p = '\0'; P+ if (stat(parent, &sbuf) == 0) P+ (void) chmod(parent, 0777); P+ else P+ return -1; P+ } else P+ return -1; P+ #endif P+ P if (pid=vfork()) { P status = fwait(pid); P #if defined(USG) && !defined(CHEAP) P*************** P*** 495,500 **** P--- 515,523 ---- P perror(path); P _exit(1); P } P+ #ifdef USG P+ (void) chmod(parent, sbuf.st_mode); /* Restore mode of parent */ P+ #endif P return status; P } P #endif /* !BSD4_2 && ! BSD4_1C */ P PIndex: getdate.y PPrereq: 2.13 P*** .d/getdate.y Thu Oct 30 16:11:06 1986 P--- getdate.y Fri Nov 21 14:05:05 1986 P*************** P*** 1,9 **** P %token ID MONTH DAY MERIDIAN NUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO P %{ P! /* Steven M. Bellovin (unc!smb) */ P /* Dept. of Computer Science */ P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.13 9/16/86 */ P P #include <sys/types.h> P #ifdef USG P--- 1,9 ---- P %token ID MONTH DAY MERIDIAN NUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO P %{ P! /* Originally from: Steven M. Bellovin (unc!smb) */ P /* Dept. of Computer Science */ P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.14 11/21/86 */ P P #include <sys/types.h> P #ifdef USG P*************** P*** 69,75 **** P {hh = $1; mm = $3; merid = $4;} P | NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; merid = 24; P! daylight = STANDARD; ourzone = $4%100 + 60*$4/100;} P | NUMBER ':' NUMBER ':' NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24;} P | NUMBER ':' NUMBER ':' NUMBER MERIDIAN = P--- 69,75 ---- P {hh = $1; mm = $3; merid = $4;} P | NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; merid = 24; P! daylight = STANDARD; ourzone = -($4%100 + 60*($4/100));} P | NUMBER ':' NUMBER ':' NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24;} P | NUMBER ':' NUMBER ':' NUMBER MERIDIAN = P*************** P*** 76,82 **** P {hh = $1; mm = $3; ss = $5; merid = $6;} P | NUMBER ':' NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24; P! daylight = STANDARD; ourzone = $6%100 + 60*$6/100;}; P P zone: ZONE = P {ourzone = $1; daylight = STANDARD;} P--- 76,82 ---- P {hh = $1; mm = $3; ss = $5; merid = $6;} P | NUMBER ':' NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24; P! daylight = STANDARD; ourzone = -($6%100 + 60*($6/100));}; P P zone: ZONE = P {ourzone = $1; daylight = STANDARD;} P*************** P*** 125,131 **** P #define epoch 1970 P P extern struct tm *localtime(); P! time_t dateconv(mm, dd, yy, h, m, s, mer, zone, dayflag) P int mm, dd, yy, h, m, s, mer, zone, dayflag; P { P time_t tod, jdate; P--- 125,133 ---- P #define epoch 1970 P P extern struct tm *localtime(); P! P! time_t P! dateconv(mm, dd, yy, h, m, s, mer, zone, dayflag) P int mm, dd, yy, h, m, s, mer, zone, dayflag; P { P time_t tod, jdate; P*************** P*** 149,155 **** P return (jdate); P } P P! time_t dayconv(ord, day, now) int ord, day; time_t now; P { P register struct tm *loctime; P time_t tod; P--- 151,159 ---- P return (jdate); P } P P! time_t P! dayconv(ord, day, now) P! int ord, day; time_t now; P { P register struct tm *loctime; P time_t tod; P*************** P*** 162,168 **** P return daylcorr(tod, now); P } P P! time_t timeconv(hh, mm, ss, mer) register int hh, mm, ss, mer; P { P if (mm < 0 || mm > 59 || ss < 0 || ss > 59) return (-1); P switch (mer) { P--- 166,174 ---- P return daylcorr(tod, now); P } P P! time_t P! timeconv(hh, mm, ss, mer) P! register int hh, mm, ss, mer; P { P if (mm < 0 || mm > 59 || ss < 0 || ss > 59) return (-1); P switch (mer) { P*************** P*** 175,181 **** P default: return (-1); P } P } P! time_t monthadd(sdate, relmonth) time_t sdate, relmonth; P { P struct tm *ltime; P time_t dateconv(); P--- 181,189 ---- P default: return (-1); P } P } P! time_t P! monthadd(sdate, relmonth) P! time_t sdate, relmonth; P { P struct tm *ltime; P time_t dateconv(); P*************** P*** 191,197 **** P ltime->tm_min, ltime->tm_sec, 24, ourzone, MAYBE), sdate); P } P P! time_t daylcorr(future, now) time_t future, now; P { P int fdayl, nowdayl; P P--- 199,207 ---- P ltime->tm_min, ltime->tm_sec, 24, ourzone, MAYBE), sdate); P } P P! time_t P! daylcorr(future, now) P! time_t future, now; P { P int fdayl, nowdayl; P P*************** P*** 212,218 **** P int pcnt; P P for (;;) { P! while (isspace(*lptr)) lptr++; P P if (isdigit(c = *lptr) || c == '-' || c == '+') { P if (c== '-' || c == '+') { P--- 222,229 ---- P int pcnt; P P for (;;) { P! while (isspace(*lptr)) P! lptr++; P P if (isdigit(c = *lptr) || c == '-' || c == '+') { P if (c== '-' || c == '+') { P*************** P*** 224,230 **** P } P } else sign = 1; P yylval = 0; P! while (isdigit(c = *lptr++)) yylval = 10*yylval + c - '0'; P yylval *= sign; P lptr--; P return (NUMBER); P--- 235,242 ---- P } P } else sign = 1; P yylval = 0; P! while (isdigit(c = *lptr++)) P! yylval = 10*yylval + c - '0'; P yylval *= sign; P lptr--; P return (NUMBER); P*************** P*** 258,288 **** P }; P P struct table mdtab[] = { P! {"January", MONTH, 1}, P! {"February", MONTH, 2}, P! {"March", MONTH, 3}, P! {"April", MONTH, 4}, P! {"May", MONTH, 5}, P! {"June", MONTH, 6}, P! {"July", MONTH, 7}, P! {"August", MONTH, 8}, P! {"September", MONTH, 9}, P! {"Sept", MONTH, 9}, P! {"October", MONTH, 10}, P! {"November", MONTH, 11}, P! {"December", MONTH, 12}, P P! {"Sunday", DAY, 0}, P! {"Monday", DAY, 1}, P! {"Tuesday", DAY, 2}, P! {"Tues", DAY, 2}, P! {"Wednesday", DAY, 3}, P! {"Wednes", DAY, 3}, P! {"Thursday", DAY, 4}, P! {"Thur", DAY, 4}, P! {"Thurs", DAY, 4}, P! {"Friday", DAY, 5}, P! {"Saturday", DAY, 6}, P {0, 0, 0}}; P P #define HRS *60 P--- 270,300 ---- P }; P P struct table mdtab[] = { P! {"january", MONTH, 1}, P! {"february", MONTH, 2}, P! {"march", MONTH, 3}, P! {"april", MONTH, 4}, P! {"may", MONTH, 5}, P! {"june", MONTH, 6}, P! {"july", MONTH, 7}, P! {"august", MONTH, 8}, P! {"september", MONTH, 9}, P! {"sept", MONTH, 9}, P! {"october", MONTH, 10}, P! {"november", MONTH, 11}, P! {"december", MONTH, 12}, P P! {"sunday", DAY, 0}, P! {"monday", DAY, 1}, P! {"tuesday", DAY, 2}, P! {"tues", DAY, 2}, P! {"wednesday", DAY, 3}, P! {"wednes", DAY, 3}, P! {"thursday", DAY, 4}, P! {"thur", DAY, 4}, P! {"thurs", DAY, 4}, P! {"friday", DAY, 5}, P! {"saturday", DAY, 6}, P {0, 0, 0}}; P P #define HRS *60 P*************** P*** 420,486 **** P {"z", ZONE, 0 HRS}, P {0, 0, 0}}; P P! lookup(id) char *id; P { P #define gotit (yylval=i->value, i->type) P- #define getid for(j=idvar, k=id; *j++ = *k++; ) P P! char idvar[20]; P register char *j, *k; P register struct table *i; P int abbrev; P P! getid; P! if (strlen(idvar) == 3) abbrev = 1; P! else if (strlen(idvar) == 4 && idvar[3] == '.') { P abbrev = 1; P! idvar[3] = '\0'; P! } P! else abbrev = 0; P P- if (islower(*idvar)) *idvar = toupper(*idvar); P- P for (i = mdtab; i->name; i++) { P k = idvar; P for (j = i->name; *j++ == *k++;) { P! if (abbrev && j==i->name+3) return gotit; P! if (j[-1] == 0) return gotit; P } P } P P- getid; P for (i = mztab; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P P- for (j = idvar; *j; j++) P- if (isupper(*j)) *j = tolower(*j); P for (i=mztab; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P P- getid; P for (i=unittb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P P if (idvar[strlen(idvar)-1] == 's') P idvar[strlen(idvar)-1] = '\0'; P for (i=unittb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P P- getid; P for (i = othertb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P P- getid; P if (strlen(idvar) == 1 && isalpha(*idvar)) { P- if (isupper(*idvar)) *idvar = tolower(*idvar); P for (i = milzone; i->name; i++) P! if (strcmp(i->name, idvar) == 0) return gotit; P } P P! return(ID); P } P P! time_t getdate(p, now) char *p; struct timeb *now; P { P #define mcheck(f) if (f>1) err++ P time_t monthadd(); P--- 432,510 ---- P {"z", ZONE, 0 HRS}, P {0, 0, 0}}; P P! lookup(id) P! char *id; P { P #define gotit (yylval=i->value, i->type) P P! char idvar[128]; P register char *j, *k; P register struct table *i; P int abbrev; P P! (void) strcpy(idvar, id); P! j = idvar; P! k = id - 1; P! while (*++k) P! *j++ = isupper(*k) ? tolower(*k) : *k; P! *j = '\0'; P! P! if (strlen(idvar) == 3) P abbrev = 1; P! else P! if (strlen(idvar) == 4 && idvar[3] == '.') { P! abbrev = 1; P! idvar[3] = '\0'; P! } P! else P! abbrev = 0; P P for (i = mdtab; i->name; i++) { P k = idvar; P for (j = i->name; *j++ == *k++;) { P! if (abbrev && j == i->name+3) P! return gotit; P! if (j[-1] == 0) P! return gotit; P } P } P P for (i = mztab; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P P for (i=mztab; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P P for (i=unittb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P P if (idvar[strlen(idvar)-1] == 's') P idvar[strlen(idvar)-1] = '\0'; P+ P for (i=unittb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P P for (i = othertb; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P P if (strlen(idvar) == 1 && isalpha(*idvar)) { P for (i = milzone; i->name; i++) P! if (strcmp(i->name, idvar) == 0) P! return gotit; P } P P! return ID; P } P P! time_t P! getdate(p, now) P! char *p; P! struct timeb *now; P { P #define mcheck(f) if (f>1) err++ P time_t monthadd(); P PIndex: postnews.c PPrereq: 1.28 P*** .d/postnews.c Thu Oct 30 16:09:17 1986 P--- postnews.c Fri Nov 21 14:05:17 1986 P*************** P*** 18,24 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.28 10/23/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 18,24 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.29 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 308,314 **** P } P if (deflt != (char *)0) P (void) strcpy(def, deflt); P! if (ngmatch("net.test", newsgroups)) P (void) strcpy(def, "local"); P for(;;) { P do { P--- 308,314 ---- P } P if (deflt != (char *)0) P (void) strcpy(def, deflt); P! if (ngmatch("misc.test", newsgroups)) P (void) strcpy(def, "local"); P for(;;) { P do { P*************** P*** 333,354 **** P /* Check that it's a proper distribution */ P for (i=0; distr[i].abbr[0]; i++) { P if (strncmp(distr[i].abbr, distribution, sizeof(distr[0].abbr)) == 0) { P- register int n; P- /* Found a match. Do any special rewriting. */ P- r = newsgroups; P- n = strlen(distribution); P- /* P- * A distribution of foo is useless P- * if all the newsgroups are in foo.all P- */ P- for (;;) { P- if (strncmp(r, distribution, n)) P- return; P- if ((r = index(r, NGDELIM)) == NULL) P- break; P- ++r; P- } P- distribution[0] = '\0'; P return; P } P } P--- 333,338 ---- P*************** P*** 515,520 **** P--- 499,506 ---- P if (!article_line(tempfname, "Newsgroups: ", group)) { P nogroups: P printf("Not sending to any newsgroups - no message posted\n"); P+ sprintf(ccname, "%s/dead.article", homedir); P+ save_article(); P (void) UNLINK(tempfname); P exit(1); P } P*************** P*** 529,535 **** P *p = '\0'; P P /* Sanity checks for certain newsgroups */ P! if (ngmatch(newsgroups, "all.wanted") && ngmatch(distribution,"net,na,usa,att,btl,eunet,aus")) { P printf("Is your message something that might go in your local\n"); P printf("newspaper, for example a used car ad, or an apartment\n"); P printf("for rent? "); P--- 515,521 ---- P *p = '\0'; P P /* Sanity checks for certain newsgroups */ P! if (ngmatch(newsgroups, "all.wanted") && ngmatch(distribution,"world,na,usa,att,btl,eunet,aus")) { P printf("Is your message something that might go in your local\n"); P printf("newspaper, for example a used car ad, or an apartment\n"); P printf("for rent? "); P*************** P*** 542,548 **** P } P } P P! if (ngmatch(newsgroups, "all.jokes")) { P if (askyes("Could this be offensive to anyone? ","")) { P getpr("Whom might it offend? ", group); P (void) sprintf(buf," - offensive to %s (rot 13)",group); P--- 528,534 ---- P } P } P P! if (ngmatch(newsgroups, "rec.humor,!rec.humor.d")) { P if (askyes("Could this be offensive to anyone? ","")) { P getpr("Whom might it offend? ", group); P (void) sprintf(buf," - offensive to %s (rot 13)",group); P*************** P*** 551,581 **** P } P } P P! if (ngmatch(newsgroups, "net.general")) { P! if (index(newsgroups, NGDELIM)) { P! printf("Everybody in the world reads net.general, so it doesn't make\n"); P! printf("sense to post to newsgroups in addition to net.general. If your\n"); P! printf("article belongs in one of these other newsgroups, then you\n"); P! printf("should not post to net.general. If it is important enough\n"); P! printf("for net.general, then you shouldn't post it in other places\n"); P! printf("as well. Please reenter the newsgroups.\n"); P! while (!get_newsgroup()) P! ; P! modify_article(tempfname, "Newsgroups: ", newsgroups,REPLACE); P! } P! if (ngmatch(newsgroups, "net.general")) { P! printf("net.general is for important announcements.\n"); P! printf("It is not for items for which you couldn't think\n"); P! printf("of a better place - those belong in net.misc.\n"); P! if (!askyes("Are you sure your message belongs in net.general? ","")) { P! while (!get_newsgroup()) P! ; P! modify_article(tempfname, "Newsgroups: ", newsgroups, REPLACE); P! } P! } P! } P! P! if (ngmatch(newsgroups, "net.sources,!net.sources.all")) { P if (!article_line(tempfname, "Subject: ", group)) { P nosubj: P printf("There seems to be no subject for this article.\n"); P--- 537,543 ---- P } P } P P! if (ngmatch(newsgroups, "comp.sources.all,!comp.sources.wanted")) { P if (!article_line(tempfname, "Subject: ", group)) { P nosubj: P printf("There seems to be no subject for this article.\n"); P*************** P*** 591,604 **** P } P if (ngmatch(newsgroups, "all.wanted") || iswanted(subject)) { P printf("Requests for sources should not be posted to any of\n"); P! printf("the net.sources newsgroups, please post such requests\n"); P! printf("to net.wanted.sources only. Please reenter the newsgroups.\n\n"); P while (!get_newsgroup()) P ; P modify_article(tempfname, "Newsgroups: ", newsgroups, REPLACE); P } P! if (ngmatch(newsgroups, "net.sources")) { P! if (!ngmatch(newsgroups, "net.sources.all") && P stbuf.st_size < (4*1024)) { P printf("Your article seems rather small to be a source distribution.\n"); P if (!askyes("Are you certain that this is really source? ", "")) { P--- 553,566 ---- P } P if (ngmatch(newsgroups, "all.wanted") || iswanted(subject)) { P printf("Requests for sources should not be posted to any of\n"); P! printf("the comp.sources newsgroups, please post such requests\n"); P! printf("to comp.sources.wanted only. Please reenter the newsgroups.\n\n"); P while (!get_newsgroup()) P ; P modify_article(tempfname, "Newsgroups: ", newsgroups, REPLACE); P } P! if (ngmatch(newsgroups, "comp.sources.all")) { P! if (!ngmatch(newsgroups, "comp.sources.wanted") && P stbuf.st_size < (4*1024)) { P printf("Your article seems rather small to be a source distribution.\n"); P if (!askyes("Are you certain that this is really source? ", "")) { P*************** P*** 989,1002 **** P /* newsgroup */ P if (article_line(baseart, "Newsgroups: ", buf)) P (void) strcpy(newsgroups, buf+12); P! if (ngmatch(newsgroups, "net.general")) P! (void) strcpy(newsgroups,"net.followup"); P! if (ngmatch(newsgroups, "net.sources,!net.sources.all")) P! (void) strcpy(newsgroups,"net.sources.d"); P! if (ngmatch(newsgroups, "net.jobs")) { P! printf("net.jobs is for the direct posting of job announcements and requests.\n"); P! printf("it is not for discussion. You followup has been directed to net.misc\n"); P! (void) strcpy(newsgroups,"net.misc"); P } P P /* distribution */ P--- 951,960 ---- P /* newsgroup */ P if (article_line(baseart, "Newsgroups: ", buf)) P (void) strcpy(newsgroups, buf+12); P! if (ngmatch(newsgroups, "misc.jobs")) { P! printf("misc.jobs is for the direct posting of job announcements and requests.\n"); P! printf("it is not for discussion. You followup has been directed to misc.misc\n"); P! (void) strcpy(newsgroups,"misc.misc"); P } P P /* distribution */ PIndex: defs.dist PPrereq: 2.55 P*** .d/defs.dist Thu Oct 30 16:17:04 1986 P--- defs.dist Fri Nov 21 14:36:10 1986 P*************** P*** 14,20 **** P * P */ P P! /* @(#)defs.dist 2.55 10/30/86 */ P P /* P * defs.h - defines for news-related programs. P--- 14,20 ---- P * P */ P P! /* @(#)defs.dist 2.56 11/21/86 */ P P /* P * defs.h - defines for news-related programs. P*************** P*** 28,47 **** P * to be news_version below. P */ P P- #define NEWS_VERSION "B 2.11 10/30/86" P- P #define DAYS (60L*60L*24L) P #define WEEKS (7*DAYS) P /* Things that very well may require local configuration */ P #ifndef HOME P! #define ROOTID 10 /* uid of person allowed to cancel anything */ P #endif P! #define N_UMASK 000 /* mask for umask call, 022 for secure system */ P #define DFLTEXP 2*WEEKS /* default no. of seconds to expire in */ P #define HISTEXP 4*WEEKS /* default no. of seconds to forget in */ P #define DFLTSUB "general,all.announce" /* default subscription list */ P #define TMAIL "/usr/ucb/Mail" /* Mail program that understands -T */ P! #define ADMSUB "general,all.announce" /* Mandatory subscription list */ P #define PAGE "/usr/ucb/more" /* Default pager */ P #define NOTIFY "usenet" /* Tell him about certain ctl messages */ P /* Default xmit command - remove -z if */ P--- 28,45 ---- P * to be news_version below. P */ P P #define DAYS (60L*60L*24L) P #define WEEKS (7*DAYS) P /* Things that very well may require local configuration */ P #ifndef HOME P! #define ROOTID 10 /* uid of person allowed to cancel anything */ P #endif P! #define N_UMASK 000 /* mask for umask call, 022 for secure system */ P #define DFLTEXP 2*WEEKS /* default no. of seconds to expire in */ P #define HISTEXP 4*WEEKS /* default no. of seconds to forget in */ P #define DFLTSUB "general,all.announce" /* default subscription list */ P #define TMAIL "/usr/ucb/Mail" /* Mail program that understands -T */ P! #define ADMSUB "general,all.announce" /* Mandatory subscription list */ P #define PAGE "/usr/ucb/more" /* Default pager */ P #define NOTIFY "usenet" /* Tell him about certain ctl messages */ P /* Default xmit command - remove -z if */ P*************** P*** 98,114 **** P # define BUFLEN 256 /* standard buffer size */ P #endif P #define LBUFLEN 1024 /* big buffer size */ P! #define SBUFLEN 32 /* small buffer size (for system names, etc) */ P #define LNCNT 14 /* Articles with > LNCNT lines go through pager */ P P /* Things you probably won't want to change */ P #define PATHLEN 512 /* length of longest source string */ P! #define DATELEN 64 /* length of longest allowed date string */ P! #define NAMELEN 128 /* length of longest possible message ID */ P! #define SNLN 8 /* max significant characters in sysname */ P! #define PROTO 'A' /* old protocol name */ P #define NETCHRS "!:@^%,"/* Punct. chars used for various networks */ P! #define TRUE 1 /* boolean true */ P! #define FALSE 0 /* boolean false */ P! #define PERHAPS 2 /* indeterminate boolean value */ P! #define NGDELIM ',' /* delimit character in news group line */ P--- 96,112 ---- P # define BUFLEN 256 /* standard buffer size */ P #endif P #define LBUFLEN 1024 /* big buffer size */ P! #define SBUFLEN 32 /* small buffer size (for system names, etc) */ P #define LNCNT 14 /* Articles with > LNCNT lines go through pager */ P P /* Things you probably won't want to change */ P #define PATHLEN 512 /* length of longest source string */ P! #define DATELEN 64 /* length of longest allowed date string */ P! #define NAMELEN 128 /* length of longest possible message ID */ P! #define SNLN 8 /* max significant characters in sysname */ P! #define PROTO 'A' /* old protocol name */ P #define NETCHRS "!:@^%,"/* Punct. chars used for various networks */ P! #define TRUE 1 /* boolean true */ P! #define FALSE 0 /* boolean false */ P! #define PERHAPS 2 /* indeterminate boolean value */ P! #define NGDELIM ',' /* delimit character in news group line */ P PIndex: Makefile.dst PPrereq: 1.17 P*** .d/Makefile.dst Thu Oct 30 16:16:32 1986 P--- Makefile.dst Fri Nov 21 14:04:57 1986 P*************** P*** 1,4 **** P! # '@(#)Makefile.dst 1.17 10/29/86' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P # which should at least be a copy of localize.v7 or localize.usg P--- 1,4 ---- P! # '@(#)Makefile.dst 1.19 11/21/86' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P # which should at least be a copy of localize.v7 or localize.usg P*************** P*** 98,104 **** P COMMANDS = readnews checknews postnews vnews P P # dependencies P! all: $(COMMANDS) $(OTHERS) P P install: all help vnews.help P -mkdir $(DESTDIR)$(BINDIR) P--- 98,104 ---- P COMMANDS = readnews checknews postnews vnews P P # dependencies P! all: $(OTHERS) $(COMMANDS) P P install: all help vnews.help P -mkdir $(DESTDIR)$(BINDIR) P*************** P*** 300,306 **** P $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) P #VMS mv expire.exe expire P P! header.o: header.c header.h defs.h params.h Makefile P $(CC) $(CFLAGS) -c header.c P P expire.o: expire.c defs.h Makefile params.h ndir.h header.h Makefile P--- 300,306 ---- P $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) P #VMS mv expire.exe expire P P! header.o: header.c header.h defs.h patchlevel.h params.h Makefile P $(CC) $(CFLAGS) -c header.c P P expire.o: expire.c defs.h Makefile params.h ndir.h header.h Makefile P PIndex: localize.v7 P*** .d/localize.v7 Thu Oct 30 16:12:17 1986 P--- localize.v7 Fri Nov 21 14:05:14 1986 P*************** P*** 6,11 **** P--- 6,12 ---- P g/^#USG /d P g/^#VMS /d P g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P w P q P EOF P PIndex: checkgroups.sh PPrereq: 1.17 P*** .d/checkgroups.sh Thu Oct 30 16:16:58 1986 P--- checkgroups.sh Fri Nov 21 14:04:58 1986 P*************** P*** 1,5 **** P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.17 10/29/86' P P if test ! -s LIBDIR/newsgroups P then P--- 1,5 ---- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.19 11/21/86' P P if test ! -s LIBDIR/newsgroups P then P*************** P*** 22,50 **** P group="^net\\.|^mod\\.|^comp\\.|^sci\\.|^rec\\.|^news\\.|^soc\\.|^misc\\.|^talk\\." P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P cat >> LIBDIR/newsgroups P ;; P esac P P egrep "${group}" LIBDIR/active | sed 's/ .*//' | sort >/tmp/$$active P! egrep "${group}" LIBDIR/newsgroups | sed 's/ .*//' | sort >/tmp/$$newsgroups P P! comm -13 /tmp/$$active /tmp/$$newsgroups >/tmp/$$missing P! comm -23 /tmp/$$active /tmp/$$newsgroups >/tmp/$$remove P P egrep "${group}" LIBDIR/active | sed -n "/m\$/s/ .*//p" | P! sort > /tmp/$$active.mod.all P egrep "${group}" LIBDIR/newsgroups | P! sed -n "/Moderated/s/[ ][ ]*.*//p" | sort > /tmp/$$newsg.mod P P! comm -12 /tmp/$$missing /tmp/$$newsg.mod >/tmp/$$add.mod P! comm -23 /tmp/$$missing /tmp/$$newsg.mod >/tmp/$$add.unmod P cat /tmp/$$add.mod /tmp/$$add.unmod >>/tmp/$$add P P! comm -23 /tmp/$$active.mod.all /tmp/$$remove >/tmp/$$active.mod P! comm -13 /tmp/$$newsg.mod /tmp/$$active.mod >/tmp/$$ismod P! comm -23 /tmp/$$newsg.mod /tmp/$$active.mod >/tmp/$$notmod.all P! comm -23 /tmp/$$notmod.all /tmp/$$add >/tmp/$$notmod P P if test -s /tmp/$$remove P then P--- 22,51 ---- P group="^net\\.|^mod\\.|^comp\\.|^sci\\.|^rec\\.|^news\\.|^soc\\.|^misc\\.|^talk\\." P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P+ echo "${line}" >> LIBDIR/newsgroups P cat >> LIBDIR/newsgroups P ;; P esac P P egrep "${group}" LIBDIR/active | sed 's/ .*//' | sort >/tmp/$$active P! egrep "${group}" LIBDIR/newsgroups | sed 's/ .*//' | sort >/tmp/$$newsgrps P P! comm -13 /tmp/$$active /tmp/$$newsgrps >/tmp/$$missing P! comm -23 /tmp/$$active /tmp/$$newsgrps >/tmp/$$remove P P egrep "${group}" LIBDIR/active | sed -n "/m\$/s/ .*//p" | P! sort > /tmp/$$amod.all P egrep "${group}" LIBDIR/newsgroups | P! sed -n "/Moderated/s/[ ][ ]*.*//p" | sort > /tmp/$$ng.mod P P! comm -12 /tmp/$$missing /tmp/$$ng.mod >/tmp/$$add.mod P! comm -23 /tmp/$$missing /tmp/$$ng.mod >/tmp/$$add.unmod P cat /tmp/$$add.mod /tmp/$$add.unmod >>/tmp/$$add P P! comm -23 /tmp/$$amod.all /tmp/$$remove >/tmp/$$amod P! comm -13 /tmp/$$ng.mod /tmp/$$amod >/tmp/$$ismod P! comm -23 /tmp/$$ng.mod /tmp/$$amod >/tmp/$$nm.all P! comm -23 /tmp/$$nm.all /tmp/$$add >/tmp/$$notmod P P if test -s /tmp/$$remove P then P*************** P*** 122,124 **** P--- 123,126 ---- P ) P P rm -f /tmp/$$* P+ PIndex: localize.usg P*** .d/localize.usg Thu Oct 30 16:12:16 1986 P--- localize.usg Fri Nov 21 14:05:14 1986 P*************** P*** 6,11 **** P--- 6,12 ---- P g/^#V7 /d P g/^#VMS /d P g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P g/termlib/s//curses/ P w P q P PIndex: localize.sample P*** .d/localize.sample Thu Oct 30 16:09:56 1986 P--- localize.sample Fri Nov 21 14:05:14 1986 P*************** P*** 7,12 **** P--- 7,13 ---- P g/^#BSD4_3 /s/// P g/^#BSD4_1 /d P g/^#USG /d P+ g/#NOTVMS/s/#NOTVMS.*// P /^LIBDIR/s;/usr/lib/news;/usr/new/lib/news; P /^BINDIR/s;/usr/bin;/usr/new; P w P PIndex: ifuncs.c PPrereq: 2.57 P*** .d/ifuncs.c Thu Oct 30 16:09:04 1986 P--- ifuncs.c Fri Nov 21 14:05:08 1986 P*************** P*** 16,26 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.57 10/29/86"; P #endif /* SCCSID */ P P #include "iparams.h" P- #include <errno.h> P P /*LINTLIBRARY*/ P P--- 16,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.58 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P P /*LINTLIBRARY*/ P P*************** P*** 49,54 **** P--- 48,55 ---- P static int mccount; P #endif /* MULTICAST */ P P+ long lseek(); P+ P #ifndef DBM P char *histfile(); P #endif /* !DBM */ P*************** P*** 106,114 **** P #ifdef HIDDENNET P if (strncmp(srec.s_name, LOCALSYSNAME, SNLN) == 0) P continue; P! #endif /* HIDDENNET */ P if (strncmp(srec.s_name, FULLSYSNAME, SNLN) == 0) P continue; P if (sptr = srec.s_nosend) { P while (*sptr) { P while (*sptr && *sptr != ',') P--- 107,116 ---- P #ifdef HIDDENNET P if (strncmp(srec.s_name, LOCALSYSNAME, SNLN) == 0) P continue; P! #else /* !HIDDENNET */ P if (strncmp(srec.s_name, FULLSYSNAME, SNLN) == 0) P continue; P+ #endif /* !HIDDENNET */ P if (sptr = srec.s_nosend) { P while (*sptr) { P while (*sptr && *sptr != ',') P*************** P*** 192,203 **** P break; P } P #ifdef VMS P! if (!transmit(&srec, xfopen(firstbufname,"r"), 1, P! sysptrs, mc)) P #else /* !VMS */ P! if (!transmit(&srec, xfopen(ARTICLE,"r"), 1, sysptrs, P! mc)) P #endif /* !VMS */ P continue; P } P #else /* !MULTICAST */ P--- 194,205 ---- P break; P } P #ifdef VMS P! if (!transmit(&srec, xfopen(firstbufname,"r"), P #else /* !VMS */ P! if (!transmit(&srec, xfopen(ARTICLE,"r"), P #endif /* !VMS */ P+ (strncmp(h.nbuf, "to.", 3) != 0), P+ sysptrs, mc)) P continue; P } P #else /* !MULTICAST */ P*************** P*** 273,281 **** P if (notify) P appfile = appmsgid = FALSE; P P- if (!appfile) P- appfile = appmsgid; P- P if (local && mode == PROC) { P local = 0; P while (isdigit(*++ptr)) P--- 275,280 ---- P*************** P*** 341,347 **** P sp->s_name, oldid, hh.ident); P } P P! if (appfile) { P if (firstbufname[0] == '\0') { P extern char histline[]; P localize("junk"); P--- 340,346 ---- P sp->s_name, oldid, hh.ident); P } P P! if (appfile || appmsgid) { P if (firstbufname[0] == '\0') { P extern char histline[]; P localize("junk"); P*************** P*** 444,450 **** P argv[++pid] = 0; P (void) setgid(gid); P (void) setuid(uid); P! execv(argv[0], argv); P xerror("Can't execv %s", argv[0]); P } P } else { P--- 443,449 ---- P argv[++pid] = 0; P (void) setgid(gid); P (void) setuid(uid); P! execvp(argv[0], argv); P xerror("Can't execv %s", argv[0]); P } P } else { P*************** P*** 547,554 **** P lhs.dptr = lcident; P lhs.dsize = strlen(lhs.dptr) + 1; P rhs = fetch(lhs); P! if (rhs.dptr) P return(TRUE); P #else /* !DBM */ P hfp = xfopen(histfile(lcident), "r"); P while (fgets(bfr, BUFLEN, hfp) != NULL) { P--- 546,555 ---- P lhs.dptr = lcident; P lhs.dsize = strlen(lhs.dptr) + 1; P rhs = fetch(lhs); P! if (rhs.dptr) { P! idunlock(); P return(TRUE); P+ } P #else /* !DBM */ P hfp = xfopen(histfile(lcident), "r"); P while (fgets(bfr, BUFLEN, hfp) != NULL) { P*************** P*** 612,621 **** P rhs.dsize = sizeof fpos; P store(lhs, rhs); P #else /* !DBM */ P! /* also append to proper history subfile */ P! hfp = xfopen(histfile(hline), "a"); P! fprintf(hfp, "%s\n", hline); P! (void) fclose(hfp); P #endif /* !DBM */ P idunlock(); P } P--- 613,626 ---- P rhs.dsize = sizeof fpos; P store(lhs, rhs); P #else /* !DBM */ P! if (strcmp(p = histfile(hline), ARTFILE) != 0) P! /* If the history subfile is accessible */ P! if ((hfp = xfopen(p, "a")) != NULL ) { /* If we can append */ P! fprintf(hfp, "%s\n", hline); /* Append */ P! (void) fclose(hfp); P! } else P! logerr("Unable to append to %s: %s", p, errmsg(errno)); P! P #endif /* !DBM */ P idunlock(); P } P*************** P*** 807,813 **** P */ P if (isproc && index(ngs[ngcount], '.') == NULL && P index(header.nbuf, '.') != NULL) { P! logerr("Local group '%s' removed", P ngs[ngcount]); P continue; P } P--- 812,818 ---- P */ P if (isproc && index(ngs[ngcount], '.') == NULL && P index(header.nbuf, '.') != NULL) { P! logerr("Local group %s removed", P ngs[ngcount]); P continue; P } P*************** P*** 870,878 **** P if (uses[i] == 2) P continue; P if (isproc) P! cp = "Unknown newsgroup '%s' not localized"; P else P! cp = "Unknown newsgroup '%s'"; P logerr(cp, ngs[i]); P #ifdef ALWAYSALIAS P ++okcount; /* so we know to exit below */ P--- 875,883 ---- P if (uses[i] == 2) P continue; P if (isproc) P! cp = "Unknown newsgroup %s not localized"; P else P! cp = "Unknown newsgroup %s"; P logerr(cp, ngs[i]); P #ifdef ALWAYSALIAS P ++okcount; /* so we know to exit below */ P*************** P*** 902,908 **** P continue; P if (strcmp(ngs[i], ngs[j]) != 0) P continue; P! logerr("Duplicate '%s' removed", ngs[j]); P if (uses[i] < uses[j]) P uses[i] = uses[j]; P uses[j] = 0; P--- 907,913 ---- P continue; P if (strcmp(ngs[i], ngs[j]) != 0) P continue; P! logerr("Duplicate %s removed", ngs[j]); P if (uses[i] < uses[j]) P uses[i] = uses[j]; P uses[j] = 0; P*************** P*** 999,1006 **** P * the program will die, possibly leaving the lock in place. P */ P if (++numsigs > 100) { P! logerr("inews ran away looping on signal %d", n); P! xxit(1); P } P (void) signal(n, onsig); P SigTrap = n; P--- 1004,1010 ---- P * the program will die, possibly leaving the lock in place. P */ P if (++numsigs > 100) { P! xerror("inews ran away looping on signal %d", n); P } P (void) signal(n, onsig); P SigTrap = n; P*************** P*** 1085,1091 **** P register FILE *ofd; P register int c; P char *ofdname; P- long lseek(); P P /* First try to seek back - if so, it's a cheap way back. */ P if (lseek(0, 0L, 0) == 0L) P--- 1089,1094 ---- P PIndex: patchlevel.h P*** .d/patchlevel.h Thu Oct 30 16:09:04 1986 P--- patchlevel.h Fri Nov 21 14:05:15 1986 P*************** P*** 1 **** P! 0 P--- 1,3 ---- P! #define PATCHLEVEL 1 P! P! #define NEWS_VERSION "B 2.11 11/15/86" P PIndex: localize.4.3 P*** .d/localize.4.3 Thu Oct 30 16:12:12 1986 P--- localize.4.3 Fri Nov 21 14:05:12 1986 P*************** P*** 7,12 **** P--- 7,13 ---- P g/^#USG /d P g/^#VMS /d P g/^#BSD4_1 /d P+ g/#NOTVMS/s/#NOTVMS.*// P /^UUXFLAGS/s/-r -z/-r -z -n -gd/ P /^LIBDIR/s;/usr/lib/news;/usr/new/lib/news; P /^BINDIR/s;/usr/bin;/usr/new; P PIndex: localize.7300 P*** .d/localize.7300 Thu Oct 30 16:12:11 1986 P--- localize.7300 Fri Nov 21 14:05:13 1986 P*************** P*** 1,4 **** P! #From philabs!hhb!kosman!kevin Mon Apr 28 15:56:44 1986 P rm -f Makefile P cp Makefile.dst Makefile P chmod u+w Makefile P--- 1,6 ---- P! #localize.7300 - for AT&T UNIX PC 7300 and 3b1 system, to use the shared P! # library. P! #From philabs!hhb!kosman!kevin Sun Nov 9 12:00:17 1986 P rm -f Makefile P cp Makefile.dst Makefile P chmod u+w Makefile P*************** P*** 8,13 **** P--- 10,16 ---- P g/^#V7 /d P g/^#VMS /d P g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P /CFLAGS[ ]*=/t. P .s/CFLAGS/MFLAGS/p P .s/-Dindex.*strrchr//p P*************** P*** 21,28 **** P s/\.c/.o/p P /-c compress.c/s/CFLAGS/MFLAGS/p P g/$(LFLAGS)/s;$(LFLAGS);& /lib/crt0s.o shlib.ifile;\ P! s/$(CC)/$(LD)/\ P! s/-ltermlib // P g/chmod 755.*inews/s/755/6755/p P /UUXFLAGS =/s/ -z//p P w P--- 24,31 ---- P s/\.c/.o/p P /-c compress.c/s/CFLAGS/MFLAGS/p P g/$(LFLAGS)/s;$(LFLAGS);& /lib/crt0s.o shlib.ifile;\ P! s/$(CC)/$(LD)/ P! g/-ltermlib/s/-ltermlib// P g/chmod 755.*inews/s/755/6755/p P /UUXFLAGS =/s/ -z//p P w P*************** P*** 37,43 **** P /DFLTSUB/s/".*"/"all"/p P /ROOTID/s/10/101/p P /TMAIL/s;^;/*;p P! /PAGE/s;/usr/ucb/more;/usr/bin/less;p P /DFTXMIT/s/ -z//p P /UXMIT/s/ -z//p P /UNAME/s;/\* ;;p P--- 40,46 ---- P /DFLTSUB/s/".*"/"all"/p P /ROOTID/s/10/101/p P /TMAIL/s;^;/*;p P! /PAGE/s;/usr/ucb/more;/usr/bin/more;p P /DFTXMIT/s/ -z//p P /UXMIT/s/ -z//p P /UNAME/s;/\* ;;p P*************** P*** 47,52 **** P--- 50,60 ---- P q P EOF P P+ # specific stuff to tailor the shared-libarary ifile. The news software P+ # duplicates some code in the shared library and its easiest just to avoid P+ # the error messages. Also, the ifile for some reason does not define P+ # daylight (from ctime(3c)) -- as near as I can tell, this is where it goes. P+ P rm -f shlib.ifile P cat /lib/shlib.ifile >shlib.ifile P chmod u+w shlib.ifile P*************** P*** 58,61 **** P--- 66,75 ---- P /^ospeed /d P /^COLS /d P /^_sibuf /i P+ P+ daylight = 0x303658; P+ P+ . P+ w P+ q P EOF P PIndex: header.c PPrereq: 2.43 P*** .d/header.c Thu Oct 30 16:10:09 1986 P--- header.c Fri Nov 21 16:16:00 1986 P*************** P*** 16,26 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.43 10/23/86"; P #endif /* SCCSID */ P P #include <stdio.h> P #include "params.h" P P char *hfgets(); P P--- 16,27 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.44 11/21/86"; P #endif /* SCCSID */ P P #include <stdio.h> P #include "params.h" P+ #include "patchlevel.h" P P char *hfgets(); P P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.2... ' sed 's/^P//' >patch.2 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: Patch #2 for 2.11 news src P PDescription: P This is patch #2 for the news 2.11 source distribution. It addresses P the following problems: P P Many small changes were made to make lint happy (ok, happier). P The code for HOMNAME is fixed (but still not documented). P rmgroup.sh now works correctly under Eunice. It also is more efficient P when removing lots of groups at a time. P checkgroups no longer has the toplevel newsgroup names hard P coded. It takes them from the input. P More fixes to make the HIDDENNET code work they way it's supposed to. P The rmgroup control message now works if you don't have MANUALLY P defined. P A memory allocation bug in expire was fixed. P Distributions of "net" are now aliased into "world". P New commands "l" and "L" were added to readnews/vnews. "l" list the P from and subject lines of unread articles. "L" does it for all P articles. P "l" in vnews nolonger redraws the screen. Use "^L" instead. P rnews -U no longer runs if the news system is locked. P The NICENESS code now works as expected. P Several incorrect uses of vfork were replaced with fork. P The list of active groups and aliases were updated, so "make update" P now prints more reasonable comments. P ndir.c was fixed so it will run on an HP9000/500 if HP9K5 is defined. P postnews is more rational about default posting distributions. The P intuited distribution must be in LIBDIR/distributions or it will P use "world". If the line "default foobar" appears in the distributions P file, it will use foobar as the default distribution instead of world. P virtterm now accepts line lengths >127 on machines with signed chars. P The 's' command in vnews now remembers the last saved filename and P prompts with it. You can edit the line with your erase/kill chars. PFix: P cd to the src directory and run the following through patch P PIndex: batch.c PPrereq: 1.17 P*** .d/batch.c Fri Nov 21 16:04:41 1986 P--- batch.c Tue Dec 16 13:09:52 1986 P*************** P*** 32,38 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.17 11/21/86"; P #endif /* SCCSID */ P P #include <stdio.h> P--- 32,38 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.18 12/16/86"; P #endif /* SCCSID */ P P #include <stdio.h> P*************** P*** 184,190 **** P logtime[16] = 0; P logtime += 4; P P! #ifdef IHCC P (void) sprintf(lfname, "%s/%s/errlog", logdir(HOME), LIBDIR); P #else P (void) sprintf(lfname, "%s/errlog", LIBDIR); P--- 184,190 ---- P logtime[16] = 0; P logtime += 4; P P! #if defined(IHCC) || defined(HOME) P (void) sprintf(lfname, "%s/%s/errlog", logdir(HOME), LIBDIR); P #else P (void) sprintf(lfname, "%s/errlog", LIBDIR); PIndex: checkgroups.sh PPrereq: 1.19 P*** .d/checkgroups.sh Fri Nov 21 16:05:11 1986 P--- checkgroups.sh Tue Dec 16 13:09:53 1986 P*************** P*** 1,5 **** P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.19 11/21/86' P P if test ! -s LIBDIR/newsgroups P then P--- 1,5 ---- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.20 12/16/86' P P if test ! -s LIBDIR/newsgroups P then P*************** P*** 19,29 **** P cat /tmp/$$a - > LIBDIR/newsgroups P ;; P *) P! group="^net\\.|^mod\\.|^comp\\.|^sci\\.|^rec\\.|^news\\.|^soc\\.|^misc\\.|^talk\\." P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P! echo "${line}" >> LIBDIR/newsgroups P! cat >> LIBDIR/newsgroups P ;; P esac P P--- 19,44 ---- P cat /tmp/$$a - > LIBDIR/newsgroups P ;; P *) P! # Get the distributions from the checkgroups message itself P! # This allows sites to append their local groups to the distributed P! # checkgroups message and prevents stray checkgroups from other sites P! # from showing all the local groups as being bad groups. P! # P! echo "${line}" > /tmp/$$msg P! cat >> /tmp/$$msg P! cp /dev/null /tmp/$$b P! cat /tmp/$$msg | sed -e "s;[ ].*;;" -e "s;\..*;;" | sort -u | P! while read dist P! do P! group=`cat /tmp/$$b` P! group="${group}|^$dist\\." P! echo "${group}" > /tmp/$$b P! done P! group=`cat /tmp/$$b` P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P! cat /tmp/$$msg >> LIBDIR/newsgroups P! rm -f /tmp/$$b /tmp/$$msg P ;; P esac P PIndex: checknews.c PPrereq: 2.26 P*** .d/checknews.c Fri Nov 21 16:04:45 1986 P--- checknews.c Tue Dec 16 13:09:54 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.26 11/21/86"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.27 12/16/86"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P*************** P*** 25,31 **** P P char bfr[LBUFLEN]; /* general-use scratch area */ P char optbuf[BUFLEN]; /* NEWSOPTS buffer */ P! int line = -1, y, e, n, q; P int verbose; /* For debugging. */ P int nflag; /* for spec. newsgroup */ P char narggrp[BUFLEN]; /* spec newsgroup */ P--- 25,31 ---- P P char bfr[LBUFLEN]; /* general-use scratch area */ P char optbuf[BUFLEN]; /* NEWSOPTS buffer */ P! int y, e, n, q; P int verbose; /* For debugging. */ P int nflag; /* for spec. newsgroup */ P char narggrp[BUFLEN]; /* spec newsgroup */ P*************** P*** 32,37 **** P--- 32,38 ---- P FILE *rcfp, *actfp; P char newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES]; P int mode = 1; P+ extern int line; P #ifndef SHELL P char *SHELL; P #endif P PIndex: compress.c PPrereq: 1.12 P*** .d/compress.c Thu Oct 30 16:08:25 1986 P--- compress.c Tue Dec 16 13:09:57 1986 P*************** P*** 1,6 **** P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.12 10/29/86"; P! #endif SCCSID P static char rcs_ident[] = "Based on compress.c,v 4.0 85/07/30 12:50:00 joe Release"; P P /* P--- 1,6 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.13 12/16/86"; P! #endif /* SCCSID */ P static char rcs_ident[] = "Based on compress.c,v 4.0 85/07/30 12:50:00 joe Release"; P P /* P PIndex: control.c PPrereq: 2.48 P*** .d/control.c Fri Nov 21 16:04:47 1986 P--- control.c Tue Dec 16 13:10:00 1986 P*************** P*** 19,25 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.48 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 19,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.49 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 95,104 **** P #ifdef NOTIFY P TELLME = mp->m_who_to; /* reset whom to tell */ P #endif /* NOTIFY */ P! if(strcmp(mp->m_name, "cancel") == 0) /* special case */ P! return (*mp->m_func)(cargc, cargv); P! (*mp->m_func)(cargc, cargv); /* do the function */ P! break; P } P } P if( !mp->m_name ) { P--- 95,101 ---- P #ifdef NOTIFY P TELLME = mp->m_who_to; /* reset whom to tell */ P #endif /* NOTIFY */ P! return (*mp->m_func)(cargc, cargv); /* do it */ P } P } P if( !mp->m_name ) { P*************** P*** 168,174 **** P if (argc < 2) P error("ihave: Too few arguments."); P if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P! return; P list[0] = '\0'; P if (argc > 2) { P for (i = 1; i < (argc - 1); ++i) P--- 165,171 ---- P if (argc < 2) P error("ihave: Too few arguments."); P if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P! return 0; P list[0] = '\0'; P if (argc > 2) { P for (i = 1; i < (argc - 1); ++i) P*************** P*** 177,183 **** P (void) strcat(list, argv[i]); P } P if (list[0] == '\0') P! return; P } else { P register FILE * outfp; P register long outpos, inpos; P--- 174,180 ---- P (void) strcat(list, argv[i]); P } P if (list[0] == '\0') P! return 0; P } else { P register FILE * outfp; P register long outpos, inpos; P*************** P*** 196,202 **** P if (outpos == ftell(outfp)) { /* if nothing is wanted */ P (void) fclose(outfp); P (void) fseek(infp, inpos, 0); P! return; P } P (void) fclose(outfp); P /* P--- 193,199 ---- P if (outpos == ftell(outfp)) { /* if nothing is wanted */ P (void) fclose(outfp); P (void) fseek(infp, inpos, 0); P! return 0; P } P (void) fclose(outfp); P /* P*************** P*** 230,235 **** P--- 227,233 ---- P ** Note that we do *not* change the history line P ** so that if the "ihave" message comes in again it gets rejected. P */ P+ return 0; P } P P /* P*************** P*** 241,247 **** P * Give it to them with no fuss. P */ P c_sendme(argc, argv) P! register char ** argv; P { P struct srec srec; P P--- 239,245 ---- P * Give it to them with no fuss. P */ P c_sendme(argc, argv) P! register char **argv; P { P struct srec srec; P P*************** P*** 248,254 **** P if (argc < 2) P error("sendme: Too few arguments."); P if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P! return; P if (s_find(&srec, argv[argc - 1]) != TRUE) P error("sendme: Can't find sys record for %s", argv[argc - 1]); P /* Send the articles. */ P--- 246,252 ---- P if (argc < 2) P error("sendme: Too few arguments."); P if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P! return 0; P if (s_find(&srec, argv[argc - 1]) != TRUE) P error("sendme: Can't find sys record for %s", argv[argc - 1]); P /* Send the articles. */ P*************** P*** 268,273 **** P--- 266,272 ---- P for (i = 1; i < (argc - 1); ++i) P sendmefunc(argv[i], &srec); P } P+ return 0; P } P P static P*************** P*** 331,338 **** P if (argc < 2) P error("newgroup: Too few arguments."); P P! if (header.approved[0] == '\0') P! error("newgroup: %s not approved", argv[1]); P P /* see if it already exists */ P (void) rewind(actfp); clearerr(actfp); P--- 330,339 ---- P if (argc < 2) P error("newgroup: Too few arguments."); P P! if (header.approved[0] == '\0') { P! logerr("newgroup: %s not approved", argv[1]); P! return 1; P! } P P /* see if it already exists */ P (void) rewind(actfp); clearerr(actfp); P*************** P*** 349,355 **** P p -= 3; P if (argc > 2 && strcmp(argv[2], "moderated") == 0) { P if (*p == 'm') P! return; P # ifdef NONEWGROUPS P if(can_change) { P *p = 'm'; P--- 350,356 ---- P p -= 3; P if (argc > 2 && strcmp(argv[2], "moderated") == 0) { P if (*p == 'm') P! return 0; P # ifdef NONEWGROUPS P if(can_change) { P *p = 'm'; P*************** P*** 361,367 **** P #endif /* NONEWGROUPS */ P } else { P if (*p != 'm') P! return; P # ifdef NONEWGROUPS P if(can_change) { P *p = 'y'; P--- 362,368 ---- P #endif /* NONEWGROUPS */ P } else { P if (*p != 'm') P! return 0; P # ifdef NONEWGROUPS P if(can_change) { P *p = 'y'; P*************** P*** 413,419 **** P * No permission to change P */ P if(!can_change) P! return; P # endif /* NONEWGROUPS */ P /* The active file was wrong about the state of the P * group. Rewrite the active file P--- 414,420 ---- P * No permission to change P */ P if(!can_change) P! return 0; P # endif /* NONEWGROUPS */ P /* The active file was wrong about the state of the P * group. Rewrite the active file P*************** P*** 427,433 **** P else P logerr("Newsgroup %s changed from unmoderated to moderated", P argv[1]); P! return; P } P } P P--- 428,434 ---- P else P logerr("Newsgroup %s changed from unmoderated to moderated", P argv[1]); P! return 0; P } P } P P*************** P*** 439,445 **** P fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P (argc > 2 && strcmp(argv[2], "moderated") == 0) P ? 'm' : 'y'); P! #ifdef USG P /* P * U G L Y K L U D G E P * This utter piece of tripe is the only way I know of P--- 440,446 ---- P fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P (argc > 2 && strcmp(argv[2], "moderated") == 0) P ? 'm' : 'y'); P! #if defined(USG) || defined(MG1) P /* P * U G L Y K L U D G E P * This utter piece of tripe is the only way I know of P*************** P*** 449,454 **** P--- 450,456 ---- P * on all "real" USG Unix systems, It will probably P * break on some obscure look alike that doesnt use the P * real ATT stdio.h P+ * also broken in WCW MG-1 42nix 2.0 P * Don't blame me, blame ATT. stdio should have P * already done the following line for us, but it didn't P */ P*************** P*** 487,492 **** P--- 489,495 ---- P (void) mclose(fd); P } P # endif /* NOTIFY */ P+ return 0; P } P P /* P*************** P*** 505,515 **** P if (argc < 2) P error("rmgroup: Too few arguments."); P if (!validng(argv[1])) P! return; P! if (header.approved[0] == '\0') P! error("rmgroup: %s not approved", argv[1]); P P! #ifndef MANUALLY P #ifdef ORGDISTRIB P /* P * Allow local as well as organizational removals P--- 508,520 ---- P if (argc < 2) P error("rmgroup: Too few arguments."); P if (!validng(argv[1])) P! return 0; P! if (header.approved[0] == '\0') { P! logerr("rmgroup: %s not approved", argv[1]); P! return 1; P! } P P! #ifdef MANUALLY P #ifdef ORGDISTRIB P /* P * Allow local as well as organizational removals P*************** P*** 519,528 **** P #else /* !ORGDISTRIB */ P if (!strcmp("local", header.distribution)) P #endif /* !ORGDISTRIB */ P shouldremove++; P- #endif /* !MANUALLY */ P #ifdef NOTIFY P! sprintf(subjline, "Recevied rmgroup for %s", argv[1]); P fd = mailhdr((struct hbuf *)NULL, subjline); P if (fd != NULL) { P if (shouldremove) { P--- 524,533 ---- P #else /* !ORGDISTRIB */ P if (!strcmp("local", header.distribution)) P #endif /* !ORGDISTRIB */ P+ #endif /* MANUALLY */ P shouldremove++; P #ifdef NOTIFY P! sprintf(subjline, "Received rmgroup for %s", argv[1]); P fd = mailhdr((struct hbuf *)NULL, subjline); P if (fd != NULL) { P if (shouldremove) { P*************** P*** 552,557 **** P--- 557,563 ---- P rc = system(bfr); P log("system(%s) status %d", bfr, rc); P } P+ return 0; P } P P /* P*************** P*** 685,690 **** P--- 691,697 ---- P (void) fclose(u); P (void) mclose(f); P } P+ return 0; P } P P /* P*************** P*** 733,738 **** P--- 740,746 ---- P (void) pclose(u); P (void) mclose(fd); P } P+ return 0; P } P P /* P*************** P*** 751,756 **** P--- 759,765 ---- P fprintf(f, "The header of your message follows:\n\n"); P (void) hwrite(&header, f); P (void) mclose(f); P+ return 0; P } P P /* P*************** P*** 773,778 **** P--- 782,788 ---- P #endif /* !NOTIFY */ P rc = system(bfr); P log("system(%s) status %d", bfr, rc); P+ return 0; P } P P /* P*************** P*** 794,799 **** P--- 804,810 ---- P (void) mclose(f); P } P #endif /* NOTIFY */ P+ return 0; P } P P /* ARGSUSED */ P*************** P*** 811,816 **** P--- 822,828 ---- P (void) mclose(f); P } P #endif /* NOTIFY */ P+ return 0; P } P P /* P PIndex: expire.c PPrereq: 2.48 P*** .d/expire.c Fri Nov 21 16:04:48 1986 P--- expire.c Tue Dec 16 13:10:01 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.48 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.49 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 491,499 **** P goto checkdate; P } P for(i=0; i<NUNREC; i++) P! if (h.unrec[i] != NULL) P free(h.unrec[i]); P! else P break; P if (!hread(&h, fp, TRUE)) { P printf("Garbled article %s.\n", filename); P--- 491,500 ---- P goto checkdate; P } P for(i=0; i<NUNREC; i++) P! if (h.unrec[i] != NULL) { P free(h.unrec[i]); P! h.unrec[i] = NULL; P! } else P break; P if (!hread(&h, fp, TRUE)) { P printf("Garbled article %s.\n", filename); P PIndex: funcs.c PPrereq: 2.34 P*** .d/funcs.c Fri Nov 21 16:04:55 1986 P--- funcs.c Tue Dec 16 13:10:02 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.34 11/21/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.35 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 584,590 **** P */ P P (void) strncpy(facgroups, FASCIST, BUFLEN); P! sprintf(factemp, "%s/%s", LIBDIR, "authorized"); P facfd = fopen(factemp, "r"); P P if (facfd != NULL) { /* If no such file, we go with the global default */ P--- 584,590 ---- P */ P P (void) strncpy(facgroups, FASCIST, BUFLEN); P! sprintf(factemp, "%s/%s", LIB, "authorized"); P facfd = fopen(factemp, "r"); P P if (facfd != NULL) { /* If no such file, we go with the global default */ P*************** P*** 599,605 **** P #ifdef DEBUG P fprintf(stderr, "facgroups = %s\n", facgroups); P fprintf(stderr, "newsgroups = %s\n", newsgroups); P! #endif DEBUG P P /* We step through the newsgroups being posted to and check each against P * the restriction list. *ALL* posted groups must match the restriction P--- 599,605 ---- P #ifdef DEBUG P fprintf(stderr, "facgroups = %s\n", facgroups); P fprintf(stderr, "newsgroups = %s\n", newsgroups); P! #endif /* DEBUG */ P P /* We step through the newsgroups being posted to and check each against P * the restriction list. *ALL* posted groups must match the restriction P*************** P*** 625,631 **** P /* must be okay -- return */ P #ifdef DEBUG P fprintf (stderr, "Newsgroups approved for this poster.\n"); P! #endif DEBUG P return FALSE; P } P! #endif FASCIST P--- 625,631 ---- P /* must be okay -- return */ P #ifdef DEBUG P fprintf (stderr, "Newsgroups approved for this poster.\n"); P! #endif /* DEBUG */ P return FALSE; P } P! #endif /* FASCIST */ P PIndex: funcs2.c PPrereq: 1.16 P*** .d/funcs2.c Thu Oct 30 16:10:57 1986 P--- funcs2.c Tue Dec 16 13:10:03 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.16 10/23/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.17 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 384,395 **** P char mbuf[BUFLEN], modadd[BUFLEN]; P FILE *mfd; P /* Let's find a path to the backbone */ P! sprintf(mbuf, "%s/mailpaths", LIBDIR); P mfd = xfopen(mbuf, "r"); P do { P if (fgets(mbuf, sizeof mbuf, mfd) == NULL) P xerror("Can't find internet in %s/mailpaths", P! LIBDIR); P } while (!prefix(mbuf, "internet")); P if (sscanf(mbuf, "%*s %s", modadd) != 1) P xerror("backbone address corrupted"); P--- 384,395 ---- P char mbuf[BUFLEN], modadd[BUFLEN]; P FILE *mfd; P /* Let's find a path to the backbone */ P! sprintf(mbuf, "%s/mailpaths", LIB); P mfd = xfopen(mbuf, "r"); P do { P if (fgets(mbuf, sizeof mbuf, mfd) == NULL) P xerror("Can't find internet in %s/mailpaths", P! LIB); P } while (!prefix(mbuf, "internet")); P if (sscanf(mbuf, "%*s %s", modadd) != 1) P xerror("backbone address corrupted"); P PIndex: getdate.y PPrereq: 2.14 P*** .d/getdate.y Fri Nov 21 16:05:02 1986 P--- getdate.y Tue Dec 16 13:10:04 1986 P*************** P*** 3,9 **** P /* Originally from: Steven M. Bellovin (unc!smb) */ P /* Dept. of Computer Science */ P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.14 11/21/86 */ P P #include <sys/types.h> P #ifdef USG P--- 3,9 ---- P /* Originally from: Steven M. Bellovin (unc!smb) */ P /* Dept. of Computer Science */ P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.15 12/16/86 */ P P #include <sys/types.h> P #ifdef USG P*************** P*** 22,30 **** P #include "defs.h" P #if defined(BSD4_2) || defined (BSD4_1C) P #include <sys/time.h> P! #else sane P #include <time.h> P! #endif sane P P #define NULL 0 P #define daysec (24L*60L*60L) P--- 22,30 ---- P #include "defs.h" P #if defined(BSD4_2) || defined (BSD4_1C) P #include <sys/time.h> P! #else /* sane */ P #include <time.h> P! #endif /* sane */ P P #define NULL 0 P #define daysec (24L*60L*60L) P PIndex: help P*** .d/help Thu Oct 30 16:12:10 1986 P--- help Tue Dec 16 13:10:06 1986 P*************** P*** 20,24 **** P K Mark the rest of the articles in current group as read. P x Exit. Don't update .newsrc. P v Version. Print current news version number. P! P c, f, r, e, h, and s can be followed by -'s to refer to the previous article P--- 20,25 ---- P K Mark the rest of the articles in current group as read. P x Exit. Don't update .newsrc. P v Version. Print current news version number. P! l List unread articles in newsgroup. P! L List all articles in newsgroup. P c, f, r, e, h, and s can be followed by -'s to refer to the previous article P PIndex: ifuncs.c PPrereq: 2.58 P*** .d/ifuncs.c Fri Nov 21 16:04:00 1986 P--- ifuncs.c Tue Dec 16 13:10:07 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.58 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.59 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 62,68 **** P extern char firstbufname[]; P #endif P P! broadcast() P { P register char *hptr; P register char *sptr; P--- 62,69 ---- P extern char firstbufname[]; P #endif P P! broadcast(is_rnews) P! int is_rnews; P { P register char *hptr; P register char *sptr; P*************** P*** 73,78 **** P--- 74,82 ---- P char sentbuf[LBUFLEN]; P int nsent = 0; P char *sentsys; P+ #ifdef HIDDENNET P+ int len; P+ #endif /* HIDDENNET */ P P /* h is a local copy of the header we can scribble on */ P #ifdef VMS P*************** P*** 86,94 **** P P (void) strcpy(sentbuf, h.ident); P (void) strcat(sentbuf, " sent to "); P! sentsys = index(sentbuf, 0); P nsent = 0; P /* break path into list of systems. */ P sptr = hptr = h.path; P while ((hptr=strpbrk(hptr, NETCHRS)) != NULL) { P *hptr++ = '\0'; P--- 90,105 ---- P P (void) strcpy(sentbuf, h.ident); P (void) strcat(sentbuf, " sent to "); P! sentsys = index(sentbuf, '\0'); P nsent = 0; P /* break path into list of systems. */ P+ hptr = h.path; P+ #ifdef HIDDENNET P+ if (!is_rnews && P+ strncmp(FULLSYSNAME, h.path, (len = strlen(FULLSYSNAME))) == 0 P+ && index(NETCHRS, h.path[len])) P+ (void) strcpy(h.path, &(h.path[len+1])); P+ #endif HIDDENNET P sptr = hptr = h.path; P while ((hptr=strpbrk(hptr, NETCHRS)) != NULL) { P *hptr++ = '\0'; P PIndex: inews.c PPrereq: 2.70 P*** .d/inews.c Fri Nov 21 16:04:44 1986 P--- inews.c Tue Dec 16 13:10:09 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.70 11/21/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.71 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 131,137 **** P if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0 && errno == EWOULDBLOCK) P #else /* !BSD4_2 */ P #ifdef LOCKF P! if (lockf(fileno(actfp), F_TLOCK, 0) < 0 && errno == EAGAIN) P #else /* !LOCKF */ P sprintf(bfr, "%s.lock", ACTIVE); P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P--- 131,138 ---- P if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0 && errno == EWOULDBLOCK) P #else /* !BSD4_2 */ P #ifdef LOCKF P! if (lockf(fileno(actfp), F_TLOCK, 0) < 0 && P! (errno == EAGAIN || errno == EACCES)) P #else /* !LOCKF */ P sprintf(bfr, "%s.lock", ACTIVE); P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P*************** P*** 152,157 **** P--- 153,160 ---- P #endif /* !BSD4_2 && !LOCKF */ P } P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P+ if (spool_news) /* can't unspool while things are locked */ P+ xxit(0); P dounspool(); P /* NOT REACHED */ P } P*************** P*** 163,169 **** P /* NOT REACHED */ P } P #ifdef NICENESS P! nice(NICENESS); P #endif /* NICENESS */ P } else P if (argc < 2) P--- 166,173 ---- P /* NOT REACHED */ P } P #ifdef NICENESS P! if (nice(0) < NICENESS) P! (void) nice(NICENESS); P #endif /* NICENESS */ P } else P if (argc < 2) P*************** P*** 504,510 **** P (void) sprintf(buf, "%s/.rnews/%02d%02d%02d%02d%02d%x", P #endif /* V7 */ P #endif /* VMS */ P! SPOOLDIR, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P sp = xfopen(buf, "w"); P--- 508,514 ---- P (void) sprintf(buf, "%s/.rnews/%02d%02d%02d%02d%02d%x", P #endif /* V7 */ P #endif /* VMS */ P! SPOOL, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P sp = xfopen(buf, "w"); P*************** P*** 653,659 **** P * This will overflow with 99999 articles. P */ P fprintf(actfp, "%s %05ld", ngname, ngsize+1); P! #ifdef USG P /* P * U G L Y K L U D G E P * This utter piece of tripe is the only way I know of to get P--- 657,663 ---- P * This will overflow with 99999 articles. P */ P fprintf(actfp, "%s %05ld", ngname, ngsize+1); P! #if defined(USG) || defined(MG1) P /* P * U G L Y K L U D G E P * This utter piece of tripe is the only way I know of to get P*************** P*** 664,669 **** P--- 668,674 ---- P * real ATT stdio.h P * Don't blame me, blame ATT. stdio should have already done the P * following line for us, but it doesn't P+ * also broken in WCW MG-1 42nix 2.0 P */ P actfp->_flag |= _IOWRT; P #endif /* USG */ P*************** P*** 726,732 **** P } P P #ifdef ZAPNOTES P! if (strcmp(header.title, "Re: Orphaned Response") == 0) { P logerr("Orphaned Response, moved to junk"); P if (localize("junk")) P savehist(histline); P--- 731,737 ---- P } P P #ifdef ZAPNOTES P! if (strncmp(header.title, "Re: Orphaned Response", 21) == 0) { P logerr("Orphaned Response, moved to junk"); P if (localize("junk")) P savehist(histline); P*************** P*** 763,774 **** P fprintf(stderr," directly.\nYour article is being mailed to"); P fprintf(stderr," the moderator who will post it for you.\n"); P /* Let's find a path to the backbone */ P! sprintf(bfr, "%s/mailpaths", LIBDIR); P mfd = xfopen(bfr, "r"); P do { P if (fscanf(mfd, "%s %s", bfr, modadd) != 2) P xerror("Can't find backbone in %s/mailpaths", P! LIBDIR); P } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P (void) fclose(mfd); P /* fake a header for mailhdr */ P--- 768,779 ---- P fprintf(stderr," directly.\nYour article is being mailed to"); P fprintf(stderr," the moderator who will post it for you.\n"); P /* Let's find a path to the backbone */ P! sprintf(bfr, "%s/mailpaths", LIB); P mfd = xfopen(bfr, "r"); P do { P if (fscanf(mfd, "%s %s", bfr, modadd) != 2) P xerror("Can't find backbone in %s/mailpaths", P! LIB); P } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P (void) fclose(mfd); P /* fake a header for mailhdr */ P*************** P*** 866,883 **** P (void) fclose(tfp); P (void) fclose(infp); P if(exitcode == 0) { P- int pid; P /* article has passed all the checks, so work in background */ P! if (mode != PROC) P! if ((pid=vfork()) < 0) P xerror("Can't fork"); P else if (pid > 0) P exit(0); P #ifdef SIGTTOU P signal(SIGTTOU, SIG_IGN); P #endif /* SIGTTOU */ P savehist(histline); P! broadcast(); P } P xxit(mode == PROC ? 0 : exitcode); P } P--- 871,889 ---- P (void) fclose(tfp); P (void) fclose(infp); P if(exitcode == 0) { P /* article has passed all the checks, so work in background */ P! if (mode != PROC) { P! int pid; P! if ((pid=fork()) < 0) P xerror("Can't fork"); P else if (pid > 0) P exit(0); P+ } P #ifdef SIGTTOU P signal(SIGTTOU, SIG_IGN); P #endif /* SIGTTOU */ P savehist(histline); P! broadcast(mode==PROC); P } P xxit(mode == PROC ? 0 : exitcode); P } P*************** P*** 1099,1107 **** P register struct direct *dir; P register int foundsome; P #ifdef VMS P! sprintf(bfr, "%s/+rnews", SPOOLDIR); P #else /* !VMS */ P! sprintf(bfr, "%s/.rnews", SPOOLDIR); P #endif /* !VMS */ P P if (chdir(bfr) < 0) P--- 1105,1113 ---- P register struct direct *dir; P register int foundsome; P #ifdef VMS P! sprintf(bfr, "%s/+rnews", SPOOL); P #else /* !VMS */ P! sprintf(bfr, "%s/.rnews", SPOOL); P #endif /* !VMS */ P P if (chdir(bfr) < 0) P*************** P*** 1117,1123 **** P if (dir->d_name[0] == '.') P continue; P sprintf(bfr,"%s -S -p %s", RNEWS, dir->d_name); P! system(bfr); P (void) unlink(dir->d_name); P foundsome++; P } P--- 1123,1134 ---- P if (dir->d_name[0] == '.') P continue; P sprintf(bfr,"%s -S -p %s", RNEWS, dir->d_name); P! if (system(bfr) != 0) { P! sprintf(bfr, "../%s", dir->d_name); P! (void) LINK(dir->d_name, bfr); P! logerr("rnews failed. Batch saved in %s/%s", P! SPOOLDIR, dir->d_name); P! } P (void) unlink(dir->d_name); P foundsome++; P } P PIndex: install.sh PPrereq: 1.16 P*** .d/install.sh Thu Oct 30 16:16:49 1986 P--- install.sh Tue Dec 16 13:10:09 1986 P*************** P*** 1,4 **** P! : '@(#)install.sh 1.16 10/29/86' P P if test "$#" != 6 P then P--- 1,4 ---- P! : '@(#)install.sh 1.17 12/16/86' P P if test "$#" != 6 P then P*************** P*** 110,128 **** P fi P P cat >$LIBDIR/aliases.new <<EOF P! net.chess net.games.chess P! net.trivia net.games.trivia P! net.rec.radio net.ham-radio P! net.term net.info-terms P! net.joke net.jokes P! net.vlsi net.lsi P! net.micro.16k net.micro.ns32k P! net.music.gdea net.music.gdead P! net.notes net.news.notes P! net.periph net.periphs P! net.puzzles net.puzzle P! net.unix.wizards net.unix-wizards P! net.sources.wanted net.wanted.sources P net.consumers misc.consumers P net.consumers.house misc.consumers.house P net.house misc.consumers.house P--- 110,258 ---- P fi P P cat >$LIBDIR/aliases.new <<EOF P! net.audio rec.audio P! net.auto rec.autos P! net.auto.tech rec.autos.tech P! net.aviation rec.aviation P! net.bicycle rec.bicycles P! net.rec.birds rec.birds P! net.rec.boat rec.boats P! net.cooks rec.food.cooking P! net.wines rec.food.drink P! net.veg rec.food.veg P! net.games rec.games.misc P! net.games.board rec.games.board P! net.rec.bridge rec.games.bridge P! net.games.chess rec.games.chess P! net.games.emp rec.games.empire P! net.games.frp rec.games.frp P! net.games.go rec.games.go P! net.games.hack rec.games.hack P! net.games.pbm rec.games.pbm P! net.games.rogue rec.games.rogue P! net.games.trivia rec.games.trivia P! net.games.video rec.games.video P! net.garden rec.gardens P! net.ham-radio rec.ham-radio P! net.ham-radio.packet rec.ham-radio.packet P! net.jokes rec.humor P! net.jokes.d rec.humor.d P! mod.mag rec.mag P! net.mag rec.mag P! net.books rec.arts.books P! net.comics rec.arts.comics P! net.tv.drwho rec.arts.drwho P! mod.movies rec.arts.movies P! net.movies rec.arts.movies P! net.sf-lovers rec.arts.sf-lovers P! net.startrek rec.arts.startrek P! net.tv rec.arts.tv P! net.tv.soaps rec.arts.tv.soaps P! net.wobegon rec.arts.wobegon P! net.rec rec.misc P! net.cycle rec.motorcycles P! net.music.classical rec.music.classical P! net.music.folk rec.music.folk P! net.music.gdead rec.music.gdead P! net.music.makers rec.music.makers P! net.music rec.music.misc P! net.music.synth rec.music.synth P! net.rec.nude rec.nude P! net.pets rec.pets P! net.rec.photo rec.photo P! net.poems rec.arts.poems P! net.puzzle rec.puzzles P! net.railroad rec.railroad P! net.rec.scuba rec.scuba P! net.rec.ski rec.skiing P! net.rec.skydive rec.skydiving P! net.sport rec.sport.misc P! net.sport.baseball rec.sport.baseball P! net.sport.hoops rec.sport.basketball P! net.sport.football rec.sport.football P! net.sport.hockey rec.sport.hockey P! net.travel rec.travel P! net.video rec.video P! net.rec.wood rec.woodworking P! net.ai comp.ai P! net.arch comp.arch P! net.bugs.2bsd comp.bugs.2bsd P! net.bugs.4bsd comp.bugs.4bsd P! net.bugs.usg comp.bugs.sys5 P! net.bugs.uucp comp.bugs.misc P! net.bugs.v7 comp.bugs.misc P! net.bugs comp.bugs.misc P! net.cog-eng comp.cog-eng P! net.cse comp.edu P! net.database comp.databases P! net.dcom comp.dcom.modems P! net.decus comp.org.decus P! net.emacs comp.emacs P! net.eunice comp.os.eunice P! net.graphics comp.graphics P! net.info-terms comp.terminals P! net.internat comp.std.internat P! net.lan comp.dcom.lans P! net.lang comp.lang.misc P! net.lang.ada comp.lang.ada P! net.lang.apl comp.lang.apl P! net.lang.c comp.lang.c P! net.lang.c++ comp.lang.c++ P! net.lang.f77 comp.lang.fortran P! net.lang.forth comp.lang.forth P! net.lang.lisp comp.lang.lisp P! net.lang.mod2 comp.lang.modula2 P! net.lang.pascal comp.lang.pascal P! net.lang.prolog comp.lang.prolog P! net.lang.st80 comp.lang.smalltalk P! net.lsi comp.lsi P! net.mail comp.mail.uucp P! net.mail.headers comp.mail.headers P! net.micro comp.sys.misc P! net.micro.6809 comp.sys.m6809 P! net.micro.68k comp.sys.m68k P! net.micro.apple comp.sys.apple P! net.micro.amiga comp.sys.amiga P! net.micro.atari16 comp.sys.atari.st P! net.micro.atari8 comp.sys.atari.8bit P! net.micro.att comp.sys.att P! net.micro.cbm comp.sys.cbm P! net.micro.cpm comp.os.cpm P! net.micro.hp comp.sys.hp P! net.micro.mac comp.sys.mac P! net.micro.ns32k comp.sys.nsc.32k P! net.micro.pc comp.sys.ibm.pc P! net.micro.ti comp.sys.ti P! net.micro.trs-80 comp.sys.tandy P! net.news news.misc P! net.news.adm news.admin P! net.news.b news.software.b P! net.news.config news.config P! net.news.group news.groups P! net.news.newsite news.newsites P! net.news.notes news.software.notes P! net.news.sa news.sysadmin P! net.news.stargate news.stargate P! net.periphs comp.periphs P! net.sources.d comp.sources.d P! net.text comp.text P! net.unix comp.unix.questions P! net.unix-wizards comp.unix.wizards P! net.usenix comp.org.usenix P! net.wanted.sources comp.sources.wanted P! net.chess rec.games.chess P! net.trivia rec.games.trivia P! net.rec.radio rec.ham-radio P! net.term comp.terminals P! net.joke rec.humor P! net.vlsi comp.lsi P! net.micro.16k comp.sys.nsc.32k P! net.music.gdea rec.music.gdead P! net.notes news.software.notes P! net.periph comp.periphs P! net.puzzles rec.puzzles P! net.unix.wizards comp.unix.wizards P! net.sources.wanted comp.sources.wanted P net.consumers misc.consumers P net.consumers.house misc.consumers.house P net.house misc.consumers.house P*************** P*** 187,192 **** P--- 317,327 ---- P talk.religion talk.religion.misc P net.rumor talk.rumors P talk.rumor talk.rumors P+ rec.skydive rec.skydiving P+ comp.sources.games net.sources.games P+ comp.sources.bugs net.sources.bugs P+ comp.sources.unix net.sources P+ comp.sources.mac net.sources.mac P EOF P : if no aliases file, make one P if test ! -f $LIBDIR/aliases P PIndex: ndir.c PPrereq: 1.8 P*** .d/ndir.c Thu Oct 30 16:12:02 1986 P--- ndir.c Tue Dec 16 13:10:10 1986 P*************** P*** 4,10 **** P #include "ndir.h" P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.8 4/26/85"; P #endif /* SCCSID */ P P /* P--- 4,10 ---- P #include "ndir.h" P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.9 12/16/86"; P #endif /* SCCSID */ P P /* P*************** P*** 48,58 **** P--- 48,68 ---- P #else /* V7 file system */ P #define ODIRSIZ 14 P P+ #if HP9K5 P+ /* HP 9000/500 has a weird directory format */ P+ struct olddirect { P+ char od_name[DIRSIZ+2]; /* filename */ P+ short od_object_type; P+ short od_file_code; P+ short od_ino; /* inode */ P+ }; P+ #else /* normal V7 */ P struct olddirect { P short od_ino; P char od_name[ODIRSIZ]; P }; P #endif /* V7 */ P+ #endif /* !pyr */ P P /* P * get next entry in a directory. PIndex: pathinit.c PPrereq: 1.18 P*** .d/pathinit.c Thu Oct 30 16:09:55 1986 P--- pathinit.c Tue Dec 16 13:10:11 1986 P*************** P*** 34,40 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.18 10/23/86"; P #endif /* SCCSID */ P P #if defined(INEW) || defined(EXP) P--- 34,40 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.19 12/16/86"; P #endif /* SCCSID */ P P #if defined(INEW) || defined(EXP) P*************** P*** 116,123 **** P pathinit() P { P #if defined(INEW) && defined(NOTIFY) P- FILE *nfd; /* notify file descriptor */ P- char *p; P #endif /* INEW && NOTIFY */ P #ifndef ROOTID P struct passwd *pw; /* struct for pw lookup */ P--- 116,121 ---- PIndex: postnews.c PPrereq: 1.29 P*** .d/postnews.c Fri Nov 21 16:05:06 1986 P--- postnews.c Tue Dec 16 13:10:12 1986 P*************** P*** 16,24 **** P * script, and does more intelligent prompting and filtering than possible P * in a shell script. P */ P- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.29 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 16,23 ---- P * script, and does more intelligent prompting and filtering than possible P * in a shell script. P */ P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.30 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 57,62 **** P--- 56,62 ---- P char descr[128]; P } distr[MAXDISTR]; P P+ char def_distr[24] = ""; /* default distribution */ P FILE *xfopen(); P P main(argc, argv) P*************** P*** 253,258 **** P--- 253,259 ---- P #endif /* !PAGE */ P } P printf("These are the currently active groups:\n"); P+ (void) fflush(stdout); P sprintf(buf, "exec %s %s/newsgroups", pager, LIB); P (void) system(buf); P continue; P*************** P*** 310,315 **** P--- 311,322 ---- P (void) strcpy(def, deflt); P if (ngmatch("misc.test", newsgroups)) P (void) strcpy(def, "local"); P+ for (i=0; distr[i].abbr[0]; i++) { P+ if (strcmp(distr[i].abbr, def) == 0) P+ break; P+ } P+ if (distr[i].abbr[0] == '\0') P+ strcpy(def, def_distr); P for(;;) { P do { P (void) sprintf(buf, "Distribution (default='%s', '?' for help) : ", def); P*************** P*** 419,424 **** P--- 426,432 ---- P fprintf(tf, "> %s", buf); P (void) fclose(of); P printf("OK, but please edit it to suppress unnecessary verbiage, signatures, etc.\n"); P+ (void) fflush(stdout); P } P } P P*************** P*** 732,739 **** P--- 740,752 ---- P if (fscanf(fd, "%s %[^\n]", distr[i].abbr, distr[i].descr) P != 2) P break; P+ if (strcmp(distr[i].abbr, "default") == 0) P+ strcpy(def_distr, distr[i--].descr); P } P (void) fclose(fd); P+ distr[i].abbr[0] = '\0'; P+ if (def_distr[0] == '\0') P+ strcpy(def_distr, "world"); /* maybe "local" is better? */ P } P P /* P*************** P*** 886,892 **** P *canpost = 'n'; P return FALSE; P } P! #endif FASCIST P return TRUE; P } else P return FALSE; P--- 899,905 ---- P *canpost = 'n'; P return FALSE; P } P! #endif /* FASCIST */ P return TRUE; P } else P return FALSE; P*************** P*** 1047,1052 **** P--- 1060,1066 ---- P P (void) sprintf(buf,"exec %s/%s 13 < %s >> %s\n", LIB, "caesar", codedfile, article); P printf("Encoding article -- please stand by\n"); P+ (void) fflush(stdout); P if (system(buf)) { P printf("encoding failed"); P exit(2); P PIndex: process.c PPrereq: 2.16 P*** .d/process.c Fri Nov 21 16:04:39 1986 P--- process.c Tue Dec 16 13:10:13 1986 P*************** P*** 16,28 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.16 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P P char coptbuf[LBUFLEN], datebuf[LBUFLEN]; P- struct hbuf header; P P #define OPTION 0 /* pick up an option string */ P #define STRING 1 /* pick up a string of arguments */ P--- 16,27 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.17 12/16/86"; P #endif /* SCCSID */ P P #include "rparams.h" P P char coptbuf[LBUFLEN], datebuf[LBUFLEN]; P P #define OPTION 0 /* pick up an option string */ P #define STRING 1 /* pick up a string of arguments */ P PIndex: readr.c PPrereq: 2.59 P*** .d/readr.c Fri Nov 21 16:04:38 1986 P--- readr.c Tue Dec 16 13:10:14 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.59 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.60 12/16/86"; P #endif /* SCCSID */ P P #include "rparams.h" P*************** P*** 221,226 **** P--- 221,233 ---- P P switch (*bptr++) { P P+ /* display list of articles in current group */ P+ case 'l': P+ case 'L': P+ list_group(groupdir, atoi(bptr), P+ (*(bptr - 1) == 'l') ? FALSE : TRUE, pngsize); P+ break; P+ P /* No. Go on to next article. */ P case 'n': P EOL(); P*************** P*** 516,522 **** P *ptr2 = '\0'; P ptr2 = index(ptr3, '/'); P if (!ptr2) { P- *ptr3 = '\0'; P if (strcmp(ptr3, "cancelled") == 0) { P fprintf(ofp, "Article %s has been cancelled.\n", P bptr); P--- 523,528 ---- P PIndex: rfuncs2.c PPrereq: 1.32 P*** .d/rfuncs2.c Thu Oct 30 16:10:44 1986 P--- rfuncs2.c Tue Dec 16 13:10:16 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.32 10/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.33 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 24,29 **** P--- 24,30 ---- P #include "rparams.h" P P static char lbuf[LBUFLEN]; P+ extern char *replyname(); P P FILE *popen(); P PIndex: uname.c PPrereq: 2.12 P*** .d/uname.c Fri Nov 21 16:04:50 1986 P--- uname.c Tue Dec 16 13:10:17 1986 P*************** P*** 21,27 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.12 11/21/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 21,27 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.13 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 36,42 **** P { P char *cp; P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! if (MYDOMAIN[0] == '\0') /* get domain name from hostname */ P return; P cp = index(uptr->nodename, '.'); P if (cp) P--- 36,43 ---- P { P char *cp; P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! cp = MYDOMAIN; /* Gould compiler can't handle ""[0] */ P! if (*cp == '\0') /* get domain name from hostname */ P return; P cp = index(uptr->nodename, '.'); P if (cp) P PIndex: unbatch.c PPrereq: 1.23 P*** .d/unbatch.c Fri Nov 21 16:04:53 1986 P--- unbatch.c Tue Dec 16 13:10:17 1986 P*************** P*** 13,19 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.23 11/21/86"; P #endif /* SCCSID */ P P #define MAXARGS 32 P--- 13,19 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.24 12/16/86"; P #endif /* SCCSID */ P P #define MAXARGS 32 P*************** P*** 161,167 **** P--- 161,171 ---- P if (cp++ == NULL) P cp = args[0]; P P+ # ifdef HOME P+ sprintf(path, "%s/%s/%s", logdir(HOME), LIBDIR, cp); P+ # else /* !HOME */ P sprintf(path, "%s/%s", LIBDIR, cp); P+ # endif /* HOME */ P P /* P * "path" is absolute, no searching is needed, we use P PIndex: virtterm.c PPrereq: 1.12 P*** .d/virtterm.c Thu Oct 30 16:08:32 1986 P--- virtterm.c Tue Dec 16 13:10:19 1986 P*************** P*** 5,11 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.12 10/29/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 5,11 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.13 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 89,95 **** P int COLS; /* width of screen */ P P struct line { P! char len; P char flags; P char *l; /* pointer to actual line text, NO NULL @ end */ P }; P--- 89,95 ---- P int COLS; /* width of screen */ P P struct line { P! short len; /* should really be u_char */ P char flags; P char *l; /* pointer to actual line text, NO NULL @ end */ P }; P*************** P*** 1006,1009 **** P P winch_upd(); P } P! #endif TIOCGWINSZ P--- 1006,1009 ---- P P winch_upd(); P } P! #endif /* TIOCGWINSZ */ P PIndex: visual.c PPrereq: 1.33 P*** .d/visual.c Fri Nov 21 16:04:36 1986 P--- visual.c Tue Dec 16 13:10:21 1986 P*************** P*** 4,10 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.33 11/21/86"; P #endif /* SCCSID */ P P #include "rparams.h" P--- 4,10 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.34 12/16/86"; P #endif /* SCCSID */ P P #include "rparams.h" P*************** P*** 324,330 **** P secpr[0] = '\0'; P if (countset == 0) P count = 1; P! docmd(c, count); P if (c != '?' && c != 'H') /* UGGH */ P prflags &=~ HELPMSG; P if (dlinno > hdrstart) P--- 324,330 ---- P secpr[0] = '\0'; P if (countset == 0) P count = 1; P! docmd(c, count, countset); P if (c != '?' && c != 'H') /* UGGH */ P prflags &=~ HELPMSG; P if (dlinno > hdrstart) P*************** P*** 335,343 **** P /* P * Process one command, which has already been typed in. P */ P! docmd(c, count) P int c; P long count; P { P int i; P long nart, Hoffset; P--- 335,344 ---- P /* P * Process one command, which has already been typed in. P */ P! docmd(c, count, countset) P int c; P long count; P+ int countset; P { P int i; P long nart, Hoffset; P*************** P*** 345,350 **** P--- 346,363 ---- P P switch (c) { P P+ /* display list of articles in current group */ P+ case 'l': P+ case 'L': P+ botscreen(); P+ ttycooked(); P+ list_group(groupdir, countset ? count : 0, P+ (c == 'l') ? FALSE : TRUE, pngsize); P+ ttyraw(); P+ clearok(curscr, 1); P+ updscr(); P+ break; P+ P /* Show more of current article, or advance to next article */ P case '\n': P case ' ': P*************** P*** 432,438 **** P break; P P /* Turn displaying of article back on */ P- case 'l': P case 'd': P prflags &=~ NOPRT; P break; P--- 445,450 ---- P*************** P*** 496,528 **** P P /* write out the article someplace */ P /* w writes out without the header */ P! case 's': P! case 'w': { P! char *grn = groupdir; P int wflags; P P! msg("file: "); P! curflag = CURP2; P! while ((wflags = vgetc()) == ' '); P! if (wflags == cintr) { P! secpr[0] = '\0'; P! break; P } P! if (wflags == '|') { P! linebuf[0] = '|'; P! if (prget("| ", linebuf+1)) P! break; P! } else { P! pushback(wflags); P! if (prget("file: ", linebuf)) P! break; P! } P wflags = 0; P if (c == 's') P wflags |= SVHEAD; P if (count != 1) P wflags |= OVWRITE; P! bptr = linebuf; P while( *bptr == ' ') P bptr++; /* strip leading spaces */ P P--- 508,550 ---- P P /* write out the article someplace */ P /* w writes out without the header */ P! /* | defaults to pipeing */ P! { P! static char savebuf[BUFLEN]; P int wflags; P P! case '|': P! if (savebuf[0] != '|') { P! savebuf[0] = '|'; P! savebuf[1] = '\0'; P } P! c = 's'; P! case 's': P! case 'w': P! /* We loop back to here each time user types ^U to prompt */ P! do { P! if (savebuf[0] == 0) { P! /* No saved default. Ask. */ P! msg("file: "); P! curflag = CURP2; P! while ((wflags = vgetc()) == ' '); P! if (wflags == cintr) { P! secpr[0] = '\0'; P! break; P! } P! savebuf[0] = wflags; P! savebuf[1] = 0; P! } P! wflags = prget( (savebuf[0] == '|') ? "": "file: ", P! savebuf); P! } while (wflags == 2); P! if (wflags) break; /* Interrupted out */ P wflags = 0; P if (c == 's') P wflags |= SVHEAD; P if (count != 1) P wflags |= OVWRITE; P! bptr = savebuf; P while( *bptr == ' ') P bptr++; /* strip leading spaces */ P P*************** P*** 536,542 **** P } else if (boxptr = getenv("NEWSBOX")) { P if (index(boxptr, '%')) { P struct stat stbf; P! sprintf(bptr, boxptr, grn); P if (stat(bptr,&stbf) < 0) { P if (mkdir(bptr, 0777) < 0) { P msg("Cannot create directory %s", bptr); P--- 558,564 ---- P } else if (boxptr = getenv("NEWSBOX")) { P if (index(boxptr, '%')) { P struct stat stbf; P! sprintf(bptr, boxptr, groupdir); P if (stat(bptr,&stbf) < 0) { P if (mkdir(bptr, 0777) < 0) { P msg("Cannot create directory %s", bptr); P*************** P*** 633,638 **** P--- 655,661 ---- P int flags; P P p = linebuf; P+ *p = 0; P if (prget("!", p)) P break; P flags = CWAIT; P*************** P*** 763,770 **** P /* specific message ID. */ P case '<': P /* could improve this */ P! linebuf[0] = '<'; P! if (prget("<", linebuf+1)) P break; P searchid: secpr[0] = '\0'; P if (index(linebuf, '@') == NULL && index(linebuf, '>') == NULL) { P--- 786,793 ---- P /* specific message ID. */ P case '<': P /* could improve this */ P! linebuf[0] = '<'; linebuf[1] = 0; P! if (prget("", linebuf)) P break; P searchid: secpr[0] = '\0'; P if (index(linebuf, '@') == NULL && index(linebuf, '>') == NULL) { P*************** P*** 1033,1038 **** P--- 1056,1062 ---- P next_ng_command() P { P obit = -1; P+ linebuf[0] = 0; P if (prget("group? ", linebuf)) P return FALSE; P bptr = linebuf; P*************** P*** 1530,1556 **** P maxcol = linebuf; P } P P prget(prompter, buf) P char *prompter, *buf; P { P! char *p, *q, *r; P! int c, lastc; P P curflag = CURP2; P! r = buf; P lastc = '\0'; P for (;;) { P- *r = '\0'; P p = secpr; P for (q = prompter ; *q ; q++) P *p++ = *q; P for (q = buf ; *q ; q++) { P! if (p < &secpr[SECPRLEN-1] && *q >= ' ' && *p <= '~') P *p++ = *q; P } P *p = '\0'; P c = vgetc(); P! if (c == '\n' || c == cintr) { P break; P } P if (c == cerase || c == '\b' || c == '\177') { P--- 1554,1595 ---- P maxcol = linebuf; P } P P+ P+ /* P+ * Prompt the user and get a line. P+ * "prompter" is the prompt. "buf" contains a string which P+ * will be used as the initial user response (which may be edited P+ * by the user with backspace, ^U, etc). The resulting line is P+ * returned in "buf". The result of prget() is: P+ * 0 if the line was terminated by NL or CR P+ * 1 if it was terminated by the interrupt character. P+ * 2 if it was terminated by erasing all the characters, including P+ * one or more that were prompted initially in "buf". (If "buf" P+ * was empty, this will never occur.) P+ */ P+ int P prget(prompter, buf) P char *prompter, *buf; P { P! register char *p, *q, *r; P! register char c; P! char lastc; P! char hadprompt = buf[0]; P P curflag = CURP2; P! r = buf + strlen(buf); P lastc = '\0'; P for (;;) { P p = secpr; P for (q = prompter ; *q ; q++) P *p++ = *q; P for (q = buf ; *q ; q++) { P! if (p < &secpr[SECPRLEN-1] && *q >= ' ' && *q <= '~') P *p++ = *q; P } P *p = '\0'; P c = vgetc(); P! if (c == '\n' || c == '\r' || c == cintr) { P break; P } P if (c == cerase || c == '\b' || c == '\177') { P*************** P*** 1578,1583 **** P--- 1617,1625 ---- P *r++ = c; P } P lastc = c; P+ *r = '\0'; P+ if ((r == buf) && hadprompt) P+ return 2; P } P curflag = CURHOME; P secpr[0] = '\0'; P*************** P*** 1620,1626 **** P (void) signal(SIGTTOU, SIG_DFL); P #endif P } P! #ifdef BSD4_2 P while ((pid = vfork()) == -1) P #else /* !BSD4_2 */ P /* 4.1 BSD (at least) can't handle this vfork with -ljobs */ P--- 1662,1668 ---- P (void) signal(SIGTTOU, SIG_DFL); P #endif P } P! #if defined(BSD4_2) && !defined(sun) P while ((pid = vfork()) == -1) P #else /* !BSD4_2 */ P /* 4.1 BSD (at least) can't handle this vfork with -ljobs */ P*************** P*** 1811,1817 **** P if(UPDATING) /* concurrency. wow! */ P WINCH++; P else if((WINCH == 0) && (savelinno >= 0)) { P! int saveline = dlinno, saveflag = curflag; P P /* reread the article */ P FCLOSE(fp); P--- 1853,1859 ---- P if(UPDATING) /* concurrency. wow! */ P WINCH++; P else if((WINCH == 0) && (savelinno >= 0)) { P! int saveflag = curflag; P P /* reread the article */ P FCLOSE(fp); PIndex: vnews.help P*** .d/vnews.help Thu Oct 30 16:12:04 1986 P--- vnews.help Tue Dec 16 13:10:22 1986 P*************** P*** 17,22 **** P ESC-r Reply directly using mailer m Move on to next item in a digest P f Post a followup article s Save article in file P N Go to newsgroup (next is default) w Save without header P! l Display article (use after !, r, f, or ?) P P! [Press l to see article again] P--- 17,22 ---- P ESC-r Reply directly using mailer m Move on to next item in a digest P f Post a followup article s Save article in file P N Go to newsgroup (next is default) w Save without header P! l List unread articles in group L List all articles in group P P! [Press ^L to see article again] P PIndex: header.c PPrereq: 2.44 P*** .d/header.c Fri Nov 21 16:18:38 1986 P--- header.c Wed Dec 17 11:36:27 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.44 11/21/86"; P #endif /* SCCSID */ P P #include <stdio.h> P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.46 12/17/86"; P #endif /* SCCSID */ P P #include <stdio.h> P*************** P*** 38,44 **** P--- 38,46 ---- P FILE *fp; P int wholething; P { P+ #ifndef HIDDENNET P register int len; P+ #endif /* HIDDENNET */ P register int i; P #ifdef OLD P char *p; P*************** P*** 94,102 **** P--- 96,106 ---- P #endif /* OLD */ P P strip: /* strip off sys! from front of path. */ P+ #ifndef HIDDENNET P if (strncmp(FULLSYSNAME, hp->path, (len = strlen(FULLSYSNAME))) == 0 P && index(NETCHRS, hp->path[len])) P (void) strcpy(hp->path, &(hp->path[len+1])); P+ #endif /* HIDDENNET */ P lcase(hp->nbuf); P P /* Intuit the From: line if only a path was given. */ P*************** P*** 214,219 **** P--- 218,225 ---- P break; P case DISTRIBUTION: P getfield(hp->distribution, sizeof(hp->distribution)); P+ if (strcmp(hp->distribution, "net") == 0) P+ hp->distribution[0] = '\0'; P break; P case ORGANIZATION: P getfield(hp->organization, sizeof(hp->organization)); PIndex: rfuncs.c PPrereq: 2.31 P*** .d/rfuncs.c Thu Oct 30 16:10:23 1986 P--- rfuncs.c Wed Dec 17 00:09:42 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.31 10/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.38 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 186,193 **** P * we write it out. P */ P if ((ngsize-minartno) > BITMAPSIZE) { P! /* This should never happen */ P! (void) xerror("Bitmap not large enough for newsgroup %s", groupdir); P } P P cur = 0; P--- 186,197 ---- P * we write it out. P */ P if ((ngsize-minartno) > BITMAPSIZE) { P! /* resize the bitmap array */ P! (void) free (bitmap); P! BITMAPSIZE = 8 * (((ngsize - minartno) + 7) / 8); P! bitmap = malloc((unsigned)BITMAPSIZE/8); P! if (bitmap == NULL) P! xerror("Can't malloc bitmap"); P } P P cur = 0; P*************** P*** 698,701 **** P--- 702,844 ---- P } P (void) fclose(nfp); P #endif /* SORTACTIVE */ P+ } P+ P+ #if defined(BSD4_2) || defined(BSD4_1C) P+ #include <sys/dir.h> P+ # else P+ #include "ndir.h" P+ #endif P+ #include <errno.h> P+ P+ /* P+ * Routine to display header lines for all articles in newsgroup. If the flag P+ * argument is FALSE then only articles which are not marked as read in the P+ * bitmap will be displayed. This routine makes no attempt to determine if P+ * the article is in multiple groups and therefore should not be displayed at P+ * this time. P+ */ P+ P+ static int *lg_array = NULL; P+ static int *lg_entry; P+ static int lg_max = 0; P+ static int int_sig; P+ extern int errno; P+ P+ lg_cmp(p1, p2) P+ int *p1, *p2; P+ { P+ return *p1 > *p2; P+ } P+ P+ list_group(lgroup, displines, flag, pngsize) P+ char *lgroup; P+ int displines, flag; P+ long pngsize; P+ { P+ char *briefdate(); P+ struct hbuf hh; P+ register DIR *dirp; P+ register struct direct *dir; P+ register FILE *fp_art; P+ int i; P+ int entries; P+ unsigned int alloc_size; P+ int (*old_sig) (); P+ extern lg_trap(); P+ char *gets(); P+ P+ /* This should get the numbers from the active file XXX */ P+ if ((dirp = opendir(dirname(lgroup))) == NULL) { P+ printf("Can't open %s\r\n", dirname(lgroup)); P+ return; P+ } P+ entries = 0; P+ if (lg_array == NULL) { P+ lg_max = 50; P+ alloc_size = lg_max * sizeof(int); P+ lg_array = (int *) malloc(alloc_size); P+ } P+ while ((dir = readdir(dirp)) != NULL) { P+ if (dir->d_ino == 0) P+ continue; P+ i = atoi(dir->d_name); P+ if ((i < 1) || (i > pngsize)) P+ continue; P+ if (flag == FALSE) { P+ if (get(i) == 0) P+ continue; P+ } P+ if (++entries > lg_max) { P+ lg_max += 50; P+ alloc_size = lg_max * sizeof(int); P+ lg_array = (int *) realloc((char *) lg_array, alloc_size); P+ } P+ lg_array[entries - 1] = i; P+ } P+ if (entries == lg_max) { P+ lg_max++; P+ alloc_size = lg_max * sizeof(int); P+ lg_array = (int *) realloc((char *) lg_array, alloc_size); P+ } P+ qsort(lg_array, entries, sizeof *lg_array, lg_cmp); P+ lg_array[entries] = 0; P+ int_sig = 0; P+ old_sig = signal(SIGINT, lg_trap); P+ hh.unrec[0] = NULL; P+ for (lg_entry = lg_array; *lg_entry != 0 && int_sig == 0; lg_entry++) { P+ (void) sprintf(filename, "%s/%d", dirname(lgroup), *lg_entry); P+ fp_art = fopen(filename, "r"); P+ if (fp_art == NULL) P+ continue; P+ if (hread(&hh, fp_art, TRUE) == NULL) { P+ (void) fclose(fp_art); P+ continue; P+ } P+ printf("%5d %-20.20s %-13s %s\r\n", P+ *lg_entry, hh.from, P+ briefdate(hh.subdate), hh.title); P+ for (i = 0; i < displines;) { P+ if (fgets(bfr, LBUFLEN, fp_art) == NULL) { P+ break; P+ } P+ if ((bfr[0] == '\n') || (bfr[0] == '>')) { P+ continue; P+ } P+ printf("%s", bfr); P+ i++; P+ } P+ (void) fclose(fp_art); P+ } P+ (void) fflush(stdout); P+ P+ closedir(dirp); P+ (void) signal(SIGINT, old_sig); /* restore to old value */ P+ P+ printf("[Press RETURN to continue]"); P+ (void) fflush(stdout); P+ P+ while (TRUE) { P+ errno = 0; P+ i = getchar(); P+ if (errno == EINTR) P+ continue; P+ if (i == '\n' || i == '\r') P+ break; P+ if (i == EOF) P+ break; P+ if (i == '\4') P+ break; P+ } P+ (void) free(lg_array); P+ P+ } P+ P+ lg_trap(code) P+ int code; P+ { P+ P+ int_sig = 1; P+ (void) signal(code, lg_trap); /* reset signal */ P+ P } P PIndex: Makefile.dst PPrereq: 1.19 P*** .d/Makefile.dst Fri Nov 21 16:05:09 1986 P--- Makefile.dst Tue Dec 16 17:47:05 1986 P*************** P*** 1,4 **** P! # '@(#)Makefile.dst 1.19 11/21/86' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P # which should at least be a copy of localize.v7 or localize.usg P--- 1,4 ---- P! # '@(#)Makefile.dst 1.21 12/16/86' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P # which should at least be a copy of localize.v7 or localize.usg P*************** P*** 57,62 **** P--- 57,63 ---- P #BSD4_1 LIBS = -ldbm -ljobs P P TERMLIB = -ltermlib P+ FIXACTIVE = P P #VMS TERMLIB = -ltrmlib P #VMS LIBS = -ldbm P*************** P*** 64,69 **** P--- 65,71 ---- P #VMS MISC = uname.o P #VMS LINTFLAGS = -chba -DDBM -DVMS ${DEFS} P #VMS VFORK= P+ #VMS FIXACTIVE = /etc/vmstounix $(LIBDIR)/active P P #V7 MISC = uname.o P #USG MISC = ftime.o P*************** P*** 182,188 **** P $(CC) $(CFLAGS) $(HOMENAME) -c ifuncs.c P P iextern.o: iextern.c iparams.h defs.h params.h Makefile header.h P! $(CC) $(CFLAGS) -c iextern.c P P postnews: $(POBJECTS) P $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews P--- 184,190 ---- P $(CC) $(CFLAGS) $(HOMENAME) -c ifuncs.c P P iextern.o: iextern.c iparams.h defs.h params.h Makefile header.h P! $(CC) $(CFLAGS) $(HOMENAME) -c iextern.c P P postnews: $(POBJECTS) P $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews P*************** P*** 271,278 **** P process.o: process.c rparams.h defs.h params.h header.h Makefile P $(CC) $(CFLAGS) -c process.c P P! checknews: checknews.o process.o cpathinit.o P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o -o checknews P #VMS mv checknews.exe checknews P P sendbatch: sendbatch.sh Makefile P--- 273,280 ---- P process.o: process.c rparams.h defs.h params.h header.h Makefile P $(CC) $(CFLAGS) -c process.c P P! checknews: checknews.o process.o cpathinit.o rextern.o P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o -o checknews P #VMS mv checknews.exe checknews P P sendbatch: sendbatch.sh Makefile P*************** P*** 283,288 **** P--- 285,291 ---- P P rmgroup: rmgroup.sh Makefile P sed -e "s%LIBDIR%$(LIBDIR)%g" \ P+ -e "s%FIXACTIVE%$(FIXACTIVE)%g" \ P -e "s%SPOOLDIR%$(SPOOLDIR)%g" rmgroup.sh > rmgroup P #VMS /etc/unixtovms rmgroup P PIndex: makeactive.sh PPrereq: 1.22 P*** .d/makeactive.sh Thu Oct 30 16:10:33 1986 P--- makeactive.sh Wed Dec 17 00:09:41 1986 P*************** P*** 1,6 **** P : "Create active file and newsgroup hierarchy for new machine" P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.22 10/29/86' P LIBDIR=$1 P SPOOLDIR=$2 P NEWSUSR=$3 P--- 1,6 ---- P : "Create active file and newsgroup hierarchy for new machine" P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.23 12/16/86' P LIBDIR=$1 P SPOOLDIR=$2 P NEWSUSR=$3 P*************** P*** 7,144 **** P NEWSGRP=$4 P cat <<"E_O_F" > /tmp/$$groups P general Articles that should be read by everyone on your local system P- net.ai Artificial intelligence discussions. P- net.announce.arpa-internet Announcements from the Arpa world P- net.arch Computer architecture. P- net.audio High fidelity audio. P- net.auto Automobiles, automotive products and laws. P- net.auto.tech Technical aspects of automobiles, et. al. P- net.aviation Aviation rules, means, and methods. P- net.bicycle Bicycles, related products and laws. P- net.books Books of all genres, shapes, and sizes. P- net.bugs General bug reports and fixes. P- net.bugs.2bsd Reports of UNIX* version 2BSD related bugs. P- net.bugs.4bsd Reports of UNIX version 4BSD related bugs. P- net.bugs.usg Reports of USG (System III, V, etc.) bugs. P- net.bugs.uucp Reports of UUCP related bugs. P- net.bugs.v7 Reports of UNIX V7 related bugs. P- net.cog-eng Cognitive engineering. P- net.comics The funnies, old and new. P- net.cooks Food, cooking, cookbooks, and recipes. P- net.cse Computer science education. P- net.cycle Motorcycles and related products and laws. P- net.database Database and data management issues and theory. P- net.dcom Data communications hardware and software. P- net.decus DEC* Users' Society newsgroup. P- net.emacs EMACS editors of different flavors. P- net.eunice The SRI Eunice system. P- net.games Games and computer games. P- net.games.board Discussion and hints on board games. P- net.games.chess Chess & computer chess. P- net.games.emp Discussion and hints about Empire. P- net.games.frp Discussion about Fantasy Role Playing games. P- net.games.go Discussion about Go. P- net.games.hack Discussion, hints, etc. about the Hack game. P- net.games.pbm Discussion about Play by Mail games. P- net.games.rogue Discussion and hints about Rogue. P- net.games.trivia Discussion about trivia. P- net.games.video Discussion about video games. P- net.garden Gardening, methods and results. P- net.graphics Computer graphics, art, animation, image processing, P- net.ham-radio Amateur Radio practices, contests, events, rules, etc. P- net.ham-radio.packet Discussion about packet radio setups. P- net.info-terms All sorts of terminals. P- net.internat Discussion about international standards P- net.jokes Jokes and the like. May be somewhat offensive. P- net.jokes.d Discussions on the content of net.jokes articles P- net.lan Local area network hardware and software. P- net.lang Different computer languages. P- net.lang.ada Discussion about Ada*. P- net.lang.apl Discussion about APL. P- net.lang.c Discussion about C. P- net.lang.c++ The object-oriented C++ language. P- net.lang.f77 Discussion about FORTRAN. P- net.lang.forth Discussion about Forth. P- net.lang.lisp Discussion about LISP. P- net.lang.mod2 Discussion about Modula-2. P- net.lang.pascal Discussion about Pascal. P- net.lang.prolog Discussion about PROLOG. P- net.lang.st80 Discussion about Smalltalk 80. P- net.lsi Large scale integrated circuits. P- net.mag Magazine summaries, tables of contents, etc. P- net.mail Proposed new mail/network standards. P- net.mail.headers Gatewayed from the ARPA header-people list. P- net.micro Micro computers of all kinds. P- net.micro.6809 Discussion about 6809's. P- net.micro.68k Discussion about 68k's. P- net.micro.apple Discussion about Apple micros. P- net.micro.amiga Talk about the new Amiga micro. P- net.micro.atari8 Discussion about 8 bit Atari micros. P- net.micro.atari16 Discussion about 16 bit Atari micros. P- net.micro.att Discussions about AT&T microcomputers P- net.micro.cbm Discussion about Commodore micros. P- net.micro.cpm Discussion about the CP/M operating system. P- net.micro.hp Discussion about Hewlett/Packard's. P- net.micro.mac Material about the Apple Macintosh & Lisa P- net.micro.ns32k National Semiconductor 32000 series chips P- net.micro.pc Discussion about IBM personal computers. P- net.micro.ti Discussion about Texas Instruments. P- net.micro.trs-80 Discussion about TRS-80's. P- net.movies Reviews and discussions of movies. P- net.music Music lovers' group. P- net.music.classical Discussion about classical music. P- net.music.folk Folks discussing folk music of various sorts P- net.music.gdead A group for (Grateful) Dead-heads P- net.music.makers For performers and their discussions. P- net.music.synth Synthesizers and computer music P- net.news Discussions of USENET itself. P- net.news.adm Comments directed to news administrators. P- net.news.b Discussion about B news software. P- net.news.config Postings of system down times and interruptions. P- net.news.group Discussions and lists of newsgroups P- net.news.newsite Postings of new site announcements. P- net.news.notes Notesfile software from the Univ. of Illinois. P- net.news.sa Comments directed to system administrators. P- net.news.stargate Discussion about satellite transmission of news. P- net.periphs Peripheral devices. P- net.pets Pets, pet care, and household animals in general. P- net.poems For the posting of poems. P- net.puzzle Puzzles, problems, and quizzes. P- net.railroad Real and model train fans' newsgroup. P- net.rec Recreational/participant sports. P- net.rec.birds Hobbyists interested in bird watching. P- net.rec.boat Hobbyists interested in boating. P- net.rec.bridge Hobbyists interested in bridge. P- net.rec.nude Hobbyists interested in naturist/nudist activities. P- net.rec.photo Hobbyists interested in photography. P- net.rec.scuba Hobbyists interested in SCUBA diving. P- net.rec.ski Hobbyists interested in skiing. P- net.rec.skydive Hobbyists interested in skydiving. P- net.rec.wood Hobbyists interested in woodworking. P- net.sf-lovers Science fiction lovers' newsgroup. P net.sources For the posting of software packages & documentation. P net.sources.bugs For bug fixes and features discussion P- net.sources.d For any discussion on net.sources postings. P net.sources.games Postings of recreational software P net.sources.mac Software for the Apple Macintosh P- net.sport Spectator sports. P- net.sport.baseball Discussion about baseball. P- net.sport.football Discussion about football. P- net.sport.hockey Discussion about hockey. P- net.sport.hoops Discussion about basketball. P- net.startrek Star Trek, the TV show and the movies. P- net.text Text processing. P- net.travel Traveling all over the world. P- net.tv The boob tube, its history, and past and current shows. P- net.tv.drwho Discussion about Dr. Who. P- net.tv.soaps Postings about soap operas. P- net.unix UNIX neophytes group. P- net.unix-wizards Discussions, bug reports, and fixes on and for UNIX. P- net.usenix USENIX Association events and announcements. P- net.veg Vegetarians. P- net.video Video and video components. P- net.wines Wines and spirits. P- net.wobegon "A Prairie Home Companion" radio show discussion. P mod.announce General announcements of interest to all. (Moderated) P mod.announce.newusers Explanatory postings for new users. (Moderated) P mod.ai Discussions about Artificial Intelligence (Moderated) P--- 7,16 ---- P*************** P*** 162,175 **** P mod.comp-soc Discussion on the impact of technology on society. (Moderated) P mod.graphics Graphics software, hardware, theory, etc. (Moderated) P mod.human-nets Computer aided communications digest. (Moderated) P- mod.legal Discussions of computers and the law. (Moderated) P mod.mac Apple Macintosh micros -- info, uses, but no programs. (Moderated) P mod.mac.binaries Encoded public domain programs in binary form. (Moderated) P mod.mac.sources Public domain software in source code format. (Moderated) P- mod.mag Discussions on electronicly published "magazines" (Moderated) P mod.mag.otherrealms Edited science fiction and fantasy "magazine". (Moderated) P mod.map Various maps, including UUCP maps (Moderated) P- mod.movies Reviews and discussion of movies (Moderated) P mod.music Reviews and discussion of things musical (Moderated) P mod.music.gaffa Progressive music discussions (e.g., Kate Bush). (Moderated) P mod.newprod Announcements of new products of interest to readers (Moderated) P--- 34,44 ---- P*************** P*** 201,211 **** P mod.std.unix Discussion for the P1003 committee on UNIX (Moderated) P mod.techreports Announcements and lists of technical reports. (Moderated) P mod.telecom Telecommunications digest. (Moderated) P! mod.test Testing of moderated newsgroups -- no moderator (Moderated) P! mod.vlsi Very large scale integrated circuits. (Moderated) P misc.consumers Consumer interests, product reviews, etc. P misc.consumers.house Discussion about owning and maintaining a house. P! misc.forsale Items for sale. P misc.headlines Current interest: drug testing, terrorism, etc. P misc.invest Investments and the handling of money. P misc.jobs Job announcements, requests, etc. P--- 70,139 ---- P mod.std.unix Discussion for the P1003 committee on UNIX (Moderated) P mod.techreports Announcements and lists of technical reports. (Moderated) P mod.telecom Telecommunications digest. (Moderated) P! comp.ai Artificial intelligence discussions. P! comp.arch Computer architecture. P! comp.bugs.2bsd Reports of UNIX* version 2BSD related bugs. P! comp.bugs.4bsd Reports of UNIX version 4BSD related bugs. P! comp.bugs.misc General bug reports and fixes (includes V7 & uucp). P! comp.bugs.sys5 Reports of USG (System III, V, etc.) bugs. P! comp.cog-eng Cognitive engineering. P! comp.databases Database and data management issues and theory. P! comp.dcom.lans Local area network hardware and software. P! comp.dcom.modems Data communications hardware and software. P! comp.edu Computer science education. P! comp.emacs EMACS editors of different flavors. P! comp.graphics Computer graphics, art, animation, image processing, P! comp.lang.ada Discussion about Ada*. P! comp.lang.apl Discussion about APL. P! comp.lang.c Discussion about C. P! comp.lang.c++ The object-oriented C++ language. P! comp.lang.forth Discussion about Forth. P! comp.lang.fortran Discussion about FORTRAN. P! comp.lang.lisp Discussion about LISP. P! comp.lang.misc Different computer languages not specifically listed. P! comp.lang.modula2 Discussion about Modula-2. P! comp.lang.pascal Discussion about Pascal. P! comp.lang.prolog Discussion about PROLOG. P! comp.lang.smalltalk Discussion about Smalltalk 80. P! comp.lsi Large scale integrated circuits. P! comp.mail.headers Gatewayed from the ARPA header-people list. P! comp.mail.misc General discussions about computer mail. P! comp.mail.uucp Mail in the uucp network environment. P! comp.misc General topics about computers not covered elsewhere. P! comp.org.decus DEC* Users' Society newsgroup. P! comp.org.usenix USENIX Association events and announcements. P! comp.os.cpm Discussion about the CP/M operating system. P! comp.os.eunice The SRI Eunice system. P! comp.os.misc General OS-oriented discussion not carried elsewhere. P! comp.periphs Peripheral devices. P! comp.sources.d For any discussion of source postings. P! comp.sources.wanted Requests for software and fixes. P! comp.std.internat Discussion about international standards P! comp.sys.amiga Discussion about the Amiga micro. P! comp.sys.apple Discussion about Apple micros. P! comp.sys.atari.8bit Discussion about 8 bit Atari micros. P! comp.sys.atari.st Discussion about 16 bit Atari micros. P! comp.sys.att Discussions about AT&T microcomputers P! comp.sys.cbm Discussion about Commodore micros. P! comp.sys.dec Discussions about DEC computer systems. P! comp.sys.hp Discussion about Hewlett/Packard's. P! comp.sys.ibm.pc Discussion about IBM personal computers. P! comp.sys.intel Disucussions about Intel systems and parts. P! comp.sys.m6809 Discussion about 6809's. P! comp.sys.m68k Discussion about 68k's. P! comp.sys.mac Discussions about the Apple Macintosh & Lisa. P! comp.sys.misc Micro computers of all kinds. P! comp.sys.nsc.32k National Semiconductor 32000 series chips P! comp.sys.tandy Discussion about TRS-80's. P! comp.sys.ti Discussion about Texas Instruments. P! comp.terminals All sorts of terminals. P! comp.text Text processing. P! comp.unix.questions UNIX neophytes group. P! comp.unix.wizards Discussions, bug reports, and fixes on and for UNIX. P! comp.unix.xenix Discussion about the Xenix OS. P misc.consumers Consumer interests, product reviews, etc. P misc.consumers.house Discussion about owning and maintaining a house. P! misc.forsale Short, tasteful postings about items for sale. P misc.headlines Current interest: drug testing, terrorism, etc. P misc.invest Investments and the handling of money. P misc.jobs Job announcements, requests, etc. P*************** P*** 215,220 **** P--- 143,220 ---- P misc.taxes Tax laws and advice. P misc.test For testing of network software. Very boring. P misc.wanted Requests for things that are needed (NOT software). P+ news.admin Comments directed to news administrators. P+ news.config Postings of system down times and interruptions. P+ news.groups Discussions and lists of newsgroups P+ news.lists News-related statistics and lists (Moderated) P+ news.misc Discussions of USENET itself. P+ news.newsites Postings of new site announcements. P+ news.software.b Discussion about B news software. P+ news.software.notes Notesfile software from the Univ. of Illinois. P+ news.stargate Discussion about satellite transmission of news. P+ news.sysadmin Comments directed to system administrators. P+ rec.arts.books Books of all genres, shapes, and sizes. P+ rec.arts.comics The funnies, old and new. P+ rec.arts.drwho Discussion about Dr. Who. P+ rec.arts.movies Reviews and discussions of movies. P+ rec.arts.poems For the posting of poems. P+ rec.arts.sf-lovers Science fiction lovers' newsgroup. P+ rec.arts.startrek Star Trek, the TV show and the movies. P+ rec.arts.tv The boob tube, its history, and past and current shows. P+ rec.arts.tv.soaps Postings about soap operas. P+ rec.arts.wobegon "A Prairie Home Companion" radio show discussion. P+ rec.audio High fidelity audio. P+ rec.autos Automobiles, automotive products and laws. P+ rec.autos.tech Technical aspects of automobiles, et. al. P+ rec.aviation Aviation rules, means, and methods. P+ rec.bicycles Bicycles, related products and laws. P+ rec.birds Hobbyists interested in bird watching. P+ rec.boats Hobbyists interested in boating. P+ rec.food.cooking Food, cooking, cookbooks, and recipes. P+ rec.food.drink Wines and spirits. P+ rec.food.veg Vegetarians. P+ rec.games.board Discussion and hints on board games. P+ rec.games.bridge Hobbyists interested in bridge. P+ rec.games.chess Chess & computer chess. P+ rec.games.empire Discussion and hints about Empire. P+ rec.games.frp Discussion about Fantasy Role Playing games. P+ rec.games.go Discussion about Go. P+ rec.games.hack Discussion, hints, etc. about the Hack game. P+ rec.games.misc Games and computer games. P+ rec.games.pbm Discussion about Play by Mail games. P+ rec.games.rogue Discussion and hints about Rogue. P+ rec.games.trivia Discussion about trivia. P+ rec.games.video Discussion about video games. P+ rec.gardens Gardening, methods and results. P+ rec.ham-radio Amateur Radio practices, contests, events, rules, etc. P+ rec.ham-radio.packet Discussion about packet radio setups. P+ rec.humor Jokes and the like. May be somewhat offensive. P+ rec.humor.d Discussions on the content of rec.humor articles P+ rec.mag Magazine summaries, tables of contents, etc. P+ rec.misc General topics about recreational/participant sports. P+ rec.motorcycles Motorcycles and related products and laws. P+ rec.music.classical Discussion about classical music. P+ rec.music.folk Folks discussing folk music of various sorts P+ rec.music.gdead A group for (Grateful) Dead-heads P+ rec.music.makers For performers and their discussions. P+ rec.music.misc Music lovers' group. P+ rec.music.synth Synthesizers and computer music P+ rec.nude Hobbyists interested in naturist/nudist activities. P+ rec.pets Pets, pet care, and household animals in general. P+ rec.photo Hobbyists interested in photography. P+ rec.puzzles Puzzles, problems, and quizzes. P+ rec.railroad Real and model train fans' newsgroup. P+ rec.scuba Hobbyists interested in SCUBA diving. P+ rec.skiing Hobbyists interested in skiing. P+ rec.skydiving Hobbyists interested in skydiving. P+ rec.sport.baseball Discussion about baseball. P+ rec.sport.basketball Discussion about basketball. P+ rec.sport.football Discussion about football. P+ rec.sport.hockey Discussion about hockey. P+ rec.sport.misc Spectator sports. P+ rec.travel Traveling all over the world. P+ rec.video Video and video components. P+ rec.woodworking Hobbyists interested in woodworking. P sci.astro Astronomy discussions and information. P sci.bio Biology and related sciences. P sci.crypt Different methods of data en/decryption. P*************** P*** 234,240 **** P soc.culture.celtic Group about Celtics (*not* basketball!) P soc.culture.greek Group about Greeks. P soc.culture.indian Group for discussion about India & things Indian P! soc.culture.jewish Group for discussion about Jewish culture P soc.culture.misc Group for discussion about other cultures P soc.misc Socially-oriented topics not in other groups. P soc.motss Issues pertaining to homosexuality. P--- 234,240 ---- P soc.culture.celtic Group about Celtics (*not* basketball!) P soc.culture.greek Group about Greeks. P soc.culture.indian Group for discussion about India & things Indian P! soc.culture.jewish Group for discussion about Jewish culture & religion P soc.culture.misc Group for discussion about other cultures P soc.misc Socially-oriented topics not in other groups. P soc.motss Issues pertaining to homosexuality. PIndex: rmgroup.sh PPrereq: 1.6 P*** .d/rmgroup.sh Thu Oct 30 16:12:15 1986 P--- rmgroup.sh Tue Dec 16 17:47:07 1986 P*************** P*** 1,23 **** P! : '@(#)rmgroup.sh 1.6 9/19/86' P for group P do P- echo "Removing newsgroup $group" P qgrp="`echo $group | sed 's/\./\\\./g'`" P if P grep -s "^$qgrp " LIBDIR/active P then P! cat << E_O_F >/tmp/$$ P! /^$qgrp[ ]/d P! w P! q P! E_O_F P! ed - LIBDIR/active < /tmp/$$ P! ed - LIBDIR/newsgroups < /tmp/$$ P dir=SPOOLDIR/"`echo $group | sed 's/\./\//g'`" P! if [ -d $dir ] P then P! rm $dir/* P! rmdir $dir P else P echo "$0: $dir: no spool directory" 2>&1 P fi P--- 1,17 ---- P! : '@(#)rmgroup.sh 1.8 12/16/86' P for group P do P qgrp="`echo $group | sed 's/\./\\\./g'`" P if P grep -s "^$qgrp " LIBDIR/active P then P! echo "Removing newsgroup $group" P! echo "/^$qgrp[ ]/d" >>/tmp/,edit$$ P dir=SPOOLDIR/"`echo $group | sed 's/\./\//g'`" P! if test -d $dir P then P! rm $dir/* >/dev/null 2>&1 P! echo "rmdir $dir >/dev/null 2>&1" >>/tmp/,rmdir$$ P else P echo "$0: $dir: no spool directory" 2>&1 P fi P*************** P*** 25,29 **** P echo "$0: $group: no such newsgroup" 2>&1 P fi P done P! rm -f /tmp/$$ P exit 0 P--- 19,36 ---- P echo "$0: $group: no such newsgroup" 2>&1 P fi P done P! echo w >>/tmp/,edit$$ P! echo q >>/tmp/,edit$$ P! echo "Editing LIBDIR/active..." P! ed - LIBDIR/active < /tmp/,edit$$ P! FIXACTIVE P! echo "Editing LIBDIR/newsgroups..." P! ed - LIBDIR/newsgroups < /tmp/,edit$$ P! echo "Removing directories..." P! if test -s /tmp/,rmdir$$ P! then P! sort +1r -o /tmp/,rmdir$$ /tmp/,rmdir$$ P! . /tmp/,rmdir$$ P! fi P! rm -f /tmp/,edit$$ /tmp/,rmdir$$ P exit 0 PIndex: patchlevel.h PPrereq: 1 P*** .d/patchlevel.h Fri Nov 21 16:06:03 1986 P--- patchlevel.h Tue Dec 16 17:47:05 1986 P*************** P*** 1,3 **** P! #define PATCHLEVEL 1 P P! #define NEWS_VERSION "B 2.11 11/15/86" P--- 1,3 ---- P! #define PATCHLEVEL 2 P P! #define NEWS_VERSION "B 2.11 12/17/86" P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.3... ' sed 's/^P//' >patch.3 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: 2.11 news src patch #3 P PDescription: P patch#2's change to vnews to keep the save filename can be confusing. P restore the old behavior and add control-e to retrieve the old filename. P patch#2 broke the SPOOLBATCH code. This is fixed. P Yet another HIDDENNET problem is fixed. P NOTIFY didn't tell you if the newsgroup to be created was moderated P or not. P unbatch should use the existing string RNEWS for the rnews program P instead of building it itself. P The vnews helpfile has a tab instead of multiple blanks. P PFix: P cd to the src directory and apply the following patch. P PIndex: visual.c PPrereq: 1.34 P*** .d/visual.c Wed Dec 17 18:23:37 1986 P--- visual.c Mon Dec 29 15:54:08 1986 P*************** P*** 4,10 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.34 12/16/86"; P #endif /* SCCSID */ P P #include "rparams.h" P--- 4,10 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.35 12/23/86"; P #endif /* SCCSID */ P P #include "rparams.h" P*************** P*** 52,57 **** P--- 52,58 ---- P #endif P P #define PIPECHAR '|' /* indicate save command should pipe to program */ P+ #define CAGAIN ('e'&0x1F) /* Save-to-same-place indicator */ P #define META 0200 /* meta character bit (as in emacs) */ P /* print (display) flags */ P #define HDRONLY 0001 /* print header only */ P*************** P*** 514,537 **** P int wflags; P P case '|': P- if (savebuf[0] != '|') { P- savebuf[0] = '|'; P- savebuf[1] = '\0'; P- } P- c = 's'; P case 's': P case 'w': P /* We loop back to here each time user types ^U to prompt */ P do { P! if (savebuf[0] == 0) { P! /* No saved default. Ask. */ P! msg("file: "); P! curflag = CURP2; P! while ((wflags = vgetc()) == ' '); P! if (wflags == cintr) { P! secpr[0] = '\0'; P! break; P! } P savebuf[0] = wflags; P savebuf[1] = 0; P } P--- 515,533 ---- P int wflags; P P case '|': P case 's': P case 'w': P /* We loop back to here each time user types ^U to prompt */ P do { P! /* No saved default. Ask. */ P! msg( (c=='|')? "|": "file: "); P! curflag = CURP2; P! while ((wflags = vgetc()) == ' '); P! if (wflags == cintr) { P! secpr[0] = '\0'; P! break; P! } P! if (wflags != CAGAIN) { P savebuf[0] = wflags; P savebuf[1] = 0; P } P*************** P*** 540,545 **** P--- 536,542 ---- P } while (wflags == 2); P if (wflags) break; /* Interrupted out */ P wflags = 0; P+ if (c == '|') c = 's'; P if (c == 's') P wflags |= SVHEAD; P if (count != 1) P*************** P*** 787,794 **** P case '<': P /* could improve this */ P linebuf[0] = '<'; linebuf[1] = 0; P! if (prget("", linebuf)) P break; P searchid: secpr[0] = '\0'; P if (index(linebuf, '@') == NULL && index(linebuf, '>') == NULL) { P ptr1 = linebuf; P--- 784,793 ---- P case '<': P /* could improve this */ P linebuf[0] = '<'; linebuf[1] = 0; P! if (prget("", linebuf)) { P! secpr[0] = 0; P break; P+ } P searchid: secpr[0] = '\0'; P if (index(linebuf, '@') == NULL && index(linebuf, '>') == NULL) { P ptr1 = linebuf; P*************** P*** 2502,2507 **** P--- 2501,2507 ---- P char temp[20]; P char *fname; P char prog[BUFLEN + 24]; P+ int err; P P saveoff = ftell(fp); P (void) fseek(fp, artbody, 0); P*************** P*** 2559,2574 **** P tprint(fp, ufp, FALSE); P } P P fclose(ufp); P if (isprogram) { P! (void) sprintf(prog, "(%s)<%s", to + 1, fname); P! shcmd(prog, CWAIT); P! prflags |= NOPRT; P } else { P! if ((flags & OVWRITE) == 0) P! msg("file: %s %s", to, isnew ? "created" : "appended"); P! else P! msg("file: %s written", to); P } P P out: P--- 2559,2589 ---- P tprint(fp, ufp, FALSE); P } P P+ err = ferror(ufp); P+ P fclose(ufp); P if (isprogram) { P! if (err) P! msg("error in writing temp file, maybe disk full?"); P! else { P! (void) sprintf(prog, "(%s)<%s", to + 1, fname); P! shcmd(prog, CWAIT); P! prflags |= NOPRT; P! } P } else { P! msg("%sfile: %s %s", P! err? "ERROR WHILE WRITING ": "", P! to, P! (flags&OVWRITE)? "written": P! isnew ? "created" : "appended"); P! } P! P! /* If we got an error, screen may be messed. E.g. 4.2BSD P! * writes "disk full" messages to the user's tty. P! */ P! if (err) { P! clearok(curscr, 1); P! updscr(); P } P P out: P PIndex: inews.c PPrereq: 2.71 P*** .d/inews.c Wed Dec 17 18:23:19 1986 P--- inews.c Mon Dec 29 18:17:41 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.71 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.73 12/29/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 47,53 **** P #define CREATENG 0020 /* Create a new newsgroup */ P P char forgedname[NAMELEN]; /* A user specified -f option. */ P! int spool_news = FALSE; P extern char histline[]; P /* Fake sys line in case they forget their own system */ P struct srec dummy_srec = { "MEMEME", "", "all", "", "" }; P--- 47,53 ---- P #define CREATENG 0020 /* Create a new newsgroup */ P P char forgedname[NAMELEN]; /* A user specified -f option. */ P! int spool_news = 0; P extern char histline[]; P /* Fake sys line in case they forget their own system */ P struct srec dummy_srec = { "MEMEME", "", "all", "", "" }; P*************** P*** 123,128 **** P--- 123,129 ---- P mode = UNKNOWN; P infp = stdin; P pathinit(); P+ savmask = umask(N_UMASK); /* set up mask */ P ptr = rindex(*argv, '/'); P if (!ptr) P ptr = *argv - 1; P*************** P*** 138,144 **** P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P #endif /* V7 */ P #endif /* !BSD4_2 */ P! spool_news = TRUE; P else { P #ifdef SPOOLNEWS P if (argc > 1 && !strcmp(*(argv+1), "-S")) { P--- 139,145 ---- P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P #endif /* V7 */ P #endif /* !BSD4_2 */ P! spool_news = 2; P else { P #ifdef SPOOLNEWS P if (argc > 1 && !strcmp(*(argv+1), "-S")) { P*************** P*** 145,159 **** P argc--; P argv++; P } else P! spool_news = TRUE; P P #endif /* SPOOLNEWS */ P- #if !defined(BSD4_2) && !defined(LOCKF) P- (void) UNLINK(bfr); P- #endif /* !BSD4_2 && !LOCKF */ P } P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P! if (spool_news) /* can't unspool while things are locked */ P xxit(0); P dounspool(); P /* NOT REACHED */ P--- 146,166 ---- P argc--; P argv++; P } else P! spool_news = 1; P P #endif /* SPOOLNEWS */ P } P+ #ifdef BSD4_2 P+ flock(fileno(actfp), LOCK_UN); P+ #else /* !BSD4_2 */ P+ #ifdef LOCKF P+ lockf(fileno(actfp), F_ULOCK, 0); P+ #else /* !LOCKF */ P+ UNLINK(bfr); P+ #endif /* V7 */ P+ #endif /* !BSD4_2 */ P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P! if (spool_news > 1) /* can't unspool while things are locked */ P xxit(0); P dounspool(); P /* NOT REACHED */ P*************** P*** 216,222 **** P (void) signal(SIGHUP, onsig); P (void) signal(SIGINT, onsig); P } P- savmask = umask(N_UMASK); /* set up mask */ P uid = getuid(); P gid = getgid(); P duid = geteuid(); P--- 223,228 ---- P*************** P*** 327,333 **** P */ P P if (*filename) { P- (void) fclose(stdin); P infp = freopen(filename, "r", stdin); P if (infp == NULL) P xerror("freopen(%s): %s", filename, errmsg(errno)); P--- 333,338 ---- P*************** P*** 511,519 **** P SPOOL, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! sp = xfopen(buf, "w"); P if (batchcmd != NULL) P fprintf(sp, "%s\n", batchcmd); P if (dolhwrite) P lhwrite(&header, sp); P while ((c = getc(infp)) != EOF) P--- 516,538 ---- P SPOOL, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! sp = fopen(buf, "w"); P! if (sp == NULL) { P! char dbuf[BUFLEN]; P! #ifdef VMS P! sprintf(dbuf, "%s/+rnews", SPOOL); P! #else /* !VMS */ P! sprintf(dbuf, "%s/.rnews", SPOOL); P! #endif /* !VMS */ P! if (mkdir(dbuf, 0777&~N_UMASK) < 0) P! xerror("Cannot mkdir %s: %s", dbuf, errmsg(errno)); P! sp = xfopen(buf, "w"); P! } P if (batchcmd != NULL) P fprintf(sp, "%s\n", batchcmd); P+ else P+ if (not_here[0] != '\0') P+ fprintf(sp, "#! inews -x %s -p\n", not_here); P if (dolhwrite) P lhwrite(&header, sp); P while ((c = getc(infp)) != EOF) P*************** P*** 798,804 **** P P if (spool_news && mode != PROC) { P fprintf(stderr,"Your article has been spooled for later processing.\n"); P! dospool((char *)NULL, TRUE); P /* NOT REACHED */ P } P P--- 817,823 ---- P P if (spool_news && mode != PROC) { P fprintf(stderr,"Your article has been spooled for later processing.\n"); P! dospool("#! inews -S -h", TRUE); P /* NOT REACHED */ P } P P*************** P*** 877,883 **** P if ((pid=fork()) < 0) P xerror("Can't fork"); P else if (pid > 0) P! exit(0); P } P #ifdef SIGTTOU P signal(SIGTTOU, SIG_IGN); P--- 896,902 ---- P if ((pid=fork()) < 0) P xerror("Can't fork"); P else if (pid > 0) P! _exit(0); P } P #ifdef SIGTTOU P signal(SIGTTOU, SIG_IGN); P*************** P*** 885,891 **** P savehist(histline); P broadcast(mode==PROC); P } P! xxit(mode == PROC ? 0 : exitcode); P } P P input() P--- 904,910 ---- P savehist(histline); P broadcast(mode==PROC); P } P! xxit((mode == PROC && filename[0] == '\0') ? 0 : exitcode); P } P P input() P*************** P*** 1104,1109 **** P--- 1123,1129 ---- P register DIR *dirp; P register struct direct *dir; P register int foundsome; P+ int pid, status, ret; P #ifdef VMS P sprintf(bfr, "%s/+rnews", SPOOL); P #else /* !VMS */ P*************** P*** 1122,1133 **** P while ((dir=readdir(dirp)) != NULL) { P if (dir->d_name[0] == '.') P continue; P! sprintf(bfr,"%s -S -p %s", RNEWS, dir->d_name); P! if (system(bfr) != 0) { P sprintf(bfr, "../%s", dir->d_name); P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed. Batch saved in %s/%s", P! SPOOLDIR, dir->d_name); P } P (void) unlink(dir->d_name); P foundsome++; P--- 1142,1163 ---- P while ((dir=readdir(dirp)) != NULL) { P if (dir->d_name[0] == '.') P continue; P! if ((pid=vfork()) == -1) P! xerror("Can't fork: %s", errmsg(errno)); P! if (pid == 0) { P! execl(RNEWS, "rnews", "-S", "-p", dir->d_name, P! (char *) NULL); P! _exit(1); P! } P! P! while ((ret=wait(&status)) != pid && ret != -1) P! /* continue */; P! P! if (status != 0) { P sprintf(bfr, "../%s", dir->d_name); P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed, status %d. Batch saved in %s/%s", P! status, SPOOL, dir->d_name); P } P (void) unlink(dir->d_name); P foundsome++; PIndex: control.c PPrereq: 2.49 P*** .d/control.c Wed Dec 17 18:23:05 1986 P--- control.c Mon Dec 29 18:17:52 1986 P*************** P*** 19,25 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.49 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 19,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.50 12/29/86"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 479,489 **** P ORGDISTRIB); P fprintf(fd, P "In other words, by executing the command:\n"); P! fprintf(fd, "%s/inews -d %s -C %s\n", LIB, P! ORGDISTRIB, argv[1]); P # else /* !ORGDISTRIB */ P fprintf(fd, "In other words, by executing the command:\n"); P! fprintf(fd, "%s/inews -C %s\n", LIB, argv[1]); P # endif /* !ORGDISTRIB */ P } P (void) mclose(fd); P--- 479,490 ---- P ORGDISTRIB); P fprintf(fd, P "In other words, by executing the command:\n"); P! fprintf(fd, "%s/inews -d %s -C %s %s\n", LIB, P! ORGDISTRIB, argv[1], argc > 2 ? argv[2] : ""); P # else /* !ORGDISTRIB */ P fprintf(fd, "In other words, by executing the command:\n"); P! fprintf(fd, "%s/inews -C %s %s\n", LIB, argv[1], P! argc > 2 ? argv[2] : ""); P # endif /* !ORGDISTRIB */ P } P (void) mclose(fd); PIndex: rfuncs.c PPrereq: 2.38 P*** .d/rfuncs.c Wed Dec 17 18:23:41 1986 P--- rfuncs.c Mon Dec 29 15:54:15 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.38 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.39 12/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 622,631 **** P p = ACTIVE; P ACTIVE = newactivename; P afp = xfopen(p, "r"); P- tp = table; P #else /* !SORTACTIVE */ P afp = xfopen(ACTIVE, "r"); P #endif /* !SORTACTIVE */ P while (fgets(aline, sizeof aline, afp) != NULL) { P if (sscanf(aline,"%s %ld %ld %c", ngname, &tp->maxart, P &tp->minart, &tp->yn) != 4) P--- 622,631 ---- P p = ACTIVE; P ACTIVE = newactivename; P afp = xfopen(p, "r"); P #else /* !SORTACTIVE */ P afp = xfopen(ACTIVE, "r"); P #endif /* !SORTACTIVE */ P+ tp = table; P while (fgets(aline, sizeof aline, afp) != NULL) { P if (sscanf(aline,"%s %ld %ld %c", ngname, &tp->maxart, P &tp->minart, &tp->yn) != 4) PIndex: rfuncs2.c PPrereq: 1.33 P*** .d/rfuncs2.c Wed Dec 17 18:23:28 1986 P--- rfuncs2.c Mon Dec 29 15:54:19 1986 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.33 12/16/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.34 12/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 149,154 **** P--- 149,155 ---- P if (checkfrom && strncmp(bfr, "From ", 5) == 0) P putc('>', ofp); P (void) fputs(bfr, ofp); P+ if (ferror(ofp)) break; /* E.g. disk full */ P } P if (SigTrap) P qfflush(ofp); PIndex: unbatch.c PPrereq: 1.24 P*** .d/unbatch.c Wed Dec 17 18:23:30 1986 P--- unbatch.c Mon Dec 29 15:54:23 1986 P*************** P*** 13,19 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.24 12/16/86"; P #endif /* SCCSID */ P P #define MAXARGS 32 P--- 13,19 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.25 12/23/86"; P #endif /* SCCSID */ P P #define MAXARGS 32 P*************** P*** 105,111 **** P #ifdef IHCC P (void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR); P #else P! (void) sprintf(buf, "%s/rnews", BINDIR); P #endif P #ifdef SPOOLNEWS P execlp(buf, "rnews", "-S", (char *)0); P--- 105,111 ---- P #ifdef IHCC P (void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR); P #else P! strcpy(buf, RNEWS); P #endif P #ifdef SPOOLNEWS P execlp(buf, "rnews", "-S", (char *)0); PIndex vnews.help P*** .d/vnews.help Wed Dec 17 18:23:38 1986 P--- vnews.help Mon Dec 29 15:49:43 1986 P*************** P*** 17,22 **** P ESC-r Reply directly using mailer m Move on to next item in a digest P f Post a followup article s Save article in file P N Go to newsgroup (next is default) w Save without header P! l List unread articles in group L List all articles in group P P [Press ^L to see article again] P--- 17,22 ---- P ESC-r Reply directly using mailer m Move on to next item in a digest P f Post a followup article s Save article in file P N Go to newsgroup (next is default) w Save without header P! l List unread articles in group L List all articles in group P P [Press ^L to see article again] P PIndex: funcs2.c PPrereq: 1.17 P*** .d/funcs2.c Wed Dec 17 18:23:11 1986 P--- funcs2.c Mon Dec 29 18:19:19 1986 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.17 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.18 12/29/86"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 127,133 **** P--- 127,137 ---- P * A sys file line reading "ME" means the name of the local system. P */ P if (strcmp(sp->s_name, "ME") == 0) P+ #ifdef HIDDENNET P+ (void) strcpy(sp->s_name, LOCALSYSNAME); P+ #else /* !HIDDENNET */ P (void) strcpy(sp->s_name, FULLSYSNAME); P+ #endif /* !HIDDENNET */ P e = index(sp->s_name, '/'); P if (e) { P *e++ = '\0'; PIndex: patchlevel.h P*** .d/patchlevel.h Wed Dec 17 18:23:46 1986 P--- patchlevel.h Mon Dec 29 18:19:21 1986 P*************** P*** 1,3 **** P! #define PATCHLEVEL 2 P P! #define NEWS_VERSION "B 2.11 12/17/86" P--- 1,3 ---- P! #define PATCHLEVEL 3 P P! #define NEWS_VERSION "B 2.11 12/29/86" P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.4... ' sed 's/^P//' >patch.4 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: Patch #4 for 2.11 news src P PDescription: P This is patch #4 for news 2.11 source. It addresses the following P problems: P P A minor optimization for checknews. P Handle trailing white space better in control messages. P If you are running with history subdirectories (i.e. you don't have P dbm), you don't need the history file anymore. P Fix the STUPID typo in patch#3 that could have unlinked the active file. P Fix some portability problems with the readnews/vnews 'l' command. P A few minor cleanups. P PFix: P cd to the src directory and apply the following patch P PIndex: checknews.c PPrereq: 2.27 P*** .d/checknews.c Wed Dec 17 18:23:00 1986 P--- checknews.c Mon Feb 23 22:28:20 1987 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.27 12/16/86"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.28 2/22/87"; P #endif /* SCCSID */ P P char *Progname = "checknews"; /* used by xerror */ P*************** P*** 238,243 **** P--- 238,245 ---- P #ifdef DEBUG P fprintf(stderr, "bfr = '%s'\n", bfr); P #endif P+ if (narts == 0) P+ continue; P ngcat(bfr); P if (!ngmatch(bfr, nflag ? narggrp : header.nbuf)) P continue; P PIndex: control.c PPrereq: 2.50 P*** .d/control.c Mon Dec 29 18:34:10 1986 P--- control.c Mon Feb 23 22:28:30 1987 P*************** P*** 19,25 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.50 12/29/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 19,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.51 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 127,140 **** P P while (*str) { P if (*str <= ' ') { P- *nextfree++ = 0; P- cargv[cargc] = nextfree; P- cargc++; P /* skip over white space */ P while (*str != '\0' && *str <= ' ') P str++; P if (*str == '\0') /* line ends in white space */ P return; P } else P *nextfree++ = *str++; P } P--- 127,140 ---- P P while (*str) { P if (*str <= ' ') { P /* skip over white space */ P while (*str != '\0' && *str <= ' ') P str++; P if (*str == '\0') /* line ends in white space */ P return; P+ *nextfree++ = 0; P+ cargv[cargc] = nextfree; P+ cargc++; P } else P *nextfree++ = *str++; P } P PIndex: expire.c PPrereq: 2.49 P*** .d/expire.c Wed Dec 17 18:23:08 1986 P--- expire.c Mon Feb 23 22:28:40 1987 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.49 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.50 2/22/87"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 54,67 **** P char recdate[BUFLEN]; P long rectime, exptime; P extern char *OLDNEWS; P! int verbose = 0; P! int ignorexp = 0; P! int doarchive = 0; P! int nohistory = 0; P! int dorebuild = 0; P! int usepost = 0; P! int frflag = 0; P! int updateactive = 0; P char baduser[BUFLEN]; P extern char filename[], nbuf[]; P P--- 54,68 ---- P char recdate[BUFLEN]; P long rectime, exptime; P extern char *OLDNEWS; P! int verbose = 0; /* output trace information */ P! int ignorexp = 0; /* ignore Expire: lines */ P! int doarchive = 0; /* archive articles in SPOOL/oldnews */ P! int nohistory = 0; /* ignore history file */ P! int dorebuild = 0; /* rebuild history file */ P! int dorbldhistory = 0; /* rebuild history.d directory */ P! int usepost = 0; /* use posting date to expire */ P! int frflag = 0; /* expire specific user */ P! int doupdateactive = 0; /* update ACTIVE file */ P char baduser[BUFLEN]; P extern char filename[], nbuf[]; P P*************** P*** 79,88 **** P--- 80,93 ---- P char *realloc(); P struct tm *gmtime(); P P+ #ifdef DBM P typedef struct { P char *dptr; P int dsize; P } datum; P+ #else P+ FILE *nexthistfile(); P+ #endif /* !DBM */ P P long expincr; P long dropincr; P*************** P*** 99,123 **** P char grpsleft[BUFLEN]; P struct hbuf h; P int ExpireLock; P P main(argc, argv) P int argc; P char **argv; P { P- register char *p1, *p2, *p3; P- register time_t newtime, today; P- register FILE *fp = NULL; P- FILE *ohfd, *nhfd; P- DIR *ngdirp = NULL; P- static struct direct *ngdir; P- char fn[BUFLEN]; P- int i, LockFd; P- #ifndef DBM P- char *ptr, chr; P- FILE *subfd[10]; P- char *histfile(); P- #endif /* !DBM */ P- P pathinit(); P (void) umask(N_UMASK); P P--- 104,116 ---- P char grpsleft[BUFLEN]; P struct hbuf h; P int ExpireLock; P+ int rmlock(); P+ time_t today; P P main(argc, argv) P int argc; P char **argv; P { P pathinit(); P (void) umask(N_UMASK); P P*************** P*** 134,139 **** P--- 127,136 ---- P (void) setgid(gid); P (void) setuid(uid); P P+ if (signal(SIGHUP, SIG_IGN) != SIG_IGN) P+ signal(SIGHUP, rmlock); P+ if (signal(SIGINT, SIG_IGN) != SIG_IGN) P+ signal(SIGINT, rmlock); P expincr = DFLTEXP; P dropincr = HISTEXP; P ngpat[0] = ','; P*************** P*** 233,242 **** P dorebuild++; P nohistory++; P break; P! case 'p': P usepost++; P break; P! case 'f': P frflag++; P if (argc > 2) { P strcpy(baduser, argv[2]); P--- 230,239 ---- P dorebuild++; P nohistory++; P break; P! case 'p': /* use posting date to expire */ P usepost++; P break; P! case 'f': /* expire messages from baduser */ P frflag++; P if (argc > 2) { P strcpy(baduser, argv[2]); P*************** P*** 244,259 **** P argc--; P } P break; P! case 'u': P! updateactive++; P break; P default: P! printf("Usage: expire [ -v [level] ] [-e days ] [-i] [-a] [-r] [-h] [-p] [-u] [-f username] [-n newsgroups]\n"); P xxit(1); P } P argc--; P argv++; P } P if (dropincr < expincr) { P dropincr = HISTEXP; P fprintf(stderr, "History expiration time < article expiration time. Default used.\n"); P--- 241,265 ---- P argc--; P } P break; P! case 'u': /* update the active file from 2.10.1 fmt */ P! doupdateactive++; P break; P+ case 'H': /* convert to history.d format */ P+ dorbldhistory++; P+ break; P default: P! printf("Usage: expire [ -v [level] ] [-e days ] [-i] [-a] [-r] [-h] [-p] [-u] [-f username] [-n newsgroups] [-H]\n"); P xxit(1); P } P argc--; P argv++; P } P+ if (dorbldhistory) { P+ #ifndef DBM P+ rebuildhistorydir(); P+ #endif /* !DBM */ P+ exit(0); P+ } P if (dropincr < expincr) { P dropincr = HISTEXP; P fprintf(stderr, "History expiration time < article expiration time. Default used.\n"); P*************** P*** 275,289 **** P printf("archiving: %s\n",arpat); P } P P (void) sprintf(OARTFILE, "%s/%s", LIB, "ohistory"); P (void) sprintf(NARTFILE, "%s/%s", LIB, "nhistory"); P P (void) sprintf(OACTIVE, "%s/%s", LIB, "oactive"); P (void) sprintf(NACTIVE, "%s/%s", LIB, "nactive"); P P! if (updateactive) P! goto doupdateactive; P P #ifdef DBM P if (!dorebuild) { P (void) sprintf(PAGFILE, "%s/%s", LIB, "nhistory.pag"); P--- 281,327 ---- P printf("archiving: %s\n",arpat); P } P P+ #ifdef DBM P (void) sprintf(OARTFILE, "%s/%s", LIB, "ohistory"); P+ #endif /* DBM */ P (void) sprintf(NARTFILE, "%s/%s", LIB, "nhistory"); P P (void) sprintf(OACTIVE, "%s/%s", LIB, "oactive"); P (void) sprintf(NACTIVE, "%s/%s", LIB, "nactive"); P P! if (!doupdateactive) { P! expire(); P! #ifndef DBM P! rebuildhistorydir(); P! #endif P! } P P+ updateactive(); P+ rmlock(); P+ P+ /* P+ * Now read in any saved news. P+ */ P+ #ifdef PROFILING P+ monitor((int(*)())0,(int(*)())0,0,0,0); P+ #endif /* PROFILING */ P+ execl(RNEWS, "rnews", "-U", (char *)NULL); P+ perror(RNEWS); P+ xxit(1); P+ /* NOTREACHED */ P+ } P+ P+ expire() P+ { P+ register char *p1, *p2, *p3; P+ register time_t newtime; P+ register FILE *fp = NULL; P+ FILE *ohfd, *nhfd; P+ int i; P+ char fn[BUFLEN]; P+ DIR *ngdirp = NULL; P+ static struct direct *ngdir; P+ P #ifdef DBM P if (!dorebuild) { P (void) sprintf(PAGFILE, "%s/%s", LIB, "nhistory.pag"); P*************** P*** 290,296 **** P (void) sprintf(DIRFILE, "%s/%s", LIB, "nhistory.dir"); P (void) close(creat(PAGFILE, 0666)); P (void) close(creat(DIRFILE, 0666)); P! initdbm(NARTFILE); P } P #endif P P--- 328,334 ---- P (void) sprintf(DIRFILE, "%s/%s", LIB, "nhistory.dir"); P (void) close(creat(PAGFILE, 0666)); P (void) close(creat(DIRFILE, 0666)); P! initdbm(NARTFILE); P } P #endif P P*************** P*** 297,304 **** P if (nohistory) { P ohfd = xfopen(ACTIVE, "r"); P if (dorebuild) { P! /* Allocate initial space for multiple newsgroup (for an P! article) array */ P multhist = (struct multhist *)calloc (SPACE_INCREMENT, P sizeof (struct multhist)); P mh_size = SPACE_INCREMENT; P--- 335,342 ---- P if (nohistory) { P ohfd = xfopen(ACTIVE, "r"); P if (dorebuild) { P! /* Allocate initial space for multiple newsgroup (for P! an article) array */ P multhist = (struct multhist *)calloc (SPACE_INCREMENT, P sizeof (struct multhist)); P mh_size = SPACE_INCREMENT; P*************** P*** 309,336 **** P } else P nhfd = xfopen("/dev/null", "w"); P } else { P ohfd = xfopen(ARTFILE, "r"); P nhfd = xfopen(NARTFILE, "w"); P } P P! /* set up exclusive locking so inews doesn't run while expire does */ P! #if defined(BSD4_2) || defined(LOCKF) P! LockFd = open(ACTIVE, 2); P! #ifdef LOCKF P! (void) lockf(LockFd, F_LOCK, 0); P! #else /* BSD4_2 */ P! (void) flock(LockFd, LOCK_EX); P! #endif /* BSd4_2 */ P! #else /* !BSD4_2 && !LOCKF */ P! i = 0; P! sprintf(afline,"%s.lock", ACTIVE); P! while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P! if (i++ > 5) P! xerror("Can't get lock for expire"); P! sleep(i*2); P! } P! P! #endif /* !BSD4_2 && !LOCKF */ P P for(i=0;i<NUNREC;i++) P h.unrec[i] = NULL; P--- 347,361 ---- P } else P nhfd = xfopen("/dev/null", "w"); P } else { P+ #ifdef DBM P ohfd = xfopen(ARTFILE, "r"); P+ #else P+ ohfd = nexthistfile((FILE *)NULL); P+ #endif /* DBM */ P nhfd = xfopen(NARTFILE, "w"); P } P P! dolock(); P P for(i=0;i<NUNREC;i++) P h.unrec[i] = NULL; P*************** P*** 375,382 **** P--- 400,415 ---- P fp = access(filename, 04) ? NULL : art_open(filename, "r"); P } else { P char dc; P+ #ifdef DBM P if (fgets(afline, BUFLEN, ohfd) == NULL) P break; P+ #else P+ if (fgets(afline, BUFLEN, ohfd) == NULL) P+ if (!(ohfd = nexthistfile(ohfd))) P+ break; P+ else P+ continue; P+ #endif /* DBM */ P if (verbose > 2) P printf("article: %s", afline); P p1 = index(afline, '\t'); P*************** P*** 429,438 **** P } else { P /* P * Nothing after the 2nd tab. This happens P! * when there's no message left in the spool P * directory, only the memory of it in the P! * history file. Use date in the history file P! * to decide if we should keep this article. P */ P grpsleft[0] = '\0'; P goto checkdate; P--- 462,472 ---- P } else { P /* P * Nothing after the 2nd tab. This happens P! * when there is no message left in the spool P * directory, only the memory of it in the P! * history file. (That is, it got cancelled P! * or expired.) Use date in the history file P! * to decide if we should keep the memory. P */ P grpsleft[0] = '\0'; P goto checkdate; P*************** P*** 439,445 **** P } P if (!ngmatch(nbuf, ngpat) || P ((rectime+expincr > today) && !dorebuild && P! !frflag && !usepost && recdate[0] != ' ')) P goto keephist; P if (!dorebuild && !frflag && !usepost && P recdate[0] != ' ') { P--- 473,479 ---- P } P if (!ngmatch(nbuf, ngpat) || P ((rectime+expincr > today) && !dorebuild && P! !frflag && !usepost && recdate[0] != ' ')) P goto keephist; P if (!dorebuild && !frflag && !usepost && P recdate[0] != ' ') { P*************** P*** 526,533 **** P * and this code changes it to a.b.c/4 (the correct P * kind of entry in the history file.) P * P! * This can't be a strcpy because the addresses overlap P! * and some machines can't handle that. P */ P p1 = filename; P cp = p1 + strlen(SPOOL); P--- 560,567 ---- P * and this code changes it to a.b.c/4 (the correct P * kind of entry in the history file.) P * P! * This cannot be a strcpy because the addresses P! * overlap and some machines cannot handle that. P */ P p1 = filename; P cp = p1 + strlen(SPOOL); P*************** P*** 578,584 **** P P /* P * Here is where we realloc the multhist space rather P! * than the old way of static allocation. It's P * really trivial. We just clear out the space P * in case it was reused. The old static array was P * guaranteed to be cleared since it was cleared when P--- 612,618 ---- P P /* P * Here is where we realloc the multhist space rather P! * than the old way of static allocation. It is P * really trivial. We just clear out the space P * in case it was reused. The old static array was P * guaranteed to be cleared since it was cleared when P*************** P*** 648,656 **** P--- 682,694 ---- P printf("Drop history of %s - %s\n", P h.ident, recdate); P } else { P+ #ifdef DBM P long hpos; P+ #endif /* DBM */ P keephist: P+ #ifdef DBM P hpos = ftell(nhfd); P+ #endif /* DBM */ P P if (verbose > 3) P printf("Retain history of %s - %s\n", P*************** P*** 693,703 **** P rectime = statb.st_mtime; P } P tm = gmtime(&rectime); P! if ( P #ifdef USG P! fprintf(nhfd,"%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", P #else /* !USG */ P! fprintf(nhfd,"%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", P #endif /* !USG */ P h.ident, h.expdate[0] ? " " : "", P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P--- 731,741 ---- P rectime = statb.st_mtime; P } P tm = gmtime(&rectime); P! if ( fprintf(nhfd, P #ifdef USG P! "%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", P #else /* !USG */ P! "%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", P #endif /* !USG */ P h.ident, h.expdate[0] ? " " : "", P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P*************** P*** 714,720 **** P--- 752,760 ---- P xerror("History write failed, %s", errmsg(errno)); P P if (dorebuild || !nohistory) { P+ #ifndef DBM P (void) rename(ARTFILE, OARTFILE); P+ #endif /* !DBM */ P (void) rename(NARTFILE, ARTFILE); P #ifdef DBM P if (dorebuild) P*************** P*** 730,759 **** P } P #endif P } P! #ifndef DBM P! /* rebuild history subfiles */ P! for (i = 0; i < 10; i++) { P! (void) sprintf(fn, "%s.d/%c", ARTFILE, i + '0'); P! close(creat(fn, 0644)); P! subfd[i] = xfopen(fn, "w+"); P } P- ohfd = xfopen(ARTFILE, "r"); P- while (fgets(fn, BUFLEN, ohfd) != NULL) { P- ptr = histfile(fn); P- chr = *(ptr + strlen(ptr) - 1); P- if (isdigit(chr)) P- i = chr - '0'; P- else P- i = 0; P- fputs(fn, subfd[i]); P- } P- (void) fclose(ohfd); P- for (i = 0; i < 10; i++) P- if (ferror(subfd[i]) || fclose(subfd[i])) P- xerror("History subfile write"); P- #endif /* !DBM */ P P! doupdateactive: P ohfd = xfopen(ACTIVE, "r"); P nhfd = xfopen(NACTIVE, "w"); P do { P--- 770,822 ---- P } P #endif P } P! } P! P! #if defined(BSD4_2) || defined(LOCKF) P! static int LockFd = -1; P! #endif P! P! dolock() P! { P! /* set up exclusive locking so inews does not run while expire does */ P! #if defined(BSD4_2) || defined(LOCKF) P! LockFd = open(ACTIVE, 2); P! # ifdef LOCKF P! (void) lockf(LockFd, F_LOCK, 0); P! # else /* BSD4_2 */ P! (void) flock(LockFd, LOCK_EX); P! # endif /* BSd4_2 */ P! #else /* !BSD4_2 && !LOCKF */ P! int i = 0; P! sprintf(afline,"%s.lock", ACTIVE); P! while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P! if (i++ > 5) P! xerror("Can't get lock for expire"); P! sleep(i*2); P } P P! #endif /* !BSD4_2 && !LOCKF */ P! } P! P! rmlock() P! { P! #if defined(BSD4_2) || defined(LOCKF) P! close(LockFd); P! #else P! sprintf(bfr, "%s.lock", ACTIVE); P! (void) UNLINK(bfr); P! #endif /* !BSD4_2 */ P! } P! P! updateactive() P! { P! register char *p1; P! FILE *ohfd, *nhfd; P! DIR *ngdirp = NULL; P! static struct direct *ngdir; P! P! if (verbose) P! printf("updating active file %s\n", ACTIVE); P ohfd = xfopen(ACTIVE, "r"); P nhfd = xfopen(NACTIVE, "w"); P do { P*************** P*** 768,773 **** P--- 831,838 ---- P if (sscanf(afline,"%s %ld %ld %c",nbuf,&maxart, &minart, P &cansub) < 4) P xerror("Active file corrupt"); P+ if (verbose > 3) P+ printf("looking at group %s\n", nbuf); P if (!ngmatch(nbuf, ngpat)) { P if (fputs(afline, nhfd) == EOF) P xerror("active file write failed"); P*************** P*** 800,823 **** P afline[gdsize] = '\0'; P if (minart > maxart) P minart = maxart; P if (fprintf(nhfd,"%s %05ld %05ld %c\n", afline, maxart, P minart, cansub) == EOF) P xerror("Active file write failed"); P } while (!feof(ohfd)); P if (fclose(nhfd)) P xerror("Active file write failed, %s", errmsg(errno)); P! (void) fclose(ohfd); /* unlocking inews as a side effect */ P! #ifndef BSD4_2 P! sprintf(bfr, "%s.lock", ACTIVE); P! (void) UNLINK(bfr); P! #endif /* !BSD4_2 */ P P (void) rename(ACTIVE, OACTIVE); P (void) rename(NACTIVE, ACTIVE); P- P- execl(RNEWS, "rnews", "-U", (char *)NULL); P- perror(RNEWS); P- xxit(1); P } P P /* Unlink (using unwound tail recursion) all the articles in 'artlist'. */ P--- 865,892 ---- P afline[gdsize] = '\0'; P if (minart > maxart) P minart = maxart; P+ #ifdef USG P+ if (verbose > 4) P+ printf("\tmaxart = %5.5ld, minart = %5.5ld\n", P+ maxart, minart); P+ if (fprintf(nhfd,"%s %5.5ld %5.5ld %c\n", afline, maxart, P+ minart, cansub) == EOF) P+ xerror("Active file write failed"); P+ #else P+ if (verbose > 4) P+ printf("\tmaxart = %05ld, minart = %05ld\n", P+ maxart, minart); P if (fprintf(nhfd,"%s %05ld %05ld %c\n", afline, maxart, P minart, cansub) == EOF) P xerror("Active file write failed"); P+ #endif /* !USG */ P } while (!feof(ohfd)); P if (fclose(nhfd)) P xerror("Active file write failed, %s", errmsg(errno)); P! (void) fclose(ohfd); /* this might unlock inews as a side effect */ P P (void) rename(ACTIVE, OACTIVE); P (void) rename(NACTIVE, ACTIVE); P } P P /* Unlink (using unwound tail recursion) all the articles in 'artlist'. */ P*************** P*** 928,934 **** P return 0; P } P P! /* P * Count instances of c in s P */ P chrcnt(s, c) P--- 997,1003 ---- P return 0; P } P P! /* P * Count instances of c in s P */ P chrcnt(s, c) P*************** P*** 969,975 **** P return rc; P } P P- P /* Make sure this file is a legal article. */ P islegal(fullname, path, name) P register char *fullname; P--- 1038,1043 ---- P*************** P*** 1065,1075 **** P if (store(lhs, rhs) < 0) P xerror("dbm store failed"); P } P! #endif /* DBM */ P P xxit(i) P { P! sprintf(bfr,"%s.lock", ACTIVE); P! (void) UNLINK(bfr); P exit(i); P } P--- 1133,1201 ---- P if (store(lhs, rhs) < 0) P xerror("dbm store failed"); P } P! #else P! /* P! * Open the next history subdirectory file P! */ P P+ FILE *nexthistfile(ofp) P+ FILE *ofp; P+ { P+ static int histfilecounter = -1; P+ P+ if (ofp) P+ fclose(ofp); P+ do { P+ if (++histfilecounter > 9) P+ return NULL; P+ sprintf(bfr, "%s.d/%d", ARTFILE, histfilecounter); P+ if (verbose > 3) P+ printf("reading history file %s\n", bfr); P+ ofp = xfopen(bfr, "r"); P+ } while (ofp == NULL); P+ return ofp; P+ } P+ P+ /* P+ * Rebuild the history subdirectory from LIBDIR/history P+ */ P+ rebuildhistorydir() P+ { P+ char fn[BUFLEN], ofn[BUFLEN]; P+ register int i; P+ FILE *subfd[10], *ohfd; P+ P+ /* rebuild history subfiles */ P+ (void) sprintf(fn, "%s.od", ARTFILE); P+ if (access(fn,0) != 0) P+ (void) mkdir(fn, 0755); P+ (void) sprintf(fn, "%s.d", ARTFILE); P+ if (verbose) P+ printf("Rebuilding history subfile directory %d.\n", fn); P+ if (access(fn,0) != 0) P+ (void) mkdir(fn, 0755); P+ for (i = 0; i < 10; i++) { P+ (void) sprintf(fn, "%s.d/%c", ARTFILE, i + '0'); P+ (void) sprintf(ofn, "%s.od/%c", ARTFILE, i + '0'); P+ (void) rename(fn, ofn); P+ close(creat(fn, 0644)); P+ subfd[i] = xfopen(fn, "w+"); P+ } P+ ohfd = xfopen(ARTFILE, "r"); P+ while (fgets(fn, BUFLEN, ohfd) != NULL) { P+ i = findhfdigit(fn) - '0'; P+ fputs(fn, subfd[i]); P+ } P+ (void) fclose(ohfd); P+ for (i = 0; i < 10; i++) P+ if (ferror(subfd[i]) || fclose(subfd[i])) P+ xerror("History subfile write"); P+ (void) UNLINK(ARTFILE); P+ } P+ #endif /* !DBM */ P+ P xxit(i) P { P! rmlock(); P exit(i); P } P PIndex: funcs2.c PPrereq: 1.18 P*** .d/funcs2.c Mon Dec 29 18:34:15 1986 P--- funcs2.c Mon Feb 23 22:28:47 1987 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.18 12/29/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.19 2/22/87"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 596,616 **** P histfile(hline) P char *hline; P { P- char *p; P char chr; /* least significant digit of article number */ P static char subfile[BUFLEN]; P P! p = strchr(hline, '@'); P! if (p != NULL && p > hline) P chr = *(p - 1); P else P chr = '0'; P if (!isdigit(chr)) P chr = '0'; P! sprintf(subfile, "%s.d/%c", ARTFILE, chr); P! if (access(subfile, 04) < 0) P! return(ARTFILE); P! return(subfile); P } P #endif /* !DBM */ P P--- 596,625 ---- P histfile(hline) P char *hline; P { P char chr; /* least significant digit of article number */ P static char subfile[BUFLEN]; P P! chr = findhfdigit(hline); P! sprintf(subfile, "%s.d/%c", ARTFILE, chr); P! if (access(subfile, 04) < 0) P! return(ARTFILE); P! return(subfile); P! } P! P! findhfdigit(fn) P! char *fn; P! { P! register char *p; P! register int chr; P! P! p = index(fn, '@'); P! if (p != NULL && p > fn) P chr = *(p - 1); P else P chr = '0'; P if (!isdigit(chr)) P chr = '0'; P! return chr; P } P #endif /* !DBM */ P PIndex: header.h PPrereq: 2.19 P*** .d/header.h Thu Oct 30 16:12:05 1986 P--- header.h Mon Feb 23 22:28:50 1987 P*************** P*** 2,8 **** P * header.h - Article header format P */ P P! /* @(#)header.h 2.19 1/17/86 */ P P #define NUNREC 50 P P--- 2,8 ---- P * header.h - Article header format P */ P P! /* @(#)header.h 2.20 2/22/87 */ P P #define NUNREC 50 P P*************** P*** 10,16 **** P struct hbuf { P char from[BUFLEN]; /* From: */ P char path[PATHLEN]; /* Path: */ P! char nbuf[BUFLEN]; /* Newsgroups: */ P char title[BUFLEN]; /* Subject: */ P char ident[BUFLEN]; /* Message-ID: */ P char replyto[BUFLEN]; /* Reply-To: */ P--- 10,16 ---- P struct hbuf { P char from[BUFLEN]; /* From: */ P char path[PATHLEN]; /* Path: */ P! char nbuf[LBUFLEN]; /* Newsgroups: */ P char title[BUFLEN]; /* Subject: */ P char ident[BUFLEN]; /* Message-ID: */ P char replyto[BUFLEN]; /* Reply-To: */ P PIndex: ifuncs.c PPrereq: 2.59 P*** .d/ifuncs.c Wed Dec 17 18:23:15 1986 P--- ifuncs.c Mon Feb 23 22:28:59 1987 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.59 12/16/86"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.60 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 603,618 **** P char *hline; P { P register FILE *hfp; P- datum lhs, rhs; P- long fpos; P register char *p; P P hfp = xfopen(ARTFILE, "a"); P (void) fseek(hfp, 0L, 2); /* Unisoft 5.1 doesn't seek to EOF on 'a' */ P fpos = ftell(hfp); P fprintf(hfp, "%s\n", hline); P (void) fclose(hfp); P #ifdef DBM P /* We assume that history has already been called, calling dbminit. */ P p = index(hline, '\t'); P if (p) P--- 603,635 ---- P char *hline; P { P register FILE *hfp; P register char *p; P+ #ifdef DBM P+ long fpos; P+ #endif /* !DBM */ P P+ #ifndef DBM P+ if (strcmp((p = histfile(hline)), ARTFILE) != 0) { P+ /* If the history subfile is accessible */ P+ if ((hfp = xfopen(p, "a")) != NULL ) { /* If we can append */ P+ fprintf(hfp, "%s\n", hline); /* Append */ P+ (void) fclose(hfp); P+ } else P+ logerr("Unable to append to %s: %s", p, errmsg(errno)); P+ } else P+ #endif /* !DBM */ P+ { P hfp = xfopen(ARTFILE, "a"); P (void) fseek(hfp, 0L, 2); /* Unisoft 5.1 doesn't seek to EOF on 'a' */ P+ #ifdef DBM P fpos = ftell(hfp); P+ #endif /* !DBM */ P fprintf(hfp, "%s\n", hline); P (void) fclose(hfp); P+ } P #ifdef DBM P+ { P+ datum lhs, rhs; P /* We assume that history has already been called, calling dbminit. */ P p = index(hline, '\t'); P if (p) P*************** P*** 623,638 **** P rhs.dptr = (char *)&fpos; P rhs.dsize = sizeof fpos; P store(lhs, rhs); P! #else /* !DBM */ P! if (strcmp(p = histfile(hline), ARTFILE) != 0) P! /* If the history subfile is accessible */ P! if ((hfp = xfopen(p, "a")) != NULL ) { /* If we can append */ P! fprintf(hfp, "%s\n", hline); /* Append */ P! (void) fclose(hfp); P! } else P! logerr("Unable to append to %s: %s", p, errmsg(errno)); P! P! #endif /* !DBM */ P idunlock(); P } P P--- 640,647 ---- P rhs.dptr = (char *)&fpos; P rhs.dsize = sizeof fpos; P store(lhs, rhs); P! } P! #endif /* DBM */ P idunlock(); P } P PIndex: inews.c PPrereq: 2.73 P*** .d/inews.c Mon Dec 29 18:34:08 1986 P--- inews.c Mon Feb 23 22:29:09 1987 P*************** P*** 17,27 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.73 12/29/86"; P #endif /* SCCSID */ P P #include "iparams.h" P- #include <errno.h> P P #ifdef BSD4_2 P # include <sys/dir.h> P--- 17,26 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.74 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P P #ifdef BSD4_2 P # include <sys/dir.h> P*************** P*** 114,120 **** P struct group *gp; /* struct for group lookup */ P register int i; P FILE *mfd; /* mail file file-descriptor */ P- char cbuf[BUFLEN]; /* command buffer */ P P /* uuxqt doesn't close all it's files */ P for (i = 3; !close(i); i++) P--- 113,118 ---- P*************** P*** 156,162 **** P #ifdef LOCKF P lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P! UNLINK(ACTIVE, bfr); P #endif /* V7 */ P #endif /* !BSD4_2 */ P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P--- 154,160 ---- P #ifdef LOCKF P lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P! UNLINK(bfr); P #endif /* V7 */ P #endif /* !BSD4_2 */ P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P*************** P*** 184,223 **** P header.title[0] = header.nbuf[0] = filename[0] = '\0'; P P /* check for existence of special files */ P! if (!rwaccess(ARTFILE)) { P! mfd = mailhdr((struct hbuf *)NULL, exists(ARTFILE) ? "Unwritable files!" : "Missing files!"); P! if (mfd != NULL) { P! #ifdef HIDDENNET P! fprintf(mfd,"System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, ARTFILE); P! #else /* !HIDDENNET */ P! fprintf(mfd,"System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, ARTFILE); P! #endif /* !HIDDENNET */ P! (void) sprintf(cbuf, "touch %s;chmod 666 %s", ARTFILE, ARTFILE); P! (void) system(cbuf); P! if (rwaccess(ARTFILE)) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P! } P! } P! if (!rwaccess(ACTIVE)) { P! mfd = mailhdr((struct hbuf *)NULL, exists(ACTIVE) ? "Unwritable files!" : "Missing files!"); P! if (mfd != NULL) { P! #ifdef HIDDENNET P! fprintf(mfd,"System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, ARTFILE); P! #else /* !HIDDENNET */ P! fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, ACTIVE); P! #endif /* !HIDDENNET */ P! (void) sprintf(cbuf, "touch %s;chmod 666 %s", ACTIVE, ACTIVE); P! (void) system(cbuf); P! if (rwaccess(ACTIVE)) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P! } P! } P SigTrap = FALSE; /* true if a signal has been caught */ P if (mode != PROC) { P (void) signal(SIGHUP, onsig); P--- 182,193 ---- P header.title[0] = header.nbuf[0] = filename[0] = '\0'; P P /* check for existence of special files */ P! #ifdef DBM P! chkfile(ARTFILE); P! #else P! chkdir(ARTFILE); P! #endif DBM P! chkfile(ACTIVE); P SigTrap = FALSE; /* true if a signal has been caught */ P if (mode != PROC) { P (void) signal(SIGHUP, onsig); P*************** P*** 487,493 **** P--- 457,562 ---- P P /* Do the actual insertion. */ P insert(); P+ /* NOTREACHED */ P } P+ P+ /* check for existence of file */ P+ static chkfile(f) P+ char *f; P+ { P+ FILE *mfd; /* mail file file-descriptor */ P+ char cbuf[BUFLEN]; /* command buffer */ P+ P+ if (!rwaccess(f)) { P+ mfd = mailhdr((struct hbuf *)NULL, exists(f) ? "Unwritable files!" : "Missing files!"); P+ if (mfd != NULL) { P+ #ifdef HIDDENNET P+ fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, f); P+ #else /* !HIDDENNET */ P+ fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, f); P+ #endif /* !HIDDENNET */ P+ (void) sprintf(cbuf, "touch %s;chmod 666 %s", f, f); P+ (void) system(cbuf); P+ if (rwaccess(f)) P+ fprintf(mfd, "The problem has been taken care of.\n"); P+ else P+ fprintf(mfd, "Corrective action failed - check suid bits.\n"); P+ (void) mclose(mfd); P+ } P+ } P+ } P+ P+ #ifndef DBM P+ /* check for existence of directory */ P+ static chkdir(d) P+ char *d; P+ { P+ FILE *mfd; /* mail file file-descriptor */ P+ char dir[BUFLEN]; /* holds directory name */ P+ P+ sprintf(dir, "%s.d", d); P+ if (eaccess(dir, 07) != 0) { P+ mfd = mailhdr((struct hbuf *)NULL, exists(dir) ? "Unwritable diretories!" : "Missing directories!"); P+ if (mfd != NULL) { P+ #ifdef HIDDENNET P+ fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, dir); P+ #else /* !HIDDENNET */ P+ fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, dir); P+ #endif /* !HIDDENNET */ P+ (void) mkdir(dir, 0775); P+ if (eaccess(dir, 07) == 0) P+ fprintf(mfd, "The problem has been taken care of.\n"); P+ else P+ fprintf(mfd, "Corrective action failed - check suid bits.\n"); P+ (void) mclose(mfd); P+ } P+ } P+ } P+ P+ /* P+ * This version of access checks against effective uid and effective gid P+ */ P+ P+ eaccess(name, mode) P+ register char *name; P+ register int mode; P+ { P+ struct stat statb; P+ int euserid = geteuid(); P+ int egroupid = getegid(); P+ P+ if (stat(name, &statb) == 0) { P+ if (euserid == 0) { P+ if ((statb.st_mode&S_IFMT) != S_IFREG || mode != 1) P+ return 0; P+ /* root needs execute permission for someone */ P+ mode = (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); P+ } P+ else if (euserid == statb.st_uid) P+ mode <<= 6; P+ else if (egroupid == statb.st_gid) P+ mode <<= 3; P+ #ifdef BSD4_2 P+ /* in BSD4_2 you can be in several groups */ P+ else { P+ int groups[NGROUPS]; P+ register int n; P+ n = getgroups(NGROUPS,groups); P+ while(--n >= 0) { P+ if(groups[n] == statb.st_gid) { P+ mode <<= 3; P+ break; P+ } P+ } P+ } P+ #endif /* BSD4_2 */ P+ P+ if (statb.st_mode & mode) P+ return 0; P+ } P+ return -1; P+ } P+ #endif /* DBM */ P P dospool(batchcmd, dolhwrite) P char *batchcmd; P PIndex: patchlevel.h PPrereq: 3 P*** .d/patchlevel.h Mon Dec 29 18:34:15 1986 P--- patchlevel.h Mon Feb 23 22:29:11 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 3 P P! #define NEWS_VERSION "B 2.11 12/29/86" P--- 1,3 ---- P! #define PATCHLEVEL 4 P P! #define NEWS_VERSION "B 2.11 2/22/87" PIndex: rfuncs.c PPrereq: 2.39 P*** .d/rfuncs.c Mon Dec 29 18:34:11 1986 P--- rfuncs.c Mon Feb 23 22:29:19 1987 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.39 12/23/86"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.40 2/22/87"; P #endif /* SCCSID */ P P /*LINTLIBRARY*/ P*************** P*** 728,734 **** P lg_cmp(p1, p2) P int *p1, *p2; P { P! return *p1 > *p2; P } P P list_group(lgroup, displines, flag, pngsize) P--- 728,734 ---- P lg_cmp(p1, p2) P int *p1, *p2; P { P! return *p1 - *p2; P } P P list_group(lgroup, displines, flag, pngsize) P*************** P*** 831,836 **** P--- 831,837 ---- P break; P } P (void) free(lg_array); P+ lg_array = NULL; P P } P P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.5... ' sed 's/^P//' >patch.5 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: patch #5 for 2.11 news src P PDescription: P This is patch #5 for news 2.11 source. It addresses the following P problems: P P The locking seems to work completely now. Various obscure P interactions have all been fixed. P Mail sent to moderators no longer contains the suggested news header. P If HIDDENNET is defined, you can now use your local hostname instead P of the HIDDENNET name in the sys file. P The senduuname control message has been removed. It wasn't used P anymore and many people felt it was a security hole. P ihave/sendme now works with multicasting. P expire -R will just rebuild the dbm history files without actually P expiring anything. P If LIBDIR/localdomain is present, it is used instead of MYDOMAIN. P "unbatch" has been moved into rnews to avoid execing a separate process. P Processing batches of news is much faster (but still not fast). This P is done by recognizing that the parent process IS rnews (since P the unbatcher was moved into it), so it only need fork and not exec. P PFix: P cd to the src directory and apply the following patch P PIndex: patchlevel.h PPrereq: 4 P*** .d/patchlevel.h Tue Feb 24 17:55:57 1987 P--- patchlevel.h Tue Mar 10 15:06:47 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 4 P P! #define NEWS_VERSION "B 2.11 2/22/87" P--- 1,3 ---- P! #define PATCHLEVEL 5 P P! #define NEWS_VERSION "B 2.11 3/10/87" P PIndex: inews.c PPrereq: 2.74 P*** .d/inews.c Tue Feb 24 17:55:56 1987 P--- inews.c Tue Mar 10 15:06:14 1987 P*************** P*** 17,27 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.74 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P P #ifdef BSD4_2 P # include <sys/dir.h> P # include <sys/file.h> P--- 17,31 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.76 3/10/87"; P #endif /* SCCSID */ P P #include "iparams.h" P P+ # ifdef LOCKF P+ # include <unistd.h> P+ # endif /* LOCKF */ P+ P #ifdef BSD4_2 P # include <sys/dir.h> P # include <sys/file.h> P*************** P*** 30,38 **** P # ifdef USG P # include <fcntl.h> P # endif /* USG */ P- # ifdef LOCKF P- # include <unistd.h> P- # endif /* LOCKF */ P #endif /* !BSD4_2 */ P /* local defines for inews */ P P--- 34,39 ---- P*************** P*** 86,91 **** P--- 87,93 ---- P }; P P FILE *mailhdr(); P+ extern char *mydomain(); P extern int errno; P P struct timeb Now; P*************** P*** 126,138 **** P if (!ptr) P ptr = *argv - 1; P actfp = xfopen(ACTIVE, "r+"); P- #ifdef BSD4_2 P- if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0 && errno == EWOULDBLOCK) P- #else /* !BSD4_2 */ P #ifdef LOCKF P if (lockf(fileno(actfp), F_TLOCK, 0) < 0 && P (errno == EAGAIN || errno == EACCES)) P #else /* !LOCKF */ P sprintf(bfr, "%s.lock", ACTIVE); P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P #endif /* V7 */ P--- 128,140 ---- P if (!ptr) P ptr = *argv - 1; P actfp = xfopen(ACTIVE, "r+"); P #ifdef LOCKF P if (lockf(fileno(actfp), F_TLOCK, 0) < 0 && P (errno == EAGAIN || errno == EACCES)) P #else /* !LOCKF */ P+ #ifdef BSD4_2 P+ if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0 && errno == EWOULDBLOCK) P+ #else /* !BSD4_2 */ P sprintf(bfr, "%s.lock", ACTIVE); P if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P #endif /* V7 */ P*************** P*** 148,162 **** P P #endif /* SPOOLNEWS */ P } P! #ifdef BSD4_2 P! flock(fileno(actfp), LOCK_UN); P! #else /* !BSD4_2 */ P #ifdef LOCKF P! lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P! UNLINK(bfr); P! #endif /* V7 */ P #endif /* !BSD4_2 */ P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P if (spool_news > 1) /* can't unspool while things are locked */ P xxit(0); P--- 150,170 ---- P P #endif /* SPOOLNEWS */ P } P! if (spool_news != 2) { P! /* only unlock if we locked */ P #ifdef LOCKF P! lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P! #ifdef BSD4_2 P! flock(fileno(actfp), LOCK_UN); P! #else /* !BSD4_2 */ P! UNLINK(bfr); P! #endif /* V7 */ P #endif /* !BSD4_2 */ P+ } else { /* expire is running */ P+ if (argc > 1 && !strcmp(*(argv+1), "-S")) P+ exit(42); /* inform rnews -U by exit status */ P+ } P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P if (spool_news > 1) /* can't unspool while things are locked */ P xxit(0); P*************** P*** 357,368 **** P } P if (!Mflag && !strpbrk(forgedname, "@ (<")) P (void) sprintf(header.from,"%s@%s%s", P! forgedname, FULLSYSNAME, MYDOMAIN); P else P (void) strncpy(header.from, forgedname, BUFLEN); P P (void) sprintf(header.sender, "%s@%s%s", P! username, FULLSYSNAME, MYDOMAIN); P } else { P gensender(&header, username); P } P--- 365,376 ---- P } P if (!Mflag && !strpbrk(forgedname, "@ (<")) P (void) sprintf(header.from,"%s@%s%s", P! forgedname, FULLSYSNAME, mydomain()); P else P (void) strncpy(header.from, forgedname, BUFLEN); P P (void) sprintf(header.sender, "%s@%s%s", P! username, FULLSYSNAME, mydomain()); P } else { P gensender(&header, username); P } P*************** P*** 407,413 **** P (void) signal(SIGQUIT, SIG_IGN); P header.ident[0] = '\0'; P if (hread(&header, infp, TRUE) == NULL) P! error("Inbound news is garbled"); P input(); P } P /* always check history */ P--- 415,421 ---- P (void) signal(SIGQUIT, SIG_IGN); P header.ident[0] = '\0'; P if (hread(&header, infp, TRUE) == NULL) P! xerror("%s: Inbound news is garbled", filename); P input(); P } P /* always check history */ P*************** P*** 470,475 **** P--- 478,484 ---- P if (!rwaccess(f)) { P mfd = mailhdr((struct hbuf *)NULL, exists(f) ? "Unwritable files!" : "Missing files!"); P if (mfd != NULL) { P+ putc('\n', mfd); P #ifdef HIDDENNET P fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, f); P #else /* !HIDDENNET */ P*************** P*** 498,503 **** P--- 507,513 ---- P if (eaccess(dir, 07) != 0) { P mfd = mailhdr((struct hbuf *)NULL, exists(dir) ? "Unwritable diretories!" : "Missing directories!"); P if (mfd != NULL) { P+ putc('\n', mfd); P #ifdef HIDDENNET P fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, dir); P #else /* !HIDDENNET */ P*************** P*** 566,574 **** P register FILE *sp; P register struct tm *tp; P time_t t; P! char buf[BUFLEN]; P extern struct tm *gmtime(); P P (void) time(&t); P tp = gmtime(&t); P /* This file name "has to" be unique (right?) */ P--- 576,596 ---- P register FILE *sp; P register struct tm *tp; P time_t t; P! char buf[BUFLEN], *mktemp(); P extern struct tm *gmtime(); P P+ sp = xfopen(mktemp(INFILE), "w"); P+ if (batchcmd != NULL) P+ fprintf(sp, "%s\n", batchcmd); P+ else P+ if (not_here[0] != '\0') P+ fprintf(sp, "#! inews -x %s -p\n", not_here); P+ if (dolhwrite) P+ lhwrite(&header, sp); P+ while ((c = getc(infp)) != EOF) P+ putc(c, sp); P+ fclose(sp); P+ P (void) time(&t); P tp = gmtime(&t); P /* This file name "has to" be unique (right?) */ P*************** P*** 585,592 **** P SPOOL, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! sp = fopen(buf, "w"); P! if (sp == NULL) { P char dbuf[BUFLEN]; P #ifdef VMS P sprintf(dbuf, "%s/+rnews", SPOOL); P--- 607,613 ---- P SPOOL, P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! if (LINK(INFILE, buf) < 0) { P char dbuf[BUFLEN]; P #ifdef VMS P sprintf(dbuf, "%s/+rnews", SPOOL); P*************** P*** 595,612 **** P #endif /* !VMS */ P if (mkdir(dbuf, 0777&~N_UMASK) < 0) P xerror("Cannot mkdir %s: %s", dbuf, errmsg(errno)); P! sp = xfopen(buf, "w"); P } P! if (batchcmd != NULL) P! fprintf(sp, "%s\n", batchcmd); P! else P! if (not_here[0] != '\0') P! fprintf(sp, "#! inews -x %s -p\n", not_here); P! if (dolhwrite) P! lhwrite(&header, sp); P! while ((c = getc(infp)) != EOF) P! putc(c, sp); P! fclose(sp); P xxit(0); P /* NOTREACHED */ P } P--- 616,626 ---- P #endif /* !VMS */ P if (mkdir(dbuf, 0777&~N_UMASK) < 0) P xerror("Cannot mkdir %s: %s", dbuf, errmsg(errno)); P! if (LINK(INFILE, buf) < 0) P! xerror("Cannot link(%s,%s): %s", INFILE, buf, P! errmsg(errno)); P } P! (void) UNLINK(INFILE); P xxit(0); P /* NOTREACHED */ P } P*************** P*** 638,644 **** P P if (header.approved[0] == '\0') P (void) sprintf(header.approved, "%s@%s%s", P! username, FULLSYSNAME, MYDOMAIN); P (void) sprintf(bfr, "%s/inews -n %s.ctl -c newgroup %s -d %s -a \"%s\"", P LIB, header.nbuf, header.ctlmsg, header.distribution, P header.approved); P--- 652,658 ---- P P if (header.approved[0] == '\0') P (void) sprintf(header.approved, "%s@%s%s", P! username, FULLSYSNAME, mydomain()); P (void) sprintf(bfr, "%s/inews -n %s.ctl -c newgroup %s -d %s -a \"%s\"", P LIB, header.nbuf, header.ctlmsg, header.distribution, P header.approved); P*************** P*** 839,847 **** P if (is_mod[0] != '\0' /* one of the groups is moderated */ P && header.approved[0] == '\0') { /* and unapproved */ P struct hbuf mhdr; P! FILE *mfd; P register char *p; P! char modadd[BUFLEN]; P #ifdef DONTFOWARD P if(mode == PROC) { P logerr("Unapproved article in moderated group %s", P--- 853,861 ---- P if (is_mod[0] != '\0' /* one of the groups is moderated */ P && header.approved[0] == '\0') { /* and unapproved */ P struct hbuf mhdr; P! FILE *mfd, *mhopen(); P register char *p; P! char modadd[BUFLEN], *replyname(); P #ifdef DONTFOWARD P if(mode == PROC) { P logerr("Unapproved article in moderated group %s", P*************** P*** 871,882 **** P while (*++p) P if (*p == '.') P *p = '-'; P- sprintf(bfr, "Submission for %s", is_mod); P sprintf(mhdr.path, modadd, is_mod); P! mfd = mailhdr(&mhdr, bfr); P if (mfd == NULL) P xerror("Can't send mail to %s", mhdr.path); P lhwrite(&header, mfd); P while ((c = getc(infp)) != EOF) P putc(c, mfd); P mclose(mfd); P--- 885,897 ---- P while (*++p) P if (*p == '.') P *p = '-'; P sprintf(mhdr.path, modadd, is_mod); P! mfd = mhopen(&mhdr); P if (mfd == NULL) P xerror("Can't send mail to %s", mhdr.path); P+ fprintf(mfd, "To: %s\n", replyname(mhdr.path)); P lhwrite(&header, mfd); P+ putc('\n', mfd); P while ((c = getc(infp)) != EOF) P putc(c, mfd); P mclose(mfd); P*************** P*** 891,901 **** P } P P if (is_ctl) { P! exitcode = control(&header); P if (localize("control") && exitcode != 0) P savehist(histline); P } else { P if (s_find(&srec, FULLSYSNAME) == FALSE) { P logerr("Cannot find my name '%s' in %s", FULLSYSNAME, SUBFILE); P srec = dummy_srec; P } P--- 906,920 ---- P } P P if (is_ctl) { P! exitcode = control(&header, mode == PROC); P if (localize("control") && exitcode != 0) P savehist(histline); P } else { P+ #ifdef HIDDENNET P+ if (s_find(&srec, LOCALSYSNAME) == FALSE) { P+ #else /* !HIDDENNET */ P if (s_find(&srec, FULLSYSNAME) == FALSE) { P+ #endif /* !HIDDENNET */ P logerr("Cannot find my name '%s' in %s", FULLSYSNAME, SUBFILE); P srec = dummy_srec; P } P*************** P*** 1193,1212 **** P register struct direct *dir; P register int foundsome; P int pid, status, ret; P #ifdef VMS P! sprintf(bfr, "%s/+rnews", SPOOL); P #else /* !VMS */ P! sprintf(bfr, "%s/.rnews", SPOOL); P #endif /* !VMS */ P P! if (chdir(bfr) < 0) P! xerror("chdir(%s):%s", bfr, errmsg(errno)); P P do { P foundsome = 0; P- dirp = opendir("."); P- if (dirp == NULL) /* Boy are things screwed up */ P- xerror("opendir can't open .:%s", errmsg(errno)); P P while ((dir=readdir(dirp)) != NULL) { P if (dir->d_name[0] == '.') P--- 1212,1253 ---- P register struct direct *dir; P register int foundsome; P int pid, status, ret; P+ char spbuf[BUFLEN]; P #ifdef VMS P! sprintf(spbuf, "%s/+rnews", SPOOL); P #else /* !VMS */ P! sprintf(spbuf, "%s/.rnews", SPOOL); P #endif /* !VMS */ P P! if (chdir(spbuf) < 0) P! xerror("chdir(%s):%s", spbuf, errmsg(errno)); P P+ dirp = opendir("."); P+ if (dirp == NULL) /* Boy are things screwed up */ P+ xerror("opendir can't open .:%s", errmsg(errno)); P+ #ifdef LOCKF P+ if (lockf(dirp->dd_fd, F_TLOCK, 0) < 0 && P+ (errno == EAGAIN || errno == EACCES)) { P+ #else /* !LOCKF */ P+ #ifdef BSD4_2 P+ if (flock(dirp->dd_fd, LOCK_EX|LOCK_NB) < 0 && P+ errno == EWOULDBLOCK) { P+ #else /* V7 */ P+ strcat(spbuf, ".lock"); P+ sprintf(bfr, "%s.tmp", spbuf); P+ (void) close(creat(bfr, 0666)); P+ if (LINK(bfr, spbuf) < 0) { P+ (void) UNLINK(bfr); P+ if (errno != EEXIST) P+ xerror("Can't lock %s: %s", spbuf, errmsg(errno)); P+ else P+ #endif /* V7 */ P+ #endif /* !LOCKF */ P+ xxit(3); /* another rnews -U is running */ P+ } P+ P do { P foundsome = 0; P P while ((dir=readdir(dirp)) != NULL) { P if (dir->d_name[0] == '.') P*************** P*** 1222,1227 **** P--- 1263,1273 ---- P while ((ret=wait(&status)) != pid && ret != -1) P /* continue */; P P+ if (((status>>8)&0177) == 42) { P+ /* expire has started up, shutdown rnews -U */ P+ break; P+ } P+ P if (status != 0) { P sprintf(bfr, "../%s", dir->d_name); P (void) LINK(dir->d_name, bfr); P*************** P*** 1231,1238 **** P (void) unlink(dir->d_name); P foundsome++; P } P! closedir(dirp); P } while (foundsome); /* keep rereading the directory until it's empty */ P P xxit(0); P } P--- 1277,1286 ---- P (void) unlink(dir->d_name); P foundsome++; P } P! rewinddir(dirp); P } while (foundsome); /* keep rereading the directory until it's empty */ P+ closedir(dirp); P+ (void) UNLINK(spbuf); P P xxit(0); P } P PIndex: control.c PPrereq: 2.51 P*** .d/control.c Tue Feb 24 17:55:44 1987 P--- control.c Mon Mar 9 22:59:58 1987 P*************** P*** 19,25 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.51 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 19,25 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.52 3/9/87"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 55,66 **** P * to listed address. P */ P P! control(h) P struct hbuf *h; P { P register char *ctlmsgtext; P register struct msgtype *mp; P P if (strncmp(h->title, "cmsg ", 5) == 0) { P register char *cp1, *cp2; P cp1 = h->title; P--- 55,70 ---- P * to listed address. P */ P P! static int is_proc; P! P! control(h, isproc) P struct hbuf *h; P+ int isproc; P { P register char *ctlmsgtext; P register struct msgtype *mp; P P+ is_proc = isproc; P if (strncmp(h->title, "cmsg ", 5) == 0) { P register char *cp1, *cp2; P cp1 = h->title; P*************** P*** 161,166 **** P--- 165,171 ---- P register int i; P char list[sizeof header.title]; P extern char * findhist(); P+ extern char * mydomain(); P P if (argc < 2) P error("ihave: Too few arguments."); P*************** P*** 210,216 **** P (void) sprintf(header.title, "sendme%s %s", list, FULLSYSNAME); P (void) strcpy(header.ctlmsg, header.title); P getident(&header); P! (void) sprintf(header.from, "%s@%s%s", "usenet", FULLSYSNAME, MYDOMAIN); P (void) strcpy(header.path, NEWSUSR); P header.subdate[0] = header.expdate[0] = '\0'; P dates(&header); P--- 215,221 ---- P (void) sprintf(header.title, "sendme%s %s", list, FULLSYSNAME); P (void) strcpy(header.ctlmsg, header.title); P getident(&header); P! (void) sprintf(header.from, "%s@%s%s", "usenet", FULLSYSNAME, mydomain()); P (void) strcpy(header.path, NEWSUSR); P header.subdate[0] = header.expdate[0] = '\0'; P dates(&header); P*************** P*** 238,243 **** P--- 243,252 ---- P * The other system wants me to send out article <artid>. P * Give it to them with no fuss. P */ P+ #ifdef MULTICAST P+ static int c_mc; P+ static char ** c_sysnames; P+ #endif /* MULTICAST */ P c_sendme(argc, argv) P register char **argv; P { P*************** P*** 249,254 **** P--- 258,275 ---- P return 0; P if (s_find(&srec, argv[argc - 1]) != TRUE) P error("sendme: Can't find sys record for %s", argv[argc - 1]); P+ #ifdef MULTICAST P+ c_mc = index(srec.s_flags, 'M') != 0; P+ if (c_mc) { P+ struct srec trec; P+ P+ c_sysnames = &argv[argc - 1]; P+ if (s_find(&trec, srec.s_xmit) != TRUE) P+ error("sendme: Can't find sys record for %s for %s", P+ srec.s_xmit, argv[argc - 1]); P+ srec = trec; P+ } else c_sysnames = NULL; P+ #endif /* MULTICAST */ P /* Send the articles. */ P if (argc == 2) { P register FILE * fp; P*************** P*** 284,290 **** P--- 305,315 ---- P cp = findfname(id); P if (cp == NULL) { P logerr("System %s wants unavailable article %s.", P+ #ifdef MULTICAST P+ (c_mc ? c_sysnames[0] : sp->s_name), id); P+ #else /* !MULTICAST */ P sp->s_name, id); P+ #endif /* !MULTICAST */ P return; P } P cp = dirname(cp); P*************** P*** 295,301 **** P } P (void) strcpy(savedbufname, firstbufname); P (void) strcpy(firstbufname, cp); P! transmit(sp, fp, FALSE, (char **) NULL, FALSE); P /* transmit closes fp */ P (void) strcpy(firstbufname, savedbufname); P } P--- 320,330 ---- P } P (void) strcpy(savedbufname, firstbufname); P (void) strcpy(firstbufname, cp); P! #ifdef MULTICAST P! transmit(sp, fp, FALSE, c_sysnames, c_mc); P! #else /* !MULTICAST */ P! transmit(sp, fp, FALSE, (char **) NULL, 0); P! #endif /* !MULTICAST */ P /* transmit closes fp */ P (void) strcpy(firstbufname, savedbufname); P } P*************** P*** 389,396 **** P fprintf(fd, P "%s\nhas requested that %s be changed from %smoderated to %smoderated\n", P header.path, argv[1], P! *p=='y' ? "un" : "", P! *p=='y' ? "" : "un"); P #ifdef ORGDISTRIB P fprintf(fd, P "You can accomplish this by re-creating the newsgroup with a distribution\n"); P--- 418,425 ---- P fprintf(fd, P "%s\nhas requested that %s be changed from %smoderated to %smoderated\n", P header.path, argv[1], P! *p=='y' ? "" : "un", P! *p=='y' ? "un" : ""); P #ifdef ORGDISTRIB P fprintf(fd, P "You can accomplish this by re-creating the newsgroup with a distribution\n"); P*************** P*** 595,601 **** P argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour, P tm->tm_min); P savehist(bfr); P! return 1; P } P P q = index(line, '\t'); P--- 624,630 ---- P argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour, P tm->tm_min); P savehist(bfr); P! return is_proc ? 0 : 1; P } P P q = index(line, '\t'); P*************** P*** 603,614 **** P if (p == NULL || *++p == '\0' || *p == '\n') { P *q = '\0'; P log("Expired article %s", line); P! return 1; P } P if (strcmp(p, "cancelled") == 0) { P *q = '\0'; P log("Already Cancelled %s", line); P! return 1; P } else P log("Cancelling %s", line); P if ((uid == ROOTID||uid == 0) && strcmp(header.distribution, "local") == 0) P--- 632,643 ---- P if (p == NULL || *++p == '\0' || *p == '\n') { P *q = '\0'; P log("Expired article %s", line); P! return is_proc ? 0 : 1; P } P if (strcmp(p, "cancelled") == 0) { P *q = '\0'; P log("Already Cancelled %s", line); P! return is_proc ? 0 : 1; P } else P log("Cancelling %s", line); P if ((uid == ROOTID||uid == 0) && strcmp(header.distribution, "local") == 0) P*************** P*** 696,750 **** P } P P /* P- * senduuname (no arguments) P- * P- * Run the "uuname" command and send it back to the person who submitted P- * the article. The purpose of this control message is for attempting to P- * make a uucp net map. P- * P- * POLICY: If you view this information as not public (because you have P- * a connection you consider secret, or know a site that considers itself P- * secret) you can feel free to change this code in whatever way is P- * appropriate, so long as it sends some response back to the sender. If P- * you don't run uucp, this code does not make sense, and so an error P- * message (or garbage, such as "research") will be mailed back. P- * P- * If you wish to add or remove sites from the output of uuname, you P- * may wish to use the euuname.sh shell script here. P- */ P- /* ARGSUSED */ P- c_senduuname(argc, argv) P- char **argv; P- { P- char buf[256]; P- FILE *fd, *u; P- int c; P- P- #ifdef NOTIFY P- fd = mailhdr((struct hbuf *)NULL, "uuname control message"); P- fprintf(fd, "%s requested your uuname output\n", header.path); P- (void) mclose(fd); P- #endif /* NOTIFY */ P- fd = mailhdr(&header, "response to your senduuname request"); P- #ifdef UUPROG P- if (UUPROG[0] == '/') P- (void) strcpy(buf, UUPROG); P- else P- (void) sprintf(buf, "%s/%s", LIB, UUPROG); P- #else P- (void) strcpy(buf, "uuname"); P- #endif P- u = popen(buf, "r"); P- if (fd != NULL && u != NULL) { P- while ((c=getc(u)) != EOF) P- putc(c, fd); P- (void) pclose(u); P- (void) mclose(fd); P- } P- return 0; P- } P- P- /* P * Send the version number to the right person. P */ P /* ARGSUSED */ P--- 725,730 ---- P*************** P*** 923,928 **** P--- 903,909 ---- P FILE *fp; P time_t now; P char *to = "usenet"; P+ extern char *mydomain(); P P #ifdef NOTIFY P if (TELLME && *TELLME) P*************** P*** 936,942 **** P fprintf(fp, "Date: %s\n", arpadate(&now)); P #ifdef MMDF P fprintf(fp, "From: The News System <usenet@%s%s>\n", P! FULLSYSNAME, MYDOMAIN); P #endif /* MMDF */ P fprintf(fp, "To: %s\n", to); P fprintf(fp, "Subject: %s\n", subject); P--- 917,923 ---- P fprintf(fp, "Date: %s\n", arpadate(&now)); P #ifdef MMDF P fprintf(fp, "From: The News System <usenet@%s%s>\n", P! FULLSYSNAME, mydomain()); P #endif /* MMDF */ P fprintf(fp, "To: %s\n", to); P fprintf(fp, "Subject: %s\n", subject); P*************** P*** 943,953 **** P #ifdef HIDDENNET P if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P fprintf(fp, "Responding-System: %s.%s%s\n\n", P! LOCALSYSNAME, FULLSYSNAME, MYDOMAIN); P else P #endif /* !HIDDENNET */ P fprintf(fp, "Responding-System: %s%s\n\n", P! FULLSYSNAME, MYDOMAIN); P } P return fp; P } P--- 924,934 ---- P #ifdef HIDDENNET P if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P fprintf(fp, "Responding-System: %s.%s%s\n\n", P! LOCALSYSNAME, FULLSYSNAME, mydomain()); P else P #endif /* !HIDDENNET */ P fprintf(fp, "Responding-System: %s%s\n\n", P! FULLSYSNAME, mydomain()); P } P return fp; P } P*************** P*** 1009,1016 **** P } else if (strcmp(msg, "rmgroup") == 0) { P suser(); P } else if (strcmp(msg, "sendsys") == 0) { P- suser(); P- } else if (strcmp(msg, "senduuname") == 0) { P suser(); P } else if (strcmp(msg, "checkgroups") == 0) { P suser(); P--- 990,995 ---- P PIndex: expire.c PPrereq: 2.50 P*** .d/expire.c Tue Feb 24 17:55:47 1987 P--- expire.c Mon Mar 9 22:59:59 1987 P*************** P*** 17,23 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.50 2/22/87"; P #endif /* SCCSID */ P P #include "params.h" P--- 17,23 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.51 3/9/87"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 230,235 **** P--- 230,244 ---- P dorebuild++; P nohistory++; P break; P+ case 'R': /* just rebuild the dbm files */ P+ #ifdef DBM P+ rebuilddbm(); P+ xxit(0); P+ #else /* !DBM */ P+ fprintf(stderr, "You have not compiled expire with DBM, so -R is meaningless\n"); P+ xxit(1); P+ #endif /* !DBM */ P+ P case 'p': /* use posting date to expire */ P usepost++; P break; P*************** P*** 1171,1177 **** P (void) mkdir(fn, 0755); P (void) sprintf(fn, "%s.d", ARTFILE); P if (verbose) P! printf("Rebuilding history subfile directory %d.\n", fn); P if (access(fn,0) != 0) P (void) mkdir(fn, 0755); P for (i = 0; i < 10; i++) { P--- 1180,1186 ---- P (void) mkdir(fn, 0755); P (void) sprintf(fn, "%s.d", ARTFILE); P if (verbose) P! printf("Rebuilding history subfile directory %s.\n", fn); P if (access(fn,0) != 0) P (void) mkdir(fn, 0755); P for (i = 0; i < 10; i++) { P PIndex: header.c PPrereq: 2.46 P*** .d/header.c Wed Dec 17 18:23:40 1986 P--- header.c Mon Mar 9 22:59:59 1987 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.46 12/17/86"; P #endif /* SCCSID */ P P #include <stdio.h> P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.47 3/9/87"; P #endif /* SCCSID */ P P #include <stdio.h> P*************** P*** 284,289 **** P--- 284,290 ---- P char *at, *dot; P char pathbuf[PATHLEN]; P char fullname[BUFLEN]; P+ extern char *mydomain(); P P tp = tailpath(hp); P user = rindex(tp, '!'); P*************** P*** 314,320 **** P tp = index(host, '@'); P if (tp != NULL) P *tp = 0; P! (void) sprintf(hp->from, "%s@%s%s", user, host, MYDOMAIN); P P skin(pathbuf, fullname, hp->path); /* remove RFC822-style comments */ P if (fullname[0] != '\0') { P--- 315,321 ---- P tp = index(host, '@'); P if (tp != NULL) P *tp = 0; P! (void) sprintf(hp->from, "%s@%s%s", user, host, mydomain()); P P skin(pathbuf, fullname, hp->path); /* remove RFC822-style comments */ P if (fullname[0] != '\0') { P PIndex: pathinit.c PPrereq: 1.19 P*** .d/pathinit.c Wed Dec 17 18:23:22 1986 P--- pathinit.c Mon Mar 9 23:00:02 1987 P*************** P*** 34,40 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.19 12/16/86"; P #endif /* SCCSID */ P P #if defined(INEW) || defined(EXP) P--- 34,40 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.20 3/9/87"; P #endif /* SCCSID */ P P #if defined(INEW) || defined(EXP) P*************** P*** 57,63 **** P char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; P P int c_cancel(), c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), P! c_sendsys(), c_senduuname(), c_version(), c_checkgroups(), c_unimp(); P P struct msgtype msgtype[] = { P "cancel", NULL, c_cancel, P--- 57,63 ---- P char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; P P int c_cancel(), c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), P! c_sendsys(), c_version(), c_checkgroups(), c_unimp(); P P struct msgtype msgtype[] = { P "cancel", NULL, c_cancel, P*************** P*** 67,73 **** P "sendbad", NULL, c_sendme, P "rmgroup", NULL, c_rmgroup, P "sendsys", NULL, c_sendsys, P- "senduuname", NULL, c_senduuname, P "version", NULL, c_version, P "checkgroups", NULL, c_checkgroups, P "delsub", NULL, c_unimp, P--- 67,72 ---- P PIndex: uname.c PPrereq: 2.13 P*** .d/uname.c Wed Dec 17 18:23:29 1986 P--- uname.c Mon Mar 9 23:00:02 1987 P*************** P*** 21,27 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.13 12/16/86"; P #endif /* SCCSID */ P P #include "params.h" P--- 21,27 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.14 3/9/87"; P #endif /* SCCSID */ P P #include "params.h" P*************** P*** 35,42 **** P struct utsname *uptr; P { P char *cp; P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! cp = MYDOMAIN; /* Gould compiler can't handle ""[0] */ P if (*cp == '\0') /* get domain name from hostname */ P return; P cp = index(uptr->nodename, '.'); P--- 35,43 ---- P struct utsname *uptr; P { P char *cp; P+ extern char *mydomain(); P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! cp = mydomain(); P if (*cp == '\0') /* get domain name from hostname */ P return; P cp = index(uptr->nodename, '.'); P*************** P*** 96,98 **** P--- 97,157 ---- P } P } P #endif P+ P+ P+ /* P+ * At sites where the are many mail domains within the support area of a single P+ * news administrator, it is much nicer to be able to read the local domain of P+ * a machine from a file. What we do here is: P+ * 1) Check for the presence of a LIBDIR/localdomain file. If it doesn't P+ * exist,assume that MYDOMAIN should be used instead. P+ * 2) If it does exist, we make the following assumptions: P+ * a) If it is empty, has only comments, or only blank lines; we assume P+ * the domain is desired to be a zero length string ( ie ""). (this P+ * implies that the domain name is contained in the hostname.) P+ * b) If it is not empty, we assume the first line not beginning with a P+ * '#', blank/tab, or newline is the desired domain name. P+ * A like '.UUCP' or '.TEK.COM' should be used. We could insure that P+ * the line begin with a '.' to be a valid domain name, but I don't P+ * think it is necessary to put that restriction on it. P+ */ P+ char * P+ mydomain() P+ { P+ static char *md = NULL; P+ register char *cp; P+ FILE *fp = NULL; P+ char fbuf[BUFLEN]; P+ extern char *malloc(), *strcpy(), *index(); P+ P+ if(md) /* we've been here before, so just return what we found */ P+ return(md); P+ P+ (void) sprintf(fbuf,"%s/localdomain", LIBDIR); P+ if ( (fp = fopen(fbuf,"r")) == NULL) { P+ md = MYDOMAIN; /* No localdomain file, use MYDOMAIN instead */ P+ } else { P+ while(fgets(fbuf, sizeof(fbuf), fp) ) { P+ if( *fbuf == '\n' || *fbuf == '#' P+ || *fbuf == ' ' || *fbuf == '\t') P+ continue; P+ P+ if( cp = index(fbuf, '\n') ) P+ *cp = '\0'; P+ P+ if ( (md = malloc(strlen(fbuf) + 1)) == NULL) P+ md = MYDOMAIN; /* punt here */ P+ else P+ (void)strcpy(md, fbuf); P+ break; P+ } P+ } P+ P+ if(fp) P+ (void)fclose(fp); P+ P+ if( md == NULL) P+ md = ""; P+ P+ return(md); P+ } P PIndex: ndir.c PPrereq: 1.9 P*** .d/ndir.c Wed Dec 17 18:23:21 1986 P--- ndir.c Mon Mar 9 23:00:01 1987 P*************** P*** 1,10 **** P #include "defs.h" P! #if !defined(BSD4_2) && !defined(BSD4_1C) P #include <sys/param.h> P #include "ndir.h" P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.9 12/16/86"; P #endif /* SCCSID */ P P /* P--- 1,10 ---- P #include "defs.h" P! #if !defined(BSD4_2) && !defined(BSD4_1C) && !defined(HP9K5) P #include <sys/param.h> P #include "ndir.h" P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.10 3/9/87"; P #endif /* SCCSID */ P P /* P*************** P*** 48,67 **** P #else /* V7 file system */ P #define ODIRSIZ 14 P P- #if HP9K5 P- /* HP 9000/500 has a weird directory format */ P- struct olddirect { P- char od_name[DIRSIZ+2]; /* filename */ P- short od_object_type; P- short od_file_code; P- short od_ino; /* inode */ P- }; P- #else /* normal V7 */ P struct olddirect { P short od_ino; P char od_name[ODIRSIZ]; P }; P- #endif /* V7 */ P #endif /* !pyr */ P P /* P--- 48,57 ---- P*************** P*** 110,113 **** P dirp->dd_loc = 0; P free((char *)dirp); P } P! #endif /* !BSD4_2 && !BSD4_1C */ P--- 100,140 ---- P dirp->dd_loc = 0; P free((char *)dirp); P } P! P! /* P! * seek to an entry in a directory. P! * Only values returned by "telldir" should be passed to seekdir. P! */ P! void P! seekdir(dirp, loc) P! register DIR *dirp; P! long loc; P! { P! long curloc, base, offset; P! struct direct *dp; P! extern long lseek(); P! P! curloc = telldir(dirp); P! if (loc == curloc) P! return; P! base = loc & ~(DIRBLKSIZ - 1); P! offset = loc & (DIRBLKSIZ - 1); P! (void) lseek(dirp->dd_fd, base, 0); P! dirp->dd_loc = 0; P! while (dirp->dd_loc < offset) { P! dp = readdir(dirp); P! if (dp == NULL) P! return; P! } P! } P! P! /* P! * return a pointer into a directory P! */ P! long P! telldir(dirp) P! DIR *dirp; P! { P! return lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc; P! } P! #endif /* !BSD4_2 && !BSD4_1C && !HP9K5 */ P PIndex: ndir.h PPrereq: 1.4 P*** .d/ndir.h Thu Oct 30 16:12:09 1986 P--- ndir.h Mon Mar 9 23:00:01 1987 P*************** P*** 1,4 **** P! /* @(#)ndir.h 1.4 4/16/85 */ P #ifndef DEV_BSIZE P #define DEV_BSIZE 512 P #endif P--- 1,8 ---- P! /* @(#)ndir.h 1.6 3/9/87 */ P! #if defined(HP9K5) P! /* He should have included it instead of this, but prevent confusion */ P! #include <sys/ndir.h> P! #else /* other */ P #ifndef DEV_BSIZE P #define DEV_BSIZE 512 P #endif P*************** P*** 40,42 **** P--- 44,49 ---- P extern DIR *opendir(); P extern struct direct *readdir(); P extern void closedir(); P+ P+ #define rewinddir(dirp) seekdir((dirp), (long)0) P+ #endif /* other */ P PIndex: ifuncs.c PPrereq: 2.60 P*** .d/ifuncs.c Tue Feb 24 17:55:52 1987 P--- ifuncs.c Mon Mar 9 23:00:00 1987 P*************** P*** 16,22 **** P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.60 2/22/87"; P #endif /* SCCSID */ P P #include "iparams.h" P--- 16,22 ---- P */ P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.61 3/9/87"; P #endif /* SCCSID */ P P #include "iparams.h" P*************** P*** 712,719 **** P extern int errno; P #ifdef VMS P int fd; P! P! (void) sprintf(lockname, "/tmp/%s.l.1", str); P while ((fd = creat(lockname, 0444)) < 0) { P #else /* !VMS */ P (void) strcpy(tempname, "/tmp/LTMP.XXXXXX"); P--- 712,723 ---- P extern int errno; P #ifdef VMS P int fd; P! /* The name here is because of the peculiar properties of version numbers P! * in Eunice. We eliminate any troublesome characters also. P! */ P! (void) sprintf(lockname, "/tmp/%.10s.l.1", str); P! for (cp = lockname; *cp; cp++) P! if (*cp == '/' || *cp == '[' || *cp == ']') *cp = '.'; P while ((fd = creat(lockname, 0444)) < 0) { P #else /* !VMS */ P (void) strcpy(tempname, "/tmp/LTMP.XXXXXX"); P*************** P*** 768,773 **** P--- 772,778 ---- P { P long seqn; P register FILE *fp; P+ extern char *mydomain(); P P lock(); P fp = xfopen(SEQFILE, "r"); P*************** P*** 784,793 **** P #ifdef HIDDENNET P if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P (void) sprintf(hp->ident, "<%ld@%s.%s%s>", seqn, LOCALSYSNAME, FULLSYSNAME, P! MYDOMAIN); P else P #endif /* !HIDDENNET */ P! (void) sprintf(hp->ident, "<%ld@%s%s>", seqn, FULLSYSNAME, MYDOMAIN); P } P P /* P--- 789,798 ---- P #ifdef HIDDENNET P if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P (void) sprintf(hp->ident, "<%ld@%s.%s%s>", seqn, LOCALSYSNAME, FULLSYSNAME, P! mydomain()); P else P #endif /* !HIDDENNET */ P! (void) sprintf(hp->ident, "<%ld@%s%s>", seqn, FULLSYSNAME, mydomain()); P } P P /* P*************** P*** 989,994 **** P--- 994,1000 ---- P char buf[BUFLEN]; P char *fullname(), *getenv(); P int fd, n; P+ extern char *mydomain(); P P if ((fn = getenv("NAME")) == NULL) { P (void) sprintf(buf, "%s/%s", userhome, ".name"); P*************** P*** 1007,1013 **** P fn = fullname(logname); P P (void) sprintf(hp->path, "%s", logname); P! (void) sprintf(hp->from, "%s@%s%s (%s)", logname, FULLSYSNAME, MYDOMAIN, fn); P } P P /* P--- 1013,1019 ---- P fn = fullname(logname); P P (void) sprintf(hp->path, "%s", logname); P! (void) sprintf(hp->from, "%s@%s%s (%s)", logname, FULLSYSNAME, mydomain(), fn); P } P P /* P*************** P*** 1032,1104 **** P P #ifdef BATCH P /* P! * If the stdin begins with "#", we assume we have been fed a batched P! * shell script which looks like this: P * #! rnews 1234 P * article with 1234 chars P * #! rnews 4321 P * article with 4321 chars P! * P! * In this case we just exec the unbatcher and let it unpack and call us back. P! * P! * Note that there is a potential security hole here. If the batcher is P! * /bin/sh, someone could ship you arbitrary stuff to run as shell commands. P! * The main protection you have is that the effective uid will be news, not P! * uucp and not the super user. (That, plus the fact that BATCH is set to P! * "unbatch" as the system is distributed.) If you want to run a batched link P! * and you are security conscious, do not use /bin/sh as the unbatcher. P! * the thing to do is to change BATCH in your localize.sh file from /bin/sh P! * to some restricted shell which can only run rnews. P */ P checkbatch() P { P int c; P P! c = getc(infp); P if (c != EOF) P (void) ungetc(c, infp); P clearerr(infp); P! if (c == '#') { P! char cmd[BUFLEN], unbatcher[BUFLEN], arg1[BUFLEN], arg2[BUFLEN]; P! register char *cp; P! int n; P P! reset_infp(); P /* P! * For efficiency, try and recognize the most common P! * forms of batching and exec them directly P */ P! n = read(0, cmd, BUFLEN-1); P! if (n <= 0) /* Can't happen */ P! xerror("can't read stdin to unbatch"); P! cmd[n] = '\0'; P! cp = index(cmd, '\n'); P! if (cp) P! *cp = '\0'; P! /* now put stdin at the "right" place for the exec */ P! (void) lseek(0,1L+(long)(cp - cmd), 0); P! if( strncmp(cmd, "#! cunbatch", 11) == 0) { P! (void) strcpy(unbatcher, "/bin/sh"); P! (void) strcpy(arg1, "-c"); P! (void) sprintf(arg2, "%s/compress -d | %s/%s", P! LIB, LIB, BATCH); P! } else if (strncmp(cmd, "#! c7unbatch", 12) == 0) { P! (void) strcpy(unbatcher, "/bin/sh"); P! (void) strcpy(arg1, "-c"); P! (void) sprintf(arg2, P! "%s/decode | %s/compress -d | %s/%s", P! LIB, LIB, LIB, BATCH); P! } else { P! (void) lseek(0, 0L, 0); P! (void) sprintf(unbatcher, "%s/%s", LIB, BATCH); P! arg1[0] = '\0'; P! arg2[0] = '\0'; P! } P! execl(unbatcher, "news-unpack", arg1, arg2, (char *)0); P! xerror("Unable to exec %s to unpack news.", unbatcher); P } P } P P /* P * We've already done a read on stdin, and we want to seek back to the P * beginning. We want the real file descriptor (beyond buffers) to P--- 1038,1330 ---- P P #ifdef BATCH P /* P! * If the stdin begins with "#" the input is some kind of batch. if P! * the first line is: P! * #!cunbatch P! * or P! * #!c7unbatch P! * then fork off a pipe to do the either a P! * "compress -d" P! * or a P! * "decode | compress -d" P! * and check their output for more batch headers. They probably P! * contain a batch format that looks like this: P * #! rnews 1234 P * article with 1234 chars P * #! rnews 4321 P * article with 4321 chars P! * If so, then for each article, copy the indicated number of chars into P! * a temp file, fork a copy of ourselves, make its input the temp file, P! * and allow the copy to process the article. This avoids an exec of P! * rnews for each article. P */ P+ P checkbatch() P { P int c; P P! while ((c = getc(infp)) == '#') { P! /* some kind of batch, investigate further */ P! int i; P! char cmd[BUFLEN]; P! cmd[0] = c; P! fgets(cmd + 1, BUFLEN, infp); P! if (strncmp(cmd, "#! cunbatch", 11) == 0) { P! reset_infp(); P! i = strlen(cmd); P! (void) lseek(0, (long) i, 0); /* position STDIN for P! * exec */ P! (void) sprintf(cmd, "%s/compress", LIB); P! input_pipe(cmd, "compress", "-d", (char *) 0); P! continue; /* look for the #! rnews */ P! } else if (strncmp(cmd, "#! c7unbatch", 12) == 0) { P! reset_infp(); P! i = strlen(cmd); P! (void) lseek(0, (long) i, 0); /* position STDIN for P! * exec */ P! (void) sprintf(cmd, "%s/decode | %s/compress -d", LIB, LIB); P! input_pipe("/bin/sh", "news-unpack", "-c", cmd); P! continue; /* look for the #! rnews */ P! } else if (strncmp(cmd, "#! rnews", 8) == 0) { P! /* instead of execing unbatch do it ourselves */ P! register int fd, rc, wc; P! int piped[2]; P! register long size, asize; P! char *filename; P! int pid, wpid, exstat; P! char *mktemp(); P! long atol(); P! #define CPBFSZ 8192 P! char buf[CPBFSZ]; P! P! filename = 0; P! do { P! while (strncmp(cmd, "#! rnews ", 9)) { P! fprintf(stderr, "out of sync, skipping %s\n", cmd); P! if (fgets(cmd, BUFLEN, infp) == NULL) P! exit(0); P! } P! asize = atol(cmd + 9); P! if (asize <= 0) P! xerror("checkbatch: bad batch count %ld", asize); P! fd = -1; P! size = asize; P! do { P! if (size > CPBFSZ) P! rc = CPBFSZ; P! else P! rc = size; P! rc = fread(buf, 1, rc, infp); P! if (rc <= 0) P! break; P! if (fd < 0) { P! if (rc == asize) P! break; /* fits in buffer */ P! if (!filename) P! filename = mktemp("/tmp/unbnewsXXXXXX"); P! if ((fd = creat(filename, 0666)) < 0) { P! fprintf(stderr, "rnews: creat of \"%s\" failed", P! filename); P! perror(" "); P! exit(1); P! } P! } P! wc = write(fd, buf, rc); /* write to temp file */ P! if (wc != rc) { P! fprintf(stderr, "write of %d to \"%s\" returned %d", P! rc, filename, wc); P! perror(" "); P! exit(1); P! } P! size -= rc; P! } while (size > 0); P! if (fd >= 0) P! (void) close(fd); P! P! /* P! * If we got a truncated batch, don't process P! * the last article; it will probably be P! * received again. P! */ P! if ((rc < asize) && (size > 0)) P! break; P! P! /* P! * This differs from the old unbatcher in P! * that we don't exec rnews, mainly because P! * we ARE rnews. Instead we fork off a copy P! * of ourselves for each article and allow it P! * to process. P! */ P! if (rc == asize) { P! /* P! * article fits in buffer, use a pipe P! * instead of a temporary file. P! */ P! if (pipe(piped) != 0) { P! perror("checkbatch: pipe() failed"); P! exit(1); P! } P! } P! while ((pid = fork()) == -1) { P! fprintf(stderr, "fork failed, waiting...\r\n"); P! sleep(60); P! } P! if (pid == 0) { P! if (rc == asize) { P! /* article fits in buffer P! * make the output of the P! * pipe for STDIN P! */ P! (void) fclose(infp); P! /* redundant but why not */ P! (void) close(0); P! if ((i = dup(piped[0])) != 0) P! xerror("dup() returned %d, should be 0", i); P! (void) close(piped[0]); P! (void) close(piped[1]); P! infp = fdopen(0, "r"); P! } else /* supstitute temp file as P! * input */ P! freopen(filename, "r", infp); P! return; /* from checkbatch as if P! * normal article */ P! } P! /* parent of fork */ P! if (rc == asize) { P! /* article fits in buffer */ P! wc = write(piped[1], buf, rc); P! if (wc != rc) { P! fprintf(stderr, "write of %d to pipe returned %d", P! rc, wc); P! perror("rnews: write"); P! exit(1); P! } P! (void) close(piped[0]); P! (void) close(piped[1]); P! } P! while ((wpid = wait(&exstat)) >= 0 && wpid != pid); P! } while (fgets(cmd, BUFLEN, infp) != NULL); P! (void) unlink(filename); P! exit(0);/* all done */ P! P! } else { P! reset_infp(); P! i = strlen(cmd); P! (void) lseek(0, (long)i, 0); P! docmd(cmd); P! xxit(0); P! } P! } /* while a batch */ P if (c != EOF) P (void) ungetc(c, infp); P clearerr(infp); P! } P P! /* P! * The input requires some processing so fork and exec the indicated command P! * with its output piped to our input. P! */ P! static P! input_pipe(cmd, arg0, arg1, arg2) P! char *cmd, *arg0, *arg1, *arg2; P! { P! int i, pid; P! int piped[2]; P! P! if (pipe(piped) != 0) { P! perror("checkbatch: pipe() failed"); P! exit(1); P! } P! fflush(stdout); P! while ((pid = fork()) == -1) { P! perror("checkbatch: fork failed, waiting"); P! sleep(60); P! } P! if (pid == 0) { /* child process */ P /* P! * setup a pipe such that the exec'ed process will read our P! * input file and write to the pipe P */ P! (void) close(1); P! if ((i = dup(piped[1])) != 1) P! xerror("dup() returned %d, should be 1", i); P! (void) close(piped[0]); P! (void) close(piped[1]); P! execl(cmd, arg0, arg1, arg2, (char *) 0); P! perror("checkbatch"); P! xerror("Unable to exec %s to unpack news.", cmd); P! } else { /* parent process */ P! /* make the output of the pipe for STDIN */ P! (void) fclose(infp); P! (void) close(0); P! if ((i = dup(piped[0])) != 0) P! xerror("dup() returned %d, should be 0", i); P! (void) close(piped[0]); P! (void) close(piped[1]); P! /* P! * there should be a way to clear any buffered input and just P! * replace file descriptor 0 but I can't find a portable way. P! */ P! infp = fdopen(0, "r"); P } P } P P+ #define MAXARGS 32 P+ P+ docmd(p) P+ register char *p; P+ { P+ char *args[MAXARGS]; P+ register char **ap = args; P+ char path[BUFSIZ]; P+ char *rindex(), *cp; P+ P+ while (*p && !isspace(*p)) /* skip leading #! crud */ P+ p++; P+ P+ while (isspace(*p)) P+ p++; P+ P+ while (*p != '\0') { P+ *ap++ = p; P+ if (ap >= &args[MAXARGS]) { P+ logerr("inews: unbatch: Too many args to %s", args[0]); P+ exit(2); P+ } P+ while (*p && !isspace(*p)) P+ p++; P+ if (*p) P+ *p++ = '\0'; P+ while (isspace(*p)) P+ p++; P+ } P+ *ap = (char *)0; P+ P+ if (ap == args) { P+ logerr("inews: unbatch: no command to execute"); P+ exit(2); P+ } P+ P+ /* strip off any leading pathname in case someone gets tricky */ P+ cp = rindex(args[0], '/'); P+ if (cp++ == NULL) P+ cp = args[0]; P+ P+ # ifdef HOME P+ sprintf(path, "%s/%s/%s", logdir(HOME), LIBDIR, cp); P+ # else /* !HOME */ P+ sprintf(path, "%s/%s", LIBDIR, cp); P+ # endif /* HOME */ P+ P+ /* P+ * "path" is absolute, no searching is needed, we use P+ * 'execvp' solely so that sh scripts will be handled P+ */ P+ (void) execvp(path, args); P+ perror(path); P+ xxit(2); P+ } P /* P * We've already done a read on stdin, and we want to seek back to the P * beginning. We want the real file descriptor (beyond buffers) to P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.6... ' sed 's/^P//' >patch.6 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: Patch #6 for news 2.11 source P PDescription: P This is patch #6 for news 2.11 source. It addresses the following P problems: P P Makefile.dst has had its dependencies corrected. P checkgroups now supports !newscategory to complain if those categories P are present. P newgroup control messages now use locking to keep from smashing the P active file. P Much greater control over the hostname used in the Path and From lines P is provided via the optional GENERICPATH and GENERICFROM defines. P (HIDDENNET automatically uses thse defines. More on how to use them P in a following article) P If you defined LOCKF, locking DID NOT WORK on most systems! (How come P nobody noticed this???). It works now. P Unknown newsgroups are no longer logged in errlog. P Problems with unbatching from pipes have been corrected. P locking to prevent multiple rnews -U processes running is provided. P postnews now supports an append option to append to a file instead P of overwriting it. P cancelling an article from vnews/readnews works better. P The vnews.help file has been updated. P Various minor portability cleanups. P PHow to use GENERICPATH/GENERICFROM: P The patches try to support maximum naming choice, providing P independently a local system name, USENET node name, and generic From: P address. As far as I can tell, they implement both the previous naming P system (with or without HIDDENNET) as well as Stephen Muir's naming P behaviour, which he recently have propagated for in news.software.b. P Essentially, what they do is to divide the dual purpose that HIDDENNET P presently is being used for (generic UUCP/USENET nodename and generic P From:-address), into GENERICPATH and GENERICFROM. The former being the P name of the local UUCP gateway and the latter being the preferred user P From:-address for mail replies etc. P P Or more specifically, P P If GENERICPATH is defined, it is used as the site's PATHSYSNAME. If P not, PATHSYSNAME is set to the site's local hostname (as returned by P GETHOSTNAME or equiv). P P If GENERICFROM is defined, it is used as the site's FROMSYSNAME. If P not, FROMSYSNAME is set to the site's local hostname concat- enated P with the value of mydomain(). P P Both GENERICPATH and GENERICFROM are being sprintf'ed through, thus P being subject to %s interpretation. The first %s will be substituted P for the node's hostname (ubuf.nodename), the second for the value of P mydomain(). (Use a %0.0s pattern to ignore the hostname.) P P The GENERIC macros are essentially only used in pathinit, where they P form LOCALSYSNAME, FROMSYSNAME and PATHSYSNAME. These replace the P former LOCALSYSNAME and FULLSYSNAME and the use of mydomain() in the P rest of the code. Note that LOCALSYSNAME now has the site's complete P name (with domain) and that the ifdef's for HIDDENNET are no more P necessary and thus have been removed. P P An example: We currently have all our machines in the "ida.liu.se" P domain, but plan to put all the university's hosts within the same P "liu.se" domain. We will still use "ida.liu.se" as a generic P From:-address, though, as the same time as we hold on to our "liuida" P UUCP/USENET node name. In the old naming system, this was not possible P to implement. With the proposed patches, this will be done by defining P GENERICPATH to "liuida", GENERICFROM to "ida.liu.se" and MYDOMAIN to P ".liu.se". The articles produced will then have header lines like: P P From: lenlo@ida.liu.se (Lennart Lovstrand) Path: liuida!lenlo P Message-ID: <123456@prefix.liu.se> P ... P P If one rather would like to emulate the old behaviour of HIDDENNET, one P would define GENERICPATH to "liuida", GENERICFROM to "liuida.UUCP" and P MYDOMAIN to ".UUCP". As before, if neither GENERIC macro is defined, P the site's hostname will be used in both cases. P P To make the transition easier, the code will still use the value of P HIDDENNET if the GENERIC macros have not been defined. P P PFix: P cd to the src directory and apply the following patch P PIndex: patchlevel.h PPrereq: 5 P*** .d/patchlevel.h Tue Mar 10 16:13:26 1987 P--- patchlevel.h Tue Mar 24 10:59:32 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 5 P P! #define NEWS_VERSION "B 2.11 3/10/87" P--- 1,3 ---- P! #define PATCHLEVEL 6 P P! #define NEWS_VERSION "B 2.11 3/23/87" P PIndex: Makefile.dst PPrereq: 1.21 P*** .d/Makefile.dst Wed Dec 17 18:23:43 1986 P--- Makefile.dst Tue Mar 24 11:00:54 1987 P*************** P*** 1,3 **** P! # '@(#)Makefile.dst 1.21 12/16/86' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P--- 1,3 ---- P! # '@(#)Makefile.dst 1.23 3/23/87' P # Generic Makefile. P # This is converted to USG/v7/etc by localize.sh P*************** P*** 128,134 **** P--- 128,138 ---- P defs.h: defs.dist localize.sh Makefile.dst Makefile P sh localize.sh P+ @echo Localize has been run. Restart the make. P+ @exit 1 P P Makefile: localize.sh defs.dist Makefile.dst P sh localize.sh P+ @echo Localize has been run. Restart the make. P+ @exit 1 P P update: install.sh makeactive.sh P*************** P*** 171,175 **** P $(CC) $(CFLAGS) -c funcs2.c P P! getdate.o: getdate.y P @echo "expect 8 shift/reduce conflicts" P yacc getdate.y P--- 175,179 ---- P $(CC) $(CFLAGS) -c funcs2.c P P! getdate.o: getdate.y defs.h P @echo "expect 8 shift/reduce conflicts" P yacc getdate.y P*************** P*** 228,232 **** P $(CC) $(CFLAGS) -c uname.c P P! ndir.o: ndir.c ndir.h P $(CC) $(CFLAGS) -c ndir.c P P--- 232,236 ---- P $(CC) $(CFLAGS) -c uname.c P P! ndir.o: ndir.c ndir.h defs.h P $(CC) $(CFLAGS) -c ndir.c P P*************** P*** 239,247 **** P #VMS mv recnews.exe recnews P P! sendnews: sendnews.o uname.o P! $(CC) $(LFLAGS) sendnews.o uname.o -o sendnews P #VMS mv sendnews.exe sendnews P P! batch: batch.c Makefile P $(CC) $(CFLAGS) $(LFLAGS) batch.c -o batch P #VMS mv batch.exe batch P--- 243,251 ---- P #VMS mv recnews.exe recnews P P! sendnews: sendnews.o defs.h P! $(CC) $(LFLAGS) sendnews.o -o sendnews P #VMS mv sendnews.exe sendnews P P! batch: batch.c Makefile defs.h P $(CC) $(CFLAGS) $(LFLAGS) batch.c -o batch P #VMS mv batch.exe batch PIndex: checkgroups.sh PPrereq: 1.20 P*** .d/checkgroups.sh Wed Dec 17 18:22:58 1986 P--- checkgroups.sh Mon Mar 23 14:00:53 1987 P*************** P*** 1,4 **** P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.20 12/16/86' P P if test ! -s LIBDIR/newsgroups P--- 1,4 ---- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.22 3/20/87' P P if test ! -s LIBDIR/newsgroups P*************** P*** 28,32 **** P cat >> /tmp/$$msg P cp /dev/null /tmp/$$b P! cat /tmp/$$msg | sed -e "s;[ ].*;;" -e "s;\..*;;" | sort -u | P while read dist P do P--- 28,32 ---- P cat >> /tmp/$$msg P cp /dev/null /tmp/$$b P! sed -e "s;[ ].*;;" -e "s;\..*;;" -e "s;^!;;" /tmp/$$msg | sort -u | P while read dist P do P*************** P*** 38,42 **** P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P! cat /tmp/$$msg >> LIBDIR/newsgroups P rm -f /tmp/$$b /tmp/$$msg P ;; P--- 38,42 ---- P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P cat /tmp/$$a > LIBDIR/newsgroups P! sed -e "/^!/d" /tmp/$$msg >> LIBDIR/newsgroups P rm -f /tmp/$$b /tmp/$$msg P ;; PIndex: control.c PPrereq: 2.52 P*** .d/control.c Tue Mar 10 16:13:31 1987 P--- control.c Mon Mar 23 14:00:21 1987 P*************** P*** 20,24 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.52 3/9/87"; P #endif /* SCCSID */ P P--- 20,24 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.53 3/20/87"; P #endif /* SCCSID */ P P*************** P*** 25,29 **** P #include "iparams.h" P P! #define eq(msg) (strcmp(msg, cargv[0]) == 0) P P int cargc; P--- 25,29 ---- P #include "iparams.h" P P! #define eq(msg) (msg[0] == cargv[0][0] && strcmp(msg, cargv[0]) == 0) P P int cargc; P*************** P*** 33,36 **** P--- 33,37 ---- P FILE *popen(), *mhopen(), *mailhdr(); P P+ #define NCARGS 30 P char *senderof(); P #ifdef u370 P*************** P*** 120,124 **** P char *str; P { P! static char *cavpbuf[20]; P static char cavbuf[256]; P char *nextfree = cavbuf; P--- 121,125 ---- P char *str; P { P! static char *cavpbuf[NCARGS]; P static char cavbuf[256]; P char *nextfree = cavbuf; P*************** P*** 139,143 **** P *nextfree++ = 0; P cargv[cargc] = nextfree; P! cargc++; P } else P *nextfree++ = *str++; P--- 140,146 ---- P *nextfree++ = 0; P cargv[cargc] = nextfree; P! if (cargc++ >= NCARGS) P! xerror("Too many arguments to control message %s", P! header.ident); P } else P *nextfree++ = *str++; P*************** P*** 170,174 **** P if (argc < 2) P error("ihave: Too few arguments."); P! if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P list[0] = '\0'; P--- 173,177 ---- P if (argc < 2) P error("ihave: Too few arguments."); P! if (strncmp(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P list[0] = '\0'; P*************** P*** 213,220 **** P */ P (void) sprintf(header.nbuf, "to.%s.ctl", argv[argc - 1]); P! (void) sprintf(header.title, "sendme%s %s", list, FULLSYSNAME); P (void) strcpy(header.ctlmsg, header.title); P getident(&header); P! (void) sprintf(header.from, "%s@%s%s", "usenet", FULLSYSNAME, mydomain()); P (void) strcpy(header.path, NEWSUSR); P header.subdate[0] = header.expdate[0] = '\0'; P--- 216,223 ---- P */ P (void) sprintf(header.nbuf, "to.%s.ctl", argv[argc - 1]); P! (void) sprintf(header.title, "sendme%s %s", list, PATHSYSNAME); P (void) strcpy(header.ctlmsg, header.title); P getident(&header); P! (void) sprintf(header.from, "%s@%s", "usenet", FROMSYSNAME); P (void) strcpy(header.path, NEWSUSR); P header.subdate[0] = header.expdate[0] = '\0'; P*************** P*** 255,259 **** P if (argc < 2) P error("sendme: Too few arguments."); P! if (strncmp(FULLSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P if (s_find(&srec, argv[argc - 1]) != TRUE) P--- 258,262 ---- P if (argc < 2) P error("sendme: Too few arguments."); P! if (strncmp(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P if (s_find(&srec, argv[argc - 1]) != TRUE) P*************** P*** 365,368 **** P--- 368,372 ---- P } P P+ lock(); P /* see if it already exists */ P (void) rewind(actfp); clearerr(actfp); P*************** P*** 379,384 **** P p -= 3; P if (argc > 2 && strcmp(argv[2], "moderated") == 0) { P! if (*p == 'm') P return 0; P # ifdef NONEWGROUPS P if(can_change) { P--- 383,390 ---- P p -= 3; P if (argc > 2 && strcmp(argv[2], "moderated") == 0) { P! if (*p == 'm') { P! unlock(); P return 0; P+ } P # ifdef NONEWGROUPS P if(can_change) { P*************** P*** 443,448 **** P * No permission to change P */ P! if(!can_change) P return 0; P # endif /* NONEWGROUPS */ P /* The active file was wrong about the state of the P--- 449,456 ---- P * No permission to change P */ P! if(!can_change) { P! unlock(); P return 0; P+ } P # endif /* NONEWGROUPS */ P /* The active file was wrong about the state of the P*************** P*** 458,461 **** P--- 466,470 ---- P logerr("Newsgroup %s changed from unmoderated to moderated", P argv[1]); P+ unlock(); P return 0; P } P*************** P*** 520,523 **** P--- 529,533 ---- P } P # endif /* NOTIFY */ P+ unlock(); P return 0; P } P*************** P*** 580,590 **** P P if (shouldremove) { P! int rc; P /* We let the shell do all the work. P! * See the rmgrp shell script. */ P! (void) setuid(geteuid()); /* otherwise it won't rmdir the dir */ P! (void) sprintf(bfr, "exec %s/rmgroup %s", LIB, argv[1]); P! rc = system(bfr); P! log("system(%s) status %d", bfr, rc); P } P return 0; P--- 590,609 ---- P P if (shouldremove) { P! int pid, status; P /* We let the shell do all the work. P! * See the rmgrp shell script. P! */ P! lock(); P! (void) sprintf(bfr, "%s/rmgroup", LIB); P! P! if (pid = vfork()) { P! status = fwait(pid); P! } else { P! (void) setuid(duid); P! execvp(bfr, argv); P! } P! unlock(); P! if (status) P! log("rmgroup status %d", status); P } P return 0; P*************** P*** 641,645 **** P } else P log("Cancelling %s", line); P! if ((uid == ROOTID||uid == 0) && strcmp(header.distribution, "local") == 0) P su = 1; P while (*p) { P--- 660,668 ---- P } else P log("Cancelling %s", line); P! if ((uid == ROOTID||uid == 0) && ( P! #ifdef ORGDISTRIB P! strcmp(header.distribution, ORGDISTRIB) == 0 || P! #endif /* ORGDISTRIB */ P! strcmp(header.distribution, "local") == 0)) P su = 1; P while (*p) { P*************** P*** 917,933 **** P fprintf(fp, "Date: %s\n", arpadate(&now)); P #ifdef MMDF P! fprintf(fp, "From: The News System <usenet@%s%s>\n", P! FULLSYSNAME, mydomain()); P #endif /* MMDF */ P fprintf(fp, "To: %s\n", to); P fprintf(fp, "Subject: %s\n", subject); P! #ifdef HIDDENNET P! if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P! fprintf(fp, "Responding-System: %s.%s%s\n\n", P! LOCALSYSNAME, FULLSYSNAME, mydomain()); P! else P! #endif /* !HIDDENNET */ P! fprintf(fp, "Responding-System: %s%s\n\n", P! FULLSYSNAME, mydomain()); P } P return fp; P--- 940,949 ---- P fprintf(fp, "Date: %s\n", arpadate(&now)); P #ifdef MMDF P! fprintf(fp, "From: The News System <usenet@%s>\n", P! FROMSYSNAME); P #endif /* MMDF */ P fprintf(fp, "To: %s\n", to); P fprintf(fp, "Subject: %s\n", subject); P! fprintf(fp, "Responding-System: %s\n\n", LOCALSYSNAME); P } P return fp; PIndex: defs.dist PPrereq: 2.56 P*** .d/defs.dist Fri Nov 21 16:05:07 1986 P--- defs.dist Tue Mar 24 11:00:58 1987 P*************** P*** 15,19 **** P */ P P! /* @(#)defs.dist 2.56 11/21/86 */ P P /* P--- 15,19 ---- P */ P P! /* @(#)defs.dist 2.57 3/23/87 */ P P /* P*************** P*** 79,82 **** P--- 79,85 ---- P /* The mail address to look like it came */ P /* from one machine */ P+ /* NOTE: The following two macros replace the use of HIDDENNET */ P+ /* #define GENERICPATH "frooz" /* If you are using a shared USENET/UUCP node */ P+ /* #define GENERICFROM "Frobozz.COM" /* If you want generic From:-addresses */ P /* #define NICENESS 4 /* does a nice(NICENESS) in rnews */ P /* #define FASCIST "all,!all.all" /* only permit posting to certain groups */ PIndex: expire.c PPrereq: 2.51 P*** .d/expire.c Tue Mar 10 16:13:33 1987 P--- expire.c Mon Mar 23 14:00:08 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.51 3/9/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.52 3/20/87"; P #endif /* SCCSID */ P P*************** P*** 315,319 **** P--- 315,325 ---- P monitor((int(*)())0,(int(*)())0,0,0,0); P #endif /* PROFILING */ P+ #ifdef IHCC P+ /*afline happens to be available - (we're getting out anyway)*/ P+ sprintf(afline, "%s/%s", logdir(HOME), RNEWS); P+ execl(afline, "rnews", "-U", (char *)NULL); P+ #else /* ! IHCC */ P execl(RNEWS, "rnews", "-U", (char *)NULL); P+ #endif /* ! IHCC */ P perror(RNEWS); P xxit(1); P*************** P*** 792,799 **** P LockFd = open(ACTIVE, 2); P # ifdef LOCKF P! (void) lockf(LockFd, F_LOCK, 0); P # else /* BSD4_2 */ P! (void) flock(LockFd, LOCK_EX); P! # endif /* BSd4_2 */ P #else /* !BSD4_2 && !LOCKF */ P int i = 0; P--- 798,806 ---- P LockFd = open(ACTIVE, 2); P # ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0) < 0) P # else /* BSD4_2 */ P! if (flock(LockFd, LOCK_EX) < 0) P! # endif /* BSD4_2 */ P! xerror("Can't get lock for expire: %s", errmsg(errno)); P #else /* !BSD4_2 && !LOCKF */ P int i = 0; P*************** P*** 804,808 **** P sleep(i*2); P } P- P #endif /* !BSD4_2 && !LOCKF */ P } P--- 811,814 ---- PIndex: funcs2.c PPrereq: 1.19 P*** .d/funcs2.c Tue Feb 24 17:55:49 1987 P--- funcs2.c Mon Mar 23 13:59:43 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.19 2/22/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.20 3/20/87"; P #endif /* SCCSID */ P P*************** P*** 124,136 **** P if (*p++ == '\0') P xerror("Bad SUBFILE (%s) line %d.", SUBFILE, sfline); P! /* P! * A sys file line reading "ME" means the name of the local system. P! */ P if (strcmp(sp->s_name, "ME") == 0) P! #ifdef HIDDENNET P! (void) strcpy(sp->s_name, LOCALSYSNAME); P! #else /* !HIDDENNET */ P! (void) strcpy(sp->s_name, FULLSYSNAME); P! #endif /* !HIDDENNET */ P e = index(sp->s_name, '/'); P if (e) { P--- 124,132 ---- P if (*p++ == '\0') P xerror("Bad SUBFILE (%s) line %d.", SUBFILE, sfline); P! /* P! * A sys file line reading "ME" means the name of the local system. P! */ P if (strcmp(sp->s_name, "ME") == 0) P! (void) strcpy(sp->s_name, LOCALPATHSYSNAME); P e = index(sp->s_name, '/'); P if (e) { P*************** P*** 323,328 **** P P ptr = hptr->path; P! if (prefix(ptr, FULLSYSNAME) && P! index(NETCHRS, ptr[strlen(FULLSYSNAME)])) P ptr = index(ptr, '!') + 1; P #ifdef INTERNET P--- 319,324 ---- P P ptr = hptr->path; P! if (prefix(ptr, PATHSYSNAME) && P! index(NETCHRS, ptr[strlen(PATHSYSNAME)])) P ptr = index(ptr, '!') + 1; P #ifdef INTERNET P*************** P*** 602,608 **** P chr = findhfdigit(hline); P sprintf(subfile, "%s.d/%c", ARTFILE, chr); P! if (access(subfile, 04) < 0) P! return(ARTFILE); P! return(subfile); P } P P--- 598,602 ---- P chr = findhfdigit(hline); P sprintf(subfile, "%s.d/%c", ARTFILE, chr); P! return subfile; P } P P*************** P*** 662,663 **** P--- 656,685 ---- P } P #endif /* VMS */ P+ P+ /* P+ * Generate the name of the person responsible for posting this article, P+ * in order to check that two articles were posted by the same person. P+ */ P+ char * P+ senderof(hp) P+ struct hbuf *hp; P+ { P+ register char *r, *q, *tp; P+ char *tailpath(); P+ static char senderbuf[BUFLEN]; P+ P+ if (hp->sender[0]) P+ tp = hp->sender; P+ else if (hp->from[0]) P+ tp = hp->from; P+ else P+ tp = tailpath(hp); P+ P+ (void) strncpy(senderbuf, tp, BUFLEN); P+ /* Remove full name */ P+ q = index(senderbuf, ' '); P+ if (q) P+ *q = '\0'; P+ P+ return senderbuf; P+ } PIndex: header.c PPrereq: 2.47 P*** .d/header.c Tue Mar 10 16:13:35 1987 P--- header.c Mon Mar 23 13:59:38 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.47 3/9/87"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.48 3/20/87"; P #endif /* SCCSID */ P P*************** P*** 39,45 **** P int wholething; P { P! #ifndef HIDDENNET P register int len; P! #endif /* HIDDENNET */ P register int i; P #ifdef OLD P--- 39,45 ---- P int wholething; P { P! #ifndef GENERICPATH P register int len; P! #endif /* GENERICPATH */ P register int i; P #ifdef OLD P*************** P*** 97,105 **** P P strip: /* strip off sys! from front of path. */ P! #ifndef HIDDENNET P! if (strncmp(FULLSYSNAME, hp->path, (len = strlen(FULLSYSNAME))) == 0 P && index(NETCHRS, hp->path[len])) P (void) strcpy(hp->path, &(hp->path[len+1])); P! #endif /* HIDDENNET */ P lcase(hp->nbuf); P P--- 97,105 ---- P P strip: /* strip off sys! from front of path. */ P! #ifndef GENERICPATH P! if (strncmp(PATHSYSNAME, hp->path, (len = strlen(PATHSYSNAME))) == 0 P && index(NETCHRS, hp->path[len])) P (void) strcpy(hp->path, &(hp->path[len+1])); P! #endif /* GENERICPATH */ P lcase(hp->nbuf); P P*************** P*** 309,313 **** P host = index(tp, '!') + 1; P else if (user == tp) P! host = FULLSYSNAME; P else P host = tp; P--- 309,313 ---- P host = index(tp, '!') + 1; P else if (user == tp) P! host = FROMSYSNAME; P else P host = tp; P*************** P*** 316,320 **** P if (tp != NULL) P *tp = 0; P! (void) sprintf(hp->from, "%s@%s%s", user, host, mydomain()); P P skin(pathbuf, fullname, hp->path); /* remove RFC822-style comments */ P--- 316,323 ---- P if (tp != NULL) P *tp = 0; P! if (index(host, '.') != NULL) P! (void) sprintf(hp->from, "%s@%s%s", user, host, mydomain()); P! else P! (void) sprintf(hp->from, "%s@%s", user, host); P P skin(pathbuf, fullname, hp->path); /* remove RFC822-style comments */ P*************** P*** 631,639 **** P * first one it sees, so will ignore the second. P */ P! if (prefix(hp->path, FULLSYSNAME) && P! index(NETCHRS, hp->path[strlen(FULLSYSNAME)])) P fprintf(fp, "Path: %s\n", hp->path); P else P! fprintf(fp, "Path: %s!%s\n", FULLSYSNAME, hp->path); P if (hp->from[0]) P fprintf(fp, "From: %s\n", hp->from); P--- 634,642 ---- P * first one it sees, so will ignore the second. P */ P! if (prefix(hp->path, PATHSYSNAME) && P! index(NETCHRS, hp->path[strlen(PATHSYSNAME)])) P fprintf(fp, "Path: %s\n", hp->path); P else P! fprintf(fp, "Path: %s!%s\n", PATHSYSNAME, hp->path); P if (hp->from[0]) P fprintf(fp, "From: %s\n", hp->from); PIndex: ifuncs.c PPrereq: 2.61 P*** .d/ifuncs.c Tue Mar 10 16:13:41 1987 P--- ifuncs.c Tue Mar 24 11:01:13 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.61 3/9/87"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.63 3/23/87"; P #endif /* SCCSID */ P P*************** P*** 75,81 **** P int nsent = 0; P char *sentsys; P! #ifdef HIDDENNET P int len; P! #endif /* HIDDENNET */ P P /* h is a local copy of the header we can scribble on */ P--- 75,81 ---- P int nsent = 0; P char *sentsys; P! #ifdef GENERICPATH P int len; P! #endif /* GENERICPATH */ P P /* h is a local copy of the header we can scribble on */ P*************** P*** 95,104 **** P /* break path into list of systems. */ P hptr = h.path; P! #ifdef HIDDENNET P if (!is_rnews && P! strncmp(FULLSYSNAME, h.path, (len = strlen(FULLSYSNAME))) == 0 P && index(NETCHRS, h.path[len])) P (void) strcpy(h.path, &(h.path[len+1])); P! #endif HIDDENNET P sptr = hptr = h.path; P while ((hptr=strpbrk(hptr, NETCHRS)) != NULL) { P--- 95,104 ---- P /* break path into list of systems. */ P hptr = h.path; P! #ifdef GENERICPATH P if (!is_rnews && P! strncmp(PATHSYSNAME, h.path, (len = strlen(PATHSYSNAME))) == 0 P && index(NETCHRS, h.path[len])) P (void) strcpy(h.path, &(h.path[len+1])); P! #endif /* GENERICPATH */ P sptr = hptr = h.path; P while ((hptr=strpbrk(hptr, NETCHRS)) != NULL) { P*************** P*** 116,126 **** P while (s_read(&srec)) { P char *dist = h.distribution; P! #ifdef HIDDENNET P! if (strncmp(srec.s_name, LOCALSYSNAME, SNLN) == 0) P continue; P- #else /* !HIDDENNET */ P- if (strncmp(srec.s_name, FULLSYSNAME, SNLN) == 0) P- continue; P- #endif /* !HIDDENNET */ P if (sptr = srec.s_nosend) { P while (*sptr) { P--- 116,121 ---- P while (s_read(&srec)) { P char *dist = h.distribution; P! if (strncmp(srec.s_name, LOCALPATHSYSNAME, SNLN) == 0) P continue; P if (sptr = srec.s_nosend) { P while (*sptr) { P*************** P*** 342,346 **** P if (notify) { P char oldid[50]; P! (void) sprintf(hh.title, "ihave %s %s", hh.ident, FULLSYSNAME); P (void) strcpy(hh.ctlmsg, hh.title); P (void) strcpy(hh.numlines, "0"); P--- 337,341 ---- P if (notify) { P char oldid[50]; P! (void) sprintf(hh.title, "ihave %s %s", hh.ident, PATHSYSNAME); P (void) strcpy(hh.ctlmsg, hh.title); P (void) strcpy(hh.numlines, "0"); P*************** P*** 410,414 **** P if (afmt) { P #ifdef OLD P! fprintf(ofp, "A%s\n%s\n%s!%s\n%s\n%s\n", oident(hh.ident), hh.nbuf, FULLSYSNAME, P hh.path, hh.subdate, hh.title); P #else /* !OLD */ P--- 405,409 ---- P if (afmt) { P #ifdef OLD P! fprintf(ofp, "A%s\n%s\n%s!%s\n%s\n%s\n", oident(hh.ident), hh.nbuf, PATHSYSNAME, P hh.path, hh.subdate, hh.title); P #else /* !OLD */ P*************** P*** 787,797 **** P (void) fclose(fp); P unlock(); P! #ifdef HIDDENNET P! if (strcmp(LOCALSYSNAME, FULLSYSNAME)) P! (void) sprintf(hp->ident, "<%ld@%s.%s%s>", seqn, LOCALSYSNAME, FULLSYSNAME, P! mydomain()); P! else P! #endif /* !HIDDENNET */ P! (void) sprintf(hp->ident, "<%ld@%s%s>", seqn, FULLSYSNAME, mydomain()); P } P P--- 782,786 ---- P (void) fclose(fp); P unlock(); P! (void) sprintf(hp->ident, "<%ld@%s>", seqn, LOCALSYSNAME); P } P P*************** P*** 901,908 **** P continue; P if (isproc) P! cp = "Unknown newsgroup %s not localized"; P else P! cp = "Unknown newsgroup %s"; P! logerr(cp, ngs[i]); P #ifdef ALWAYSALIAS P ++okcount; /* so we know to exit below */ P--- 890,897 ---- P continue; P if (isproc) P! log("Unknown newsgroup %s not localized", P! ngs[i]); P else P! logerr("Unknown newsgroup %s", ngs[i]); P #ifdef ALWAYSALIAS P ++okcount; /* so we know to exit below */ P*************** P*** 1014,1018 **** P P (void) sprintf(hp->path, "%s", logname); P! (void) sprintf(hp->from, "%s@%s%s (%s)", logname, FULLSYSNAME, mydomain(), fn); P } P P--- 1003,1007 ---- P P (void) sprintf(hp->path, "%s", logname); P! (void) sprintf(hp->from, "%s@%s (%s)", logname, FROMSYSNAME, fn); P } P P*************** P*** 1064,1067 **** P--- 1053,1057 ---- P int c; P P+ setbuf(infp, NULL); P while ((c = getc(infp)) == '#') { P /* some kind of batch, investigate further */ P*************** P*** 1071,1078 **** P fgets(cmd + 1, BUFLEN, infp); P if (strncmp(cmd, "#! cunbatch", 11) == 0) { P- reset_infp(); P- i = strlen(cmd); P- (void) lseek(0, (long) i, 0); /* position STDIN for P- * exec */ P (void) sprintf(cmd, "%s/compress", LIB); P input_pipe(cmd, "compress", "-d", (char *) 0); P--- 1061,1064 ---- P*************** P*** 1079,1090 **** P continue; /* look for the #! rnews */ P } else if (strncmp(cmd, "#! c7unbatch", 12) == 0) { P! reset_infp(); P! i = strlen(cmd); P! (void) lseek(0, (long) i, 0); /* position STDIN for P! * exec */ P! (void) sprintf(cmd, "%s/decode | %s/compress -d", LIB, LIB); P input_pipe("/bin/sh", "news-unpack", "-c", cmd); P continue; /* look for the #! rnews */ P! } else if (strncmp(cmd, "#! rnews", 8) == 0) { P /* instead of execing unbatch do it ourselves */ P register int fd, rc, wc; P--- 1065,1074 ---- P continue; /* look for the #! rnews */ P } else if (strncmp(cmd, "#! c7unbatch", 12) == 0) { P! (void) sprintf(cmd, "%s/decode | %s/compress -d", P! LIB, LIB); P input_pipe("/bin/sh", "news-unpack", "-c", cmd); P continue; /* look for the #! rnews */ P! } else if (strncmp(cmd, "#! rnews ", 9) == 0 || P! strncmp(cmd, "! rnews ", 8) == 0) { P /* instead of execing unbatch do it ourselves */ P register int fd, rc, wc; P*************** P*** 1093,1098 **** P char *filename; P int pid, wpid, exstat; P- char *mktemp(); P- long atol(); P #define CPBFSZ 8192 P char buf[CPBFSZ]; P--- 1077,1080 ---- P*************** P*** 1162,1169 **** P * instead of a temporary file. P */ P! if (pipe(piped) != 0) { P! perror("checkbatch: pipe() failed"); P! exit(1); P! } P } P while ((pid = fork()) == -1) { P--- 1144,1149 ---- P * instead of a temporary file. P */ P! if (pipe(piped) != 0) P! xerror("checkbatch: pipe() failed"); P } P while ((pid = fork()) == -1) { P*************** P*** 1210,1216 **** P P } else { P- reset_infp(); P- i = strlen(cmd); P- (void) lseek(0, (long)i, 0); P docmd(cmd); P xxit(0); P--- 1190,1193 ---- P*************** P*** 1238,1242 **** P } P fflush(stdout); P! while ((pid = fork()) == -1) { P perror("checkbatch: fork failed, waiting"); P sleep(60); P--- 1215,1219 ---- P } P fflush(stdout); P! while ((pid = vfork()) == -1) { P perror("checkbatch: fork failed, waiting"); P sleep(60); P*************** P*** 1326,1362 **** P xxit(2); P } P- /* P- * We've already done a read on stdin, and we want to seek back to the P- * beginning. We want the real file descriptor (beyond buffers) to P- * reflect the true beginning. Do whatever is necessary. P- */ P- reset_infp() P- { P- register FILE *ofd; P- register int c; P- char *ofdname; P- P- /* First try to seek back - if so, it's a cheap way back. */ P- if (lseek(0, 0L, 0) == 0L) P- return; P- P- /* Can't seek, so have to copy input to a file and use that. */ P- ofdname = "/tmp/inewsXXXXXX"; P- (void) mktemp(ofdname); P- ofd = fopen(ofdname, "w"); P- while ((c=getc(infp)) != EOF) P- putc(c, ofd); P- if (ferror(ofd)) P- xerror("write failed on temp file %s", ofdname); P- (void) fclose(ofd); P- (void) fclose(infp); P- P- /* Now for a few lower level hacks to reopen stdin and make P- * absolutely sure that the right fd's are done for the exec. P- */ P- (void) close(0); /* make sure stdin is really closed. */ P- (void) open(ofdname, 0); P- (void) unlink(ofdname); /* to avoid cleaning it up later. */ P- } P #endif /* BATCH */ P P--- 1303,1306 ---- P*************** P*** 1452,1463 **** P lock() P { P! LockFd = open(SUBFILE,0); P /* This will sleep until the other program releases the lock */ P /* We may need to alarm out of this, but I don't think so */ P #ifdef LOCKF P! (void) lockf(LockFd, F_LOCK, 0); P #else P! (void) flock(LockFd, LOCK_EX); P #endif P } P P--- 1396,1410 ---- P lock() P { P! LockFd = open(SUBFILE, 2); P! if (LockFd < 0) P! logerr("Can't open(%s,2) to lock", SUBFILE); P /* This will sleep until the other program releases the lock */ P /* We may need to alarm out of this, but I don't think so */ P #ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0) < 0) P #else P! if (flock(LockFd, LOCK_EX) < 0) P #endif P+ xerror("Can't get lock on %s: %s", SUBFILE, errmsg(errno)); P } P P*************** P*** 1491,1523 **** P #endif /* !BSD4_2 */ P #endif /* !VMS */ P- P- /* P- * Generate the name of the person responsible for posting this article, P- * in order to check that two articles were posted by the same person. P- */ P- char * P- senderof(hp) P- struct hbuf *hp; P- { P- register char *r, *q, *tp; P- char *tailpath(); P- P- if (hp->sender[0]) P- tp = hp->sender; P- else if (hp->from[0]) P- tp = hp->from; P- else P- tp = tailpath(hp); P- P- /* Remove full name */ P- q = index(tp, ' '); P- if (q) P- *q = '\0'; P- P- r = AllocCpy(tp); P- if (q != NULL) P- *q = ' '; P- return r; P- } P P /* VARARGS1 */ P--- 1438,1441 ---- P PIndex: inews.c PPrereq: 2.76 P*** .d/inews.c Tue Mar 10 16:13:29 1987 P--- inews.c Tue Mar 24 11:01:30 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.76 3/10/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.78 3/23/87"; P #endif /* SCCSID */ P P*************** P*** 25,28 **** P--- 25,31 ---- P # ifdef LOCKF P # include <unistd.h> P+ # include <fcntl.h> P+ P+ struct flock news_lock; P # endif /* LOCKF */ P P*************** P*** 32,36 **** P #else /* !BSD4_2 */ P # include "ndir.h" P! # ifdef USG P # include <fcntl.h> P # endif /* USG */ P--- 35,39 ---- P #else /* !BSD4_2 */ P # include "ndir.h" P! # if defined(USG) && !defined(LOCKF) P # include <fcntl.h> P # endif /* USG */ P*************** P*** 81,84 **** P--- 84,88 ---- P 'a', '\0', FALSE, UNPROC, UNKNOWN, header.approved, P 'U', '\0', FALSE, PROC, PROC, filename, P+ #define Sflag options[14].flag P 'S', '\0', FALSE, UNKNOWN|PROC, UNPROC, filename, P 'x', '\0', FALSE, UNPROC, UNKNOWN, not_here, P*************** P*** 88,92 **** P P FILE *mailhdr(); P- extern char *mydomain(); P extern int errno; P P--- 92,95 ---- P*************** P*** 130,145 **** P actfp = xfopen(ACTIVE, "r+"); P #ifdef LOCKF P! if (lockf(fileno(actfp), F_TLOCK, 0) < 0 && P! (errno == EAGAIN || errno == EACCES)) P #else /* !LOCKF */ P #ifdef BSD4_2 P! if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0 && errno == EWOULDBLOCK) P #else /* !BSD4_2 */ P sprintf(bfr, "%s.lock", ACTIVE); P! if (LINK(ACTIVE,bfr) < 0 && errno == EEXIST) P #endif /* V7 */ P #endif /* !BSD4_2 */ P spool_news = 2; P! else { P #ifdef SPOOLNEWS P if (argc > 1 && !strcmp(*(argv+1), "-S")) { P--- 133,156 ---- P actfp = xfopen(ACTIVE, "r+"); P #ifdef LOCKF P! # ifdef F_RDLCK P! news_lock.l_type = F_RDLCK; P! if (fcntl(fileno(actfp), F_SETLK, &news_lock) < 0) { P! # else /* !F_RDLCK */ P! if (lockf(fileno(actfp), F_TLOCK, 0) < 0) { P! # endif /* !F_RDLCK */ P! if (errno != EAGAIN && errno != EACCES) P #else /* !LOCKF */ P #ifdef BSD4_2 P! if (flock(fileno(actfp), LOCK_SH|LOCK_NB) < 0) { P! if (errno != EWOULDBLOCK) P #else /* !BSD4_2 */ P sprintf(bfr, "%s.lock", ACTIVE); P! if (LINK(ACTIVE, bfr) < 0) { P! if (errno != EEXIST) P #endif /* V7 */ P #endif /* !BSD4_2 */ P+ xerror("Can't lock %s: %s", ACTIVE, errmsg(errno)); P spool_news = 2; P! } else { P #ifdef SPOOLNEWS P if (argc > 1 && !strcmp(*(argv+1), "-S")) { P*************** P*** 146,149 **** P--- 157,161 ---- P argc--; P argv++; P+ Sflag = 1; P } else P spool_news = 1; P*************** P*** 154,163 **** P /* only unlock if we locked */ P #ifdef LOCKF P! lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P #ifdef BSD4_2 P! flock(fileno(actfp), LOCK_UN); P #else /* !BSD4_2 */ P! UNLINK(bfr); P #endif /* V7 */ P #endif /* !BSD4_2 */ P--- 166,175 ---- P /* only unlock if we locked */ P #ifdef LOCKF P! (void) lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P #ifdef BSD4_2 P! (void) flock(fileno(actfp), LOCK_UN); P #else /* !BSD4_2 */ P! (void) UNLINK(bfr); P #endif /* V7 */ P #endif /* !BSD4_2 */ P*************** P*** 195,199 **** P #else P chkdir(ARTFILE); P! #endif DBM P chkfile(ACTIVE); P SigTrap = FALSE; /* true if a signal has been caught */ P--- 207,211 ---- P #else P chkdir(ARTFILE); P! #endif /* DBM */ P chkfile(ACTIVE); P SigTrap = FALSE; /* true if a signal has been caught */ P*************** P*** 224,232 **** P } P P- #ifndef IHCC P /* P! * We force the use of 'getuser()' to prevent forgery of articles P * by just changing $LOGNAME P */ P if (isatty(fileno(stderr))) { P if ((user = getenv("USER")) == NULL) P--- 236,244 ---- P } P P /* P! * IHCC forces the use of 'getuser()' to prevent forgery of articles P * by just changing $LOGNAME P */ P+ #ifndef IHCC P if (isatty(fileno(stderr))) { P if ((user = getenv("USER")) == NULL) P*************** P*** 235,239 **** P home = getenv("LOGDIR"); P } P! #endif P if (user == NULL || home == NULL) P getuser(); P--- 247,251 ---- P home = getenv("LOGDIR"); P } P! #endif /* !IHCC */ P if (user == NULL || home == NULL) P getuser(); P*************** P*** 340,348 **** P (void) hread(&header, infp, FALSE); P /* there are certain fields we won't let him specify. */ P! if (header.from[0]) P! (void) strcpy(forgedname, header.from); P if (!header.approved[0]) P Mflag = FALSE; P- header.from[0] = '\0'; P header.sender[0] = '\0'; P if (header.subdate[0] && cgtdate(header.subdate) < 0) P--- 352,374 ---- P (void) hread(&header, infp, FALSE); P /* there are certain fields we won't let him specify. */ P! if (header.from[0]) { P! if (Sflag) { P! register char *p; P! strcpy(bfr, header.from); P! p = strpbrk(bfr, "@ !"); P! if (p) P! *p = '\0'; P! if ((pw = getpwnam(bfr)) != NULL) { P! uid = pw->pw_uid; P! gid = pw->pw_gid; P! username = AllocCpy(bfr); P! } P! } else { P! (void) strcpy(forgedname, header.from); P! header.from[0] = '\0'; P! } P! } P if (!header.approved[0]) P Mflag = FALSE; P header.sender[0] = '\0'; P if (header.subdate[0] && cgtdate(header.subdate) < 0) P*************** P*** 357,361 **** P if (Mflag) P sprintf(header.path, "%s!%s", P! FULLSYSNAME, username); P else if (!header.path[0]) { P (void) strcpy(header.path, forgedname); P--- 383,387 ---- P if (Mflag) P sprintf(header.path, "%s!%s", P! PATHSYSNAME, username); P else if (!header.path[0]) { P (void) strcpy(header.path, forgedname); P*************** P*** 365,375 **** P } P if (!Mflag && !strpbrk(forgedname, "@ (<")) P! (void) sprintf(header.from,"%s@%s%s", P! forgedname, FULLSYSNAME, mydomain()); P else P (void) strncpy(header.from, forgedname, BUFLEN); P P! (void) sprintf(header.sender, "%s@%s%s", P! username, FULLSYSNAME, mydomain()); P } else { P gensender(&header, username); P--- 391,401 ---- P } P if (!Mflag && !strpbrk(forgedname, "@ (<")) P! (void) sprintf(header.from,"%s@%s", P! forgedname, FROMSYSNAME); P else P (void) strncpy(header.from, forgedname, BUFLEN); P P! (void) sprintf(header.sender, "%s@%s", P! username, FROMSYSNAME); P } else { P gensender(&header, username); P*************** P*** 476,497 **** P char cbuf[BUFLEN]; /* command buffer */ P P! if (!rwaccess(f)) { P! mfd = mailhdr((struct hbuf *)NULL, exists(f) ? "Unwritable files!" : "Missing files!"); P! if (mfd != NULL) { P! putc('\n', mfd); P! #ifdef HIDDENNET P! fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, f); P! #else /* !HIDDENNET */ P! fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, f); P! #endif /* !HIDDENNET */ P! (void) sprintf(cbuf, "touch %s;chmod 666 %s", f, f); P! (void) system(cbuf); P! if (rwaccess(f)) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P! } P! } P } P P--- 502,521 ---- P char cbuf[BUFLEN]; /* command buffer */ P P! if (rwaccess(f)) P! return; /* everything is ok */ P! mfd = mailhdr((struct hbuf *)NULL, P! exists(f) ? "Unwritable files!" : "Missing files!"); P! if (mfd == NULL) P! return; P! putc('\n', mfd); P! fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", P! LOCALSYSNAME, f); P! (void) sprintf(cbuf, "touch %s;chmod 666 %s", f, f); P! (void) system(cbuf); P! if (rwaccess(f)) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P } P P*************** P*** 505,525 **** P P sprintf(dir, "%s.d", d); P! if (eaccess(dir, 07) != 0) { P! mfd = mailhdr((struct hbuf *)NULL, exists(dir) ? "Unwritable diretories!" : "Missing directories!"); P! if (mfd != NULL) { P! putc('\n', mfd); P! #ifdef HIDDENNET P! fprintf(mfd, "System: %s.%s\n\nThere was a problem with %s!!\n", LOCALSYSNAME, FULLSYSNAME, dir); P! #else /* !HIDDENNET */ P! fprintf(mfd, "System: %s\n\nThere was a problem with %s!!\n", FULLSYSNAME, dir); P! #endif /* !HIDDENNET */ P! (void) mkdir(dir, 0775); P! if (eaccess(dir, 07) == 0) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P! } P! } P } P P--- 529,547 ---- P P sprintf(dir, "%s.d", d); P! if (eaccess(dir, 07) == 0) P! return; /* everything is ok */ P! mfd = mailhdr((struct hbuf *)NULL, P! exists(dir) ? "Unwritable directories" : "Missing directories"); P! if (mfd == NULL) P! return; P! putc('\n', mfd); P! fprintf(mfd, "System: %s\n\nThere was a problem with %s!\n", P! LOCALSYSNAME, dir); P! (void) mkdir(dir, 0775); P! if (eaccess(dir, 07) == 0) P! fprintf(mfd, "The problem has been taken care of.\n"); P! else P! fprintf(mfd, "Corrective action failed - check suid bits.\n"); P! (void) mclose(mfd); P } P P*************** P*** 527,531 **** P * This version of access checks against effective uid and effective gid P */ P- P eaccess(name, mode) P register char *name; P--- 549,552 ---- P*************** P*** 577,588 **** P register struct tm *tp; P time_t t; P! char buf[BUFLEN], *mktemp(); P extern struct tm *gmtime(); P P! sp = xfopen(mktemp(INFILE), "w"); P! if (batchcmd != NULL) P! fprintf(sp, "%s\n", batchcmd); P! else P if (not_here[0] != '\0') P fprintf(sp, "#! inews -x %s -p\n", not_here); P if (dolhwrite) P--- 598,613 ---- P register struct tm *tp; P time_t t; P! char buf[BUFLEN], sfile[BUFLEN]; P extern struct tm *gmtime(); P P! (void) sprintf(sfile, "%s/.spXXXXXX", SPOOL); P! sp = xfopen(mktemp(sfile), "w"); P! if (batchcmd != NULL) { P if (not_here[0] != '\0') P+ fprintf(sp, "%s -x %s\n", batchcmd, not_here); P+ else P+ fprintf(sp, "%s\n", batchcmd); P+ } else P+ if (not_here[0] != '\0') P fprintf(sp, "#! inews -x %s -p\n", not_here); P if (dolhwrite) P*************** P*** 608,612 **** P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! if (LINK(INFILE, buf) < 0) { P char dbuf[BUFLEN]; P #ifdef VMS P--- 633,637 ---- P tp->tm_year, tp->tm_mon+1, tp->tm_mday, P tp->tm_hour, tp->tm_min, getpid()); P! if (LINK(sfile, buf) < 0) { P char dbuf[BUFLEN]; P #ifdef VMS P*************** P*** 617,625 **** P if (mkdir(dbuf, 0777&~N_UMASK) < 0) P xerror("Cannot mkdir %s: %s", dbuf, errmsg(errno)); P! if (LINK(INFILE, buf) < 0) P! xerror("Cannot link(%s,%s): %s", INFILE, buf, P errmsg(errno)); P } P! (void) UNLINK(INFILE); P xxit(0); P /* NOTREACHED */ P--- 642,650 ---- P if (mkdir(dbuf, 0777&~N_UMASK) < 0) P xerror("Cannot mkdir %s: %s", dbuf, errmsg(errno)); P! if (LINK(sfile, buf) < 0) P! xerror("Cannot link(%s,%s): %s", sfile, buf, P errmsg(errno)); P } P! (void) UNLINK(sfile); P xxit(0); P /* NOTREACHED */ P*************** P*** 652,657 **** P P if (header.approved[0] == '\0') P! (void) sprintf(header.approved, "%s@%s%s", P! username, FULLSYSNAME, mydomain()); P (void) sprintf(bfr, "%s/inews -n %s.ctl -c newgroup %s -d %s -a \"%s\"", P LIB, header.nbuf, header.ctlmsg, header.distribution, P--- 677,682 ---- P P if (header.approved[0] == '\0') P! (void) sprintf(header.approved, "%s@%s", P! username, FROMSYSNAME); P (void) sprintf(bfr, "%s/inews -n %s.ctl -c newgroup %s -d %s -a \"%s\"", P LIB, header.nbuf, header.ctlmsg, header.distribution, P*************** P*** 900,907 **** P } P P! if (spool_news && mode != PROC) { P! fprintf(stderr,"Your article has been spooled for later processing.\n"); P! dospool("#! inews -S -h", TRUE); P! /* NOT REACHED */ P } P P--- 925,937 ---- P } P P! if (mode != PROC && spool_news) { P! if (spool_news == 1 && ngmatch(header.nbuf, "to.all.ctl")) P! spool_news = 0; P! if (spool_news) { P! fprintf(stderr, P! "Your article has been spooled for later processing.\n"); P! dospool("#! inews -S -h", TRUE); P! /* NOT REACHED */ P! } P } P P*************** P*** 911,924 **** P savehist(histline); P } else { P! #ifdef HIDDENNET P! if (s_find(&srec, LOCALSYSNAME) == FALSE) { P! #else /* !HIDDENNET */ P! if (s_find(&srec, FULLSYSNAME) == FALSE) { P! #endif /* !HIDDENNET */ P! logerr("Cannot find my name '%s' in %s", FULLSYSNAME, SUBFILE); P srec = dummy_srec; P } P #ifdef DOXREFS P! (void) strncpy(nextref, FULLSYSNAME, BUFLEN); P #endif /* DOXREFS */ P for (ptr = nbuf; *ptr;) { P--- 941,950 ---- P savehist(histline); P } else { P! if (s_find(&srec, PATHSYSNAME) == FALSE) { P! logerr("Cannot find my name '%s' in %s", PATHSYSNAME, SUBFILE); P srec = dummy_srec; P } P #ifdef DOXREFS P! (void) strncpy(nextref, PATHSYSNAME, BUFLEN); P #endif /* DOXREFS */ P for (ptr = nbuf; *ptr;) { P*************** P*** 988,992 **** P } P #ifdef SIGTTOU P! signal(SIGTTOU, SIG_IGN); P #endif /* SIGTTOU */ P savehist(histline); P--- 1014,1018 ---- P } P #ifdef SIGTTOU P! (void) signal(SIGTTOU, SIG_IGN); P #endif /* SIGTTOU */ P savehist(histline); P*************** P*** 1067,1071 **** P username); P P! if (mode != PROC && !is_ctl && header.sender[0] == '\0') { P int siglines = 0; P char sbuf[BUFLEN]; P--- 1093,1097 ---- P username); P P! if (mode != PROC && !is_ctl && header.sender[0] == '\0' && !Sflag) { P int siglines = 0; P char sbuf[BUFLEN]; P*************** P*** 1214,1217 **** P--- 1240,1246 ---- P int pid, status, ret; P char spbuf[BUFLEN]; P+ #ifdef LOCKF P+ FILE* LockFd; P+ #endif /* LOCKF */ P #ifdef VMS P sprintf(spbuf, "%s/+rnews", SPOOL); P*************** P*** 1227,1236 **** P xerror("opendir can't open .:%s", errmsg(errno)); P #ifdef LOCKF P! if (lockf(dirp->dd_fd, F_TLOCK, 0) < 0 && P! (errno == EAGAIN || errno == EACCES)) { P #else /* !LOCKF */ P #ifdef BSD4_2 P! if (flock(dirp->dd_fd, LOCK_EX|LOCK_NB) < 0 && P! errno == EWOULDBLOCK) { P #else /* V7 */ P strcat(spbuf, ".lock"); P--- 1256,1266 ---- P xerror("opendir can't open .:%s", errmsg(errno)); P #ifdef LOCKF P! LockFd = xfopen(SEQFILE, "r+w"); P! if (lockf(fileno(LockFd), F_TLOCK, 0) < 0) { P! if (errno != EAGAIN && errno != EACCES) P #else /* !LOCKF */ P #ifdef BSD4_2 P! if (flock(dirp->dd_fd, LOCK_EX|LOCK_NB) < 0) { P! if (errno != EWOULDBLOCK) P #else /* V7 */ P strcat(spbuf, ".lock"); P*************** P*** 1240,1247 **** P (void) UNLINK(bfr); P if (errno != EEXIST) P- xerror("Can't lock %s: %s", spbuf, errmsg(errno)); P- else P #endif /* V7 */ P #endif /* !LOCKF */ P xxit(3); /* another rnews -U is running */ P } P--- 1270,1276 ---- P (void) UNLINK(bfr); P if (errno != EEXIST) P #endif /* V7 */ P #endif /* !LOCKF */ P+ xerror("Can't lock %s: %s", spbuf, errmsg(errno)); P xxit(3); /* another rnews -U is running */ P } P*************** P*** 1256,1261 **** P--- 1285,1297 ---- P xerror("Can't fork: %s", errmsg(errno)); P if (pid == 0) { P+ #ifdef IHCC P+ char bufr[BUFSIZ]; P+ sprintf(bufr, "%s/%s", logdir(HOME), RNEWS); P+ execl(bufr, "rnews", "-S", "-p", dir->d_name, P+ (char *) NULL); P+ #else /* !IHCC */ P execl(RNEWS, "rnews", "-S", "-p", dir->d_name, P (char *) NULL); P+ #endif /* !IHCC */ P _exit(1); P } P*************** P*** 1280,1284 **** P rewinddir(dirp); P } while (foundsome); /* keep rereading the directory until it's empty */ P- closedir(dirp); P (void) UNLINK(spbuf); P P--- 1316,1319 ---- PIndex: ndir.c PPrereq: 1.10 P*** .d/ndir.c Tue Mar 10 16:13:37 1987 P--- ndir.c Mon Mar 23 13:59:15 1987 P*************** P*** 5,9 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.10 3/9/87"; P #endif /* SCCSID */ P P--- 5,9 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.11 3/20/87"; P #endif /* SCCSID */ P P*************** P*** 113,117 **** P long curloc, base, offset; P struct direct *dp; P! extern long lseek(); P P curloc = telldir(dirp); P--- 113,117 ---- P long curloc, base, offset; P struct direct *dp; P! long lseek(), telldir(); P P curloc = telldir(dirp); P PIndex: params.h PPrereq: 2.21 P*** .d/params.h Thu Oct 30 16:11:55 1986 P--- params.h Mon Mar 23 13:58:58 1987 P*************** P*** 3,7 **** P */ P P! /* @(#)params.h 2.21 10/23/86 */ P P #include <stdio.h> P--- 3,7 ---- P */ P P! /* @(#)params.h 2.22 3/20/87 */ P P #include <stdio.h> P*************** P*** 73,83 **** P #endif /* NOTIFY */ P P! #ifdef HIDDENNET P! extern char *LOCALSYSNAME; P! #endif /* HIDDENNET */ P P- extern char *FULLSYSNAME; P #ifndef SHELL P! extern char *SHELL; P #endif /* !SHELL */ P P--- 73,80 ---- P #endif /* NOTIFY */ P P! extern char *LOCALSYSNAME, *LOCALPATHSYSNAME, *FROMSYSNAME, *PATHSYSNAME; P P #ifndef SHELL P! extern char *SHELL; P #endif /* !SHELL */ P P*************** P*** 116,117 **** P--- 113,124 ---- P #define xart_open xfopen P #endif /* !VMS */ P+ P+ /* Check for old naming scheme using HIDDENNET */ P+ #ifdef HIDDENNET P+ # ifndef GENERICFROM /* Ugly fix, only for use in pathinit.c */ P+ # define GENERICFROM "%s%0.0s%s", HIDDENNET P+ # endif P+ # ifndef GENERICPATH P+ # define GENERICPATH HIDDENNET P+ # endif P+ #endif PIndex: pathinit.c PPrereq: 1.20 P*** .d/pathinit.c Tue Mar 10 16:13:36 1987 P--- pathinit.c Tue Mar 24 11:01:37 1987 P*************** P*** 35,39 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.20 3/9/87"; P #endif /* SCCSID */ P P--- 35,39 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.22 3/23/87"; P #endif /* SCCSID */ P P*************** P*** 51,55 **** P P P! char *FULLSYSNAME, *SPOOL, *LIB, *BIN, *ACTIVE, *SUBFILE, *ARTFILE, P *username, *userhome; P P--- 51,56 ---- P P P! char *FROMSYSNAME, *PATHSYSNAME, *LOCALSYSNAME, *LOCALPATHSYSNAME; P! char *SPOOL, *LIB, *BIN, *ACTIVE, *SUBFILE, *ARTFILE, P *username, *userhome; P P*************** P*** 87,95 **** P #endif /* READ */ P P- #ifdef HIDDENNET P- char *LOCALSYSNAME; P- #endif /* HIDDENNET */ P P- P struct passwd *getpwnam(); P char *rindex(); P--- 88,92 ---- P*************** P*** 115,120 **** P pathinit() P { P- #if defined(INEW) && defined(NOTIFY) P- #endif /* INEW && NOTIFY */ P #ifndef ROOTID P struct passwd *pw; /* struct for pw lookup */ P--- 112,115 ---- P*************** P*** 123,138 **** P char *p; P #endif /* EXP */ P! #ifndef CHKN P struct utsname ubuf; P P uname(&ubuf); P- #ifdef HIDDENNET P- FULLSYSNAME = AllocCpy(HIDDENNET); P- LOCALSYSNAME = AllocCpy(ubuf.nodename); P- #else /* !HIDDENNET */ P- FULLSYSNAME = AllocCpy(ubuf.nodename); P- #endif /* !HIDDENNET */ P- #endif /* !CHKN */ P P #ifdef HOME P /* Relative to the home directory of user HOME */ P--- 118,158 ---- P char *p; P #endif /* EXP */ P! #if !defined(CHKN) && !defined(EXP) P! #ifdef GENERICFROM P! int len; P! #endif /* GENERICFROM */ P struct utsname ubuf; P+ char buf[BUFLEN]; P+ extern char *mydomain(); P P uname(&ubuf); P P+ #ifdef GENERICFROM P+ (void) sprintf(buf, GENERICFROM, ubuf.nodename, mydomain()); P+ FROMSYSNAME = AllocCpy(buf); P+ len = strlen(ubuf.nodename); P+ if (FROMSYSNAME[len] == '.' && P+ strncmp(ubuf.nodename, FROMSYSNAME, len) == 0) P+ LOCALSYSNAME = FROMSYSNAME; P+ else { P+ (void) sprintf(buf, "%s.%s", ubuf.nodename, FROMSYSNAME); P+ LOCALSYSNAME = AllocCpy(buf); P+ } P+ #else /* !GENERICFROM */ P+ (void) sprintf(buf, "%s%s", ubuf.nodename, mydomain()); P+ LOCALSYSNAME = AllocCpy(buf); P+ FROMSYSNAME = LOCALSYSNAME; P+ #endif /* !GENERICFROM */ P+ P+ LOCALPATHSYSNAME = AllocCpy(ubuf.nodename); P+ #ifdef GENERICPATH P+ (void) sprintf(buf, GENERICPATH, ubuf.nodename, mydomain()); P+ PATHSYSNAME = AllocCpy(buf); P+ #else /* !GENERICPATH */ P+ PATHSYSNAME = LOCALPATHSYSNAME; P+ #endif /* !GENERICPATH */ P+ P+ #endif /* !CHKN && ! EXP */ P+ P #ifdef HOME P /* Relative to the home directory of user HOME */ P*************** P*** 334,335 **** P--- 354,414 ---- P #endif /* NOTIFY */ P #endif /* INEW */ P+ P+ #ifndef CHKN P+ /* P+ * At sites where the are many mail domains within the support area of a single P+ * news administrator, it is much nicer to be able to read the local domain of P+ * a machine from a file. What we do here is: P+ * 1) Check for the presence of a LIBDIR/localdomain file. If it doesn't P+ * exist,assume that MYDOMAIN should be used instead. P+ * 2) If it does exist, we make the following assumptions: P+ * a) If it is empty, has only comments, or only blank lines; we assume P+ * the domain is desired to be a zero length string ( ie ""). (this P+ * implies that the domain name is contained in the hostname.) P+ * b) If it is not empty, we assume the first line not beginning with a P+ * '#', blank/tab, or newline is the desired domain name. P+ * A like '.UUCP' or '.TEK.COM' should be used. We could insure that P+ * the line begin with a '.' to be a valid domain name, but I don't P+ * think it is necessary to put that restriction on it. P+ */ P+ char * P+ mydomain() P+ { P+ static char *md = NULL; P+ register char *cp; P+ FILE *fp = NULL; P+ char fbuf[BUFLEN]; P+ extern char *malloc(), *strcpy(), *index(); P+ P+ if(md) /* we've been here before, so just return what we found */ P+ return(md); P+ P+ (void) sprintf(fbuf,"%s/localdomain", LIBDIR); P+ if ( (fp = fopen(fbuf,"r")) == NULL) { P+ md = MYDOMAIN; /* No localdomain file, use MYDOMAIN instead */ P+ } else { P+ while(fgets(fbuf, sizeof(fbuf), fp) ) { P+ if( *fbuf == '\n' || *fbuf == '#' P+ || *fbuf == ' ' || *fbuf == '\t') P+ continue; P+ P+ if( cp = index(fbuf, '\n') ) P+ *cp = '\0'; P+ P+ if ( (md = malloc(strlen(fbuf) + 1)) == NULL) P+ md = MYDOMAIN; /* punt here */ P+ else P+ (void)strcpy(md, fbuf); P+ break; P+ } P+ } P+ P+ if(fp) P+ (void)fclose(fp); P+ P+ if( md == NULL) P+ md = ""; P+ P+ return md; P+ } P+ #endif /* !CHKN */ PIndex: postnews.c PPrereq: 1.30 P*** .d/postnews.c Wed Dec 17 18:23:24 1986 P--- postnews.c Mon Mar 23 13:58:48 1987 P*************** P*** 18,22 **** P */ P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.30 12/16/86"; P #endif /* SCCSID */ P P--- 18,22 ---- P */ P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.31 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 156,160 **** P do { P do { P! getpr("\nWhat now? [send, edit, list, quit, write] ", buf); P c = buf[0]; P } while (c == '\0'); P--- 156,160 ---- P do { P do { P! getpr("\nWhat now? [send, edit, list, quit, write, append] ", buf); P c = buf[0]; P } while (c == '\0'); P*************** P*** 183,187 **** P (void) system(buf); P } P! if (c == 'w') { P register int ifd, ofd, nbytes; P char iobuf[BUFSIZ]; P--- 183,187 ---- P (void) system(buf); P } P! if (c == 'w' || c == 'a') { P register int ifd, ofd, nbytes; P char iobuf[BUFSIZ]; P*************** P*** 190,197 **** P if (fname[0] == '\0') P continue; P! ofd = creat(fname, 0666); P if (ofd < 0) P perror(fname); P else { P ifd = open(tempfname, 0); P if (ifd < 0) P--- 190,200 ---- P if (fname[0] == '\0') P continue; P! ofd = (c == 'w') ? creat(fname, 0666) P! : open(fname, 2); P if (ofd < 0) P perror(fname); P else { P+ if (c == 'a') P+ (void) lseek(ofd, 0L, 2); P ifd = open(tempfname, 0); P if (ifd < 0) PIndex: readnews.c PPrereq: 2.31 P*** .d/readnews.c Thu Oct 30 16:16:46 1986 P--- readnews.c Mon Mar 23 13:58:38 1987 P*************** P*** 4,8 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.31 9/16/86"; P #endif /* SCCSID */ P P--- 4,8 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.32 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 37,41 **** P { P register char *ptr; /* pointer to rest of buffer */ P! char *user, *home; P int optflag = FALSE, space = FALSE; P struct utsname ubuf; P--- 37,41 ---- P { P register char *ptr; /* pointer to rest of buffer */ P! char *user = NULL, *home = NULL; P int optflag = FALSE, space = FALSE; P struct utsname ubuf; P*************** P*** 48,52 **** P coptbuf[0] = datebuf[0] = '\0'; P uname(&ubuf); P! strcpy(FULLSYSNAME, ubuf.nodename); P P savmask = umask(N_UMASK); /* set up mask */ P--- 48,52 ---- P coptbuf[0] = datebuf[0] = '\0'; P uname(&ubuf); P! strcpy(FROMSYSNAME, ubuf.nodename); P P savmask = umask(N_UMASK); /* set up mask */ P*************** P*** 57,60 **** P--- 57,70 ---- P (void) ftime(&Now); P P+ /* give reasonable error message if SPOOL directory P+ * is unaccessable... usually means system administrator P+ * has "turned off" news reading... P+ */ P+ if (access(SPOOL, 05)) P+ { P+ fputs("News articles are not available at this time\n",stderr); P+ xxit(1); P+ } P+ P #ifndef SHELL P if ((SHELL = getenv("SHELL")) == NULL) P*************** P*** 61,70 **** P SHELL = "/bin/sh"; P #endif P- #ifndef IHCC P /* P! * IHCC does not allow use of $LOGNAME to prevent forgery. P * Note that this shouldn't matter in readnews, since inews P * does all the actual posting of news. P */ P if ((user = getenv("USER")) == NULL) P user = getenv("LOGNAME"); P--- 71,81 ---- P SHELL = "/bin/sh"; P #endif P /* P! * IHCC forces the use of 'getuser()' to prevent forgery of articles P! * by just changing $LOGNAME P * Note that this shouldn't matter in readnews, since inews P * does all the actual posting of news. P */ P+ #ifndef IHCC P if ((user = getenv("USER")) == NULL) P user = getenv("LOGNAME"); P*************** P*** 71,75 **** P if ((home = getenv("HOME")) == NULL) P home = getenv("LOGDIR"); P! #endif P if (user == NULL || home == NULL) P getuser(); P--- 82,86 ---- P if ((home = getenv("HOME")) == NULL) P home = getenv("LOGDIR"); P! #endif /* ! IHCC */ P if (user == NULL || home == NULL) P getuser(); P*************** P*** 270,286 **** P } P P! cleanup(); P /*NOTREACHED*/ P } P P! cleanup() P { P (void) signal(SIGHUP, SIG_IGN); P (void) fflush(stdout); P! if (!news || xflag || lflag || tflag) P! xxit(0); P! if (*groupdir && mode != MAIL) P! updaterc(); P! writeoutrc(); P xxit(0); P } P--- 281,305 ---- P } P P! cleanup(0); P /*NOTREACHED*/ P } P P! cleanup(signo) P { P+ extern short ospeed; P+ P (void) signal(SIGHUP, SIG_IGN); P (void) fflush(stdout); P! if (news && !xflag && !lflag && !tflag) { P! if (*groupdir && mode != MAIL) P! updaterc(); P! writeoutrc(); P! } P! /* P! * stop vnews from clearing the screen if we're P! * killed by a hangup P! */ P! if (signo == SIGHUP) P! ospeed = 0; P xxit(0); P } PIndex: readr.c PPrereq: 2.60 P*** .d/readr.c Wed Dec 17 18:23:27 1986 P--- readr.c Mon Mar 23 13:58:33 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.60 12/16/86"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.61 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 77,80 **** P--- 77,83 ---- P static jmp_buf sigjmpbuf; /* for signal processing */ P static int canlongjmp; /* TRUE if setjmp on sigjmp valid */ P+ short ospeed; /* terminal speed NOT STATIC */ P+ /* used in readnews.c, declared here */ P+ /* to match declaration in visual.c */ P P int catchcont(); P*** .d/rfuncs2.c Mon Dec 29 18:34:12 1986 P--- rfuncs2.c Mon Mar 23 13:58:22 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.34 12/23/86"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.35 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 305,312 **** P FILE *fp; P { P! /* Alas, stdio does not permit this */ P } P P- P /* P * Count the number of remaining lines in file fp. P--- 305,321 ---- P FILE *fp; P { P! #ifdef fileno P! int fno, err; P! P! fno = fileno(fp); P! err = ferror(fp); P! fileno(fp) = -1; P! (void) fflush(fp); P! fileno(fp) = fno; P! if (!err) P! (void) clearerr(fp); P! #endif /* fileno */ P } P P /* P * Count the number of remaining lines in file fp. P*************** P*** 360,364 **** P else { P #ifdef OLD P! fprintf(ofp, "A%s\n%s\n%s!%s\n%s\n%s\n", oident(hh.ident), hh.nbuf, FULLSYSNAME, P hh.path, hh.subdate, hh.title); P #else /* !OLD */ P--- 369,373 ---- P else { P #ifdef OLD P! fprintf(ofp, "A%s\n%s\n%s!%s\n%s\n%s\n", oident(hh.ident), hh.nbuf, PATHSYSNAME, P hh.path, hh.subdate, hh.title); P #else /* !OLD */ P*************** P*** 410,415 **** P return 0; P if (notauthor) P! (void) sprintf(bfr, "%s/%s -c 'cancel %s' -n %s -d local < /dev/null", P! LIB, "inews", hp->ident, hp->nbuf); P else { P if (hp->distribution[0] == '\0') P--- 419,429 ---- P return 0; P if (notauthor) P! (void) sprintf(bfr, "%s/%s -c 'cancel %s' -n %s -d %s < /dev/null", P! LIB, "inews", hp->ident, hp->nbuf, P! #ifdef ORGDISTRIB P! ORGDISTRIB); P! #else /* !ORGDISTRIB */ P! "local"); P! #endif /* !ORGDISTRIB */ P else { P if (hp->distribution[0] == '\0') PIndex: sendnews.c PPrereq: 2.11 P*** .d/sendnews.c Thu Oct 30 16:12:03 1986 P--- sendnews.c Mon Mar 23 13:58:16 1987 P*************** P*** 4,8 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.11 9/19/86"; P #endif /* SCCSID */ P P--- 4,8 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.12 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 9,12 **** P--- 9,13 ---- P #include <stdio.h> P #include <ctype.h> P+ #include "defs.h" P P char buffer[BUFSIZ]; PIndex: uname.c PPrereq: 2.14 P*** .d/uname.c Tue Mar 10 16:13:37 1987 P--- uname.c Mon Mar 23 13:58:09 1987 P*************** P*** 22,26 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.14 3/9/87"; P #endif /* SCCSID */ P P--- 22,26 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.15 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 98,157 **** P } P #endif P- P- P- /* P- * At sites where the are many mail domains within the support area of a single P- * news administrator, it is much nicer to be able to read the local domain of P- * a machine from a file. What we do here is: P- * 1) Check for the presence of a LIBDIR/localdomain file. If it doesn't P- * exist,assume that MYDOMAIN should be used instead. P- * 2) If it does exist, we make the following assumptions: P- * a) If it is empty, has only comments, or only blank lines; we assume P- * the domain is desired to be a zero length string ( ie ""). (this P- * implies that the domain name is contained in the hostname.) P- * b) If it is not empty, we assume the first line not beginning with a P- * '#', blank/tab, or newline is the desired domain name. P- * A like '.UUCP' or '.TEK.COM' should be used. We could insure that P- * the line begin with a '.' to be a valid domain name, but I don't P- * think it is necessary to put that restriction on it. P- */ P- char * P- mydomain() P- { P- static char *md = NULL; P- register char *cp; P- FILE *fp = NULL; P- char fbuf[BUFLEN]; P- extern char *malloc(), *strcpy(), *index(); P- P- if(md) /* we've been here before, so just return what we found */ P- return(md); P- P- (void) sprintf(fbuf,"%s/localdomain", LIBDIR); P- if ( (fp = fopen(fbuf,"r")) == NULL) { P- md = MYDOMAIN; /* No localdomain file, use MYDOMAIN instead */ P- } else { P- while(fgets(fbuf, sizeof(fbuf), fp) ) { P- if( *fbuf == '\n' || *fbuf == '#' P- || *fbuf == ' ' || *fbuf == '\t') P- continue; P- P- if( cp = index(fbuf, '\n') ) P- *cp = '\0'; P- P- if ( (md = malloc(strlen(fbuf) + 1)) == NULL) P- md = MYDOMAIN; /* punt here */ P- else P- (void)strcpy(md, fbuf); P- break; P- } P- } P- P- if(fp) P- (void)fclose(fp); P- P- if( md == NULL) P- md = ""; P- P- return(md); P- } P--- 98,99 ---- PIndex: unbatch.c PPrereq: 1.25 P*** .d/unbatch.c Mon Dec 29 18:34:13 1986 P--- unbatch.c Mon Mar 23 13:58:13 1987 P*************** P*** 14,18 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.25 12/23/86"; P #endif /* SCCSID */ P P--- 14,18 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)unbatch.c 1.26 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 104,108 **** P (void) open(filename, 0); P #ifdef IHCC P! (void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR); P #else P strcpy(buf, RNEWS); P--- 104,108 ---- P (void) open(filename, 0); P #ifdef IHCC P! (void) sprintf(buf, "%s/%s", logdir(HOME), RNEWS); P #else P strcpy(buf, RNEWS); PIndex: uurec.c PPrereq: 2.10 P*** .d/uurec.c Fri Nov 21 16:04:54 1986 P--- uurec.c Mon Mar 23 13:58:05 1987 P*************** P*** 4,8 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.10 11/21/86"; P #endif /* SCCSID */ P P--- 4,8 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.11 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 94,99 **** P pathcnt = 0; P #ifdef IHCC P! sprintf(pbfr, "%s/%s/%s", logdir(HOME), P! LIBDIR, "rnews"); P #else P pbfr = RNEWS; P--- 94,98 ---- P pathcnt = 0; P #ifdef IHCC P! sprintf(pbfr, "%s/%s", logdir(HOME), RNEWS); P #else P pbfr = RNEWS; PIndex: visual.c PPrereq: 1.35 P*** .d/visual.c Mon Dec 29 18:34:06 1986 P--- visual.c Mon Mar 23 13:57:49 1987 P*************** P*** 5,9 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.35 12/23/86"; P #endif /* SCCSID */ P P--- 5,9 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.36 3/21/87"; P #endif /* SCCSID */ P P*************** P*** 227,230 **** P--- 227,232 ---- P P if (!news) { P+ ttycooked(); P+ ospeed = 0; /* to convince xxit() not to clear screen */ P fprintf(stderr, "No news.\n"); P } P*************** P*** 515,519 **** P int wflags; P P! case '|': P case 's': P case 'w': P--- 517,521 ---- P int wflags; P P! case PIPECHAR: P case 's': P case 'w': P*************** P*** 520,525 **** P /* We loop back to here each time user types ^U to prompt */ P do { P! /* No saved default. Ask. */ P! msg( (c=='|')? "|": "file: "); P curflag = CURP2; P while ((wflags = vgetc()) == ' '); P--- 522,527 ---- P /* We loop back to here each time user types ^U to prompt */ P do { P! /* Prompt based on command char */ P! msg( (c==PIPECHAR)? "|": "file: "); P curflag = CURP2; P while ((wflags = vgetc()) == ' '); P*************** P*** 529,536 **** P } P if (wflags != CAGAIN) { P! savebuf[0] = wflags; P! savebuf[1] = 0; P } P! wflags = prget( (savebuf[0] == '|') ? "": "file: ", P savebuf); P } while (wflags == 2); P--- 531,556 ---- P } P if (wflags != CAGAIN) { P! if ((wflags & 0x1F) == wflags) { /* control char */ P! pushback(wflags); P! savebuf[0] = 0; P! } else { P! if (c == PIPECHAR) { P! savebuf[0] = PIPECHAR; P! savebuf[1] = wflags; P! savebuf[2] = 0; P! } else { P! savebuf[0] = wflags; P! savebuf[1] = 0; P! } P! } P! } else { P! /* don't let them pipe to a saved filename */ P! if (c == PIPECHAR && savebuf[0] != PIPECHAR) { P! savebuf[0] = PIPECHAR; P! savebuf[1] = 0; P! } P } P! P! wflags = prget( (savebuf[0] == PIPECHAR) ? "" : "file: ", P savebuf); P } while (wflags == 2); P*************** P*** 537,541 **** P if (wflags) break; /* Interrupted out */ P wflags = 0; P! if (c == '|') c = 's'; P if (c == 's') P wflags |= SVHEAD; P--- 557,561 ---- P if (wflags) break; /* Interrupted out */ P wflags = 0; P! if (c == PIPECHAR) c = 's'; P if (c == 's') P wflags |= SVHEAD; P*************** P*** 578,581 **** P--- 598,618 ---- P (void) strcat(bptr, "Articles"); P } P+ P+ /* handle ~/ for pipes */ P+ if (*bptr == PIPECHAR) { P+ char fullname[BUFLEN]; P+ bptr++; /* skip PIPECHAR */ P+ while( *bptr == ' ') P+ bptr++; /* strip leading spaces */ P+ if (bptr[0] == '~' && bptr[1] == '/') { P+ strcpy(fullname,userhome); P+ strcat(fullname,bptr+2); P+ } else P+ strcpy(fullname,bptr); P+ /* we know PIPECHAR is in *savebuf */ P+ strcpy(savebuf+1,fullname); P+ bptr = savebuf; P+ } P+ P vsave(bptr, wflags); P break; P*************** P*** 667,673 **** P *p = '\0'; P flags = BKGRND; P! } else if (*p == '|') { P *p = '\0'; P! (void) sprintf(bfr, "(%s)|mail '%s'", linebuf, username); P (void) strcpy(linebuf, bfr); P flags |= BKGRND; P--- 704,710 ---- P *p = '\0'; P flags = BKGRND; P! } else if (*p == PIPECHAR) { P *p = '\0'; P! (void) sprintf(bfr, "(%s)%cmail '%s'", linebuf, PIPECHAR, username); P (void) strcpy(linebuf, bfr); P flags |= BKGRND; P*************** P*** 907,918 **** P cancel_command() P { P int notauthor; P P tfilename = filename; P! (void) strcpy(rcbuf, h->path); P! ptr1 = index(rcbuf, ' '); P! if (ptr1) P! *ptr1 = 0; P! notauthor = strcmp(username, rcbuf); P if (uid != ROOTID && uid && notauthor) { P msg("Can't cancel what you didn't write."); P--- 944,960 ---- P cancel_command() P { P+ register char *poster, *r; P int notauthor; P+ char *senderof(); P P+ poster = senderof(&h); P+ /* only compare up to '.' or ' ' */ P+ r = index(poster,'.'); P+ if (r == NULL) P+ r = index(poster,' '); P+ if (r != NULL) P+ *r = '\0'; P tfilename = filename; P! notauthor = strcmp(username, poster); P if (uid != ROOTID && uid && notauthor) { P msg("Can't cancel what you didn't write."); P*************** P*** 1055,1058 **** P--- 1097,1101 ---- P next_ng_command() P { P+ set(bit); P obit = -1; P linebuf[0] = 0; P*************** P*** 1825,1828 **** P--- 1868,1872 ---- P msg(s, a1, a2, a3, a4) P char *s; P+ long a1, a2, a3, a4; P { P (void) sprintf(secpr, s, a1, a2, a3, a4); P*** .d/vnews.help Mon Dec 29 18:34:14 1986 P--- vnews.help Mon Mar 23 11:29:26 1987 P*************** P*** 20,22 **** P l List unread articles in group L List all articles in group P P! [Press ^L to see article again] P--- 20,22 ---- P l List unread articles in group L List all articles in group P P! [Press CR to see article, h to see header... (any command will work)] P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.7... ' sed 's/^P//' >patch.7 <<\PSHAREND PFrom: rick@seismo.CSS.GOV (Rick Adams) PSubject: Patch #7 for news 2.11 src P PThis patch contains no enhancements. It is intended to only correct Pproblems in patch #6. In theory, patch #7 should be a stable, Plargely bugfree version. #8 will add more enhancements and undoubtably Pintroduce new bugs. P PDescription: P This is patch #7 for news 2.11 source. It addresses the following P problems: P P Fix more problems with the GENERICPATH/GENERICFROM defines. P Fix a problem with the interaction of SPOOLNEWS and moderators P posting. P Add ifdef so machines that support flock() but not the fcntl() P interface can define FLOCK. P username was not set in expire causing it to drop core when it P tried to log an error. P inews now handles non-batched rnews input correctly. P checknews now complains if no argument is given with -N P PFix: P cd to the src directory and apply the following patch P PIndex: patchlevel.h PPrereq: 6 P*** .d/patchlevel.h Tue Mar 24 13:51:17 1987 P--- patchlevel.h Mon Apr 6 19:43:42 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 6 P P! #define NEWS_VERSION "B 2.11 3/23/87" P--- 1,3 ---- P! #define PATCHLEVEL 7 P P! #define NEWS_VERSION "B 2.11 4/06/87" P PIndex: params.h PPrereq: 2.22 P*** .d/params.h Tue Mar 24 13:51:47 1987 P--- params.h Mon Apr 6 19:43:42 1987 P*************** P*** 3,7 **** P */ P P! /* @(#)params.h 2.22 3/20/87 */ P P #include <stdio.h> P--- 3,7 ---- P */ P P! /* @(#)params.h 2.23 4/6/87 */ P P #include <stdio.h> P*************** P*** 118,121 **** P--- 118,122 ---- P # ifndef GENERICFROM /* Ugly fix, only for use in pathinit.c */ P # define GENERICFROM "%s%0.0s%s", HIDDENNET P+ # define HIDDENNET_IN_LOCALSYSNAME P # endif P # ifndef GENERICPATH P PIndex: pathinit.c PPrereq: 1.22 P*** .d/pathinit.c Tue Mar 24 13:51:48 1987 P--- pathinit.c Mon Apr 6 19:43:43 1987 P*************** P*** 35,39 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.22 3/23/87"; P #endif /* SCCSID */ P P--- 35,39 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.23 4/6/87"; P #endif /* SCCSID */ P P*************** P*** 118,125 **** P char *p; P #endif /* EXP */ P! #if !defined(CHKN) && !defined(EXP) P! #ifdef GENERICFROM P! int len; P! #endif /* GENERICFROM */ P struct utsname ubuf; P char buf[BUFLEN]; P--- 118,122 ---- P char *p; P #endif /* EXP */ P! #ifndef CHKN P struct utsname ubuf; P char buf[BUFLEN]; P*************** P*** 128,149 **** P uname(&ubuf); P P #ifdef GENERICFROM P (void) sprintf(buf, GENERICFROM, ubuf.nodename, mydomain()); P FROMSYSNAME = AllocCpy(buf); P! len = strlen(ubuf.nodename); P! if (FROMSYSNAME[len] == '.' && P! strncmp(ubuf.nodename, FROMSYSNAME, len) == 0) P! LOCALSYSNAME = FROMSYSNAME; P! else { P! (void) sprintf(buf, "%s.%s", ubuf.nodename, FROMSYSNAME); P! LOCALSYSNAME = AllocCpy(buf); P! } P! #else /* !GENERICFROM */ P! (void) sprintf(buf, "%s%s", ubuf.nodename, mydomain()); P! LOCALSYSNAME = AllocCpy(buf); P FROMSYSNAME = LOCALSYSNAME; P! #endif /* !GENERICFROM */ P P LOCALPATHSYSNAME = AllocCpy(ubuf.nodename); P #ifdef GENERICPATH P (void) sprintf(buf, GENERICPATH, ubuf.nodename, mydomain()); P--- 125,147 ---- P uname(&ubuf); P P+ #ifdef HIDDENNET_IN_LOCALSYSNAME P+ /* old compatibility code, remove when HIDDENNET is used no more */ P+ if (strcmp(ubuf.nodename, HIDDENNET) != 0) P+ (void) sprintf(buf, "%s.%s%s", ubuf.nodename, HIDDENNET, P+ mydomain()); P+ else P+ #endif P+ (void) sprintf(buf, "%s%s", ubuf.nodename, mydomain()); P+ LOCALSYSNAME = AllocCpy(buf); P+ P #ifdef GENERICFROM P (void) sprintf(buf, GENERICFROM, ubuf.nodename, mydomain()); P FROMSYSNAME = AllocCpy(buf); P! #else /* !GENERICFROM */ P FROMSYSNAME = LOCALSYSNAME; P! #endif /* !GENERICFROM */ P P LOCALPATHSYSNAME = AllocCpy(ubuf.nodename); P+ P #ifdef GENERICPATH P (void) sprintf(buf, GENERICPATH, ubuf.nodename, mydomain()); P*************** P*** 153,157 **** P #endif /* !GENERICPATH */ P P! #endif /* !CHKN && ! EXP */ P P #ifdef HOME P--- 151,155 ---- P #endif /* !GENERICPATH */ P P! #endif /* !CHKN */ P P #ifdef HOME P PIndex: ifuncs.c PPrereq: 2.63 P*** .d/ifuncs.c Tue Mar 24 13:51:41 1987 P--- ifuncs.c Mon Apr 6 19:43:39 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.63 3/23/87"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.64 4/6/87"; P #endif /* SCCSID */ P P*************** P*** 1052,1057 **** P { P int c; P P! setbuf(infp, NULL); P while ((c = getc(infp)) == '#') { P /* some kind of batch, investigate further */ P--- 1052,1058 ---- P { P int c; P+ char *cp; P P! setbuf(infp, (char *)NULL); P while ((c = getc(infp)) == '#') { P /* some kind of batch, investigate further */ P*************** P*** 1194,1197 **** P--- 1195,1201 ---- P } P } /* while a batch */ P+ cp = malloc((unsigned)BUFSIZ); P+ if (cp != NULL) P+ setbuf(infp, cp); P if (c != EOF) P (void) ungetc(c, infp); P*************** P*** 1398,1402 **** P LockFd = open(SUBFILE, 2); P if (LockFd < 0) P! logerr("Can't open(%s,2) to lock", SUBFILE); P /* This will sleep until the other program releases the lock */ P /* We may need to alarm out of this, but I don't think so */ P--- 1402,1406 ---- P LockFd = open(SUBFILE, 2); P if (LockFd < 0) P! logerr("Can't open(\"%s\",2) to lock", SUBFILE); P /* This will sleep until the other program releases the lock */ P /* We may need to alarm out of this, but I don't think so */ P PIndex: inews.c PPrereq: 2.78 P*** .d/inews.c Tue Mar 24 13:51:45 1987 P--- inews.c Mon Apr 6 19:43:41 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.78 3/23/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.79 4/6/87"; P #endif /* SCCSID */ P P*************** P*** 27,31 **** P--- 27,33 ---- P # include <fcntl.h> P P+ # ifdef F_RDLCK P struct flock news_lock; P+ # endif /* F_RDLCK */ P # endif /* LOCKF */ P P*************** P*** 353,357 **** P /* there are certain fields we won't let him specify. */ P if (header.from[0]) { P! if (Sflag) { P register char *p; P strcpy(bfr, header.from); P--- 355,360 ---- P /* there are certain fields we won't let him specify. */ P if (header.from[0]) { P! if (Sflag && !Mflag && !header.approved[0] & P! !header.sender[0]) { P register char *p; P strcpy(bfr, header.from); P*************** P*** 533,537 **** P mfd = mailhdr((struct hbuf *)NULL, P exists(dir) ? "Unwritable directories" : "Missing directories"); P! if (mfs == NULL) P return; P putc('\n', mfd); P--- 536,540 ---- P mfd = mailhdr((struct hbuf *)NULL, P exists(dir) ? "Unwritable directories" : "Missing directories"); P! if (mfd == NULL) P return; P putc('\n', mfd); P*************** P*** 941,946 **** P savehist(histline); P } else { P! if (s_find(&srec, PATHSYSNAME) == FALSE) { P! logerr("Cannot find my name '%s' in %s", PATHSYSNAME, SUBFILE); P srec = dummy_srec; P } P--- 944,950 ---- P savehist(histline); P } else { P! if (s_find(&srec, LOCALPATHSYSNAME) == FALSE) { P! logerr("Cannot find my name '%s' in %s", P! LOCALPATHSYSNAME, SUBFILE); P srec = dummy_srec; P } PIndex: checknews.c PPrereq: 2.28 P*** .d/checknews.c Tue Feb 24 17:55:41 1987 P--- checknews.c Mon Apr 6 19:43:35 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.28 2/22/87"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.29 4/6/87"; P #endif /* SCCSID */ P P*************** P*** 72,75 **** P--- 72,77 ---- P case 'N': P nflag++; P+ if (argc <= 1) P+ xerror("No newsgroup specified with -N"); P strcpy(narggrp,argv[1]); P strcat(narggrp,","); PIndex: expire.c PPrereq: 2.52 P*** .d/expire.c Tue Mar 24 13:51:29 1987 P--- expire.c Mon Apr 6 19:43:37 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.52 3/20/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.53 4/6/87"; P #endif /* SCCSID */ P P*************** P*** 114,117 **** P--- 114,118 ---- P pathinit(); P (void) umask(N_UMASK); P+ username = NEWSUSR; P P /* P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.8... ' sed 's/^P//' >patch.8 <<\PSHAREND PFrom seismo!rick Mon Apr 13 10:12:37 MET DST 1987 PArticle 402 of news.software.b: PPath: mcvax!seismo!rick P>From: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: patch #8 for news 2.11 src (IMPORTANT) PKeywords: stupid PMessage-ID: <43388@beno.seismo.CSS.GOV> PDate: 11 Apr 87 04:30:36 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 434 P PIf you have installed patch #6 it is important that you install this Ppatch. (Having installed #7 implies that you have installed #6). PPatch #6 added locking so that only 1 newgroup message at a time Pwould be running. Unfortunately, if the newgroup message was for a Pgroup that already existed, you did a premature return and did Pnot unlock inews. P PDescription: P This is patch #8 for news 2.11 source. It addresses the following P problems: P P The newgroup locking mentioned above. P Cancel control messages for articles that were non-existant are P not forwarded. P If SPOOLNEWS is defined, locally generated articles (i.e. inews P not rnews) are processed immediately unless SPOOLINEWS is defined. P Several defines that are no longer used were removed. P The SPOOLNEWS code was made a little more readable. P A temporary file used for rnews -U interlocking is now removed. P PFix: P cd to the src directory and apply the following patch P PIndex: patchlevel.h PPrereq: 7 P*** .d/patchlevel.h Tue Apr 7 13:58:31 1987 P--- patchlevel.h Fri Apr 10 23:40:11 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 7 P P! #define NEWS_VERSION "B 2.11 4/06/87" P--- 1,3 ---- P! #define PATCHLEVEL 8 P P! #define NEWS_VERSION "B 2.11 4/10/87" P PIndex: control.c PPrereq: 2.53 P*** .d/control.c Tue Mar 24 13:51:24 1987 P--- control.c Fri Apr 10 23:40:06 1987 P*************** P*** 20,24 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.53 3/20/87"; P #endif /* SCCSID */ P P--- 20,24 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.54 4/10/87"; P #endif /* SCCSID */ P P*************** P*** 57,65 **** P */ P P- static int is_proc; P P! control(h, isproc) P struct hbuf *h; P- int isproc; P { P register char *ctlmsgtext; P--- 57,63 ---- P */ P P P! control(h) P struct hbuf *h; P { P register char *ctlmsgtext; P*************** P*** 66,70 **** P register struct msgtype *mp; P P- is_proc = isproc; P if (strncmp(h->title, "cmsg ", 5) == 0) { P register char *cp1, *cp2; P--- 64,67 ---- P*************** P*** 397,402 **** P #endif /* NONEWGROUPS */ P } else { P! if (*p != 'm') P return 0; P # ifdef NONEWGROUPS P if(can_change) { P--- 394,401 ---- P #endif /* NONEWGROUPS */ P } else { P! if (*p != 'm') { P! unlock(); P return 0; P+ } P # ifdef NONEWGROUPS P if(can_change) { P*************** P*** 644,648 **** P tm->tm_min); P savehist(bfr); P! return is_proc ? 0 : 1; P } P P--- 643,647 ---- P tm->tm_min); P savehist(bfr); P! return -1; P } P P*************** P*** 652,656 **** P *q = '\0'; P log("Expired article %s", line); P! return is_proc ? 0 : 1; P } P if (strcmp(p, "cancelled") == 0) { P--- 651,655 ---- P *q = '\0'; P log("Expired article %s", line); P! return -1; P } P if (strcmp(p, "cancelled") == 0) { P*************** P*** 657,661 **** P *q = '\0'; P log("Already Cancelled %s", line); P! return is_proc ? 0 : 1; P } else P log("Cancelling %s", line); P--- 656,660 ---- P *q = '\0'; P log("Already Cancelled %s", line); P! return -1; P } else P log("Cancelling %s", line); P PIndex: defs.dist PPrereq: 2.57 P*** .d/defs.dist Tue Mar 24 13:56:06 1987 P--- defs.dist Fri Apr 10 23:40:06 1987 P*************** P*** 15,19 **** P */ P P! /* @(#)defs.dist 2.57 3/23/87 */ P P /* P--- 15,19 ---- P */ P P! /* @(#)defs.dist 2.58 4/10/87 */ P P /* P*************** P*** 50,55 **** P #define MANUALLY /* Don't execute rmgroups, just notify. */ P /* #define NONEWGROUPS /* Don't create new groups, just notify.*/ P! #define BATCH "unbatch" /* name of unbatcher */ P! /* #define SPOOLNEWS /* Spool incoming news, don't process */ P /* #define LOCALNAME /* There is no full name database. */ P /* #define INTERNET /* Internet mail works locally */ P--- 50,55 ---- P #define MANUALLY /* Don't execute rmgroups, just notify. */ P /* #define NONEWGROUPS /* Don't create new groups, just notify.*/ P! /* #define SPOOLNEWS /* Spool incoming rnews, don't process */ P! /* #define SPOOLINEWS /* Spool local inews, don't process */ P /* #define LOCALNAME /* There is no full name database. */ P /* #define INTERNET /* Internet mail works locally */ P PIndex: ifuncs.c PPrereq: 2.64 P*** .d/ifuncs.c Tue Apr 7 13:58:42 1987 P--- ifuncs.c Fri Apr 10 23:40:09 1987 P*************** P*** 17,21 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.64 4/6/87"; P #endif /* SCCSID */ P P--- 17,21 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.65 4/10/87"; P #endif /* SCCSID */ P P*************** P*** 24,29 **** P /*LINTLIBRARY*/ P P- #define AFSIZ 4000 /* size of text in the active file for initial malloc */ P- P /* P * Transmit this article to all interested systems. P--- 24,27 ---- P*************** P*** 1026,1030 **** P } P P- #ifdef BATCH P /* P * If the stdin begins with "#" the input is some kind of batch. if P--- 1024,1027 ---- P*************** P*** 1307,1311 **** P xxit(2); P } P- #endif /* BATCH */ P P /* P--- 1304,1307 ---- P PIndex: inews.c PPrereq: 2.79 P*** .d/inews.c Tue Apr 7 13:58:48 1987 P--- inews.c Fri Apr 10 23:40:11 1987 P*************** P*** 18,22 **** P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.79 4/6/87"; P #endif /* SCCSID */ P P--- 18,22 ---- P P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.80 4/10/87"; P #endif /* SCCSID */ P P*************** P*** 52,58 **** P #define CREATENG 0020 /* Create a new newsgroup */ P P! char forgedname[NAMELEN]; /* A user specified -f option. */ P! int spool_news = 0; P extern char histline[]; P /* Fake sys line in case they forget their own system */ P struct srec dummy_srec = { "MEMEME", "", "all", "", "" }; P--- 52,62 ---- P #define CREATENG 0020 /* Create a new newsgroup */ P P! #define DONT_SPOOL 0 P! #define DO_SPOOL 1 P! #define EXPIRE_RUNNING 2 P! int spool_news = DONT_SPOOL; P! P extern char histline[]; P+ char forgedname[NAMELEN]; /* A user specified -f option. */ P /* Fake sys line in case they forget their own system */ P struct srec dummy_srec = { "MEMEME", "", "all", "", "" }; P*************** P*** 153,157 **** P #endif /* !BSD4_2 */ P xerror("Can't lock %s: %s", ACTIVE, errmsg(errno)); P! spool_news = 2; P } else { P #ifdef SPOOLNEWS P--- 157,161 ---- P #endif /* !BSD4_2 */ P xerror("Can't lock %s: %s", ACTIVE, errmsg(errno)); P! spool_news = EXPIRE_RUNNING; P } else { P #ifdef SPOOLNEWS P*************** P*** 161,169 **** P Sflag = 1; P } else P! spool_news = 1; P P #endif /* SPOOLNEWS */ P } P! if (spool_news != 2) { P /* only unlock if we locked */ P #ifdef LOCKF P--- 165,173 ---- P Sflag = 1; P } else P! spool_news = DO_SPOOL; P P #endif /* SPOOLNEWS */ P } P! if (spool_news != EXPIRE_RUNNING) { P /* only unlock if we locked */ P #ifdef LOCKF P*************** P*** 181,185 **** P } P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P! if (spool_news > 1) /* can't unspool while things are locked */ P xxit(0); P dounspool(); P--- 185,190 ---- P } P if (argc > 1 && !strcmp(*(argv+1), "-U")) { P! /* can't unspool while things are locked */ P! if (spool_news == EXPIRE_RUNNING) P xxit(0); P dounspool(); P*************** P*** 189,193 **** P if (!strncmp(ptr+1, "rnews", 5)) { P mode = PROC; P! if (spool_news) { P dospool((char *)NULL, FALSE); P /* NOT REACHED */ P--- 194,198 ---- P if (!strncmp(ptr+1, "rnews", 5)) { P mode = PROC; P! if (spool_news != DONT_SPOOL) { P dospool((char *)NULL, FALSE); P /* NOT REACHED */ P*************** P*** 197,203 **** P (void) nice(NICENESS); P #endif /* NICENESS */ P! } else P if (argc < 2) P goto usage; P P state = OPTION; P--- 202,214 ---- P (void) nice(NICENESS); P #endif /* NICENESS */ P! } else { P! /* it's not rnews, so it must be inews */ P if (argc < 2) P goto usage; P+ #ifndef SPOOLINEWS P+ if (spool_news == DO_SPOOL) P+ spool_news = DONT_SPOOL; P+ #endif /* SPOOLINEWS */ P+ } P P state = OPTION; P*************** P*** 355,358 **** P--- 366,370 ---- P /* there are certain fields we won't let him specify. */ P if (header.from[0]) { P+ (void) fixfrom(&header); P if (Sflag && !Mflag && !header.approved[0] & P !header.sender[0]) { P*************** P*** 437,443 **** P /* Authorize newsgroups. */ P if (mode == PROC) { P- #ifdef BATCH P checkbatch(); P- #endif /* BATCH */ P (void) signal(SIGHUP, SIG_IGN); P (void) signal(SIGINT, SIG_IGN); P--- 449,453 ---- P*************** P*** 846,851 **** P tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min); P addhist(bfr); P! log("%s %s ng %s subj '%s' from %s", P! spool_news ? "queued" : (mode==PROC ? "received" : "posted"), P header.ident, header.nbuf, header.title, header.from); P P--- 856,861 ---- P tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min); P addhist(bfr); P! log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL P! ? "queued" : (mode==PROC ? "received" : "posted"), P header.ident, header.nbuf, header.title, header.from); P P*************** P*** 928,935 **** P } P P! if (mode != PROC && spool_news) { P! if (spool_news == 1 && ngmatch(header.nbuf, "to.all.ctl")) P! spool_news = 0; P! if (spool_news) { P fprintf(stderr, P "Your article has been spooled for later processing.\n"); P--- 938,946 ---- P } P P! if (mode != PROC && spool_news != DONT_SPOOL) { P! if (spool_news != EXPIRE_RUNNING P! && ngmatch(header.nbuf,"to.all.ctl")) P! spool_news = DONT_SPOOL; P! if (spool_news != DONT_SPOOL) { P fprintf(stderr, P "Your article has been spooled for later processing.\n"); P*************** P*** 940,944 **** P P if (is_ctl) { P! exitcode = control(&header, mode == PROC); P if (localize("control") && exitcode != 0) P savehist(histline); P--- 951,955 ---- P P if (is_ctl) { P! exitcode = control(&header); P if (localize("control") && exitcode != 0) P savehist(histline); P*************** P*** 1023,1027 **** P broadcast(mode==PROC); P } P! xxit((mode == PROC && filename[0] == '\0') ? 0 : exitcode); P } P P--- 1034,1039 ---- P broadcast(mode==PROC); P } P! xxit((mode == PROC && filename[0] == '\0') ? 0 : P! (exitcode < 0 ? 0 : exitcode)); P } P P*************** P*** 1271,1276 **** P sprintf(bfr, "%s.tmp", spbuf); P (void) close(creat(bfr, 0666)); P! if (LINK(bfr, spbuf) < 0) { P! (void) UNLINK(bfr); P if (errno != EEXIST) P #endif /* V7 */ P--- 1283,1291 ---- P sprintf(bfr, "%s.tmp", spbuf); P (void) close(creat(bfr, 0666)); P! ret = LINK(bfr, spbuf); P! status = errno; P! (void) UNLINK(bfr); P! errno = status; P! if (ret < 0) { P if (errno != EEXIST) P #endif /* V7 */ P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.9... ' sed 's/^P//' >patch.9 <<\PSHAREND PFrom mcvax!uunet!seismo!rick Tue Sep 29 14:22:39 MET 1987 PArticle 701 of news.software.b: PPath: mcvax!uunet!seismo!rick P>From: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: 2.11 news src patch #9 PKeywords: #10 is coming very soon PMessage-ID: <44098@beno.seismo.CSS.GOV> PDate: 25 Sep 87 23:50:57 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 1637 P PDescription: P This is patch #9 for news 2.11 src. Patch #10 will follow in a P few days. You can wait for both of them before applying them. P (They were to big to fit in one patch.) P P Parallelize the makefile and remove the unused unbatch command. P Make checkgroups a little more robust. P Allow fullnames with embedded hyphens. P Keep getdate from running off the end of a buffer. P Various lint fixes. P Various Xenix fixes. P Update the newsgroups lists so virgin installations have a P reasonably accurate newsgroup list. P Fix "make install" to work if the existing binaries are already P in use. P Sendbatch now stops batching when the first file of artciles to P be batched is exhausted. P PFix: P cd to the src directory and apply the following patch. P PIndex: Makefile.dst PPrereq: 1.23 P*** .d/Makefile.dst Tue Mar 24 13:51:18 1987 P--- Makefile.dst Thu Sep 24 18:13:35 1987 P*************** P*** 1,2 P! # '@(#)Makefile.dst 1.23 3/23/87' P # Generic Makefile. P P--- 1,2 ----- P! # '@(#)Makefile.dst 1.24 9/24/87' P # Generic Makefile. P*************** P*** 5,6 P P # definitions P P--- 5,9 ----- P P+ # We MUST use the Bourne shell during the install phase P+ SHELL=/bin/sh P+ P # definitions P*************** P*** 16,17 P P NEWSUSR = news P P--- 19,23 ----- P P+ # Support for Parallel Make files on a Sequent P+ #P=& P+ P NEWSUSR = news P*************** P*** 71,73 P #USG MISC = ftime.o P! OBJECTS = funcs.o funcs2.o getdate.o header.o ndir.o $(MISC) P IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o \ P P--- 77,79 ----- P #USG MISC = ftime.o P! OBJECTS = funcs.o funcs2.o header.o ndir.o $(MISC) getdate.o P IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o \ P*************** P*** 73,75 P IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o \ P! ipathinit.o $(OBJECTS) P P P--- 79,81 ----- P IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o \ P! $(OBJECTS) ipathinit.o P P*************** P*** 77,83 P ROBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o readr.o \ P! process.o rpathinit.o digest.o $(OBJECTS) P! VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o rpathinit.o \ P! $(OBJECTS) visual.o virtterm.o P! EXPOBJS = expire.o header.o funcs.o getdate.o iextern.o epathinit.o \ P! funcs2.o ndir.o $(MISC) P P P--- 83,89 ----- P ROBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o readr.o \ P! process.o digest.o $(OBJECTS) rpathinit.o P! VOBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o process.o \ P! $(OBJECTS) visual.o virtterm.o rpathinit.o P! EXPOBJS = expire.o header.o funcs.o getdate.o iextern.o \ P! funcs2.o ndir.o $(MISC) epathinit.o P P*************** P*** 92,94 P funcs2.c P! OSRCS = uurec.c recnews.c sendnews.c batch.c unbatch.c caesar.c \ P recmail.c compress.c P P--- 98,100 ----- P funcs2.c P! OSRCS = uurec.c recnews.c sendnews.c batch.c caesar.c \ P recmail.c compress.c P*************** P*** 95,97 P P! UTILS = inews uurec recnews sendnews expire batch unbatch caesar recmail \ P encode decode $(COMPRESS) P P--- 101,103 ----- P P! UTILS = uurec recnews sendnews expire batch caesar recmail \ P encode decode $(COMPRESS) P*************** P*** 98,100 P SCRIPTS = sendbatch rmgroup checkgroups P! OTHERS = $(UTILS) $(SCRIPTS) P COMMANDS = readnews checknews postnews vnews P P--- 104,106 ----- P SCRIPTS = sendbatch rmgroup checkgroups P! OTHERS = inews $(UTILS) $(SCRIPTS) P COMMANDS = readnews checknews postnews vnews P*************** P*** 102,104 P # dependencies P! all: $(OTHERS) $(COMMANDS) P P P--- 108,110 ----- P # dependencies P! all: $(P) $(OTHERS) $(COMMANDS) P P*************** P*** 105,106 P install: all help vnews.help P -mkdir $(DESTDIR)$(BINDIR) P P--- 111,113 ----- P install: all help vnews.help P+ chmod 755 ./installit P -mkdir $(DESTDIR)$(BINDIR) P*************** P*** 107,121 P -mkdir $(DESTDIR)$(LIBDIR) P! cp $(COMMANDS) $(DESTDIR)$(BINDIR) P! -cd $(DESTDIR)$(BINDIR); \ P! strip $(COMMANDS); \ P! chown $(NEWSUSR) $(COMMANDS); \ P! chgrp $(NEWSGRP) $(COMMANDS); \ P! chmod 755 $(COMMANDS) P! cp help vnews.help $(OTHERS) $(DESTDIR)$(LIBDIR) P! cd $(DESTDIR)$(LIBDIR); \ P! strip $(UTILS); \ P! chown $(NEWSUSR) $(OTHERS); \ P! chgrp $(NEWSGRP) $(OTHERS); \ P! chmod 755 $(OTHERS) P! -rm -f $(DESTDIR)$(BINDIR)/rnews $(DESTDIR)$(BINDIR)/inews P ${LNRNEWS} $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P P--- 114,131 ----- P -mkdir $(DESTDIR)$(LIBDIR) P! for i in $(COMMANDS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P! $(DESTDIR)$(BINDIR); \ P! done P! cp help vnews.help $(DESTDIR)$(LIBDIR) P! for i in $(UTILS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P! $(DESTDIR)$(LIBDIR); \ P! done P! for i in $(SCRIPTS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) $$i \ P! $(DESTDIR)$(LIBDIR); \ P! done P! ./installit -m 6755 -o $(NEWSUSR) -g $(NEWSGRP) -s inews \ P! $(DESTDIR)$(LIBDIR) P! -rm -f $(DESTDIR)$(BINDIR)/rnews P ${LNRNEWS} $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P*************** P*** 121,124 P ${LNRNEWS} $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P- chown $(NEWSUSR) $(DESTDIR)$(LIBDIR)/inews P- chgrp $(NEWSGRP) $(DESTDIR)$(LIBDIR)/inews P chmod 6755 $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P P--- 131,132 ----- P ${LNRNEWS} $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P chmod 6755 $(DESTDIR)$(LIBDIR)/inews $(DESTDIR)$(BINDIR)/rnews P*************** P*** 160,162 P P! inews: $(IOBJECTS) P $(CC) $(LFLAGS) $(IOBJECTS) -o inews $(LIBS) #NOTVMS P P--- 168,170 ----- P P! inews: $(P) $(IOBJECTS) P $(CC) $(LFLAGS) $(IOBJECTS) -o inews $(LIBS) #NOTVMS P*************** P*** 166,168 P P! readnews: $(ROBJECTS) P $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(LIBS) P P--- 174,176 ----- P P! readnews: $(P) $(ROBJECTS) P $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(LIBS) P*************** P*** 192,194 P P! postnews: $(POBJECTS) P $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews P P--- 200,202 ----- P P! postnews: $(P) $(POBJECTS) P $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews P*************** P*** 217,219 P P! vnews: $(VOBJECTS) P $(CC) $(LFLAGS) $(VOBJECTS) $(TERMLIB) $(LIBS) -o $@ P P--- 225,227 ----- P P! vnews: $(P) $(VOBJECTS) P $(CC) $(LFLAGS) $(VOBJECTS) $(TERMLIB) $(LIBS) -o $@ P*************** P*** 252,257 P P- unbatch: unbatch.c Makefile P- $(CC) $(CFLAGS) $(LFLAGS) unbatch.c -o unbatch P- #VMS mv unbatch.exe unbatch P- P encode: encode.c P P--- 260,261 ----- P P encode: encode.c P*************** P*** 279,281 P P! checknews: checknews.o process.o cpathinit.o rextern.o P $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o -o checknews P P--- 283,285 ----- P P! checknews: $(P) checknews.o process.o cpathinit.o rextern.o P $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o -o checknews P*************** P*** 305,307 P P! expire: $(EXPOBJS) P $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) P P--- 309,311 ----- P P! expire: $(P) $(EXPOBJS) P $(CC) $(LFLAGS) -o expire $(EXPOBJS) $(LIBS) PIndex: checkgroups.sh PPrereq: 1.22 P*** .d/checkgroups.sh Tue Mar 24 13:51:19 1987 P--- checkgroups.sh Thu Sep 24 18:13:24 1987 P*************** P*** 1,3 P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.22 3/20/87' P P P--- 1,3 ----- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.23 9/24/87' P P*************** P*** 7,8 P fi P # Read first line of stdin. If of the form "-n group", then only check P P--- 7,9 ----- P fi P+ echo "" >/tmp/$$out P # Read first line of stdin. If of the form "-n group", then only check P*************** P*** 9,11 P # for the specified group. Otherwise, assume doing standard groups P! sed -e '/^[a-zA-Z-]*: /d' -e '/^$/d' -e '/^[#:]/d' | ( P read line P P--- 10,12 ----- P # for the specified group. Otherwise, assume doing standard groups P! sed -e "/^From: /w /tmp/$$out" -e '/^[a-zA-Z-]*: /d' -e '/^$/d' -e '/^[#:]/d' | ( P read line P*************** P*** 16,18 P # Then append entries for this group. P! group=`echo "${line}" | sed -e 's/-n /^/' -e 's/$/\\\\./'` P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P P--- 17,19 ----- P # Then append entries for this group. P! group=`echo "x${line}" | sed -e 's/x-n /^/' -e 's/$/[. ]/'` P egrep -v "${group}" LIBDIR/newsgroups > /tmp/$$a P*************** P*** 33,35 P group=`cat /tmp/$$b` P! group="${group}|^$dist\\." P echo "${group}" > /tmp/$$b P P--- 34,36 ----- P group=`cat /tmp/$$b` P! group="${group}|^$dist[. ]" P echo "${group}" > /tmp/$$b P*************** P*** 45,47 P egrep "${group}" LIBDIR/active | sed 's/ .*//' | sort >/tmp/$$active P! egrep "${group}" LIBDIR/newsgroups | sed 's/ .*//' | sort >/tmp/$$newsgrps P P P--- 46,48 ----- P egrep "${group}" LIBDIR/active | sed 's/ .*//' | sort >/tmp/$$active P! egrep "${group}" LIBDIR/newsgroups | sed 's/[ ].*//' | sort >/tmp/$$newsgrps P P*************** P*** 64,65 P P if test -s /tmp/$$remove P P--- 65,67 ----- P P+ echo "" >>/tmp/$$out P if test -s /tmp/$$remove P*************** P*** 67,69 P ( P! echo "The following newsgroups are not valid and should be removed." P sed "s/^/ /" /tmp/$$remove P P--- 69,71 ----- P ( P! echo "The following newsgroups are non-standard." P sed "s/^/ /" /tmp/$$remove P*************** P*** 70,72 P echo "" P! echo "You can do this by executing the command:" P echo \ LIBDIR/rmgroup `cat /tmp/$$remove` P P--- 72,74 ----- P echo "" P! echo "You can remove them by executing the commands:" P echo \ LIBDIR/rmgroup `cat /tmp/$$remove` P*************** P*** 73,75 P echo "" P! ) 2>&1 >/tmp/$$out P fi P P--- 75,77 ----- P echo "" P! ) 2>&1 >>/tmp/$$out P fi PIndex: compress.c PPrereq: 1.13 P*** .d/compress.c Wed Dec 17 18:23:02 1986 P--- compress.c Thu Sep 24 18:13:39 1987 P*************** P*** 1,3 P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.13 12/16/86"; P #endif /* SCCSID */ P P--- 1,3 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.14 9/24/87"; P #endif /* SCCSID */ P*************** P*** 75,77 P # define BITS PBITS P! # endif BITS P #endif /* PBITS */ P P--- 75,77 ----- P # define BITS PBITS P! # endif /* BITS */ P #endif /* PBITS */ P*************** P*** 160,162 P #ifdef COMPATIBLE /* But wrong! */ P! # define MAXCODE(n_bits) (1 << (n_bits) - 1) P #else P P--- 160,162 ----- P #ifdef COMPATIBLE /* But wrong! */ P! # define MAXCODE(n_bits) (1L << (n_bits) - 1) P #else P*************** P*** 162,164 P #else P! # define MAXCODE(n_bits) ((1 << (n_bits)) - 1) P #endif /* COMPATIBLE */ P P--- 162,164 ----- P #else P! # define MAXCODE(n_bits) ((1L << (n_bits)) - 1) P #endif /* COMPATIBLE */ P*************** P*** 1093,1095 P #else P! code_int sorttab[SSIZE]; /* sorted pointers into htab */ P #define stabof(i) (sorttab[i]) P P--- 1093,1095 ----- P #else P! code_int sorttab[HSIZE]; /* sorted pointers into htab */ P #define stabof(i) (sorttab[i]) P*************** P*** 1148,1151 P de_stack[--stack_top] = '"'; P! for ( ; ent != NULL; P! ent = (ent >= FIRST ? tab_prefixof(ent) : NULL) ) { P stack_top = in_stack(tab_suffixof(ent), stack_top); P P--- 1148,1151 ----- P de_stack[--stack_top] = '"'; P! for ( ; ent != 0; P! ent = (ent >= FIRST ? tab_prefixof(ent) : 0) ) { P stack_top = in_stack(tab_suffixof(ent), stack_top); PIndex: fullname.c PPrereq: 1.11 P*** .d/fullname.c Thu Oct 30 16:11:51 1986 P--- fullname.c Thu Sep 24 18:13:40 1987 P*************** P*** 16,18 P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.11 9/16/86"; P #endif /* SCCSID */ P P--- 16,18 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.12 9/24/87"; P #endif /* SCCSID */ P*************** P*** 127,129 P { P! if (*p == '-') { P bp = buf; P P--- 127,129 ----- P { P! if (*p == '-' && isspace(p[1])) { P bp = buf; PIndex: getdate.y PPrereq: 2.15 P*** .d/getdate.y Wed Dec 17 18:23:12 1986 P--- getdate.y Thu Sep 24 18:13:43 1987 P*************** P*** 5,7 P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.15 12/16/86 */ P P P--- 5,7 ----- P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.16 9/24/87 */ P P*************** P*** 7,8 P P #include <sys/types.h> P P--- 7,9 ----- P P+ #include "defs.h" P #include <sys/types.h> P*************** P*** 21,23 P P- #include "defs.h" P #if defined(BSD4_2) || defined (BSD4_1C) P P--- 22,23 ----- P P #if defined(BSD4_2) || defined (BSD4_1C) P*************** P*** 246,248 P while (isalpha(c = *lptr++) || c=='.') P! *p++ = c; P *p = '\0'; P P--- 246,248 ----- P while (isalpha(c = *lptr++) || c=='.') P! if (p < &idbuf[sizeof(idbuf)-1]) *p++ = c; P *p = '\0'; PIndex: iextern.c PPrereq: 2.17 P*** .d/iextern.c Thu Oct 30 16:10:46 1986 P--- iextern.c Thu Sep 24 18:15:30 1987 P*************** P*** 3,4 P */ P P P--- 3,5 ----- P */ P+ /*LINTLIBRARY*/ P P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)iextern.c 2.17 9/19/86"; P #endif /* SCCSID */ P P--- 6,8 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)iextern.c 2.18 9/24/87"; P #endif /* SCCSID */ PIndex: install.sh PPrereq: 1.17 P*** .d/install.sh Wed Dec 17 18:23:20 1986 P--- install.sh Thu Sep 24 18:13:45 1987 P*************** P*** 1,2 P! : '@(#)install.sh 1.17 12/16/86' P P P--- 1,2 ----- P! : '@(#)install.sh 1.18 9/24/87' P P*************** P*** 22,24 P chgrp $NEWSGRP $LIBDIR/history.d P! fi;; P v7) SYSNAME=`uuname -l` P P--- 22,31 ----- P chgrp $NEWSGRP $LIBDIR/history.d P! fi P! for i in 0 1 2 3 4 5 6 7 8 9 P! do P! touch $LIBDIR/history.d/$i P! chown $NEWSUSR $LIBDIR/history.d/$i P! chgrp $NEWSGRP $LIBDIR/history.d/$i P! done P! ;; P v7) SYSNAME=`uuname -l` P*************** P*** 63,66 P cat > $LIBDIR/sys << EOF P! $SYSNAME:world,comp,sci,news,rec,soc,talk,misc,net,mod,na,usa,to:: P! oopsvax:world,comp,sci,news,rec,soc,talk,misc,net,mod,na,usa,to.oopsvax:: P EOF P P--- 70,73 ----- P cat > $LIBDIR/sys << EOF P! $SYSNAME:world,comp,sci,news,rec,soc,talk,misc,na,usa,to:: P! oopsvax:world,comp,sci,news,rec,soc,talk,misc,na,usa,to.oopsvax:: P EOF P*************** P*** 112,259 P cat >$LIBDIR/aliases.new <<EOF P! net.audio rec.audio P! net.auto rec.autos P! net.auto.tech rec.autos.tech P! net.aviation rec.aviation P! net.bicycle rec.bicycles P! net.rec.birds rec.birds P! net.rec.boat rec.boats P! net.cooks rec.food.cooking P! net.wines rec.food.drink P! net.veg rec.food.veg P! net.games rec.games.misc P! net.games.board rec.games.board P! net.rec.bridge rec.games.bridge P! net.games.chess rec.games.chess P! net.games.emp rec.games.empire P! net.games.frp rec.games.frp P! net.games.go rec.games.go P! net.games.hack rec.games.hack P! net.games.pbm rec.games.pbm P! net.games.rogue rec.games.rogue P! net.games.trivia rec.games.trivia P! net.games.video rec.games.video P! net.garden rec.gardens P! net.ham-radio rec.ham-radio P! net.ham-radio.packet rec.ham-radio.packet P! net.jokes rec.humor P! net.jokes.d rec.humor.d P! mod.mag rec.mag P! net.mag rec.mag P! net.books rec.arts.books P! net.comics rec.arts.comics P! net.tv.drwho rec.arts.drwho P! mod.movies rec.arts.movies P! net.movies rec.arts.movies P! net.sf-lovers rec.arts.sf-lovers P! net.startrek rec.arts.startrek P! net.tv rec.arts.tv P! net.tv.soaps rec.arts.tv.soaps P! net.wobegon rec.arts.wobegon P! net.rec rec.misc P! net.cycle rec.motorcycles P! net.music.classical rec.music.classical P! net.music.folk rec.music.folk P! net.music.gdead rec.music.gdead P! net.music.makers rec.music.makers P! net.music rec.music.misc P! net.music.synth rec.music.synth P! net.rec.nude rec.nude P! net.pets rec.pets P! net.rec.photo rec.photo P! net.poems rec.arts.poems P! net.puzzle rec.puzzles P! net.railroad rec.railroad P! net.rec.scuba rec.scuba P! net.rec.ski rec.skiing P! net.rec.skydive rec.skydiving P! net.sport rec.sport.misc P! net.sport.baseball rec.sport.baseball P! net.sport.hoops rec.sport.basketball P! net.sport.football rec.sport.football P! net.sport.hockey rec.sport.hockey P! net.travel rec.travel P! net.video rec.video P! net.rec.wood rec.woodworking P! net.ai comp.ai P! net.arch comp.arch P! net.bugs.2bsd comp.bugs.2bsd P! net.bugs.4bsd comp.bugs.4bsd P! net.bugs.usg comp.bugs.sys5 P! net.bugs.uucp comp.bugs.misc P! net.bugs.v7 comp.bugs.misc P! net.bugs comp.bugs.misc P! net.cog-eng comp.cog-eng P! net.cse comp.edu P! net.database comp.databases P! net.dcom comp.dcom.modems P! net.decus comp.org.decus P! net.emacs comp.emacs P! net.eunice comp.os.eunice P! net.graphics comp.graphics P! net.info-terms comp.terminals P! net.internat comp.std.internat P! net.lan comp.dcom.lans P! net.lang comp.lang.misc P! net.lang.ada comp.lang.ada P! net.lang.apl comp.lang.apl P! net.lang.c comp.lang.c P! net.lang.c++ comp.lang.c++ P! net.lang.f77 comp.lang.fortran P! net.lang.forth comp.lang.forth P! net.lang.lisp comp.lang.lisp P! net.lang.mod2 comp.lang.modula2 P! net.lang.pascal comp.lang.pascal P! net.lang.prolog comp.lang.prolog P! net.lang.st80 comp.lang.smalltalk P! net.lsi comp.lsi P! net.mail comp.mail.uucp P! net.mail.headers comp.mail.headers P! net.micro comp.sys.misc P! net.micro.6809 comp.sys.m6809 P! net.micro.68k comp.sys.m68k P! net.micro.apple comp.sys.apple P! net.micro.amiga comp.sys.amiga P! net.micro.atari16 comp.sys.atari.st P! net.micro.atari8 comp.sys.atari.8bit P! net.micro.att comp.sys.att P! net.micro.cbm comp.sys.cbm P! net.micro.cpm comp.os.cpm P! net.micro.hp comp.sys.hp P! net.micro.mac comp.sys.mac P! net.micro.ns32k comp.sys.nsc.32k P! net.micro.pc comp.sys.ibm.pc P! net.micro.ti comp.sys.ti P! net.micro.trs-80 comp.sys.tandy P! net.news news.misc P! net.news.adm news.admin P! net.news.b news.software.b P! net.news.config news.config P! net.news.group news.groups P! net.news.newsite news.newsites P! net.news.notes news.software.notes P! net.news.sa news.sysadmin P! net.news.stargate news.stargate P! net.periphs comp.periphs P! net.sources.d comp.sources.d P! net.text comp.text P! net.unix comp.unix.questions P! net.unix-wizards comp.unix.wizards P! net.usenix comp.org.usenix P! net.wanted.sources comp.sources.wanted P! net.chess rec.games.chess P! net.trivia rec.games.trivia P! net.rec.radio rec.ham-radio P! net.term comp.terminals P! net.joke rec.humor P! net.vlsi comp.lsi P! net.micro.16k comp.sys.nsc.32k P! net.music.gdea rec.music.gdead P! net.notes news.software.notes P! net.periph comp.periphs P! net.puzzles rec.puzzles P! net.unix.wizards comp.unix.wizards P! net.sources.wanted comp.sources.wanted P! net.consumers misc.consumers P! net.consumers.house misc.consumers.house P! net.house misc.consumers.house P na.forsale misc.forsale P P--- 119,123 ----- P cat >$LIBDIR/aliases.new <<EOF P! comp.os.fidonet comp.org.fidonet P! net.sources comp.sources.misc P! misc.jobs misc.jobs.misc P na.forsale misc.forsale P*************** P*** 259,317 P na.forsale misc.forsale P! net.forsale misc.forsale P! net.politics.terror misc.headlines P! net.invest misc.invest P! net.jobs misc.jobs P! net.kids misc.kids P! mod.legal misc.legal P! net.legal misc.legal P! net.followup misc.misc P! net.general misc.misc P! net.misc misc.misc P! net.suicide misc.misc P! net.taxes misc.taxes P! mod.test misc.test P! net.test misc.test P! net.wanted misc.wanted P! net.announce mod.announce P! net.announce.newusers mod.announce.newusers P! mod.map.uucp mod.map P! net.religion.christian mod.religion.christian P! net.religion.xian mod.religion.christian P! net.astro sci.astro P! net.astro.expert sci.astro P! net.bio sci.bio P! net.crypt sci.crypt P! net.analog sci.electronics P! net.nlang sci.lang P! net.math sci.math P! net.stat sci.math.stat P! net.math.stat sci.math.stat P! net.math.symbolic sci.math.symbolic P! net.med sci.med P! net.sci sci.misc P! net.physics sci.physics P! net.research sci.research P! net.space sci.space P! net.columbia sci.space.shuttle P! net.challenger sci.space.shuttle P! net.college soc.college P! net.nlang.africa soc.culture.african P! net.nlang.celts soc.culture.celtic P! net.nlang.greek soc.culture.greek P! net.nlang.india soc.culture.indian P! net.religion.jewish soc.culture.jewish P! net.social soc.misc P! mod.motss soc.motss P! net.motss soc.motss P! net.net-people soc.net-people P! net.roots soc.roots P! net.singles soc.singles P! net.women soc.women P! net.abortion talk.abortion P! net.bizarre talk.bizarre P! net.origins talk.origins P! net.philosophy talk.philosophy.misc P! net.politics talk.politics.misc P! net.politics.theory talk.politics.theory P! net.religion talk.religion.misc P talk.religion talk.religion.misc P P--- 123,126 ----- P na.forsale misc.forsale P! rec.skydive rec.skydiving P! talk.philosophy.tech sci.philosophy.tech P talk.religion talk.religion.misc P*************** P*** 317,319 P talk.religion talk.religion.misc P- net.rumor talk.rumors P talk.rumor talk.rumors P P--- 126,127 ----- P talk.religion talk.religion.misc P talk.rumor talk.rumors P*************** P*** 319,325 P talk.rumor talk.rumors P- rec.skydive rec.skydiving P- comp.sources.games net.sources.games P- comp.sources.bugs net.sources.bugs P- comp.sources.unix net.sources P- comp.sources.mac net.sources.mac P EOF P P--- 127,128 ----- P talk.rumor talk.rumors P EOF PIndex: installit P*** .d/installit Thu Sep 24 17:18:55 1987 P--- installit Thu Sep 24 18:31:05 1987 P*************** P*** 0 P P--- 1,83 ----- P+ #! /bin/sh P+ # P+ # '@(#)installit 2.3 9/24/87' P+ # From install.sh 4.8 (Berkeley) 3/6/86 P+ # on the 4.3 BSD distribution (with permission) P+ # P+ PATH=/bin:/etc:/usr/bin:/usr/ucb P+ export BATH P+ cmd="" P+ stripbefore="" P+ stripafter="" P+ chmod="chmod 755" P+ chown="#" P+ chgrp="#" P+ while true ; do P+ case $1 in P+ -s ) if test $cmd P+ then stripafter="strip" P+ else stripbefore="strip" P+ fi P+ shift P+ ;; P+ -c ) if test $cmd P+ then echo "install: multiple specifications of -c" P+ exit 1 P+ fi P+ cmd="cp" P+ stripafter=$stripbefore P+ stripbefore="" P+ shift P+ ;; P+ -m ) chmod="chmod $2" P+ shift P+ shift P+ ;; P+ -o ) chown="chown $2" P+ shift P+ shift P+ ;; P+ -g ) chgrp="chgrp $2" P+ shift P+ shift P+ ;; P+ * ) break P+ ;; P+ esac P+ done P+ if test $cmd P+ then true P+ else cmd="mv" P+ fi P+ P+ if test ! ${2-""} P+ then echo "install: no destination specified" P+ exit 1 P+ fi P+ if test ${3-""} P+ then echo "install: too many files specified -> $*" P+ exit 1 P+ fi P+ if test $1 = $2 -o $2 = . P+ then echo "install: can't move $1 onto itself" P+ exit 1 P+ fi P+ if test '!' -f $1 P+ then echo "install: can't open $1" P+ exit 1 P+ fi P+ if test -d $2 P+ then file=$2/`basename $1` P+ else file=$2 P+ fi P+ /bin/rm -f $file P+ if test $stripbefore P+ then $stripbefore $1 P+ fi P+ $cmd $1 $file P+ if test $stripafter P+ then $stripafter $file P+ fi P+ $chown $file P+ $chgrp $file P+ $chmod $file PIndex: makeactive.sh PPrereq: 1.23 P*** .d/makeactive.sh Wed Dec 17 18:23:45 1986 P--- makeactive.sh Thu Sep 24 18:08:01 1987 P*************** P*** 2,4 P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.23 12/16/86' P LIBDIR=$1 P P--- 2,4 ----- P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.24 9/24/87' P LIBDIR=$1 P*************** P*** 7,9 P NEWSGRP=$4 P! cat <<"E_O_F" > /tmp/$$groups P general Articles that should be read by everyone on your local system P P--- 7,9 ----- P NEWSGRP=$4 P! cat <<"E_O_F" | sort > /tmp/$$groups P general Articles that should be read by everyone on your local system P*************** P*** 9,73 P general Articles that should be read by everyone on your local system P- net.sources For the posting of software packages & documentation. P- net.sources.bugs For bug fixes and features discussion P- net.sources.games Postings of recreational software P- net.sources.mac Software for the Apple Macintosh P- mod.announce General announcements of interest to all. (Moderated) P- mod.announce.newusers Explanatory postings for new users. (Moderated) P- mod.ai Discussions about Artificial Intelligence (Moderated) P- mod.amiga Commodore Amiga micros -- info, uses, but no programs. (Moderated) P- mod.amiga.binaries Encoded public domain programs in binary form. (Moderated) P- mod.amiga.sources Public domain software in source code format. (Moderated) P- mod.compilers Discussion about compiler construction, theory, etc. (Moderated) P- mod.computers Discussion about various computers and related. (Moderated) P- mod.computers.68k 68000-based systems. (Moderated) P- mod.computers.apollo Apollo computer systems. (Moderated) P- mod.computers.masscomp The Masscomp line of computers. (Moderated) P- mod.computers.ibm-pc The IBM PC, PC-XT, and PC-AT. (Moderated) P- mod.computers.laser-printers Laser printers, hardware and software. (Moderated) P- mod.computers.pyramid Pyramid 90x computers. (Moderated) P- mod.computers.ridge Ridge 32 computers and ROS. (Moderated) P- mod.computers.sequent Sequent systems, (esp. Balance 8000). (Moderated) P- mod.computers.sun Sun "workstation" computers (Moderated) P- mod.computers.vax DEC's VAX* line of computers & VMS. (Moderated) P- mod.computers.workstations Various workstation-type computers. (Moderated) P- mod.conferences Calls for papers and conference announcements. (Moderated) P- mod.comp-soc Discussion on the impact of technology on society. (Moderated) P- mod.graphics Graphics software, hardware, theory, etc. (Moderated) P- mod.human-nets Computer aided communications digest. (Moderated) P- mod.mac Apple Macintosh micros -- info, uses, but no programs. (Moderated) P- mod.mac.binaries Encoded public domain programs in binary form. (Moderated) P- mod.mac.sources Public domain software in source code format. (Moderated) P- mod.mag.otherrealms Edited science fiction and fantasy "magazine". (Moderated) P- mod.map Various maps, including UUCP maps (Moderated) P- mod.music Reviews and discussion of things musical (Moderated) P- mod.music.gaffa Progressive music discussions (e.g., Kate Bush). (Moderated) P- mod.newprod Announcements of new products of interest to readers (Moderated) P- mod.newslists Postings of news-related statistics and lists (Moderated) P- mod.os Disussions about operating systems and related areas. (Moderated) P- mod.os.os9 Discussions about the os9 operating system. (Moderated) P- mod.os.unix Discussion of UNIX* features and bugs. (Moderated) P- mod.philosophy Discussion of philosphical issues and concepts. (Moderated) P- mod.philosophy.tech Technical philosophy: math, science, logic, etc (Moderated) P- mod.politics Discussions on political problems, systems, solutions. (Moderated) P- mod.politics.arms-d Arms discussion digest. (Moderated) P- mod.protocols Various forms and types of FTP protocol discussions. (Moderated) P- mod.protocols.appletalk Applebus hardware & software discussion. (Moderated) P- mod.protocols.kermit Information about the Kermit package. (Moderated) P- mod.protocols.tcp-ip TCP and IP network protocols. (Moderated) P- mod.psi Discussion of paranormal abilities and experiences. (Moderated) P- mod.rec Discussions on pastimes (not currently active) (Moderated) P- mod.rec.guns Discussions about firearms (Moderated) P- mod.recipes A "distributed cookbook" of screened recipes. (Moderated) P- mod.religion Top-level group with no moderator (as of yet). (Moderated) P- mod.religion.christian Discussions on Christianity and related topics. (Moderated) P- mod.risks Risks to the public from computers & users. (Moderated) P- mod.sources postings of public-domain sources. (Moderated) P- mod.sources.doc Archived public-domain documentation. (Moderated) P- mod.sources.games Postings of public-domain game sources (Moderated) P- mod.std Discussion about various standards (Moderated) P- mod.std.c Discussion about C language standards (Moderated) P- mod.std.mumps Discussion for the X11.1 committee on Mumps (Moderated) P- mod.std.unix Discussion for the P1003 committee on UNIX (Moderated) P- mod.techreports Announcements and lists of technical reports. (Moderated) P- mod.telecom Telecommunications digest. (Moderated) P comp.ai Artificial intelligence discussions. P P--- 9,10 ----- P general Articles that should be read by everyone on your local system P comp.ai Artificial intelligence discussions. P*************** P*** 73,74 P comp.ai Artificial intelligence discussions. P comp.arch Computer architecture. P P--- 10,12 ----- P comp.ai Artificial intelligence discussions. P+ comp.ai.digest Artificial Intelligence discussions. (Moderated) P comp.arch Computer architecture. P*************** P*** 74,75 P comp.arch Computer architecture. P comp.bugs.2bsd Reports of UNIX* version 2BSD related bugs. P P--- 12,17 ----- P comp.arch Computer architecture. P+ comp.binaries.amiga Encoded public domain programs in binary. (Moderated) P+ comp.binaries.atari.st Binary-only postings for the Atari ST. (Moderated) P+ comp.binaries.ibm.pc Binary-only postings for IBM PC/MS-DOS. (Moderated) P+ comp.binaries.mac Encoded Macintosh programs in binary. (Moderated) P comp.bugs.2bsd Reports of UNIX* version 2BSD related bugs. P*************** P*** 76,78 P comp.bugs.4bsd Reports of UNIX version 4BSD related bugs. P! comp.bugs.misc General bug reports and fixes (includes V7 & uucp). P comp.bugs.sys5 Reports of USG (System III, V, etc.) bugs. P P--- 18,21 ----- P comp.bugs.4bsd Reports of UNIX version 4BSD related bugs. P! comp.bugs.4bsd.ucb-fixes Bug reports/fixes for BSD Unix. (Moderated) P! comp.bugs.misc General UNIX bug reports and fixes (incl V7, uucp) P comp.bugs.sys5 Reports of USG (System III, V, etc.) bugs. P*************** P*** 79,80 P comp.cog-eng Cognitive engineering. P comp.databases Database and data management issues and theory. P P--- 22,24 ----- P comp.cog-eng Cognitive engineering. P+ comp.compilers Compiler construction, theory, etc. (Moderated) P comp.databases Database and data management issues and theory. P*************** P*** 82,83 P comp.dcom.modems Data communications hardware and software. P comp.edu Computer science education. P P--- 26,30 ----- P comp.dcom.modems Data communications hardware and software. P+ comp.dcom.telecom Telecommunications digest. (Moderated) P+ comp.doc Archived public-domain documentation. (Moderated) P+ comp.doc.techreports Lists of technical reports. (Moderated) P comp.edu Computer science education. P*************** P*** 84,86 P comp.emacs EMACS editors of different flavors. P! comp.graphics Computer graphics, art, animation, image processing, P comp.lang.ada Discussion about Ada*. P P--- 31,35 ----- P comp.emacs EMACS editors of different flavors. P! comp.graphics Computer graphics, art, animation, image processing. P! comp.graphics.digest Graphics software, hardware, theory, etc. (Moderated) P! comp.hypercube Massively parallel systems: hardware & software. (Moderated) P comp.lang.ada Discussion about Ada*. P*************** P*** 97,98 P comp.lang.smalltalk Discussion about Smalltalk 80. P comp.lsi Large scale integrated circuits. P P--- 46,48 ----- P comp.lang.smalltalk Discussion about Smalltalk 80. P+ comp.laser-printers Laser printers, hardware & software. (Moderated) P comp.lsi Large scale integrated circuits. P*************** P*** 98,99 P comp.lsi Large scale integrated circuits. P comp.mail.headers Gatewayed from the ARPA header-people list. P P--- 48,50 ----- P comp.lsi Large scale integrated circuits. P+ comp.mail.elm Discussion and fixes for ELM mail system. P comp.mail.headers Gatewayed from the ARPA header-people list. P*************** P*** 99,100 P comp.mail.headers Gatewayed from the ARPA header-people list. P comp.mail.misc General discussions about computer mail. P P--- 50,52 ----- P comp.mail.headers Gatewayed from the ARPA header-people list. P+ comp.mail.maps Various maps, including UUCP maps. (Moderated) P comp.mail.misc General discussions about computer mail. P*************** P*** 102,103 P comp.misc General topics about computers not covered elsewhere. P comp.org.decus DEC* Users' Society newsgroup. P P--- 54,56 ----- P comp.misc General topics about computers not covered elsewhere. P+ comp.newprod Announcements of new products of interest. (Moderated) P comp.org.decus DEC* Users' Society newsgroup. P*************** P*** 103,104 P comp.org.decus DEC* Users' Society newsgroup. P comp.org.usenix USENIX Association events and announcements. P P--- 56,58 ----- P comp.org.decus DEC* Users' Society newsgroup. P+ comp.org.fidonet FidoNews digest, official news of FidoNet Assoc. (Moderated) P comp.org.usenix USENIX Association events and announcements. P*************** P*** 106,107 P comp.os.eunice The SRI Eunice system. P comp.os.misc General OS-oriented discussion not carried elsewhere. P P--- 60,62 ----- P comp.os.eunice The SRI Eunice system. P+ comp.os.minix Discussion of Tanenbaum's MINIX system. P comp.os.misc General OS-oriented discussion not carried elsewhere. P*************** P*** 107,108 P comp.os.misc General OS-oriented discussion not carried elsewhere. P comp.periphs Peripheral devices. P P--- 62,66 ----- P comp.os.misc General OS-oriented discussion not carried elsewhere. P+ comp.os.os9 Discussions about the os9 operating system. (Moderated) P+ comp.os.research Operating systems and related areas. (Moderated) P+ comp.os.vms DEC's VAX* line of computers & VMS. P comp.periphs Peripheral devices. P*************** P*** 108,109 P comp.periphs Peripheral devices. P comp.sources.d For any discussion of source postings. P P--- 66,76 ----- P comp.periphs Peripheral devices. P+ comp.protocols.appletalk Applebus hardware & software. P+ comp.protocols.kermit Info about the Kermit package. (Moderated) P+ comp.protocols.misc Various forms and types of FTP protocol. P+ comp.protocols.tcp-ip TCP and IP network protocols. P+ comp.risks Risks to the public from computers & users. (Moderated) P+ comp.society The impact of technology on society. (Moderated) P+ comp.sources.amiga Source code-only postings for the Amiga. (Moderated) P+ comp.sources.atari.st Source code-only postings for the Atari ST. (Moderated) P+ comp.sources.bugs Bug reports, fixes, discussion for posted sources P comp.sources.d For any discussion of source postings. P*************** P*** 109,110 P comp.sources.d For any discussion of source postings. P comp.sources.wanted Requests for software and fixes. P P--- 76,81 ----- P comp.sources.d For any discussion of source postings. P+ comp.sources.games Postings of recreational software. (Moderated) P+ comp.sources.mac Software for the Apple Macintosh. (Moderated) P+ comp.sources.misc Posting of software . (Moderated) P+ comp.sources.unix Postings of public-domain sources. (Moderated) P comp.sources.wanted Requests for software and fixes. P*************** P*** 110,113 P comp.sources.wanted Requests for software and fixes. P! comp.std.internat Discussion about international standards P! comp.sys.amiga Discussion about the Amiga micro. P comp.sys.apple Discussion about Apple micros. P P--- 81,89 ----- P comp.sources.wanted Requests for software and fixes. P! comp.std.c Discussion about C language standards. (Moderated) P! comp.std.internat Discussion about international standards. P! comp.std.misc Discussion about various standards. (Moderated) P! comp.std.mumps Discussion for the X11.1 committee on Mumps. (Moderated) P! comp.std.unix Discussion for the P1003 committee on UNIX. (Moderated) P! comp.sys.amiga Commodore Amiga: info&uses, but no programs. P! comp.sys.apollo Apollo computer systems. P comp.sys.apple Discussion about Apple micros. P*************** P*** 115,117 P comp.sys.atari.st Discussion about 16 bit Atari micros. P! comp.sys.att Discussions about AT&T microcomputers P comp.sys.cbm Discussion about Commodore micros. P P--- 91,93 ----- P comp.sys.atari.st Discussion about 16 bit Atari micros. P! comp.sys.att Discussions about AT&T microcomputers. P comp.sys.cbm Discussion about Commodore micros. P*************** P*** 118,120 P comp.sys.dec Discussions about DEC computer systems. P! comp.sys.hp Discussion about Hewlett/Packard's. P comp.sys.ibm.pc Discussion about IBM personal computers. P P--- 94,96 ----- P comp.sys.dec Discussions about DEC computer systems. P! comp.sys.hp Discussion about Hewlett-Packard equipment. P comp.sys.ibm.pc Discussion about IBM personal computers. P*************** P*** 120,121 P comp.sys.ibm.pc Discussion about IBM personal computers. P comp.sys.intel Disucussions about Intel systems and parts. P P--- 96,98 ----- P comp.sys.ibm.pc Discussion about IBM personal computers. P+ comp.sys.ibm.pc.digest The IBM PC, PC-XT, and PC-AT. (Moderated) P comp.sys.intel Disucussions about Intel systems and parts. P*************** P*** 123,124 P comp.sys.m68k Discussion about 68k's. P comp.sys.mac Discussions about the Apple Macintosh & Lisa. P P--- 100,102 ----- P comp.sys.m68k Discussion about 68k's. P+ comp.sys.m68k.pc Discussion about 68k-based PCs. (Moderated) P comp.sys.mac Discussions about the Apple Macintosh & Lisa. P*************** P*** 124,127 P comp.sys.mac Discussions about the Apple Macintosh & Lisa. P! comp.sys.misc Micro computers of all kinds. P! comp.sys.nsc.32k National Semiconductor 32000 series chips P comp.sys.tandy Discussion about TRS-80's. P P--- 102,111 ----- P comp.sys.mac Discussions about the Apple Macintosh & Lisa. P! comp.sys.mac.digest Apple Macintosh: info&uses, but no programs. (Moderated) P! comp.sys.masscomp The Masscomp line of computers. (Moderated) P! comp.sys.misc Discussion about computers of all kinds. P! comp.sys.nsc.32k National Semiconductor 32000 series chips. P! comp.sys.pyramid Pyramid 90x computers. P! comp.sys.ridge Ridge 32 computers and ROS. P! comp.sys.sequent Sequent systems, (esp. Balance 8000). (Moderated) P! comp.sys.sun Sun "workstation" computers. (Moderated) P comp.sys.tandy Discussion about TRS-80's. P*************** P*** 128,129 P comp.sys.ti Discussion about Texas Instruments. P comp.terminals All sorts of terminals. P P--- 112,114 ----- P comp.sys.ti Discussion about Texas Instruments. P+ comp.sys.workstations Various workstation-type computers. (Moderated) P comp.terminals All sorts of terminals. P*************** P*** 129,131 P comp.terminals All sorts of terminals. P! comp.text Text processing. P comp.unix.questions UNIX neophytes group. P P--- 114,118 ----- P comp.terminals All sorts of terminals. P! comp.text Text processing issues and methods. P! comp.text.desktop Technolgy & techniques of desktop publishing. (Moderated) P! comp.unix Discussion of UNIX* features and bugs. (Moderated) P comp.unix.questions UNIX neophytes group. P*************** P*** 133,134 P comp.unix.xenix Discussion about the Xenix OS. P misc.consumers Consumer interests, product reviews, etc. P P--- 120,124 ----- P comp.unix.xenix Discussion about the Xenix OS. P+ comp.windows.misc Various issues about windowing systems. P+ comp.windows.news Sun Microsystems' NewS window system. P+ comp.windows.x Discussion about the X Window System. P misc.consumers Consumer interests, product reviews, etc. P*************** P*** 136,137 P misc.forsale Short, tasteful postings about items for sale. P misc.headlines Current interest: drug testing, terrorism, etc. P P--- 126,128 ----- P misc.forsale Short, tasteful postings about items for sale. P+ misc.handicap Items of interest for/about the handicapped. (Moderated) P misc.headlines Current interest: drug testing, terrorism, etc. P*************** P*** 138,140 P misc.invest Investments and the handling of money. P! misc.jobs Job announcements, requests, etc. P misc.kids Children, their behavior and activities. P P--- 129,133 ----- P misc.invest Investments and the handling of money. P! misc.jobs.misc Discussion about employment, workplaces, careers. P! misc.jobs.offered Announcements of positions available. P! misc.jobs.resumes Postings of resumes and "situation wanted" articles. P misc.kids Children, their behavior and activities. P*************** P*** 142,143 P misc.misc Various discussions not fitting in any other group. P misc.taxes Tax laws and advice. P P--- 135,137 ----- P misc.misc Various discussions not fitting in any other group. P+ misc.psi Paranormal abilities and experiences. (Moderated) P misc.taxes Tax laws and advice. P*************** P*** 146,147 P news.admin Comments directed to news administrators. P news.config Postings of system down times and interruptions. P P--- 140,144 ----- P news.admin Comments directed to news administrators. P+ news.announce.conferences Calls for papers and conference announcements. (Moderated) P+ news.announce.important General announcements of interest to all. (Moderated) P+ news.announce.newusers Explanatory postings for new users. (Moderated) P news.config Postings of system down times and interruptions. P*************** P*** 147,150 P news.config Postings of system down times and interruptions. P! news.groups Discussions and lists of newsgroups P! news.lists News-related statistics and lists (Moderated) P news.misc Discussions of USENET itself. P P--- 144,147 ----- P news.config Postings of system down times and interruptions. P! news.groups Discussions and lists of newsgroups. P! news.lists News-related statistics and lists. (Moderated) P news.misc Discussions of USENET itself. P*************** P*** 158,160 P rec.arts.drwho Discussion about Dr. Who. P! rec.arts.movies Reviews and discussions of movies. P rec.arts.poems For the posting of poems. P P--- 155,158 ----- P rec.arts.drwho Discussion about Dr. Who. P! rec.arts.movies Discussions of movies and movie making. P! rec.arts.movies.reviews Reviews of movies. (Moderated) P rec.arts.poems For the posting of poems. P*************** P*** 174,175 P rec.food.drink Wines and spirits. P rec.food.veg Vegetarians. P P--- 172,174 ----- P rec.food.drink Wines and spirits. P+ rec.food.recipes Recipes from the USENET Cookbook (troff & text). (Moderated) P rec.food.veg Vegetarians. P*************** P*** 188,189 P rec.gardens Gardening, methods and results. P rec.ham-radio Amateur Radio practices, contests, events, rules, etc. P P--- 187,189 ----- P rec.gardens Gardening, methods and results. P+ rec.guns Discussions about firearms. (Moderated) P rec.ham-radio Amateur Radio practices, contests, events, rules, etc. P*************** P*** 191,193 P rec.humor Jokes and the like. May be somewhat offensive. P! rec.humor.d Discussions on the content of rec.humor articles P rec.mag Magazine summaries, tables of contents, etc. P P--- 191,194 ----- P rec.humor Jokes and the like. May be somewhat offensive. P! rec.humor.d Discussions on the content of rec.humor articles. P! rec.humor.spc The Stupid People's Court! (Moderated) P rec.mag Magazine summaries, tables of contents, etc. P*************** P*** 193,194 P rec.mag Magazine summaries, tables of contents, etc. P rec.misc General topics about recreational/participant sports. P P--- 194,196 ----- P rec.mag Magazine summaries, tables of contents, etc. P+ rec.mag.otherrealms Edited science fiction & fantasy "magazine". (Moderated) P rec.misc General topics about recreational/participant sports. P*************** P*** 196,199 P rec.music.classical Discussion about classical music. P! rec.music.folk Folks discussing folk music of various sorts P! rec.music.gdead A group for (Grateful) Dead-heads P rec.music.makers For performers and their discussions. P P--- 198,202 ----- P rec.music.classical Discussion about classical music. P! rec.music.folk Folks discussing folk music of various sorts. P! rec.music.gaffa Progressive music (e.g., Kate Bush). (Moderated) P! rec.music.gdead A group for (Grateful) Dead-heads. P rec.music.makers For performers and their discussions. P*************** P*** 200,202 P rec.music.misc Music lovers' group. P! rec.music.synth Synthesizers and computer music P rec.nude Hobbyists interested in naturist/nudist activities. P P--- 203,205 ----- P rec.music.misc Music lovers' group. P! rec.music.synth Synthesizers and computer music. P rec.nude Hobbyists interested in naturist/nudist activities. P*************** P*** 222,224 P sci.lang Natural languages, communication, etc. P! sci.math Mathematical discussions and pursuits P sci.math.stat Statistics discussion. P P--- 225,227 ----- P sci.lang Natural languages, communication, etc. P! sci.math Mathematical discussions and pursuits. P sci.math.stat Statistics discussion. P*************** P*** 226,227 P sci.med Medicine and its related products and regulations. P sci.misc Short-lived discussions on subjects in the sciences. P P--- 229,231 ----- P sci.med Medicine and its related products and regulations. P+ sci.med.aids AIDS -- treatment, consequences, etc. (Moderated) P sci.misc Short-lived discussions on subjects in the sciences. P*************** P*** 227,228 P sci.misc Short-lived discussions on subjects in the sciences. P sci.physics Physical laws, properties, etc. P P--- 231,233 ----- P sci.misc Short-lived discussions on subjects in the sciences. P+ sci.philosophy.tech Technical philosophy: math, science, logic, etc. P sci.physics Physical laws, properties, etc. P*************** P*** 232,235 P soc.college College, college activities, campus life, etc. P! soc.culture.african Discussions about Africa & things African P! soc.culture.celtic Group about Celtics (*not* basketball!) P soc.culture.greek Group about Greeks. P P--- 237,240 ----- P soc.college College, college activities, campus life, etc. P! soc.culture.african Discussions about Africa & things African. P! soc.culture.celtic Group about Celtics (*not* basketball!). P soc.culture.greek Group about Greeks. P*************** P*** 235,239 P soc.culture.greek Group about Greeks. P! soc.culture.indian Group for discussion about India & things Indian P! soc.culture.jewish Group for discussion about Jewish culture & religion P! soc.culture.misc Group for discussion about other cultures P soc.misc Socially-oriented topics not in other groups. P P--- 240,246 ----- P soc.culture.greek Group about Greeks. P! soc.culture.indian Group for discussion about India & things Indian. P! soc.culture.jewish Group for discussion about Jewish culture & religion. P! soc.culture.misc Group for discussion about other cultures. P! soc.human-nets Computer aided communications digest. (Moderated) P! soc.men Issues related to men, their problems & relationships. P soc.misc Socially-oriented topics not in other groups. P*************** P*** 240,241 P soc.motss Issues pertaining to homosexuality. P soc.roots Genealogical matters. P P--- 247,252 ----- P soc.motss Issues pertaining to homosexuality. P+ soc.net-people Announcements, requests, etc. about people on the net. P+ soc.politics Political problems, systems, solutions. (Moderated) P+ soc.politics.arms-d Arms discussion digest. (Moderated) P+ soc.religion.christian Christianity and related topics. (Moderated) P soc.roots Genealogical matters. P*************** P*** 242,244 P soc.singles Newsgroup for single people, their activities, etc. P- soc.net-people Announcements, requests, etc. about people on the net. P soc.women Women's rights, discrimination, etc. P P--- 253,254 ----- P soc.singles Newsgroup for single people, their activities, etc. P soc.women Women's rights, discrimination, etc. P*************** P*** 251,252 P talk.religion.misc Religious, ethical, & moral implications. P talk.rumors For the posting of rumors. P P--- 261,263 ----- P talk.religion.misc Religious, ethical, & moral implications. P+ talk.religion.newage Esoteric and minority religions & philosophies. P talk.rumors For the posting of rumors. P*************** P*** 299,301 P fi P! sort /tmp/$$groups | $LIBDIR/checkgroups | tee /tmp/checkgroups.out P echo the output of checkgroups has been copied into /tmp/checkgroups.out P P--- 310,315 ----- P fi P! cat << EOF | cat - /tmp/$$groups | $LIBDIR/checkgroups | tee /tmp/checkgroups.out P! From: make update P! P! EOF P echo the output of checkgroups has been copied into /tmp/checkgroups.out PIndex: recmail.c PPrereq: 1.15 P*** .d/recmail.c Thu Oct 30 16:08:05 1986 P--- recmail.c Thu Sep 24 18:17:42 1987 P*************** P*** 22,24 P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.15 10/23/86"; P #endif /* SCCSID */ P P--- 22,24 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.16 9/24/87"; P #endif /* SCCSID */ P*************** P*** 247,249 P if ((logn = getlogin()) == NULL && (logn = getenv("USER")) == NULL) { P! if ((pwd = getpwent(getuid())) == NULL) P return; P P--- 247,249 ----- P if ((logn = getlogin()) == NULL && (logn = getenv("USER")) == NULL) { P! if ((pwd = getpwuid(getuid())) == NULL) P return; PIndex: sendbatch.sh PPrereq: 1.10 P*** .d/sendbatch.sh Thu Oct 30 16:12:07 1986 P--- sendbatch.sh Thu Sep 24 18:13:47 1987 P*************** P*** 1,2 P! : '@(#)sendbatch.sh 1.10 9/23/86' P P P--- 1,2 ----- P! : '@(#)sendbatch.sh 1.11 9/24/87' P P*************** P*** 43,45 P : make sure $? is zero P! while test $? -eq 0 -a \( -s BATCHDIR/$rmt -o -s BATCHDIR/$rmt.work -o \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do P P--- 43,46 ----- P : make sure $? is zero P! testit="-s BATCHDIR/$rmt -o " P! while test $? -eq 0 -a \( $testit -s /usr/spool/batch/$rmt.work -o \( -n "$DOIHAVE" -a -s /usr/spool/batch/$rmt.ihave \) \) P do P*************** P*** 60,61 P fi P fi P P--- 61,63 ----- P fi P+ testit= P fi PIndex: sendnews.c PPrereq: 2.12 P*** .d/sendnews.c Tue Mar 24 13:51:57 1987 P--- sendnews.c Thu Sep 24 18:13:47 1987 P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.12 3/21/87"; P #endif /* SCCSID */ P P--- 5,7 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.13 9/24/87"; P #endif /* SCCSID */ P*************** P*** 47,48 P #else /* !SENDMAIL */ P (void) sprintf(buffer, "/bin/mail %s", *argv); P P--- 47,51 ----- P #else /* !SENDMAIL */ P+ #ifdef M_XENIX P+ (void) sprintf(buffer, "/usr/bin/mail %s", *argv); P+ #else /* XENIX is not quite Unix.... */ P (void) sprintf(buffer, "/bin/mail %s", *argv); P*************** P*** 48,49 P (void) sprintf(buffer, "/bin/mail %s", *argv); P #endif /* !SENDMAIL */ P P--- 51,53 ----- P (void) sprintf(buffer, "/bin/mail %s", *argv); P+ #endif /* !M_XENIX */ P #endif /* !SENDMAIL */ PIndex: uname.c PPrereq: 2.15 P*** .d/uname.c Tue Mar 24 13:51:58 1987 P--- uname.c Thu Sep 24 18:13:48 1987 P*************** P*** 23,25 P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.15 3/21/87"; P #endif /* SCCSID */ P P--- 23,25 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.16 9/24/87"; P #endif /* SCCSID */ P*************** P*** 25,26 P #endif /* SCCSID */ P P P--- 25,30 ----- P #endif /* SCCSID */ P+ P+ #ifdef BSD2_10 P+ #include <shortnames.h> P+ #endif /* BSD2_10 */ P PIndex: virtterm.c PPrereq: 1.13 P*** .d/virtterm.c Wed Dec 17 18:23:32 1986 P--- virtterm.c Thu Sep 24 18:17:43 1987 P*************** P*** 7,9 P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.13 12/16/86"; P #endif /* SCCSID */ P P--- 7,9 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.14 9/24/87"; P #endif /* SCCSID */ P*************** P*** 813,814 P int tputs_len; P countit(c) { tputs_len++; } P P--- 813,815 ----- P int tputs_len; P+ /*ARGSUSED*/ P countit(c) { tputs_len++; } P PIndex: patchlevel.h PPrereq: 8 P*** .d/patchlevel.h Fri Apr 10 23:33:50 1987 P--- patchlevel.h Thu Sep 24 18:13:46 1987 P*************** P*** 1,2 P! #define PATCHLEVEL 8 P P P--- 1,2 ----- P! #define PATCHLEVEL 9 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 4/10/87" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11 9/24/87" P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.10... ' sed 's/^P//' >patch.10 <<\PSHAREND PFrom mcvax!uunet!seismo!rick Tue Oct 13 17:45:12 MET 1987 PArticle 713 of news.software.b: PPath: mcvax!uunet!seismo!rick P>From: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: news 2.11 src patch #10 PKeywords: #11 coming soon... PMessage-ID: <44104@beno.seismo.CSS.GOV> PDate: 8 Oct 87 04:13:16 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 2546 P PDescription: P This is patch #10 for news 2.11 src. P P Remove 4.1C BSD conditionals. P Lint and minor speedups. P Batch accepts blanks lines in files. P The IHCC define was replaced by several defines P allowing you to select part of the IHCC functionality. P Fix newgroup messages for moderated groups. P Minor date conversion fix to expire. P Lots of changes to run under Xenix (including locking I think). P strcasecmp() routein used for case independant comparisons. P strcmp,strncmp, prefix replaced with macros in an attempt P to squeeze more speed out. P Support for the "Supersedes:" header line added. P Sendbatch fixed to work when 'test' is a builtin. P New defines added to defs.dist: P READDIR (has opendir(), etc in libc) P MKDIR_SUB (mkdir() is in libc) P DOGETUSER (always do a getuser() - was part of IHCC) P LOGDIR (read pathnames from file - was part of IHCC) P PFix: P cd to the src directory and apply the following patch. P PIndex: batch.c PPrereq: 1.18 P*** .d/batch.c Wed Oct 7 16:48:13 1987 P--- batch.c Wed Oct 7 18:48:54 1987 P*************** P*** 34,36 **** P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.18 12/16/86"; P #endif /* SCCSID */ P--- 34,36 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.19 10/7/87"; P #endif /* SCCSID */ P*************** P*** 43,45 **** P P! #if defined(USG) || defined(BSD4_2) || defined(BSD4_1C) P #include <fcntl.h> P--- 43,45 ---- P P! #if defined(USG) || defined(BSD4_2) P #include <fcntl.h> P*************** P*** 64,65 **** P--- 64,66 ---- P char workfile[512]; P+ char cbuf[BUFSIZ]; P char *index(), *fgets(); P*************** P*** 102,103 **** P--- 103,106 ---- P *cp = '\0'; P+ if (fname[0] == '\0') P+ continue; P nfd = fopen(fname, "r"); P*************** P*** 110,111 **** P--- 113,116 ---- P *cp = '\n'; P+ if (sbuf.st_size == 0) P+ continue; P nbytes += sbuf.st_size; P*************** P*** 117,121 **** P n = 0; P! while ((c = getc(nfd)) != EOF) { P! putchar(c); P! n++; P } P--- 122,126 ---- P n = 0; P! while (c = fread(cbuf, 1, sizeof cbuf, nfd)) { P! fwrite(cbuf, 1, c, stdout); P! n += c; P } P*************** P*** 126,127 **** P--- 131,133 ---- P } P+ (void) fflush(stdout); P if (n != sbuf.st_size) { /* paranoia */ P*************** P*** 186,188 **** P P! #if defined(IHCC) || defined(HOME) P (void) sprintf(lfname, "%s/%s/errlog", logdir(HOME), LIBDIR); P--- 192,194 ---- P P! #if defined(LOGDIR) || defined(HOME) P (void) sprintf(lfname, "%s/%s/errlog", logdir(HOME), LIBDIR); P*************** P*** 195,197 **** P if (access(lfname, 0) == 0 && (logfile = fopen(lfname, "a")) != NULL) { P! #if defined(USG) || defined(BSD4_2) || defined(BSD4_1C) P int flags; P--- 201,203 ---- P if (access(lfname, 0) == 0 && (logfile = fopen(lfname, "a")) != NULL) { P! #if defined(USG) || defined(BSD4_2) P int flags; P*************** P*** 207,209 **** P P! #if !defined(BSD4_2) && !defined(BSD4_1C) P rename(from, to) P--- 213,215 ---- P P! #if !defined(BSD4_2) P rename(from, to) P*************** P*** 218,219 **** P } P! #endif /* !BSD4_2 && !BSD4_1C */ P--- 224,225 ---- P } P! #endif /* !BSD4_2 */ P PIndex: control.c PPrereq: 2.54 P*** .d/control.c Wed Oct 7 16:49:54 1987 P--- control.c Wed Oct 7 18:48:56 1987 P*************** P*** 21,23 **** P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.54 4/10/87"; P #endif /* SCCSID */ P--- 21,23 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.55 10/7/87"; P #endif /* SCCSID */ P*************** P*** 306,308 **** P if (cp == NULL) { P! logerr("System %s wants unavailable article %s.", P #ifdef MULTICAST P--- 306,308 ---- P if (cp == NULL) { P! log("System %s wants unavailable article %s.", P #ifdef MULTICAST P*************** P*** 375,377 **** P if (*--q == '\0' && *--p == ' ') { P- int modified = 0; P /* Now check if it's correctly moderated/unmoderated */ P--- 375,376 ---- P*************** P*** 385,395 **** P } P- # ifdef NONEWGROUPS P- if(can_change) { P- *p = 'm'; P- modified = 1; P- } P- # else /* ! NONEWGROUPS */ P *p = 'm'; P- modified = 1; P- #endif /* NONEWGROUPS */ P } else { P--- 384,386 ---- P*************** P*** 399,409 **** P } P- # ifdef NONEWGROUPS P- if(can_change) { P- *p = 'y'; P- modified = 1; P- } P- # else /* ! NONEWGROUPS */ P *p = 'y'; P- modified = 1; P- # endif /* NONEWGROUPS */ P } P--- 390,392 ---- P*************** P*** 411,413 **** P (void) sprintf(subjline, P! "Newsgroup %s change from %smoderated to %smoderated", P argv[1], *p=='y' ? "" : "un", P--- 394,396 ---- P (void) sprintf(subjline, P! "Newsgroup %s changed from %smoderated to %smoderated", P argv[1], *p=='y' ? "" : "un", P*************** P*** 416,418 **** P if (fd != NULL) { P! if(modified) P fprintf(fd, P--- 399,401 ---- P if (fd != NULL) { P! if(can_change) P fprintf(fd, P*************** P*** 433,436 **** P fprintf(fd, P! "%s/inews -d %s -C %s moderated\n", P! LIB, ORGDISTRIB, argv[1]); P #else /* !ORGDISTRIB */ P--- 416,420 ---- P fprintf(fd, P! "%s/inews -d %s -C %s%s\n", P! LIB, ORGDISTRIB, argv[1], P! *p=='y' ? "" : " moderated"); P #else /* !ORGDISTRIB */ P*************** P*** 438,441 **** P "You can accomplish this by re-creating the newsgroup by executing the command:\n"); P! fprintf(fd, "%s/inews -C %s moderated\n", P! LIB, argv[1]); P #endif /* !ORGDISTRIB */ P--- 422,426 ---- P "You can accomplish this by re-creating the newsgroup by executing the command:\n"); P! fprintf(fd, "%s/inews -C %s%s\n", P! LIB, argv[1], P! *p=='y' ? "" : " moderated"); P #endif /* !ORGDISTRIB */ P*************** P*** 504,507 **** P fprintf(fd, P! "A new newsgroup called '%s' has been created by %s.\n", P! argv[1], header.path); P else { P--- 489,493 ---- P fprintf(fd, P! "A new %snewsgroup called '%s' has been created by %s.\n", P! argc > 2 ? "moderated " : "", argv[1], P! header.path); P else { P*************** P*** 508,511 **** P fprintf(fd, P! "%s requested that a new newsgroup called '%s' be created.\n", P! header.path, argv[1]); P fprintf(fd,"It was approved by %s\n\n",header.approved); P--- 494,497 ---- P fprintf(fd, P! "%s requested that a new %snewsgroup called '%s' be created.\n", P! header.path, argc > 2 ? "moderated " : "", argv[1]); P fprintf(fd,"It was approved by %s\n\n",header.approved); P*************** P*** 597,599 **** P P! if (pid = vfork()) { P status = fwait(pid); P--- 583,585 ---- P P! if (pid = fork()) { P status = fwait(pid); P*************** P*** 600,601 **** P--- 586,591 ---- P } else { P+ register int i; P+ for (i =3; i<20; i++) P+ if (close(i) < 0) P+ break; P (void) setuid(duid); P*************** P*** 674,676 **** P log("Can't cancel %s: %s", line, errmsg(errno)); P! return 1; P } P--- 664,666 ---- P log("Can't cancel %s: %s", line, errmsg(errno)); P! return -1; P } P*************** P*** 855,857 **** P #endif /* NOTIFY */ P! if (sendto == NULL || *sendto == NULL) P return NULL; P--- 845,847 ---- P #endif /* NOTIFY */ P! if (sendto == NULL || *sendto == '\0') P return NULL; P*************** P*** 877,879 **** P #endif /* MMDF */ P! execl("/bin/mail", "mail", sendto, (char *)NULL); P execl("/usr/bin/mail", "mail", sendto, (char *)NULL); P--- 867,869 ---- P #endif /* MMDF */ P! execl("/usr/bin/mailx", "mail", sendto, (char *)NULL); P execl("/usr/bin/mail", "mail", sendto, (char *)NULL); P*************** P*** 880,881 **** P--- 870,872 ---- P execl("/usr/ucb/mail", "mail", sendto, (char *)NULL); P+ execl("/bin/mail", "mail", sendto, (char *)NULL); P _exit(1); P*************** P*** 1015,1017 **** P } else if (strcmp(msg, "delsub") == 0) { P! if (!prefix(header.nbuf, "to.")) { P log("Must be in a 'to.system' newsgroup."); P--- 1006,1008 ---- P } else if (strcmp(msg, "delsub") == 0) { P! if (!PREFIX(header.nbuf, "to.")) { P log("Must be in a 'to.system' newsgroup."); P PIndex: expire.c PPrereq: 2.53 P*** .d/expire.c Wed Oct 7 16:50:41 1987 P--- expire.c Wed Oct 7 18:48:58 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.53 4/6/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.54 10/7/87"; P #endif /* SCCSID */ P*************** P*** 24,31 **** P #include <errno.h> P! #if defined(BSD4_2) || defined(BSD4_1C) P! # include <sys/dir.h> P # include <sys/file.h> P! #else P! # include "ndir.h" P! #endif P P--- 24,29 ---- P #include <errno.h> P! P! #ifdef BSD4_2 P # include <sys/file.h> P! #endif /* BSD4_2 */ P P*************** P*** 78,81 **** P unsigned int mh_size; P! char *calloc(); P! char *realloc(); P struct tm *gmtime(); P--- 76,78 ---- P unsigned int mh_size; P! extern char *calloc(), *realloc(); P struct tm *gmtime(); P*************** P*** 82,89 **** P P! #ifdef DBM P! typedef struct { P! char *dptr; P! int dsize; P! } datum; P! #else P FILE *nexthistfile(); P--- 79,81 ---- P P! #ifndef DBM P FILE *nexthistfile(); P*************** P*** 105,107 **** P struct hbuf h; P- int ExpireLock; P int rmlock(); P--- 97,98 ---- P*************** P*** 317,319 **** P #endif /* PROFILING */ P! #ifdef IHCC P /*afline happens to be available - (we're getting out anyway)*/ P--- 308,310 ---- P #endif /* PROFILING */ P! #ifdef LOGDIR P /*afline happens to be available - (we're getting out anyway)*/ P*************** P*** 321,325 **** P execl(afline, "rnews", "-U", (char *)NULL); P! #else /* ! IHCC */ P execl(RNEWS, "rnews", "-U", (char *)NULL); P! #endif /* ! IHCC */ P perror(RNEWS); P--- 312,316 ---- P execl(afline, "rnews", "-U", (char *)NULL); P! #else /* ! LOGDIR */ P execl(RNEWS, "rnews", "-U", (char *)NULL); P! #endif /* ! LOGDIR */ P perror(RNEWS); P*************** P*** 359,361 **** P P! (void) sprintf(afline, "exec sort -t\t +1.6 -2 +1 >%s", NARTFILE); P if ((nhfd = popen(afline, "w")) == NULL) P--- 350,357 ---- P P! (void) sprintf(afline, "exec sort -t\t +1.6 -2 +1 >%s", P! #ifdef DBM P! NARTFILE); P! #else /* !DBM */ P! ARTFILE); P! #endif /* !DBM */ P if ((nhfd = popen(afline, "w")) == NULL) P*************** P*** 393,395 **** P if (p1 != NULL) P! *p1 = NULL; P if (!ngmatch(nbuf, ngpat)) P--- 389,391 ---- P if (p1 != NULL) P! *p1 = '\0'; P if (!ngmatch(nbuf, ngpat)) P*************** P*** 441,442 **** P--- 437,439 ---- P (void) strcpy(recdate, p1+1); P+ (void) strcat(recdate, " GMT"); P rectime = cgtdate(recdate); P*************** P*** 770,772 **** P if (dorebuild || !nohistory) { P! #ifndef DBM P (void) rename(ARTFILE, OARTFILE); P--- 767,769 ---- P if (dorebuild || !nohistory) { P! #ifdef DBM P (void) rename(ARTFILE, OARTFILE); P*************** P*** 800,802 **** P # ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0) < 0) P # else /* BSD4_2 */ P--- 797,799 ---- P # ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0L) < 0) P # else /* BSD4_2 */ P*************** P*** 809,812 **** P while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P! if (i++ > 5) P! xerror("Can't get lock for expire"); P sleep(i*2); P--- 806,811 ---- P while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P! if (i++ > 5) { P! xerror("Can't get lock for expire"); P! exit(1); P! } P sleep(i*2); P*************** P*** 934,942 **** P } P- if (p == NULL) { P- last = 1; P- fn = dirname(artlist); P- if (UNLINK(fn) < 0 && errno != ENOENT) P- perror(fn); P- return; P- } P if (p) P--- 933,934 ---- P*************** P*** 1156,1158 **** P P! FILE *nexthistfile(ofp) P FILE *ofp; P--- 1148,1151 ---- P P! FILE * P! nexthistfile(ofp) P FILE *ofp; P PIndex: funcs.c PPrereq: 2.35 P*** .d/funcs.c Wed Oct 7 16:50:58 1987 P--- funcs.c Wed Oct 7 18:49:00 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.35 12/16/86"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.36 10/7/87"; P #endif /* SCCSID */ P*************** P*** 233,235 **** P--- 233,299 ---- P } P+ /* From UC Berkeley @(#)strcasecmp.c 1.3 (Berkeley) 8/3/87 */ P P+ /* P+ * This array is designed for mapping upper and lower case letter P+ * together for a case independent comparison. The mappings are P+ * based upon ascii character sequences. P+ */ P+ char charmap[] = { P+ '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', P+ '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', P+ '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', P+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', P+ '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', P+ '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', P+ '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', P+ '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', P+ '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', P+ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', P+ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', P+ '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', P+ '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', P+ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', P+ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', P+ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', P+ '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', P+ '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', P+ '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', P+ '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', P+ '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', P+ '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', P+ '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', P+ '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', P+ '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', P+ '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', P+ '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', P+ '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337', P+ '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', P+ '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', P+ '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', P+ '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', P+ }; P+ P+ strcasecmp(s1, s2) P+ register char *s1, *s2; P+ { P+ register char *cm = charmap; P+ P+ while (cm[*s1] == cm[*s2++]) P+ if (*s1++ == '\0') P+ return 0; P+ return cm[*s1] - cm[*--s2]; P+ } P+ P+ strncasecmp(s1, s2, n) P+ register char *s1, *s2; P+ register int n; P+ { P+ register char *cm = charmap; P+ P+ while (--n >= 0 && cm[*s1] == cm[*s2++]) P+ if (*s1++ == '\0') P+ return 0; P+ return n < 0 ? 0 : cm[*s1] - cm[*--s2]; P+ } P+ P prefix(full, pref) P*************** P*** 237,247 **** P { P! register char fc, pc; P P! while ((pc = *pref++) != '\0') { P! fc = *full++; P! if (isupper(fc)) P! fc = tolower(fc); P! if (isupper(pc)) P! pc = tolower(pc); P! if (fc != pc) P return FALSE; P--- 301,306 ---- P { P! register char *cm = charmap; P P! while (*pref != '\0') { P! if (cm[*full++] != cm[*pref++]) P return FALSE; P*************** P*** 591,592 **** P--- 650,654 ---- P while (fscanf(facfd, "%[^:]:%s\n", facuser, factemp) != EOF) P+ { P+ if (feof(facfd)) P+ break; P if (strncmp(facuser, user, BUFLEN) == 0) { P*************** P*** 596,597 **** P--- 658,660 ---- P } P+ } P fclose (facfd); PIndex: funcs2.c PPrereq: 1.20 P*** .d/funcs2.c Wed Oct 7 16:51:19 1987 P--- funcs2.c Wed Oct 7 18:49:01 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.20 3/20/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.21 10/7/87"; P #endif /* SCCSID */ P*************** P*** 128,130 **** P */ P! if (strcmp(sp->s_name, "ME") == 0) P (void) strcpy(sp->s_name, LOCALPATHSYSNAME); P--- 128,130 ---- P */ P! if (STRCMP(sp->s_name, "ME") == 0) P (void) strcpy(sp->s_name, LOCALPATHSYSNAME); P*************** P*** 170,172 **** P while (s_read(sp)) P! if (strncmp(system, sp->s_name, SNLN) == 0) { P s_close(); P--- 170,172 ---- P while (s_read(sp)) P! if (STRNCMP(system, sp->s_name, SNLN) == 0) { P s_close(); P*************** P*** 196,198 **** P P! if ( lastdatestr[0] && strcmp(datestr, lastdatestr) == 0) P return lasttime; P--- 196,198 ---- P P! if ( lastdatestr[0] && STRCMP(datestr, lastdatestr) == 0) P return lasttime; P*************** P*** 203,204 **** P--- 203,209 ---- P lasttime = getdate(bfr, &Now); P+ if (lasttime < 0) { P+ logerr("Unparsable date \"%s\"", datestr); P+ datestr = "now"; /* better than nothing */ P+ lasttime = Now.time; P+ } P } P*************** P*** 320,322 **** P ptr = hptr->path; P! if (prefix(ptr, PATHSYSNAME) && P index(NETCHRS, ptr[strlen(PATHSYSNAME)])) P--- 325,327 ---- P ptr = hptr->path; P! if (PREFIX(ptr, PATHSYSNAME) && P index(NETCHRS, ptr[strlen(PATHSYSNAME)])) P*************** P*** 328,329 **** P--- 333,337 ---- P ptr = hptr->replyto; P+ #else /* !INTERNET */ P+ if (hptr->replyto[0] && !index(hptr->replyto, '@')) P+ ptr = hptr->replyto; P #endif P*************** P*** 338,340 **** P if (ptr = rindex(tbuf, '.')) { P! if (prefix(++ptr, "OZ")) { P /* some people only allow it in lower case ... */ P--- 346,348 ---- P if (ptr = rindex(tbuf, '.')) { P! if (PREFIX(++ptr, "OZ")) { P /* some people only allow it in lower case ... */ P*************** P*** 343,346 **** P } P! if (prefix(ptr, "UUCP") || prefix(ptr, "ARPA") || P! prefix(ptr, "DEC") || prefix(ptr, "CSNET")) { P strcat(tbuf, "@munnari.oz"); /* via sun to munnari */ P--- 351,354 ---- P } P! if (PREFIX(ptr, "UUCP") || PREFIX(ptr, "ARPA") || P! PREFIX(ptr, "DEC") || PREFIX(ptr, "CSNET")) { P strcat(tbuf, "@munnari.oz"); /* via sun to munnari */ P*************** P*** 354,356 **** P for (ptr = tbuf ;; ptr++) { P! if (prefix(ptr, "munnari!")) { P strcpy(tbuf, ptr+8); P--- 362,364 ---- P for (ptr = tbuf ;; ptr++) { P! if (PREFIX(ptr, "munnari!")) { P strcpy(tbuf, ptr+8); P*************** P*** 392,394 **** P LIB); P! } while (!prefix(mbuf, "internet")); P if (sscanf(mbuf, "%*s %s", modadd) != 1) P--- 400,402 ---- P LIB); P! } while (!PREFIX(mbuf, "internet")); P if (sscanf(mbuf, "%*s %s", modadd) != 1) P*************** P*** 420,428 **** P P- #ifdef DBM P- typedef struct { P- char *dptr; P- int dsize; P- } datum; P- #endif /* DBM */ P- P /* P--- 428,429 ---- P*************** P*** 478,480 **** P *p = 0; P! if (strcmp(lbuf, artid) == 0 || strcmp(lbuf, oidbuf) == 0) { P (void) fclose(hfp); P--- 479,481 ---- P *p = 0; P! if (STRCMP(lbuf, artid) == 0 || STRCMP(lbuf, oidbuf) == 0) { P (void) fclose(hfp); P*************** P*** 573,575 **** P P! #if !defined(BSD4_2) && !defined(BSD4_1C) P rename(from,to) P--- 574,576 ---- P P! #if !defined(BSD4_2) P rename(from,to) P*************** P*** 584,586 **** P } P! #endif /* !BSD4_2 && ! BSD4_1C */ P P--- 585,587 ---- P } P! #endif /* !BSD4_2 */ P P*************** P*** 666,668 **** P { P! register char *r, *q, *tp; P char *tailpath(); P--- 667,669 ---- P { P! register char *q, *tp; P char *tailpath(); PIndex: header.c PPrereq: 2.48 P*** .d/header.c Wed Oct 7 16:51:57 1987 P--- header.c Wed Oct 7 18:49:03 1987 P*************** P*** 16,17 **** P--- 16,18 ---- P */ P+ /*LINTLIBRARY*/ P P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.48 3/20/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.49 10/7/87"; P #endif /* SCCSID */ P*************** P*** 149,150 **** P--- 150,152 ---- P #define XPATH 26 P+ #define SUPERSEDES 27 P #define OTHER 99 P*************** P*** 159,161 **** P register int i; P- long curpos; P P--- 161,162 ---- P*************** P*** 163,165 **** P do { P- curpos = ftell(fp); P switch (i) { P--- 164,165 ---- P*************** P*** 220,222 **** P getfield(hp->distribution, sizeof(hp->distribution)); P! if (strcmp(hp->distribution, "net") == 0) P hp->distribution[0] = '\0'; P--- 220,223 ---- P getfield(hp->distribution, sizeof(hp->distribution)); P! if (strcmp(hp->distribution, "net") == 0 P! || strcmp(hp->distribution, "world") == 0) P hp->distribution[0] = '\0'; P*************** P*** 242,243 **** P--- 243,247 ---- P break; P+ case SUPERSEDES: P+ getfield(hp->supersedes, sizeof(hp->supersedes)); P+ break; P /* discard these lines */ P*************** P*** 265,268 **** P P- if (*bfr != '\n') P- fseek(fp, curpos, 0); P if ((hp->from[0] || hp->path[0]) && hp->subdate[0] && hp->ident[0]) P--- 269,270 ---- P*************** P*** 536,538 **** P P! #define its(type) (prefix(ptr, type)) P type(ptr) P--- 538,540 ---- P P! #define its(type) (PREFIX(ptr, type)) P type(ptr) P*************** P*** 564,565 **** P--- 566,568 ---- P return SUBMIT; P+ #endif /* OLD */ P if (its("Received: ")) P*************** P*** 566,568 **** P return RECEIVE; P- #endif /* OLD */ P if (its("Expires: ")) P--- 569,570 ---- P*************** P*** 583,588 **** P return FOLLOWTO; P- if (its("Posting-Version: ")) P- return POSTVERSION; P- if (its("Relay-Version: ")) P- return RELAYVERSION; P if (its("Distribution: ")) P--- 585,586 ---- P*************** P*** 603,604 **** P--- 601,604 ---- P return NFFROM; P+ if (its("Supersedes: ")) P+ return SUPERSEDES; P if (its("Xref: ")) P*************** P*** 607,608 **** P--- 607,612 ---- P return XPATH; P+ if (its("Posting-Version: ")) P+ return POSTVERSION; P+ if (its("Relay-Version: ")) P+ return RELAYVERSION; P if (!isalpha(*ptr)) P*************** P*** 620,621 **** P--- 624,628 ---- P */ P+ #ifndef DOXREFS P+ /*ARGSUSED*/ P+ #endif /* !DOXREFS */ P ihwrite(hp, fp, wr) P*************** P*** 635,637 **** P */ P! if (prefix(hp->path, PATHSYSNAME) && P index(NETCHRS, hp->path[strlen(PATHSYSNAME)])) P--- 642,644 ---- P */ P! if (PREFIX(hp->path, PATHSYSNAME) && P index(NETCHRS, hp->path[strlen(PATHSYSNAME)])) P*************** P*** 691,692 **** P--- 698,701 ---- P fprintf(fp, "Nf-From: %s\n", hp->nf_from); P+ if (*hp->supersedes) P+ fprintf(fp, "Supersedes: %s\n", hp->supersedes); P #ifdef DOXREFS PIndex: header.h PPrereq: 2.20 P*** .d/header.h Wed Oct 7 16:52:04 1987 P--- header.h Wed Oct 7 18:49:03 1987 P*************** P*** 4,6 **** P P! /* @(#)header.h 2.20 2/22/87 */ P P--- 4,6 ---- P P! /* @(#)header.h 2.21 10/7/87 */ P P*************** P*** 32,33 **** P--- 32,34 ---- P char nf_from[BUFLEN]; /* Nf-From: */ P+ char supersedes[BUFLEN]; /* Supersedes: */ P #ifdef DOXREFS PIndex: ifuncs.c PPrereq: 2.65 P*** .d/ifuncs.c Wed Oct 7 16:52:37 1987 P--- ifuncs.c Wed Oct 7 18:49:07 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.65 4/10/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.66 10/7/87"; P #endif /* SCCSID */ P*************** P*** 23,24 **** P--- 23,26 ---- P P+ extern long localize(); P+ P /*LINTLIBRARY*/ P*************** P*** 62,63 **** P--- 64,68 ---- P P+ #ifndef GENERICPATH P+ /*ARGSUSED*/ P+ #endif /* !GENERICPATH */ P broadcast(is_rnews) P*************** P*** 96,98 **** P if (!is_rnews && P! strncmp(PATHSYSNAME, h.path, (len = strlen(PATHSYSNAME))) == 0 P && index(NETCHRS, h.path[len])) P--- 101,103 ---- P if (!is_rnews && P! STRNCMP(PATHSYSNAME, h.path, (len = strlen(PATHSYSNAME))) == 0 P && index(NETCHRS, h.path[len])) P*************** P*** 115,117 **** P char *dist = h.distribution; P! if (strncmp(srec.s_name, LOCALPATHSYSNAME, SNLN) == 0) P continue; P--- 120,122 ---- P char *dist = h.distribution; P! if (STRNCMP(srec.s_name, LOCALPATHSYSNAME, SNLN) == 0) P continue; P*************** P*** 128,130 **** P while (*hptr != '\0') { P! if (strncmp(srec.s_name, hptr, SNLN) == 0) P goto contin; P--- 133,135 ---- P while (*hptr != '\0') { P! if (STRNCMP(srec.s_name, hptr, SNLN) == 0) P goto contin; P*************** P*** 132,134 **** P while (*sptr != '\0') { P! if (strncmp(sptr, hptr, SNLN) == 0) P goto contin; P--- 137,139 ---- P while (*sptr != '\0') { P! if (STRNCMP(sptr, hptr, SNLN) == 0) P goto contin; P*************** P*** 152,154 **** P *sptr = '\0'; P! if (strcmp(hptr, srec.s_name) == 0) { P *sptr = ','; P--- 157,159 ---- P *sptr = '\0'; P! if (STRCMP(hptr, srec.s_name) == 0) { P *sptr = ','; P*************** P*** 160,162 **** P } P! if (strcmp(hptr, srec.s_name) == 0) P continue; P--- 165,167 ---- P } P! if (STRCMP(hptr, srec.s_name) == 0) P continue; P*************** P*** 173,175 **** P for (m = mcast; m < &mcast[mccount]; m++) P! if (strcmp(srec.s_xmit, m->mc_name) == 0) P break; P--- 178,180 ---- P for (m = mcast; m < &mcast[mccount]; m++) P! if (STRCMP(srec.s_xmit, m->mc_name) == 0) P break; P*************** P*** 193,195 **** P for (m = mcast; m < &mcast[mccount]; m++) P! if (strcmp(m->mc_name, srec.s_name) == 0) { P yptr = sysptrs; P--- 198,200 ---- P for (m = mcast; m < &mcast[mccount]; m++) P! if (STRCMP(m->mc_name, srec.s_name) == 0) { P yptr = sysptrs; P*************** P*** 204,206 **** P #endif /* !VMS */ P! (strncmp(h.nbuf, "to.", 3) != 0), P sysptrs, mc)) P--- 209,211 ---- P #endif /* !VMS */ P! (STRNCMP(h.nbuf, "to.", 3) != 0), P sysptrs, mc)) P*************** P*** 214,216 **** P #endif /* !VMS */ P! (strncmp(h.nbuf, "to.", 3) != 0), P (char **) NULL, FALSE)) P--- 219,221 ---- P #endif /* !VMS */ P! (STRNCMP(h.nbuf, "to.", 3) != 0), P (char **) NULL, FALSE)) P*************** P*** 297,299 **** P */ P! if (not_here[0] && strcmp(not_here, sp->s_name) == 0) { P (void) fclose(ifp); P--- 302,304 ---- P */ P! if (not_here[0] && STRCMP(not_here, sp->s_name) == 0) { P (void) fclose(ifp); P*************** P*** 356,358 **** P appmsgid ? ".ihave" : ""); P! #ifdef IHCC P (void) sprintf(TRANS, "%s/%s/%s", logdir(HOME), BATCHDIR, sp->s_xmit); P--- 361,363 ---- P appmsgid ? ".ihave" : ""); P! #ifdef LOGDIR P (void) sprintf(TRANS, "%s/%s/%s", logdir(HOME), BATCHDIR, sp->s_xmit); P*************** P*** 359,363 **** P ofp = fopen(TRANS, "a"); P! #else /* !IHCC */ P ofp = fopen(sp->s_xmit, "a"); P! #endif /* !IHCC */ P if (ofp == NULL) P--- 364,368 ---- P ofp = fopen(TRANS, "a"); P! #else /* !LOGDIR */ P ofp = fopen(sp->s_xmit, "a"); P! #endif /* !LOGDIR */ P if (ofp == NULL) P*************** P*** 516,522 **** P P- typedef struct { P- char *dptr; P- int dsize; P- } datum; P- P /* P--- 521,522 ---- P*************** P*** 566,568 **** P P! if (strcmp(bfr, lcident) == 0) { P (void) fclose(hfp); P--- 566,568 ---- P P! if (STRCMP(bfr, lcident) == 0) { P (void) fclose(hfp); P*************** P*** 604,606 **** P #ifndef DBM P! if (strcmp((p = histfile(hline)), ARTFILE) != 0) { P /* If the history subfile is accessible */ P--- 604,606 ---- P #ifndef DBM P! if (STRCMP((p = histfile(hline)), ARTFILE) != 0) { P /* If the history subfile is accessible */ P*************** P*** 848,850 **** P for (i = 0; i < ngcount; ++i) P! if (uses[i] >= 1 && strcmp(bfr, ngs[i]) == 0) { P uses[i] = 2; /* it should be localized too */ P--- 848,850 ---- P for (i = 0; i < ngcount; ++i) P! if (uses[i] >= 1 && STRCMP(bfr, ngs[i]) == 0) { P uses[i] = 2; /* it should be localized too */ P*************** P*** 866,868 **** P f = xfopen(ALIASES, "r"); P! while (okcount < ngcount && fscanf(f, "%s %s", abuf, bfr) == 2) P for (i = 0; i < ngcount; ++i) { P--- 866,868 ---- P f = xfopen(ALIASES, "r"); P! while (okcount < ngcount && fscanf(f, "%s %s%*[^\n]", abuf, bfr) == 2) P for (i = 0; i < ngcount; ++i) { P*************** P*** 872,874 **** P #endif /* ALWAYSALIAS */ P! if (strcmp(ngs[i], abuf) != 0) P continue; P--- 872,874 ---- P #endif /* ALWAYSALIAS */ P! if (STRCMP(ngs[i], abuf) != 0) P continue; P*************** P*** 919,921 **** P continue; P! if (strcmp(ngs[i], ngs[j]) != 0) P continue; P--- 919,921 ---- P continue; P! if (STRCMP(ngs[i], ngs[j]) != 0) P continue; P*************** P*** 1062,1063 **** P--- 1062,1064 ---- P input_pipe(cmd, "compress", "-d", (char *) 0); P+ setbuf(infp, (char *)NULL); P continue; /* look for the #! rnews */ P*************** P*** 1067,1068 **** P--- 1068,1070 ---- P input_pipe("/bin/sh", "news-unpack", "-c", cmd); P+ setbuf(infp, (char *)NULL); P continue; /* look for the #! rnews */ P*************** P*** 1074,1076 **** P register long size, asize; P! char *filename; P int pid, wpid, exstat; P--- 1076,1078 ---- P register long size, asize; P! char *tfilename; P int pid, wpid, exstat; P*************** P*** 1079,1083 **** P P! filename = 0; P do { P! while (strncmp(cmd, "#! rnews ", 9)) { P fprintf(stderr, "out of sync, skipping %s\n", cmd); P--- 1081,1088 ---- P P! tfilename = 0; P! cp = malloc((unsigned)BUFSIZ); P! if (cp != NULL) P! setbuf(infp, cp); P do { P! while (STRNCMP(cmd, "#! rnews ", 9)) { P fprintf(stderr, "out of sync, skipping %s\n", cmd); P*************** P*** 1102,1108 **** P break; /* fits in buffer */ P! if (!filename) P! filename = mktemp("/tmp/unbnewsXXXXXX"); P! if ((fd = creat(filename, 0666)) < 0) { P fprintf(stderr, "rnews: creat of \"%s\" failed", P! filename); P perror(" "); P--- 1107,1113 ---- P break; /* fits in buffer */ P! if (!tfilename) P! tfilename = mktemp("/tmp/unbnewsXXXXXX"); P! if ((fd = creat(tfilename, 0666)) < 0) { P fprintf(stderr, "rnews: creat of \"%s\" failed", P! tfilename); P perror(" "); P*************** P*** 1114,1116 **** P fprintf(stderr, "write of %d to \"%s\" returned %d", P! rc, filename, wc); P perror(" "); P--- 1119,1121 ---- P fprintf(stderr, "write of %d to \"%s\" returned %d", P! rc, tfilename, wc); P perror(" "); P*************** P*** 1166,1168 **** P * input */ P! freopen(filename, "r", infp); P return; /* from checkbatch as if P--- 1171,1173 ---- P * input */ P! freopen(tfilename, "r", infp); P return; /* from checkbatch as if P*************** P*** 1184,1187 **** P while ((wpid = wait(&exstat)) >= 0 && wpid != pid); P } while (fgets(cmd, BUFLEN, infp) != NULL); P- (void) unlink(filename); P exit(0);/* all done */ P--- 1189,1192 ---- P while ((wpid = wait(&exstat)) >= 0 && wpid != pid); P+ (void) unlink(tfilename); P } while (fgets(cmd, BUFLEN, infp) != NULL); P exit(0);/* all done */ P*************** P*** 1399,1401 **** P if (LockFd < 0) P! logerr("Can't open(\"%s\",2) to lock", SUBFILE); P /* This will sleep until the other program releases the lock */ P--- 1404,1406 ---- P if (LockFd < 0) P! logerr("Can't open(\"%s\", 2) to lock", SUBFILE); P /* This will sleep until the other program releases the lock */ P*************** P*** 1403,1407 **** P #ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0) < 0) P #else P! if (flock(LockFd, LOCK_EX) < 0) P #endif P--- 1408,1412 ---- P #ifdef LOCKF P! if (lockf(LockFd, F_LOCK, 0L) < 0) P #else P! if (flock(LockFd, LOCK_EX) < 0) P #endif PIndex: inews.c PPrereq: 2.80 P*** .d/inews.c Wed Oct 7 16:52:59 1987 P--- inews.c Wed Oct 7 18:49:10 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.80 4/10/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.81 10/7/87"; P #endif /* SCCSID */ P*************** P*** 34,36 **** P #ifdef BSD4_2 P- # include <sys/dir.h> P # include <sys/file.h> P--- 34,35 ---- P*************** P*** 37,39 **** P #else /* !BSD4_2 */ P- # include "ndir.h" P # if defined(USG) && !defined(LOCKF) P--- 36,37 ---- P*************** P*** 127,129 **** P P! /* uuxqt doesn't close all it's files */ P for (i = 3; !close(i); i++) P--- 125,127 ---- P P! /* uuxqt doesn't close all its files */ P for (i = 3; !close(i); i++) P*************** P*** 144,146 **** P # else /* !F_RDLCK */ P! if (lockf(fileno(actfp), F_TLOCK, 0) < 0) { P # endif /* !F_RDLCK */ P--- 142,144 ---- P # else /* !F_RDLCK */ P! if (lockf(fileno(actfp), F_TLOCK, 0L) < 0) { P # endif /* !F_RDLCK */ P*************** P*** 173,175 **** P #ifdef LOCKF P! (void) lockf(fileno(actfp), F_ULOCK, 0); P #else /* !LOCKF */ P--- 171,173 ---- P #ifdef LOCKF P! (void) lockf(fileno(actfp), F_ULOCK, 0L); P #else /* !LOCKF */ P*************** P*** 193,195 **** P P! if (!strncmp(ptr+1, "rnews", 5)) { P mode = PROC; P--- 191,193 ---- P P! if (!STRNCMP(ptr+1, "rnews", 5)) { P mode = PROC; P*************** P*** 228,229 **** P--- 226,234 ---- P } P+ /* P+ * Catch "filesize exceeded" signals on 4.2BSD systems P+ * - the history files may exceed this limit. P+ */ P+ #ifdef SIGXFSZ P+ (void) signal(SIGXFSZ, SIG_IGN); P+ #endif /* SIGXFSZ */ P uid = getuid(); P*************** P*** 250,253 **** P P /* P! * IHCC forces the use of 'getuser()' to prevent forgery of articles P * by just changing $LOGNAME P--- 255,259 ---- P P+ #ifndef DOGETUSER P /* P! * Force the use of 'getuser()' to prevent forgery of articles P * by just changing $LOGNAME P*************** P*** 254,256 **** P */ P- #ifndef IHCC P if (isatty(fileno(stderr))) { P--- 260,261 ---- P*************** P*** 261,263 **** P } P! #endif /* !IHCC */ P if (user == NULL || home == NULL) P--- 266,268 ---- P } P! #endif /* !DOGETUSER */ P if (user == NULL || home == NULL) P*************** P*** 265,267 **** P else { P! if (username == NULL || username[0] == 0) { P username = AllocCpy(user); P--- 270,272 ---- P else { P! if (STRCMP(username, "Unknown") == 0 || username[0] == 0) { P username = AllocCpy(user); P*************** P*** 367,369 **** P if (header.from[0]) { P! (void) fixfrom(header.from); P if (Sflag && !Mflag && !header.approved[0] & P--- 372,374 ---- P if (header.from[0]) { P! (void) fixfrom(&header); P if (Sflag && !Mflag && !header.approved[0] & P*************** P*** 403,405 **** P P! if ((p1 = strpbrk(header.path, "@ (<")) != NULL) P *p1 = '\0'; P--- 408,410 ---- P P! if ((p1 = strpbrk(header.path, " (<")) != NULL) P *p1 = '\0'; P*************** P*** 421,423 **** P strncpy(header.organization, MYORG, BUFLEN); P! if (strncmp(header.organization, "Frobozz", 7) == 0) P header.organization[0] = '\0'; P--- 426,428 ---- P strncpy(header.organization, MYORG, BUFLEN); P! if (STRNCMP(header.organization, "Frobozz", 7) == 0) P header.organization[0] = '\0'; P*************** P*** 436,438 **** P } else { P- header.organization[0] = '\0'; P logerr("Couldn't open %s", P--- 441,442 ---- P*************** P*** 439,440 **** P--- 443,445 ---- P header.organization); P+ header.organization[0] = '\0'; P } P*************** P*** 457,459 **** P xerror("%s: Inbound news is garbled", filename); P! input(); P } P--- 462,464 ---- P xerror("%s: Inbound news is garbled", filename); P! input(bfr[0] != '\n'); P } P*************** P*** 468,470 **** P /* Easy way to make control messages, since all.all.ctl is unblessed */ P! if (mode != PROC && prefix(header.title, "cmsg ") && header.ctlmsg[0] == 0) P (void) strcpy(header.ctlmsg, &header.title[5]); P--- 473,475 ---- P /* Easy way to make control messages, since all.all.ctl is unblessed */ P! if (mode != PROC && PREFIX(header.title, "cmsg ") && header.ctlmsg[0] == 0) P (void) strcpy(header.ctlmsg, &header.title[5]); P*************** P*** 486,490 **** P #ifdef FASCIST P! if (uid && uid != ROOTID && fascist(user, header.nbuf)) P xerror("User %s is not authorized to post to newsgroup %s", P! user, header.nbuf); P #endif /* FASCIST */ P--- 491,495 ---- P #ifdef FASCIST P! if (uid && uid != ROOTID && fascist(username, header.nbuf)) P xerror("User %s is not authorized to post to newsgroup %s", P! username, header.nbuf); P #endif /* FASCIST */ P*************** P*** 498,500 **** P if (mode != PROC) P! input(); P if (header.intnumlines == 0 && !is_ctl) P--- 503,505 ---- P if (mode != PROC) P! input(FALSE); P if (header.intnumlines == 0 && !is_ctl) P*************** P*** 647,648 **** P--- 652,658 ---- P tp->tm_hour, tp->tm_min, getpid()); P+ P+ #ifdef IHCC P+ log("Spooling %s into %s", header.ident, (rindex(buf,'/') + 1)); P+ #endif /* IHCC */ P+ P if (LINK(sfile, buf) < 0) { P*************** P*** 731,735 **** P } P! if (prefix(afline, ngname)) { P (void) sscanf(afline, "%s %ld", bfr, &ngsize); P! if (strcmp(bfr, ngname) == 0) { P if (ngsize < 0 || ngsize > 99998) { P--- 741,745 ---- P } P! if (PREFIX(afline, ngname)) { P (void) sscanf(afline, "%s %ld", bfr, &ngsize); P! if (STRCMP(bfr, ngname) == 0) { P if (ngsize < 0 || ngsize > 99998) { P*************** P*** 873,875 **** P #ifdef ZAPNOTES P! if (strncmp(header.title, "Re: Orphaned Response", 21) == 0) { P logerr("Orphaned Response, moved to junk"); P--- 883,885 ---- P #ifdef ZAPNOTES P! if (STRNCMP(header.title, "Re: Orphaned Response", 21) == 0) { P logerr("Orphaned Response, moved to junk"); P*************** P*** 916,918 **** P LIB); P! } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P (void) fclose(mfd); P--- 926,928 ---- P LIB); P! } while (STRCMP(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P (void) fclose(mfd); P*************** P*** 929,931 **** P xerror("Can't send mail to %s", mhdr.path); P! fprintf(mfd, "To: %s\n", replyname(mhdr.path)); P lhwrite(&header, mfd); P--- 939,941 ---- P xerror("Can't send mail to %s", mhdr.path); P! fprintf(mfd, "To: %s\n", replyname(&mhdr)); P lhwrite(&header, mfd); P*************** P*** 1033,1034 **** P--- 1043,1051 ---- P savehist(histline); P+ if (header.supersedes[0] != '\0') { P+ char *av[2]; P+ P+ av[0] = "cancel"; P+ av[1] = header.supersedes; P+ c_cancel(2, av); P+ } P broadcast(mode==PROC); P*************** P*** 1039,1041 **** P P! input() P { P--- 1056,1058 ---- P P! input(usegunk) P { P*************** P*** 1050,1052 **** P tmpfp = xfopen(mktemp(INFILE), "w"); P! while (!SigTrap && fgets(bfr, BUFLEN, infp) != NULL) { P if (mode == PROC) { /* zap trailing empty lines */ P--- 1067,1075 ---- P tmpfp = xfopen(mktemp(INFILE), "w"); P! for ( ; ; ) { P! if (SigTrap) P! break; P! if (usegunk) P! usegunk = FALSE; P! else if (fgets(bfr, BUFLEN, infp) != bfr) P! break; P if (mode == PROC) { /* zap trailing empty lines */ P*************** P*** 1089,1091 **** P } P! if (mode != PROC && tty && strcmp(bfr, ".\n") == 0) P break; P--- 1112,1114 ---- P } P! if (mode != PROC && tty && STRCMP(bfr, ".\n") == 0) P break; P*************** P*** 1202,1203 **** P--- 1225,1233 ---- P { P+ #ifdef USG P+ register char *p; P+ char parent[200]; P+ char sysbuf[200]; P+ struct stat sbuf; P+ #endif /* USG */ P+ P if (ngname == NULL || !isalpha(ngname[0])) P*************** P*** 1205,1206 **** P--- 1235,1252 ---- P P+ #ifdef USG P+ /* P+ * If the parent is 755 the setuid(getuid) P+ * will fail, and since mkdir is suid, and our real uid is random, P+ * the mkdir will fail. So we have to temporarily chmod it to 777. P+ */ P+ (void) strcpy(parent, fulldir); P+ while (p = rindex(parent, '/')) { P+ *p = '\0'; P+ if (stat(parent, &sbuf) == 0) { P+ (void) chmod(parent, 0777); P+ break; P+ } P+ } P+ #endif /* USG */ P+ P /* Create the directory */ P*************** P*** 1207,1209 **** P mkparents(fulldir); P- P if (mkdir(fulldir, 0777) < 0) P--- 1253,1254 ---- P*************** P*** 1211,1212 **** P--- 1256,1277 ---- P P+ #ifdef USG P+ /* P+ * Give away the directories we just created which were assigned P+ * our real uid. P+ */ P+ (void) setuid(uid); P+ (void) chown(fulldir, duid, dgid); P+ P+ (void) strcpy(sysbuf, fulldir); P+ while (p = rindex(sysbuf, '/')) { P+ *p = '\0'; P+ /* stop when get to last known good parent */ P+ if (strcmp(sysbuf, parent) == 0) P+ break; P+ (void) chown(sysbuf, duid, dgid); P+ } P+ (void) setuid(duid); P+ (void) chmod(parent, (int)sbuf.st_mode); /* put it back */ P+ #endif /* USG */ P+ P log("make newsgroup %s in dir %s", ngname, fulldir); P*************** P*** 1234,1251 **** P P- cancel() P- { P- register FILE *fp; P- P- log("cancel article %s", filename); P- fp = fopen(filename, "r"); P- if (fp == NULL) { P- log("article %s not found", filename); P- return; P- } P- if (hread(&header, fp, TRUE) == NULL) P- error("Article is garbled."); P- (void) fclose(fp); P- (void) unlink(filename); P- } P- P dounspool() P--- 1299,1300 ---- P*************** P*** 1274,1276 **** P LockFd = xfopen(SEQFILE, "r+w"); P! if (lockf(fileno(LockFd), F_TLOCK, 0) < 0) { P if (errno != EAGAIN && errno != EACCES) P--- 1323,1325 ---- P LockFd = xfopen(SEQFILE, "r+w"); P! if (lockf(fileno(LockFd), F_TLOCK, 0L) < 0) { P if (errno != EAGAIN && errno != EACCES) P*************** P*** 1302,1303 **** P--- 1351,1357 ---- P continue; P+ P+ #ifdef IHCC P+ log("Unspooling from %s", dir->d_name); P+ #endif /* IHCC */ P+ P if ((pid=vfork()) == -1) P*************** P*** 1305,1307 **** P if (pid == 0) { P! #ifdef IHCC P char bufr[BUFSIZ]; P--- 1359,1361 ---- P if (pid == 0) { P! #ifdef LOGDIR P char bufr[BUFSIZ]; P*************** P*** 1310,1312 **** P (char *) NULL); P! #else /* !IHCC */ P execl(RNEWS, "rnews", "-S", "-p", dir->d_name, P--- 1364,1366 ---- P (char *) NULL); P! #else /* !LOGDIR */ P execl(RNEWS, "rnews", "-S", "-p", dir->d_name, P*************** P*** 1313,1315 **** P (char *) NULL); P! #endif /* !IHCC */ P _exit(1); P--- 1367,1369 ---- P (char *) NULL); P! #endif /* !LOGDIR */ P _exit(1); P*************** P*** 1328,1331 **** P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed, status %d. Batch saved in %s/%s", P! status, SPOOL, dir->d_name); P } P--- 1382,1385 ---- P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed, status %ld. Batch saved in %s/%s", P! (long)status, SPOOL, dir->d_name); P } P*************** P*** 1336,1338 **** P--- 1390,1396 ---- P } while (foundsome); /* keep rereading the directory until it's empty */ P+ #ifndef LOCKF P+ #ifndef BSD4_2 P (void) UNLINK(spbuf); P+ #endif P+ #endif P PIndex: ndir.h PPrereq: 1.6 P*** .d/ndir.h Wed Oct 7 16:53:38 1987 P--- ndir.h Wed Oct 7 18:49:10 1987 P*************** P*** 1,2 **** P! /* @(#)ndir.h 1.6 3/9/87 */ P #if defined(HP9K5) P--- 1,2 ---- P! /* @(#)ndir.h 1.7 10/7/87 */ P #if defined(HP9K5) P*************** P*** 3,5 **** P /* He should have included it instead of this, but prevent confusion */ P! #include <sys/ndir.h> P #else /* other */ P--- 3,5 ---- P /* He should have included it instead of this, but prevent confusion */ P! #include <ndir.h> P #else /* other */ PIndex: params.h PPrereq: 2.23 P*** .d/params.h Wed Oct 7 16:53:41 1987 P--- params.h Wed Oct 7 18:49:11 1987 P*************** P*** 4,6 **** P P! /* @(#)params.h 2.23 4/6/87 */ P P--- 4,6 ---- P P! /* @(#)params.h 2.24 10/7/87 */ P P*************** P*** 125 **** P--- 125,160 ---- P #endif P+ P+ #ifdef M_XENIX P+ /* fake SVID adivsory locking with xenix routines */ P+ #define lockf locking P+ #define F_ULOCK 0 P+ #define F_LOCK 3 P+ #define F_TLOCK 4 P+ #endif /* M_XENIX */ P+ P+ #ifdef IHCC P+ #define DOGETUSERS P+ #define LOGDIR P+ #endif /* IHCC */ P+ P+ #ifdef BSD4_2 P+ #define MKDIR_SUB P+ #define READDIR P+ #endif /* BSD4_2 */ P+ P+ #ifdef READDIR P+ #include <sys/dir.h> P+ #else /* !READDIR */ P+ #include "ndir.h" P+ #endif /* !READDIR */ P+ P+ #if defined(DBM) && !defined(M_XENIX) P+ typedef struct { P+ char *dptr; P+ int dsize; P+ } datum; P+ #endif /* DBM &! XENIX */ P+ P+ #define STRCMP(a,b) ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1)) P+ #define STRNCMP(a,b,n) ((*(a) != *(b)) ? (*(a)-*(b)) : strncmp(a, b, n)) P+ #define PREFIX(a,b) ((*(a) != *(b)) ? FALSE : prefix((a)+1, (b)+1)) PIndex: pathinit.c PPrereq: 1.23 P*** .d/pathinit.c Wed Oct 7 16:53:49 1987 P--- pathinit.c Wed Oct 7 18:49:13 1987 P*************** P*** 36,38 **** P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.23 4/6/87"; P #endif /* SCCSID */ P--- 36,38 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.24 10/7/87"; P #endif /* SCCSID */ P*************** P*** 54,56 **** P char *SPOOL, *LIB, *BIN, *ACTIVE, *SUBFILE, *ARTFILE, P! *username, *userhome; P P--- 54,56 ---- P char *SPOOL, *LIB, *BIN, *ACTIVE, *SUBFILE, *ARTFILE, P! *username = "Unknown", *userhome; P P*************** P*** 128,130 **** P /* old compatibility code, remove when HIDDENNET is used no more */ P! if (strcmp(ubuf.nodename, HIDDENNET) != 0) P (void) sprintf(buf, "%s.%s%s", ubuf.nodename, HIDDENNET, P--- 128,130 ---- P /* old compatibility code, remove when HIDDENNET is used no more */ P! if (STRCMP(ubuf.nodename, HIDDENNET) != 0) P (void) sprintf(buf, "%s.%s%s", ubuf.nodename, HIDDENNET, P*************** P*** 166,168 **** P P! #ifdef IHCC P (void) sprintf(bfr, "%s/%s", logdir(HOME), BINDIR); P--- 166,168 ---- P P! #ifdef LOGDIR P (void) sprintf(bfr, "%s/%s", logdir(HOME), BINDIR); P*************** P*** 169,173 **** P BIN = AllocCpy(bfr); P! #else /* !IHCC */ P Sprintf(BIN, "%s", BINDIR); P! #endif /* !IHCC */ P P--- 169,173 ---- P BIN = AllocCpy(bfr); P! #else /* !LOGDIR */ P Sprintf(BIN, "%s", BINDIR); P! #endif /* !LOGDIR */ P P*************** P*** 303,305 **** P */ P! if(strcmp(what, "all") == 0) { P for(mp=msgtype; mp->m_name; mp++) { P--- 303,305 ---- P */ P! if(STRCMP(what, "all") == 0) { P for(mp=msgtype; mp->m_name; mp++) { P*************** P*** 314,316 **** P for(mp=msgtype; mp->m_name; mp++) P! if(strcmp(mp->m_name, what) == 0) { P mp->m_who_to = AllocCpy(to); P--- 314,316 ---- P for(mp=msgtype; mp->m_name; mp++) P! if(STRCMP(mp->m_name, what) == 0) { P mp->m_who_to = AllocCpy(to); PIndex: postnews.c PPrereq: 1.31 P*** .d/postnews.c Wed Oct 7 16:54:01 1987 P--- postnews.c Wed Oct 7 18:49:17 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.31 3/21/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.32 10/7/87"; P #endif /* SCCSID */ P*************** P*** 24,25 **** P--- 24,28 ---- P P+ # ifndef ROOTID P+ extern int ROOTID; P+ # endif P #define APPEND 1 P*************** P*** 69,71 **** P if (argc == 2) { P! if (!prefix(argv[1], SPOOL)) P xerror("Can only followup to articles in %s", SPOOL); P--- 72,74 ---- P if (argc == 2) { P! if (!PREFIX(argv[1], SPOOL)) P xerror("Can only followup to articles in %s", SPOOL); P*************** P*** 171,177 **** P #ifdef PAGE P! # ifdef IHCC P (void) sprintf(lbuf,"%s/bin/%s", logdir(HOME), PAGE); P! # else /* !IHCC */ P (void) strcpy(lbuf, PAGE); P! # endif /* !IHCC */ P pager = lbuf; P--- 174,180 ---- P #ifdef PAGE P! # ifdef LOGDIR P (void) sprintf(lbuf,"%s/bin/%s", logdir(HOME), PAGE); P! # else /* !LOGDIR */ P (void) strcpy(lbuf, PAGE); P! # endif /* !LOGDIR */ P pager = lbuf; P*************** P*** 247,253 **** P #ifdef PAGE P! # ifdef IHCC P (void) sprintf(lbuf,"%s/bin/%s", logdir(HOME), PAGE); P! # else /* !IHCC */ P (void) strcpy(lbuf, PAGE); P! # endif /* !IHCC */ P pager = lbuf; P--- 250,256 ---- P #ifdef PAGE P! # ifdef LOGDIR P (void) sprintf(lbuf,"%s/bin/%s", logdir(HOME), PAGE); P! # else /* !LOGDIR */ P (void) strcpy(lbuf, PAGE); P! # endif /* !LOGDIR */ P pager = lbuf; P*************** P*** 296,298 **** P *r = '\0'; P! if (strcmp(def, "net") == 0) P (void) strcpy(def, "world"); P--- 299,301 ---- P *r = '\0'; P! if (STRCMP(def, "net") == 0) P (void) strcpy(def, "world"); P*************** P*** 303,305 **** P P! if (strcmp(def, "to") == 0) { P /* P--- 306,308 ---- P P! if (STRCMP(def, "to") == 0) { P /* P*************** P*** 317,319 **** P for (i=0; distr[i].abbr[0]; i++) { P! if (strcmp(distr[i].abbr, def) == 0) P break; P--- 320,322 ---- P for (i=0; distr[i].abbr[0]; i++) { P! if (STRCMP(distr[i].abbr, def) == 0) P break; P*************** P*** 327,329 **** P if (distribution[0] == '\0') { P! if (strcmp(def, "*None*") == 0) P printf("You must enter a distribution, '?' for help.\n"); P--- 330,332 ---- P if (distribution[0] == '\0') { P! if (STRCMP(def, "*None*") == 0) P printf("You must enter a distribution, '?' for help.\n"); P*************** P*** 331,333 **** P } P! } while (strcmp(distribution, "*None*") == 0); P P--- 334,336 ---- P } P! } while (STRCMP(distribution, "*None*") == 0); P P*************** P*** 348,350 **** P } P! if (strcmp(distribution, def) != 0) P printf("Type ? for help.\n"); P--- 351,353 ---- P } P! if (STRCMP(distribution, def) != 0) P printf("Type ? for help.\n"); P*************** P*** 356,358 **** P while (r = index(r, NGDELIM)) P! if (!prefix(++r, def)) P break; P--- 359,361 ---- P while (r = index(r, NGDELIM)) P! if (!PREFIX(++r, def)) P break; P*************** P*** 379,381 **** P *r = '\0'; P! if (strcmp(def, "net") == 0) P strcpy(def, "world"); P--- 382,384 ---- P *r = '\0'; P! if (STRCMP(def, "net") == 0) P strcpy(def, "world"); P*************** P*** 410,412 **** P fprintf(tf, "Newsgroups: %s\n", newsgroups); P! if (distribution[0] != '\0' && strcmp(distribution, "world")) P fprintf(tf, "Distribution: %s\n", distribution); P--- 413,415 ---- P fprintf(tf, "Newsgroups: %s\n", newsgroups); P! if (distribution[0] != '\0' && STRCMP(distribution, "world")) P fprintf(tf, "Distribution: %s\n", distribution); P*************** P*** 455,457 **** P p = editor + strlen(editor) - 2; P! if (strcmp(p, "vi") == 0) P endflag = "+"; P--- 458,460 ---- P p = editor + strlen(editor) - 2; P! if (STRCMP(p, "vi") == 0) P endflag = "+"; P*************** P*** 550,552 **** P P! if (ngmatch(newsgroups, "comp.sources.all,!comp.sources.wanted")) { P if (!article_line(tempfname, "Subject: ", group)) { P--- 553,555 ---- P P! if (ngmatch(newsgroups, "comp.sources.all,!comp.sources.wanted,!comp.sources.d")) { P if (!article_line(tempfname, "Subject: ", group)) { P*************** P*** 600,602 **** P P! if (prefix(str, "Re:")) P return (FALSE); P--- 603,605 ---- P P! if (PREFIX(str, "Re:")) P return (FALSE); P*************** P*** 745,747 **** P break; P! if (strcmp(distr[i].abbr, "default") == 0) P strcpy(def_distr, distr[i--].descr); P--- 748,750 ---- P break; P! if (STRCMP(distr[i].abbr, "default") == 0) P strcpy(def_distr, distr[i--].descr); P*************** P*** 839,841 **** P while (fgets(lbfr, BUFLEN, fpart) != NULL) { P! if (prefix(lbfr, field)) { P found = TRUE; P--- 842,844 ---- P while (fgets(lbfr, BUFLEN, fpart) != NULL) { P! if (PREFIX(lbfr, field)) { P found = TRUE; P*************** P*** 896,898 **** P P! if (strcmp(ng_check, ng) == 0) { P (void) fclose(fp); P--- 899,901 ---- P P! if (STRCMP(ng_check, ng) == 0) { P (void) fclose(fp); P*************** P*** 925,927 **** P fp = xfopen(article,"r"); P! while ((c=fgets(line,BUFLEN,fp)) != NULL && !prefix(line, field)) P if (line[0] == '\n') { P--- 928,930 ---- P fp = xfopen(article,"r"); P! while ((c=fgets(line,BUFLEN,fp)) != NULL && !PREFIX(line, field)) P if (line[0] == '\n') { P*************** P*** 969,974 **** P (void) strcpy(newsgroups, buf+12); P! if (ngmatch(newsgroups, "misc.jobs")) { P! printf("misc.jobs is for the direct posting of job announcements and requests.\n"); P! printf("it is not for discussion. You followup has been directed to misc.misc\n"); P! (void) strcpy(newsgroups,"misc.misc"); P } P--- 972,977 ---- P (void) strcpy(newsgroups, buf+12); P! if (ngmatch(newsgroups, "misc.jobs.all,!misc.jobs.misc")) { P! printf("Your followup has been directed to misc.jobs.misc\n"); P! printf("It is the proper place for followup discussions\n"); P! (void) strcpy(newsgroups,"misc.jobs.misc"); P } P*************** P*** 1005,1007 **** P (void) strcpy(newsgroups, buf+13); P! if (strcmp(newsgroups, "poster") == 0) P byebye("Mail followups directly to poster."); P--- 1008,1010 ---- P (void) strcpy(newsgroups, buf+13); P! if (STRCMP(newsgroups, "poster") == 0) P byebye("Mail followups directly to poster."); P*************** P*** 1104,1107 **** P putc(c, stderr); P fprintf(stderr, "Do you understand this? Hit <return> to proceed, <BREAK> to abort: "); P! n = read(2, recbuf, 100); P c = recbuf[0]; P--- 1107,1112 ---- P putc(c, stderr); P+ fclose(fd); P fprintf(stderr, "Do you understand this? Hit <return> to proceed, <BREAK> to abort: "); P! fflush(stderr); P! n = read(0, recbuf, 100); P c = recbuf[0]; P*************** P*** 1120,1122 **** P P! #if !defined(BSD4_2) && !defined(BSD4_1C) P rename(from,to) P--- 1125,1127 ---- P P! #if !defined(BSD4_2) P rename(from,to) PIndex: sendbatch.sh PPrereq: 1.11 P*** .d/sendbatch.sh Wed Oct 7 16:54:54 1987 P--- sendbatch.sh Wed Oct 7 18:49:17 1987 P*************** P*** 1,2 **** P! : '@(#)sendbatch.sh 1.11 9/24/87' P P--- 1,2 ---- P! : '@(#)sendbatch.sh 1.12 10/7/87' P P*************** P*** 43,46 **** P : make sure $? is zero P! testit="-s BATCHDIR/$rmt -o " P! while test $? -eq 0 -a \( $testit -s /usr/spool/batch/$rmt.work -o \( -n "$DOIHAVE" -a -s /usr/spool/batch/$rmt.ihave \) \) P do P--- 43,46 ---- P : make sure $? is zero P! testit="yes" P! while test $? -eq 0 -a \( \( -n "$testit" -a -s BATCHDIR/$rmt \) -o -s BATCHDIR/$rmt.work -o \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do PIndex: rfuncs.c PPrereq: 2.40 P*** .d/rfuncs.c Wed Oct 7 16:54:45 1987 P--- rfuncs.c Wed Oct 7 18:49:19 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.40 2/22/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.41 10/7/87"; P #endif /* SCCSID */ P*************** P*** 93,95 **** P last = 1; P! if (strcmp(name, bfr)) { P af = xfopen(ACTIVE, "r"); P--- 93,95 ---- P last = 1; P! if (STRCMP(name, bfr)) { P af = xfopen(ACTIVE, "r"); P*************** P*** 97,99 **** P if (sscanf(buf, "%s %ld %ld", n, &s, &sm) == 3 && P! strcmp(n, name) == 0) { P ngsize = s; P--- 97,99 ---- P if (sscanf(buf, "%s %ld %ld", n, &s, &sm) == 3 && P! STRCMP(n, name) == 0) { P ngsize = s; P*************** P*** 247,249 **** P register char *ptr, *fname; P! int news = 0; P register int i; P--- 247,249 ---- P register char *ptr, *fname; P! int isnews = FALSE; P register int i; P*************** P*** 299,301 **** P putc('\n', ofp); P! news = TRUE; P (void) fclose(fp); P--- 299,301 ---- P putc('\n', ofp); P! isnews = TRUE; P (void) fclose(fp); P*************** P*** 306,308 **** P (void) fclose(ofp); P! if (!news) { P fprintf(stderr, "No news.\n"); P--- 306,308 ---- P (void) fclose(ofp); P! if (!isnews) { P fprintf(stderr, "No news.\n"); P*************** P*** 333,335 **** P *ptr = 0; P! if (strcmp(bfr, groupdir)) P continue; P--- 333,335 ---- P *ptr = 0; P! if (STRCMP(bfr, groupdir)) P continue; P*************** P*** 472,474 **** P return FALSE; P! if (fflag && (hp->followid[0] || prefix(hp->title, "Re:"))) P return FALSE; P--- 472,474 ---- P return FALSE; P! if (fflag && (hp->followid[0] || PREFIX(hp->title, "Re:"))) P return FALSE; P*************** P*** 499,501 **** P } P! if (strcmp(g, groupdir) == 0) P return flag; P--- 499,501 ---- P } P! if (STRCMP(g, groupdir) == 0) P return flag; P*************** P*** 569,571 **** P if (lentab[i] == len && rcline[i] != NULL && P! strncmp(name, rcline[i], len) == 0) P return prev = i; P--- 569,571 ---- P if (lentab[i] == len && rcline[i] != NULL && P! STRNCMP(name, rcline[i], len) == 0) P return prev = i; P*************** P*** 683,685 **** P while (++lastline < tp->rcindex) { P! if (strncmp(rcline[lastline], "options ", 8) == 0) { P fprintf(nfp, "%s\n", rcline[lastline]); P--- 683,685 ---- P while (++lastline < tp->rcindex) { P! if (STRNCMP(rcline[lastline], "options ", 8) == 0) { P fprintf(nfp, "%s\n", rcline[lastline]); P*************** P*** 706,712 **** P P- #if defined(BSD4_2) || defined(BSD4_1C) P- #include <sys/dir.h> P- # else P- #include "ndir.h" P- #endif P #include <errno.h> P--- 706,707 ---- P*************** P*** 713,714 **** P--- 708,718 ---- P P+ #ifdef SMALL_ADDRESS_SPACE P+ list_group(lgroup, displines, flag, pngsize) P+ char *lgroup; P+ int displines, flag; P+ long pngsize; P+ { P+ printf("Not enough memory on your machine to include this function.\n");} P+ #else /* !SMALL_ADDRESS_SPACE */ P+ P /* P*************** P*** 768,770 **** P if (flag == FALSE) { P! if (get(i) == 0) P continue; P--- 772,774 ---- P if (flag == FALSE) { P! if (get((long)i) == 0) P continue; P*************** P*** 845 **** P--- 849,850 ---- P } P+ #endif /* !SMALL_ADDRESS_SPACE */ PIndex: readr.c PPrereq: 2.61 P*** .d/readr.c Wed Oct 7 16:54:20 1987 P--- readr.c Wed Oct 7 18:49:22 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.61 3/21/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.62 10/7/87"; P #endif /* SCCSID */ P*************** P*** 22,28 **** P #include "rparams.h" P- #if defined(BSD4_2) || defined(BSD4_1C) P- #include <sys/dir.h> P- #else P- #include "ndir.h" P- #endif /* !BSD4_2 && !BSD4_1C */ P #include <setjmp.h> P--- 22,23 ---- P*************** P*** 394,396 **** P obit = bit; P! if (strcmp(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P--- 389,391 ---- P obit = bit; P! if (STRCMP(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P*************** P*** 528,530 **** P if (!ptr2) { P! if (strcmp(ptr3, "cancelled") == 0) { P fprintf(ofp, "Article %s has been cancelled.\n", P--- 523,525 ---- P if (!ptr2) { P! if (STRCMP(ptr3, "cancelled") == 0) { P fprintf(ofp, "Article %s has been cancelled.\n", P*************** P*** 547,549 **** P (void) strcpy(ogroupdir, ptr3); P! if (strcmp(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P--- 542,544 ---- P (void) strcpy(ogroupdir, ptr3); P! if (STRCMP(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P*************** P*** 560,562 **** P (void) getnextart(TRUE); P! if (bit != i || strcmp(groupdir, ptr3) != 0) { P (void) fprintf(ofp, "Can't read %s/%ld.\n", ptr3, i); P--- 555,557 ---- P (void) getnextart(TRUE); P! if (bit != i || STRCMP(groupdir, ptr3) != 0) { P (void) fprintf(ofp, "Can't read %s/%ld.\n", ptr3, i); P*************** P*** 569,571 **** P case 'f': P! if (strcmp(h->followto, "poster") == 0) { P (void) reply_command(); P--- 564,566 ---- P case 'f': P! if (STRCMP(h->followto, "poster") == 0) { P (void) reply_command(); P*************** P*** 585,587 **** P if (rfq || *bptr == '-') { P! if (strcmp(groupdir, ogroupdir)) { P i = bit; P--- 580,582 ---- P if (rfq || *bptr == '-') { P! if (STRCMP(groupdir, ogroupdir)) { P i = bit; P*************** P*** 658,660 **** P *ptr1 = 0; P! notauthor = strcmp(username, rcbuf); P if (uid != ROOTID && uid && notauthor) { P--- 653,655 ---- P *ptr1 = 0; P! notauthor = STRCMP(username, rcbuf); P if (uid != ROOTID && uid && notauthor) { P*************** P*** 751,753 **** P (void) strcpy(subj, bptr); P! if (!prefix(subj, "Re:")){ P (void) strcpy(bfr, subj); P--- 746,748 ---- P (void) strcpy(subj, bptr); P! if (!PREFIX(subj, "Re:")){ P (void) strcpy(bfr, subj); P*************** P*** 840,842 **** P } P! if (s_find(&srec, bptr) == NULL) { P fprintf(ofp, "%s not in SYSFILE\n", bptr); P--- 835,837 ---- P } P! if (s_find(&srec, bptr) == 0) { P fprintf(ofp, "%s not in SYSFILE\n", bptr); PIndex: visual.c PPrereq: 1.36 P*** .d/visual.c Wed Oct 7 16:55:47 1987 P--- visual.c Wed Oct 7 18:49:26 1987 P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.36 3/21/87"; P #endif /* SCCSID */ P--- 6,8 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.37 10/7/87"; P #endif /* SCCSID */ P*************** P*** 19,25 **** P #include <errno.h> P- #if defined(BSD4_2) || defined(BSD4_1C) P- #include <sys/dir.h> P- #else P- #include "ndir.h" P- #endif P #ifdef BSD4_2 P--- 19,20 ---- P*************** P*** 29,30 **** P--- 24,26 ---- P #endif /* BSD4_2 */ P+ P #ifdef MYDB P*************** P*** 78,80 **** P extern int _junked; P! #define clearok(xxx, flag) _junked = flag P extern int COLS; P--- 74,76 ---- P extern int _junked; P! #define okclear() (_junked = 1) P extern int COLS; P*************** P*** 356,358 **** P ttycooked(); P! list_group(groupdir, countset ? count : 0, P (c == 'l') ? FALSE : TRUE, pngsize); P--- 352,354 ---- P ttycooked(); P! list_group(groupdir, countset ? (int) count : 0, P (c == 'l') ? FALSE : TRUE, pngsize); P*************** P*** 359,361 **** P ttyraw(); P! clearok(curscr, 1); P updscr(); P--- 355,357 ---- P ttyraw(); P! okclear(); P updscr(); P*************** P*** 386,388 **** P appfile(fp, lastlin + 1); P! } while(strncmp(linebuf, "------------------------", 24) P != 0); P--- 382,384 ---- P appfile(fp, lastlin + 1); P! } while(STRNCMP(linebuf, "------------------------", 24) P != 0); P*************** P*** 636,638 **** P obit = bit; P! if (strcmp(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P--- 632,634 ---- P obit = bit; P! if (STRCMP(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P*************** P*** 854,856 **** P if (!ptr2) { P! if (strcmp(ptr3, "cancelled") == 0) P msg("%s has been cancelled", linebuf); P--- 850,852 ---- P if (!ptr2) { P! if (STRCMP(ptr3, "cancelled") == 0) P msg("%s has been cancelled", linebuf); P*************** P*** 874,876 **** P (void) strcpy(ogroupdir, ptr3); P! if (strcmp(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P--- 870,872 ---- P (void) strcpy(ogroupdir, ptr3); P! if (STRCMP(groupdir, ogroupdir)) { P (void) strcpy(bfr, groupdir); P*************** P*** 886,888 **** P getnextart(TRUE); P! if (bit != nart || strcmp(groupdir, ptr3) != 0) { P msg("can't read %s/%ld", ptr3, nart); P--- 882,884 ---- P getnextart(TRUE); P! if (bit != nart || STRCMP(groupdir, ptr3) != 0) { P msg("can't read %s/%ld", ptr3, nart); P*************** P*** 895,897 **** P case 'f': P! if (strcmp(h->followto, "poster") == 0) { P reply(FALSE); P--- 891,893 ---- P case 'f': P! if (STRCMP(h->followto, "poster") == 0) { P reply(FALSE); P*************** P*** 949,951 **** P P! poster = senderof(&h); P /* only compare up to '.' or ' ' */ P--- 945,947 ---- P P! poster = senderof(h); P /* only compare up to '.' or ' ' */ P*************** P*** 957,959 **** P tfilename = filename; P! notauthor = strcmp(username, poster); P if (uid != ROOTID && uid && notauthor) { P--- 953,955 ---- P tfilename = filename; P! notauthor = STRCMP(username, poster); P if (uid != ROOTID && uid && notauthor) { P*************** P*** 1006,1008 **** P (void) strcpy(subj, h->title); P! if (!prefix(subj, "Re:")){ P (void) strcpy(bfr, subj); P--- 1002,1004 ---- P (void) strcpy(subj, h->title); P! if (!PREFIX(subj, "Re:")){ P (void) strcpy(bfr, subj); P*************** P*** 1283,1285 **** P *p++ = '\0'; P! if (strcmp(ibuf, groupdir) == 0) { P register char *q; P--- 1279,1281 ---- P *p++ = '\0'; P! if (STRCMP(ibuf, groupdir) == 0) { P register char *q; P*************** P*** 1469,1471 **** P } P! else if (strcmp(hp->nbuf, groupdir) != 0) { P (void) sprintf(linebuf, "Newsgroups: %s", hp->nbuf); P--- 1465,1467 ---- P } P! else if (STRCMP(hp->nbuf, groupdir) != 0) { P (void) sprintf(linebuf, "Newsgroups: %s", hp->nbuf); P*************** P*** 1588,1590 **** P *maxcol = '\0'; P! if (strncmp(linebuf, ">From ", 6) == 0) { P register char *p; P--- 1584,1586 ---- P *maxcol = '\0'; P! if (STRNCMP(linebuf, ">From ", 6) == 0) { P register char *p; P*************** P*** 1758,1760 **** P ttyraw(); P! clearok(curscr, 1); P #ifdef SIGTSTP P--- 1754,1756 ---- P ttyraw(); P! okclear(); P #ifdef SIGTSTP P*************** P*** 1785,1787 **** P ; P! n = (int)p - (int)linebuf; P if ( (n > 23 && n < 33) || (n > 65 && n < 79)) { P--- 1781,1783 ---- P ; P! n = (int) (p - linebuf); P if ( (n > 23 && n < 33) || (n > 65 && n < 79)) { P*************** P*** 1909,1911 **** P strcpy(prompt,"more? "); P! clearok(curscr, 1); P updscr(); P--- 1905,1907 ---- P strcpy(prompt,"more? "); P! okclear(); P updscr(); P*************** P*** 2166,2168 **** P if (c == '\f') { P! clearok(curscr, 1); P prflags &=~ NOPRT; P--- 2162,2164 ---- P if (c == '\f') { P! okclear(); P prflags &=~ NOPRT; P*************** P*** 2524,2526 **** P #else /* !TIOCGWINSZ */ P! clearok(curscr, 1); P updscr(); P--- 2520,2522 ---- P #else /* !TIOCGWINSZ */ P! okclear(); P updscr(); P*************** P*** 2628,2630 **** P if (err) { P! clearok(curscr, 1); P updscr(); P--- 2624,2626 ---- P if (err) { P! okclear(); P updscr(); P*************** P*** 2646,2648 **** P #ifdef SORTACTIVE P! if (strncmp(ACTIVE,"/tmp/", 5) == 0) P (void) unlink(ACTIVE); P--- 2642,2644 ---- P #ifdef SORTACTIVE P! if (STRNCMP(ACTIVE,"/tmp/", 5) == 0) P (void) unlink(ACTIVE); PIndex: patchlevel.h PPrereq: 9 P*** .d/patchlevel.h Wed Oct 7 16:53:43 1987 P--- patchlevel.h Wed Oct 7 18:49:18 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 9 P P! #define NEWS_VERSION "B 2.11 9/24/87" P--- 1,3 ---- P! #define PATCHLEVEL 10 P P! #define NEWS_VERSION "B 2.11 10/07/87" P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.11... ' sed 's/^P//' >patch.11 <<\PSHAREND PFrom mcvax!uunet!seismo!rick Mon Oct 19 21:11:43 MET 1987 PArticle 742 of news.software.b: PPath: mcvax!uunet!seismo!rick P>From: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: news 2.11 src patch #11 PMessage-ID: <44164@beno.seismo.CSS.GOV> PDate: 16 Oct 87 22:23:27 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 1951 P PDescription: P This is patch #11 for news 2.11 src. P P Fix problems with expire and sendbatch introduced in patch #10 P Fix lint and more xenix mods. P A Sample localize.xenix is provided. P recnews now takes a -a flag for moderated articles P Code from Stan Barber to allow readnews/postnews/checknews/postnews P to work with NNTP. P PFix: P cd to the src directory and apply the following patch. P PIndex: localize.nntp P*** .d/localize.nntp Thu Oct 15 18:37:31 1987 P--- localize.nntp Thu Oct 15 18:29:59 1987 P*************** P*** 0 **** P--- 1,92 ---- P+ # P+ # The file "localize.nntp" should be used as a starting point from which P+ # to build a localize.sh from which nntp-capable programs can be built. P+ # Basically, you can use the regular localize.sh you use and add those line P+ # that contain #NNTP, NNTPSRC and SERVERFILE to make it work. P+ # The string NNTPSRC should be replaced with the location of your nntp source P+ # directory. The string SERVERFILE should be replaced with the location of P+ # the serverfile. See the nntp (Version 1.4) instructions for more information. P+ # P+ # You will need nntp version 1.4 to make full use of these programs. They P+ # make some use of the XHDR extenstion in nntp version 1.4. P+ # P+ # You do not need to include any reference to the dbm library. DBM may remain P+ # undefined. You may also want to remove $(OTHERS) from the line in the P+ # Makefile that starts with "all:". P+ # P+ # You may want to include the line that begins with #RESOLVE in localize.sh P+ # if you want to link against the resolver library. I use it on my suns. P+ # P+ # You will need to create a "mailpaths" file on each host that uses these P+ # programs. See the regular news documenation for information on the P+ # mailpaths file. P+ # P+ # PROBLEMS: P+ # P+ # 1. Distribution checking is disabled in postnews. nntp does not provide this P+ # information, so postnews cannot check the article before posting. P+ # P+ # 2. History file support is marginal. nntp does not provided direct access P+ # to the history file information. nntp can tell if an article is not avail- P+ # able, but you cannot know if it was cancelled or expired or has not arrived P+ # yet. P+ # P+ # 3. The recording feature is available, but you have to implement it on each P+ # host that uses these programs. nntp does not provide this information from P+ # the server. P+ # P+ # 4. sys file searching is disabled. Again, nntp does not provide access to P+ # this information from the server. P+ # P+ # 5. XHDR support is necessary for some functions to work. This can be rewritten P+ # to avoid this, but I have not done it yet. P+ # P+ # FINALLY P+ # P+ # If you have bug reports on the nntp hunks of code, please feel free to let P+ # me know about it. I will do my best to fix them and route the fixes P+ # through Rick Adams for patch releases. P+ # P+ # Stan Barber P+ # Baylor College of Medicine P+ # uucp: {hoptoad,killer,rice}!academ!sob P+ # Internet: sob@tmc.edu P+ # P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed Makefile <<'EOF' P+ g/^#BSD4_2 /s/// P+ g/^#V7 /s/// P+ g/^#NNTP /s/// P+ g/^#RESOLVE /s/// P+ g/^#USG /d P+ g/^#EXCELAN /d P+ g/=fork/d P+ g/^#VMS /d P+ g/^#BSD4_3 /d P+ g/^#BSD4_1 /d P+ g/^all:/s/$(OTHERS)// P+ g/#NOTVMS/s/#NOTVMS// P+ g/-DDBM/s/-DDBM// P+ g/-ldbm/s/-ldbm// P+ g/NNTPSRC/s/NNTPSRC/\/usr\/src\/nntp/ P+ w P+ q P+ EOF P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed defs.h << 'EOF' P+ g/NNTPSRC/s/NNTPSRC/\usr\/src\/nntp/ P+ g/SERVERFILE/s/SERVERFILE/\/usr\/lib\/news\/server/ P+ w P+ q P+ EOF P+ echo "Be sure to make a login for usenet and create the group news" P+ echo "Also, be sure to alter Makefile and defs.h to reflect the" P+ echo "user name, id number, group name and group id number in the" P+ echo "places documented." P+ echo "Finally, please set your organization name in defs.h" P+ echo "Look for #define MYORG for the string to alter." P+ echo "Good Luck." PIndex: nntp.c P*** .d/nntp.c Thu Oct 15 18:37:35 1987 P--- nntp.c Thu Oct 15 18:30:01 1987 P*************** P*** 0 **** P--- 1,253 ---- P+ /* P+ * This software is Copyright 1987 by Stan Barber. P+ * P+ * Permission is hereby granted to copy, reproduce, redistribute or otherwise P+ * use this software as long as: there is no monetary profit gained P+ * specifically from the use or reproduction or this software, it is not P+ * sold, rented, traded or otherwise marketed, and this copyright notice is P+ * included prominently in any copy made. P+ * P+ * The author make no claims as to the fitness or correctness of this software P+ * for any use whatsoever, and it is provided as is. Any use of this software P+ * is at the user's own risk. P+ * P+ * this is a file full of functions used by the various news client programs P+ */ P+ #ifdef SCCSID P+ static char *SccsId = "@(#)nntp.c 2.2 10/15/87"; P+ #endif /* SCCSID */ P+ P+ #include "params.h" P+ P+ static char *nntpserver; P+ static char ser_line[256]; P+ static char active_file_name[512]; P+ static char article_file_name[512]; P+ static char last_group[256]; P+ /* P+ * open_server open a connection to the server P+ */ P+ open_server() P+ { P+ int response; P+ P+ /* open connection to nntpserver if appropriate */ P+ P+ nntpserver = getserverbyfile(SERVER_FILE); P+ if (nntpserver == NULL) { P+ fprintf(stderr, "Can't get the name of the news server from %s\n", P+ SERVER_FILE); P+ fprintf(stderr, "Either fix this file, or put NNTPSERVER in your environment."); P+ return -1; P+ } P+ response = server_init(nntpserver); P+ if (response < 0) { P+ fprintf(stderr, "Couldn't connect to %s news server, try again later.\n", P+ nntpserver); P+ return -1; P+ } P+ if (handle_server_response(response, nntpserver) < 0) { P+ fprintf(stderr, "Cannot handle response from nntpserver.\n"); P+ return -1; P+ } P+ return 0; P+ } P+ P+ /* P+ * open_active gets the active file and returns an open file descriptor to P+ * the calling program P+ */ P+ P+ FILE * P+ open_active() P+ { P+ FILE *openfp; P+ bzero(active_file_name, sizeof(active_file_name)); P+ put_server("LIST"); /* tell server we want the active file */ P+ (void) get_server(ser_line, sizeof(ser_line)); P+ if (*ser_line != CHAR_OK) { /* and then see if that's ok */ P+ xerror("Can't get active file from server: \n%s\n", ser_line); P+ } P+ strcpy(active_file_name, "/tmp/nsact.XXXXXX"); P+ (void) mktemp(active_file_name); /* make a temporary name */ P+ openfp = fopen(active_file_name, "w+"); /* and get ready */ P+ if (openfp == NULL) P+ return NULL; P+ P+ while (get_server(ser_line, sizeof(ser_line)) >= 0) { /* while */ P+ if (ser_line[0] == '.' && strlen(ser_line) == 1) P+ /* there's another line */ P+ break; /* get it and write it to */ P+ fputs(ser_line, openfp); P+ putc('\n', openfp); P+ } P+ P+ fseek(openfp, 0L, 0); /* just get to the beginning */ P+ P+ return openfp; P+ } P+ P+ /* P+ * active_name() returns the name of the temporary file that contains the P+ * name of the current active file. P+ */ P+ P+ char * P+ active_name() P+ { P+ if (active_file_name[0] == '\0') P+ return NULL; P+ return &active_file_name[0]; P+ } P+ P+ /* P+ * set_group() set the current group returns NULL if failure "string" if P+ * successful P+ */ P+ P+ char * P+ set_group(newsgroup) P+ char *newsgroup; P+ { P+ char nntpbfr[256]; P+ if (newsgroup == NULL || *newsgroup == '\0') P+ return NULL; P+ if (strcmp(newsgroup, last_group)) { P+ (void) sprintf(nntpbfr, "GROUP %s", newsgroup); P+ put_server(nntpbfr); P+ (void) get_server(ser_line, sizeof(ser_line)); P+ if (*ser_line != CHAR_OK) P+ return NULL; P+ strcpy(last_group, newsgroup); P+ } P+ return &ser_line[0]; P+ } P+ P+ /* P+ * getarticle() returns an open file descriptor to the requested article. P+ */ P+ P+ FILE * P+ getarticle(newsgroup, number, command) P+ char *newsgroup, *command; P+ int number; P+ { P+ FILE *fp; P+ char nntpbfr[256]; P+ bzero(article_file_name, sizeof(article_file_name)); P+ if (set_group(newsgroup) == NULL) P+ return NULL; P+ strcpy(article_file_name, "/tmp/nsart.XXXXXX"); P+ if (mktemp(article_file_name) == NULL) P+ return NULL; P+ (void) sprintf(nntpbfr, "%s %ld", command, number); P+ put_server(nntpbfr); P+ (void) get_server(ser_line, sizeof(ser_line)); P+ if (*ser_line != CHAR_OK) P+ return NULL; P+ if ((fp = fopen(article_file_name, "w+")) == NULL) { P+ /* and get ready */ P+ sync_server(); P+ return NULL; P+ } P+ while (get_server(ser_line, sizeof(ser_line)) >= 0) { /* while */ P+ if (ser_line[0] == '.' && strlen(ser_line) == 1) P+ /* there's another line */ P+ break; /* get it and write it to */ P+ fputs(ser_line, fp); /* the temp file */ P+ putc('\n', fp); P+ } P+ fseek(fp, 0L, 0); /* just get to the beginning */ P+ return fp; P+ } P+ /* P+ * article_name() returns the name of the temporary file that contains the P+ * name of the current article file. P+ */ P+ P+ char * P+ article_name() P+ { P+ if (article_file_name[0] == '\0') P+ return NULL; P+ return &article_file_name[0]; P+ } P+ P+ /* P+ * group_name() returns the name of the last group accessed from nntp P+ */ P+ P+ char * P+ group_name() P+ { P+ if (last_group[0] == '\0') P+ return NULL; P+ return &last_group[0]; P+ } P+ P+ /* P+ * getartbyid retrieves an article by id number and returns an open file P+ * descriptor for that article P+ */ P+ P+ FILE * P+ getartbyid(id) P+ char *id; P+ { P+ FILE *fp; P+ char nntpbfr[256]; P+ (void) sprintf(nntpbfr, "ARTICLE %s", id); P+ put_server(nntpbfr); P+ (void) get_server(ser_line, sizeof(ser_line)); P+ if (*ser_line != CHAR_OK) { P+ fprintf(stderr, "Cannot fetch article %s\n", id); P+ return NULL; P+ } P+ strcpy(article_file_name, "/tmp/nsart.XXXXXX"); P+ if (mktemp(article_file_name) == NULL) P+ return NULL; P+ if ((fp = fopen(article_file_name, "w+")) == NULL) { P+ /* and get ready */ P+ sync_server(); P+ return NULL; P+ } P+ while (get_server(ser_line, sizeof(ser_line)) >= 0) { /* while */ P+ if (ser_line[0] == '.' && strlen(ser_line) == 1) P+ /* there's another line */ P+ break; /* get it and write it to */ P+ fputs(ser_line, fp); /* the temp file */ P+ putc('\n', fp); P+ } P+ fseek(fp, 0L, 0); /* just get to the beginning */ P+ return fp; P+ } P+ P+ /* P+ * sync_server gobbles up the rest of the server output until it sees the . P+ * on the beginning of a line by itself P+ */ P+ P+ sync_server() P+ { P+ while (get_server(ser_line, sizeof(ser_line)) >= 0) { /* while */ P+ if (ser_line[0] == '.' && strlen(ser_line) == 1) P+ /* there's another line */ P+ break; /* get it and throw it away */ P+ } P+ P+ } P+ P+ /* P+ * strindex returns location of tx in sx P+ */ P+ int P+ strindex(sx, tx) P+ char *sx, *tx; P+ { P+ int i, n; P+ n = strlen(tx); P+ for (i = 0; sx[i] != '\0'; i++) P+ if (strncmp(sx + i, tx, n) == 0) P+ return i; P+ return -1; P+ } PIndex: Makefile.dst PPrereq: 1.24 P*** .d/Makefile.dst Wed Oct 7 16:47:57 1987 P--- Makefile.dst Thu Oct 15 19:06:04 1987 P*************** P*** 1,2 **** P! # '@(#)Makefile.dst 1.24 9/24/87' P # Generic Makefile. P--- 1,2 ---- P! # '@(#)Makefile.dst 1.26 10/15/87' P # Generic Makefile. P*************** P*** 35,36 **** P--- 35,39 ---- P SCCSID = -DSCCSID P+ P+ #NNTP SERVER= -DSERVER P+ P DEFS = -DRNEWS=\"$(BINDIR)/rnews\" -DSPOOLDIR=\"$(SPOOLDIR)\" \ P*************** P*** 38,40 **** P -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P! -DNEWSGRP=\"$(NEWSGRP)\" P P--- 41,43 ---- P -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P! -DNEWSGRP=\"$(NEWSGRP)\" ${SERVER} P P*************** P*** 48,50 **** P #V7 VFORK=-Dvfork=fork P! P #BSD4_1 VFORK= P--- 51,53 ---- P #V7 VFORK=-Dvfork=fork P! #EXCELAN NETINCLUDE= -I/usr/include/EXOS P #BSD4_1 VFORK= P*************** P*** 54,56 **** P #USG IBMFLAGS = P! #USG CFLAGS = ${DEBUG} -O $(IBMFLAGS) -DUSG -Dindex=strchr -Drindex=strrchr ${DEFS} ${SCCSID} ${VFORK} P #USG LFLAGS = ${DEBUG} -s -i $(IBMFLAGS) P--- 57,59 ---- P #USG IBMFLAGS = P! #USG CFLAGS = ${DEBUG} -O $(IBMFLAGS) -DUSG -Dindex=strchr -Drindex=strrchr ${DEFS} ${SCCSID} ${VFORK} ${NETINCLUDE} P #USG LFLAGS = ${DEBUG} -s -i $(IBMFLAGS) P*************** P*** 57,60 **** P #USG LIBS = P! #USG LINTFLAGS = ${DEFS} P! #V7 CFLAGS = ${DEBUG} -O -DDBM ${DEFS} ${SCCSID} ${VFORK} P #V7 LFLAGS = ${DEBUG} P--- 60,63 ---- P #USG LIBS = P! #USG LINTFLAGS = ${DEFS} ${NETINCLUDE} P! #V7 CFLAGS = ${DEBUG} -DDBM ${DEFS} ${SCCSID} ${VFORK} ${NETINCLUDE} P #V7 LFLAGS = ${DEBUG} P*************** P*** 61,63 **** P #V7 LIBS = -ldbm P! #V7 LINTFLAGS = -chba -DDBM ${DEFS} P #BSD4_1 LIBS = -ldbm -ljobs P--- 64,66 ---- P #V7 LIBS = -ldbm P! #V7 LINTFLAGS = -chba -DDBM ${DEFS} ${NETINCLUDE} P #BSD4_1 LIBS = -ldbm -ljobs P*************** P*** 64,65 **** P--- 67,71 ---- P P+ #EXCELAN NETLIB = -lsocket P+ #RESOLVE NETLIB = -lresolv P+ P TERMLIB = -ltermlib P*************** P*** 75,78 **** P P! #V7 MISC = uname.o P! #USG MISC = ftime.o P OBJECTS = funcs.o funcs2.o header.o ndir.o $(MISC) getdate.o P--- 81,85 ---- P P! #NNTP CLIENTLIB = clientlib.o nntp.o P! #V7 MISC = uname.o ${CLIENTLIB} P! #USG MISC = ftime.o ${CLIENTLIB} P OBJECTS = funcs.o funcs2.o header.o ndir.o $(MISC) getdate.o P*************** P*** 89,90 **** P--- 96,99 ---- P P+ #NNTP CSRCS = NNTPSRC/common/clientlib.c nntp.c P+ P SRCS = funcs.c funcs2.c header.c P*************** P*** 91,97 **** P ISRCS = inews.c ifuncs.c iextern.c control.c fullname.c $(SRCS) P! PSRCS = postnews.c rextern.c funcs.c P RSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c readr.c process.c \ P! digest.c $(SRCS) P VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ P! visual.c virtterm.c P ESRCS = expire.c header.c funcs.c iextern.c \ P--- 100,106 ---- P ISRCS = inews.c ifuncs.c iextern.c control.c fullname.c $(SRCS) P! PSRCS = postnews.c rextern.c funcs.c $(CSRCS) P RSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c readr.c process.c \ P! digest.c $(SRCS) $(CSRCS) P VSRCS = readnews.c rfuncs.c rfuncs2.c rextern.c process.c $(SRCS) \ P! visual.c virtterm.c $(CSRCS) P ESRCS = expire.c header.c funcs.c iextern.c \ P*************** P*** 101,102 **** P--- 110,113 ---- P P+ P+ P UTILS = uurec recnews sendnews expire batch caesar recmail \ P*************** P*** 110,115 **** P P! install: all help vnews.help P chmod 755 ./installit P! -mkdir $(DESTDIR)$(BINDIR) P! -mkdir $(DESTDIR)$(LIBDIR) P for i in $(COMMANDS); do \ P--- 121,126 ---- P P! install: all help vnews.help installit P chmod 755 ./installit P! -test -d $(DESTDIR)$(BINDIR) || mkdir $(DESTDIR)$(BINDIR) P! -test -d $(DESTDIR)$(LIBDIR) || mkdir $(DESTDIR)$(LIBDIR) P for i in $(COMMANDS); do \ P*************** P*** 175,177 **** P readnews: $(P) $(ROBJECTS) P! $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(LIBS) P #VMS mv readnews.exe readnews P--- 186,188 ---- P readnews: $(P) $(ROBJECTS) P! $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(LIBS) $(NETLIB) P #VMS mv readnews.exe readnews P*************** P*** 178,179 **** P--- 189,196 ---- P P+ #NNTP clientlib.o: NNTPSRC/common/clientlib.c P+ #NNTP $(CC) $(CFLAGS) -c NNTPSRC/common/clientlib.c P+ P+ #NNTP nntp.o: nntp.c P+ #NNTP $(CC) $(CFLAGS) -c nntp.c P+ P funcs.o: funcs.c params.h defs.h header.h Makefile P*************** P*** 201,203 **** P postnews: $(P) $(POBJECTS) P! $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews P #VMS mv postnews.exe postnews P--- 218,220 ---- P postnews: $(P) $(POBJECTS) P! $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews $(NETLIB) P #VMS mv postnews.exe postnews P*************** P*** 204,207 **** P P! postnews.o: postnews.c defs.h params.h header.h Makefile P! $(CC) $(CFLAGS) -c postnews.c P P--- 221,224 ---- P P! postnews.o: postnews.c defs.h params.h header.h Makefile P! $(CC) $(CFLAGS) -c postnews.c P P*************** P*** 226,228 **** P vnews: $(P) $(VOBJECTS) P! $(CC) $(LFLAGS) $(VOBJECTS) $(TERMLIB) $(LIBS) -o $@ P #VMS mv vnews.exe vnews P--- 243,245 ---- P vnews: $(P) $(VOBJECTS) P! $(CC) $(LFLAGS) $(VOBJECTS) -o $@ $(TERMLIB) $(LIBS) $(NETLIB) P #VMS mv vnews.exe vnews P*************** P*** 248,250 **** P P! recnews: recnews.c defs.h header.h Makefile P $(CC) $(CFLAGS) $(LFLAGS) recnews.c -o recnews P--- 265,267 ---- P P! recnews: recnews.c defs.h header.h params.h Makefile P $(CC) $(CFLAGS) $(LFLAGS) recnews.c -o recnews P*************** P*** 283,286 **** P P! checknews: $(P) checknews.o process.o cpathinit.o rextern.o P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o -o checknews P #VMS mv checknews.exe checknews P--- 300,303 ---- P P! checknews: $(P) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) -o checknews $(NETLIB) P #VMS mv checknews.exe checknews PIndex: checknews.c PPrereq: 2.29 P*** .d/checknews.c Tue Apr 7 13:58:55 1987 P--- checknews.c Thu Oct 15 18:29:47 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.29 4/6/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.30 10/15/87"; P #endif /* SCCSID */ P*************** P*** 129,130 **** P--- 129,134 ---- P #endif P+ #ifdef SERVER P+ if (open_server() < 0) P+ xerror("NNTP connection failed."); P+ #endif /* SERVER */ P ptr = getenv("NEWSRC"); P*************** P*** 213,217 **** P } P if ((actfp = fopen(ACTIVE, "r")) == NULL) P xerror("Cannot open active newsgroups file"); P- P #ifdef DEBUG P--- 217,224 ---- P } P+ #ifdef SERVER P+ if ((actfp = open_active(ACTIVE, "r")) == NULL) P+ #else /* !SERVER */ P if ((actfp = fopen(ACTIVE, "r")) == NULL) P+ #endif /* !SERVER */ P xerror("Cannot open active newsgroups file"); P #ifdef DEBUG P*************** P*** 544,545 **** P--- 551,555 ---- P { P+ #ifdef SERVER P+ close_server(); P+ #endif /* SERVER */ P exit(i); PIndex: defs.dist PPrereq: 2.58 P*** .d/defs.dist Wed Oct 7 16:50:11 1987 P--- defs.dist Thu Oct 15 18:29:48 1987 P*************** P*** 16,18 **** P P! /* @(#)defs.dist 2.58 4/10/87 */ P P--- 16,18 ---- P P! /* @(#)defs.dist 2.59 10/15/87 */ P P*************** P*** 68,71 **** P /* #define BSD4_2 /* If you are running 4.2 or 4.3 BSD */ P! /* #define BSD4_1C /* If you are running 4.1C BSD */ P /* #define LOCKF /* If you have the lockf() sys call */ P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P--- 68,75 ---- P /* #define BSD4_2 /* If you are running 4.2 or 4.3 BSD */ P! /* #define BSD2_10 /* If you are running 2.10 BSD */ P /* #define LOCKF /* If you have the lockf() sys call */ P+ /* #define DOGETUSER /* Always do 'getuser' so can't fake name */ P+ /* #define LOGDIR /* use the 'logdir' call on path lookups */ P+ /* #define MKDIRSUB /* your system has mkdir as a syscall */ P+ /* #define READDIR /* your system has readdir() in libc */ P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P*************** P*** 115 **** P--- 119,131 ---- P #define NGDELIM ',' /* delimit character in news group line */ P+ P+ /* for NNTP */ P+ #ifdef SERVER P+ # include "NNTPSRC/common/response_codes.h" P+ # define SERVER_FILE "SERVERFILE" P+ #endif /* SERVER */ P+ P+ #ifdef M_XENIX P+ #define index strchr P+ #define rindex strrchr P+ #define vfork fork P+ #endif /* M_XENIX */ PIndex: expire.c PPrereq: 2.54 P*** .d/expire.c Thu Oct 8 00:22:29 1987 P--- expire.c Thu Oct 15 18:29:50 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.54 10/7/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.55 10/15/87"; P #endif /* SCCSID */ P*************** P*** 769,773 **** P (void) rename(ARTFILE, OARTFILE); P- #endif /* !DBM */ P (void) rename(NARTFILE, ARTFILE); P- #ifdef DBM P if (dorebuild) P--- 769,771 ---- P*************** P*** 807,810 **** P if (i++ > 5) { P! error("Can't get lock for expire"); P! exit(1); P } P--- 805,807 ---- P if (i++ > 5) { P! xerror("Can't get lock for expire"); P } PIndex: funcs2.c PPrereq: 1.21 P*** .d/funcs2.c Thu Oct 8 00:20:34 1987 P--- funcs2.c Thu Oct 15 18:29:52 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.21 10/7/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.22 10/15/87"; P #endif /* SCCSID */ P*************** P*** 43,45 **** P xerror("Cannot get user's name"); P! if ( username == NULL || username[0] == 0) P username = AllocCpy(p->pw_name); P--- 43,46 ---- P xerror("Cannot get user's name"); P! if ( username == NULL || username[0] == 0 || P! STRCMP(username, "Unknown") == 0) P username = AllocCpy(p->pw_name); P*************** P*** 51,52 **** P--- 52,55 ---- P P+ /* no sys file on clients via nntp */ P+ #ifndef SERVER P static FILE *sysfile; P*************** P*** 185,186 **** P--- 188,190 ---- P } P+ #endif /* SERVER */ P P*************** P*** 428,429 **** P--- 432,434 ---- P P+ P /* P*************** P*** 441,442 **** P--- 446,452 ---- P register char *p; P+ #ifdef SERVER P+ char workspace[256]; P+ struct tm *tm; P+ long clock; P+ #else /* !SERVER */ P #ifdef DBM P*************** P*** 448,450 **** P #endif /* !DBM */ P! P /* Try to understand old artid's as well. Assume .UUCP domain. */ P--- 458,460 ---- P #endif /* !DBM */ P! #endif /* !SERVER */ P /* Try to understand old artid's as well. Assume .UUCP domain. */ P*************** P*** 459,460 **** P--- 469,548 ---- P (void) strcpy(oidbuf, artid); P+ #ifdef SERVER P+ (void) sprintf(lbuf,"STAT %s",oidbuf); P+ put_server(lbuf); P+ (void) get_server(workspace,sizeof(workspace)); P+ if (*workspace != CHAR_OK) P+ return NULL; P+ (void) sprintf(lbuf,"XHDR xref %s",oidbuf); P+ put_server(lbuf); P+ (void) get_server(workspace,sizeof(workspace)); /* get response */ P+ if (*workspace != CHAR_OK) P+ return NULL; /* old style nntp */ P+ (void) get_server(workspace,sizeof(workspace)); /* get header line */ P+ sync_server(); /* get rid of the rest of it */ P+ p = index(workspace,' '); P+ p++; P+ P+ if (*p == '(') { /* there is no xref line */ P+ long s,sm; P+ FILE * af; P+ char n[100], buf[100], *name; P+ (void) sprintf(lbuf,"XHDR newsgroups %s",oidbuf); P+ put_server(lbuf); P+ (void) get_server(workspace,sizeof(workspace)); P+ if (*workspace != CHAR_OK) P+ return NULL; P+ (void) get_server(workspace,sizeof(workspace)); P+ sync_server(); P+ if ((name = index(workspace,' ')) == NULL) P+ return NULL; P+ name++; P+ /* now we fetch the line from the active file */ P+ af = xfopen(ACTIVE, "r"); P+ while (fgets(buf, sizeof(buf), af) != NULL) { P+ if (sscanf(buf, "%s %ld %ld", n, &s, &sm) == 3 && P+ STRCMP(n, name) == 0) { P+ break; P+ } P+ } P+ (void) fclose(af); P+ /* now we ask for a message ids in that newsgroup */ P+ if (set_group(name) == NULL) P+ return NULL; P+ (void) sprintf(lbuf, "XHDR message-id %d-%d", sm, s); P+ put_server(lbuf); P+ (void) get_server(workspace,sizeof(workspace)); P+ if (*workspace != CHAR_OK) P+ return NULL; P+ while ( get_server(workspace,sizeof(workspace)) >= 0) { P+ if (*workspace == '.' && strlen(workspace) == 1) P+ return NULL; P+ if (strindex(workspace,oidbuf) > -1) P+ break; P+ } P+ sync_server(); P+ *(index(workspace,' ')) = '\0'; P+ (void) sprintf(lbuf, "%s/%s", n, workspace); P+ bzero(workspace,sizeof(workspace)); P+ strcpy(workspace, lbuf); P+ } else { P+ bzero(lbuf, sizeof(lbuf)); P+ strcpy(lbuf, p); P+ while (*p != '\0' && (p = index(lbuf,':')) != NULL) { P+ *p = '/'; P+ p++; P+ } P+ strcpy(workspace, lbuf); P+ } P+ p = &workspace[0]; P+ time(&clock); P+ tm = localtime(&clock); P+ #ifdef USG P+ sprintf(lbuf, "%s\t%2.2d/%2.2d/%d %2.2d:%2.2d\t%s", P+ #else /* !USG */ P+ sprintf(lbuf, "%s\t%02d/%02d/%d %02d:%02d\t%s", P+ #endif /* !USG */ P+ oidbuf,tm->tm_mon,tm->tm_mday,tm->tm_year,tm->tm_hour,tm->tm_min,p); P+ return lbuf; /* not really the same, but close */ P+ #else /* !SERVER */ P lcase(oidbuf); P*************** P*** 491,492 **** P--- 579,581 ---- P return NULL; P+ #endif /* !SERVER */ P } P*************** P*** 537,539 **** P--- 626,638 ---- P if (p) { P+ #ifdef SERVER P+ if ((rv = getartbyid(p)) != NULL) { P+ strcpy(fname, article_name()); P+ (void) fclose(rv); P+ rv = NULL; P+ } P+ else P+ xerror("Cannot hfopen article %s", artid); P+ #else /* !SERVER */ P (void) strcpy(fname, dirname(p)); P+ #endif /* !SERVER */ P rv = fopen(fname, "r"); /* NOT xfopen! */ P*************** P*** 542,543 **** P--- 641,645 ---- P } P+ #ifdef SERVER P+ (void) unlink(fname); P+ #endif /* !SERVER */ P return rv; P*************** P*** 544,547 **** P } P! P! #ifdef DBM P /* P--- 646,649 ---- P } P! #ifndef SERVER P! # ifdef DBM P /* P*************** P*** 559,561 **** P } P! #endif P P--- 661,664 ---- P } P! # endif /* DBM */ P! #endif /* !SERVER */ P PIndex: inews.c PPrereq: 2.81 P*** .d/inews.c Thu Oct 8 00:22:03 1987 P--- inews.c Thu Oct 15 18:29:58 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.81 10/7/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.82 10/15/87"; P #endif /* SCCSID */ P*************** P*** 28,32 **** P P! # ifdef F_RDLCK P struct flock news_lock; P! # endif /* F_RDLCK */ P # endif /* LOCKF */ P--- 28,32 ---- P P! # if defined(F_RDLCK) && defined(F_SETLK) P struct flock news_lock; P! # endif /* F_RDLCK && F_SETLK */ P # endif /* LOCKF */ P*************** P*** 138,140 **** P #ifdef LOCKF P! # ifdef F_RDLCK P news_lock.l_type = F_RDLCK; P--- 138,140 ---- P #ifdef LOCKF P! # if defined(F_RDLCK) && defined(F_SETLK) P news_lock.l_type = F_RDLCK; PIndex: installit PPrereq: 2.3 P*** .d/installit Wed Oct 7 16:53:08 1987 P--- installit Thu Oct 15 18:29:58 1987 P*************** P*** 2,4 **** P # P! # '@(#)installit 2.3 9/24/87' P # From install.sh 4.8 (Berkeley) 3/6/86 P--- 2,4 ---- P # P! # '@(#)installit 2.4 10/15/87' P # From install.sh 4.8 (Berkeley) 3/6/86 P*************** P*** 7,9 **** P PATH=/bin:/etc:/usr/bin:/usr/ucb P! export BATH P cmd="" P--- 7,9 ---- P PATH=/bin:/etc:/usr/bin:/usr/ucb P! export PATH P cmd="" PIndex: localize.xenix P*** .d/localize.xenix Wed Oct 7 16:53:23 1987 P--- localize.xenix Thu Oct 15 18:30:00 1987 P*************** P*** 0 **** P--- 1,49 ---- P+ # P+ # This is correct for the P+ # XENIX (empty) 5.0 iAPX286 1 1006 (empty) P+ # version. There are so many versions of xenix out there P+ # that it is probabably wrong for yours. At least this should give P+ # you a starting point. P+ # P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed - Makefile <<'EOF' P+ g/^#USG /s/// P+ g/^#V7 /d P+ g/^#VMS /d P+ g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P+ g/^MISC *=/s/$/ uname.o/ P+ g/^UUXFLAGS/s//UUXFLAGS =/ P+ g/^IBMFLAGS/s/$/ -M2l -LARGE -DM_XENIX/ P+ g/^LIBS/s/$/ -lx -ldbm/ P+ g/termlib/s//curses -ltermcap/ P+ g/^LFLAGS =/s/$/ -F 8000 -m ${@}.map/ P+ g/rm -f $(COMMANDS) $(OTHERS) \*.o a.out/s/a.out/\*.map a.out/ P+ g/-o inews/s/-o/-m inews.map -F 5000 -o/ P+ g/-o readnews/s/-o/-m readnews.map -F 3000 -o/ P+ g/-o vnews /s/-o/-F 5000 -m vnews.map -o / P+ g/-o checknews/s/-o/-F E000 -o/ P+ g/-o expire/s/-o/-F A000 -o/ P+ g/-Dvfork=fork/s/// P+ g/-Dindex=strchr/s/// P+ g/-Drindex=strrchr/s/// P+ g/^SCCSID/s/^/#/ P+ w P+ q P+ EOF P+ P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed - defs.h <<'EOF' P+ g/#define TMAIL/s//\/\* #define TMAIL/ P+ g/\/usr\/ucb\/more/s//\/usr\/bin\/more/ P+ g/uux - -r -z/s//uux - / P+ g/uucpname/s//systemid/ P+ g/\/\* #define LOCKF/s//#define LOCKF/ P+ g/\/\* #define UUNAME/s/...// P+ w P+ q P+ EOF PIndex: ndir.c PPrereq: 1.11 P*** .d/ndir.c Tue Mar 24 13:51:46 1987 P--- ndir.c Thu Oct 15 18:30:00 1987 P*************** P*** 2,3 **** P--- 2,6 ---- P #if !defined(BSD4_2) && !defined(BSD4_1C) && !defined(HP9K5) P+ #ifdef M_XENIX P+ #include <sys/types.h> P+ #endif /* M_XENIX */ P #include <sys/param.h> P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.11 3/20/87"; P #endif /* SCCSID */ P--- 9,11 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.12 10/15/87"; P #endif /* SCCSID */ PIndex: params.h PPrereq: 2.24 P*** .d/params.h Thu Oct 8 00:22:15 1987 P--- params.h Thu Oct 15 18:30:02 1987 P*************** P*** 4,6 **** P P! /* @(#)params.h 2.24 10/7/87 */ P P--- 4,6 ---- P P! /* @(#)params.h 2.25 10/15/87 */ P P*************** P*** 160 **** P--- 160,180 ---- P #define PREFIX(a,b) ((*(a) != *(b)) ? FALSE : prefix((a)+1, (b)+1)) P+ P+ #ifdef SERVER P+ /* from clientlib.c */ P+ extern char *getserverbyfile(); P+ extern int server_init(); P+ extern void put_server(); P+ extern int get_server(); P+ extern void close_server(); P+ /* from nntp.c */ P+ extern FILE *open_active(); P+ extern int open_server(); P+ extern char *set_group(); P+ extern char *active_name(); P+ extern char *group_name(); P+ extern FILE *getarticle(); P+ extern FILE *getartbyid(); P+ extern char *article_name(); P+ extern void sync_server(); P+ extern int strindex(); P+ #endif /* SERVER */ PIndex: patchlevel.h P*** .d/patchlevel.h Thu Oct 8 00:22:21 1987 P--- patchlevel.h Thu Oct 15 18:30:17 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 10 P P! #define NEWS_VERSION "B 2.11 10/07/87" P--- 1,3 ---- P! #define PATCHLEVEL 11 P P! #define NEWS_VERSION "B 2.11 10/15/87" PIndex: postnews.c PPrereq: 1.32 P*** .d/postnews.c Thu Oct 8 00:23:21 1987 P--- postnews.c Thu Oct 15 18:30:05 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.32 10/7/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.33 10/15/87"; P #endif /* SCCSID */ P*************** P*** 109,110 **** P--- 109,115 ---- P } P+ #ifdef SERVER P+ if (getarticle(ng, num, "ARTICLE") == NULL) P+ goto nothere; P+ strcpy(original, article_name()); P+ #else /* !SERVER */ P (void) sprintf(original, "%s/%s", SPOOL, ng); P*************** P*** 115,117 **** P (void) strcat(original, num); P! P if ((fd=open(original,0)) >= 0) { P--- 120,122 ---- P (void) strcat(original, num); P! #endif /* !SERVER */ P if ((fd=open(original,0)) >= 0) { P*************** P*** 126,127 **** P--- 131,135 ---- P } else P+ #ifdef SERVER P+ nothere: P+ #endif /* !SERVER */ P printf("I can't find that article.\n"); P*************** P*** 234,236 **** P--- 242,246 ---- P } P+ #ifndef SERVER P printf("For a list of newsgroups, type ?\n"); P+ #endif /* !SERVER */ P n = 0; P*************** P*** 245,246 **** P--- 255,257 ---- P return TRUE; P+ #ifndef SERVER P if (buf[0] == '?'){ P*************** P*** 266,267 **** P--- 277,279 ---- P } P+ #endif /* !SERVER */ P if (valid_ng(buf, &i, &i, &canpost)) { P*************** P*** 345,346 **** P--- 357,361 ---- P P+ #ifdef SERVER P+ return; /* can't do this yet */ P+ #else /* !SERVER */ P /* Check that it's a proper distribution */ P*************** P*** 385,386 **** P--- 400,402 ---- P } P+ #endif /* !SERVER */ P } P*************** P*** 544,546 **** P P! if (ngmatch(newsgroups, "rec.humor,!rec.humor.d")) { P if (askyes("Could this be offensive to anyone? ","")) { P--- 560,562 ---- P P! if (ngmatch(newsgroups, "rec.humor,!rec.humor.all")) { P if (askyes("Could this be offensive to anyone? ","")) { P*************** P*** 742,744 **** P--- 758,769 ---- P pathinit(); P+ #ifdef SERVER P+ if (open_server() < 0) P+ xerror("Server error"); P+ /* do something to some up with distributions */ P+ if ((fd = open_active()) == NULL) P+ xerror("Server error"); P+ strcpy(ACTIVE,active_name()); P+ #else /* !SERVER */ P (void) sprintf(buf, "%s/%s", LIB, "distributions"); P+ P fd = xfopen(buf, "r"); P*************** P*** 751,752 **** P--- 776,778 ---- P } P+ #endif /* !SERVER */ P (void) fclose(fd); PIndex: readnews.c PPrereq: 2.32 P*** .d/readnews.c Wed Oct 7 16:54:09 1987 P--- readnews.c Thu Oct 15 18:30:06 1987 P*************** P*** 5,7 **** P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.32 3/21/87"; P #endif /* SCCSID */ P--- 5,7 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.33 10/15/87"; P #endif /* SCCSID */ P*************** P*** 54,59 **** P gid = getgid(); P! duid = 0; P! dgid = 0; P (void) ftime(&Now); P- P /* give reasonable error message if SPOOL directory P--- 54,58 ---- P gid = getgid(); P! duid = geteuid(); P! dgid = getegid(); P (void) ftime(&Now); P /* give reasonable error message if SPOOL directory P*************** P*** 62,64 **** P--- 61,67 ---- P */ P+ #ifdef SERVER P+ if (open_server() < 0) P+ #else /* !SERVER */ P if (access(SPOOL, 05)) P+ #endif /* !SERVER */ P { P*************** P*** 67,69 **** P } P- P #ifndef SHELL P--- 70,71 ---- P*************** P*** 147,149 **** P optflag = FALSE; P! if (!strncmp(rcbuf, "options ", 8)) P optflag = TRUE; P--- 149,151 ---- P optflag = FALSE; P! if (!STRNCMP(rcbuf, "options ", 8)) P optflag = TRUE; P*************** P*** 219,226 **** P } else { P! int (* old)(); P! if ((old = signal(SIGQUIT, SIG_IGN)) != SIG_IGN) P (void) signal(SIGQUIT, cleanup); P! if ((old = signal(SIGHUP, SIG_IGN)) != SIG_IGN) P (void) signal(SIGHUP, cleanup); P! if ((old = signal(SIGINT, SIG_IGN)) != SIG_IGN) P (void) signal(SIGINT, cleanup); P--- 221,227 ---- P } else { P! if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) P (void) signal(SIGQUIT, cleanup); P! if (signal(SIGHUP, SIG_IGN) != SIG_IGN) P (void) signal(SIGHUP, cleanup); P! if (signal(SIGINT, SIG_IGN) != SIG_IGN) P (void) signal(SIGINT, cleanup); P*************** P*** 261,262 **** P--- 262,270 ---- P } P+ #ifdef SERVER P+ if ((actfp = open_active()) == NULL) P+ xerror("Cannot open active newsgroups file"); P+ strcpy(ACTIVE, active_name()); P+ (void) fclose(actfp); P+ actfp = NULL; P+ #endif /* !SERVER */ P sortactive(); P*************** P*** 263,265 **** P actfp = xfopen(ACTIVE, "r"); P- P #ifdef DEBUG P--- 271,272 ---- P*************** P*** 370,372 **** P for (p=index(string, first); p; p = index(p+1, first)) { P! if (((p==string) || (p[-1]!='!')) && strncmp(p, searchfor, strlen(searchfor)) == 0) P return TRUE; P--- 377,379 ---- P for (p=index(string, first); p; p = index(p+1, first)) { P! if (((p==string) || (p[-1]!='!')) && STRNCMP(p, searchfor, strlen(searchfor)) == 0) P return TRUE; PIndex: readr.c PPrereq: 2.62 P*** .d/readr.c Thu Oct 8 00:23:40 1987 P--- readr.c Fri Oct 16 14:58:24 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.62 10/7/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.64 10/16/87"; P #endif /* SCCSID */ P*************** P*** 46,48 **** P--- 46,50 ---- P */ P+ #ifndef SERVER P static char goodone[BUFLEN]; /* last decent article */ P+ #endif /* !SERVER */ P static char ogroupdir[BUFLEN]; /* last groupdir */ P*************** P*** 135,137 **** P--- 137,141 ---- P #endif P+ #ifndef SERVER P (void) strcpy(goodone, filename); P+ #endif /* SERVER */ P if (pflag || lflag || eflag) { P*************** P*** 218,219 **** P--- 222,226 ---- P long i; P+ #ifdef SERVER P+ char workspace[256]; P+ #endif /* !SERVER */ P P*************** P*** 391,393 **** P (void) strcpy(bfr, groupdir); P! selectng(ogroupdir, TRUE, FALSE); P (void) strcpy(groupdir, ogroupdir); P--- 398,400 ---- P (void) strcpy(bfr, groupdir); P! selectng(ogroupdir, FALSE, FALSE); P (void) strcpy(groupdir, ogroupdir); P*************** P*** 439,441 **** P break; P! P /* escape to shell */ P--- 446,448 ---- P break; P! #ifndef NOSHELL P /* escape to shell */ P*************** P*** 448,449 **** P--- 455,457 ---- P /* mail reply */ P+ #endif P case 'r': P*************** P*** 835,836 **** P--- 843,845 ---- P } P+ #ifndef SERVER P if (s_find(&srec, bptr) == 0) { P*************** P*** 839,840 **** P--- 848,850 ---- P } P+ #endif /* !SERVER */ P (void) transmit(&srec, tfilename); P*************** P*** 964,965 **** P--- 974,978 ---- P int noaccess; P+ #ifdef SERVER P+ char workspace[256]; P+ #else /* !SERVER */ P register DIR *dirp; P*************** P*** 966,967 **** P--- 979,981 ---- P register struct direct *dir; P+ #endif /* !SERVER */ P long nextnum, tnum; P*************** P*** 1022,1024 **** P--- 1036,1046 ---- P rcreadok = 2; /* have seen >= 1 article */ P+ #ifdef SERVER P+ if ((fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P+ goto badart; P+ strcpy(filename, article_name()); P+ (void) fclose(fp); P+ fp = NULL; P+ #else /* !SERVER */ P (void) sprintf(filename, "%s/%ld", dirname(groupdir), bit); P+ P if (rfq && goodone[0]) P*************** P*** 1025,1026 **** P--- 1047,1049 ---- P strcpy(filename, goodone); P+ #endif /* !SERVER */ P if (SigTrap) { P*************** P*** 1056,1057 **** P--- 1079,1085 ---- P noaccess = 0; P+ #ifdef SERVER P+ if (*groupdir == ' ' || *groupdir == '\0' || P+ set_group(groupdir) == NULL) P+ goto badart; P+ #else /* !SERVER */ P dirp = opendir(dirname(groupdir)); P*************** P*** 1062,1064 **** P--- 1090,1107 ---- P } P+ #endif /* !SERVER */ P nextnum = rflag ? minartno - 1 : ngsize + 1; P+ #ifdef SERVER P+ tnum = nextnum; P+ for(;;){ P+ (void) sprintf(bfr,"STAT %ld",tnum); P+ put_server(bfr); P+ (void) get_server(workspace,sizeof(workspace)); P+ if (*workspace != CHAR_OK) { P+ if (rflag) P+ tnum++; P+ else P+ tnum--; P+ continue; P+ } P+ #else /* !SERVER */ P while ((dir = readdir(dirp)) != NULL) { P*************** P*** 1067,1068 **** P--- 1110,1112 ---- P continue; P+ #endif /* !SERVER */ P if (rflag ? (tnum > nextnum && tnum < bit) P*************** P*** 1070,1073 **** P--- 1114,1122 ---- P nextnum = tnum; P+ #ifdef SERVER P+ break; /* not exactly right */ P+ #endif /* !SERVER */ P } P+ #ifndef SERVER P closedir(dirp); P+ #endif /* SERVER */ P if (rflag ? (nextnum >= bit) : (nextnum <= bit)) P*************** P*** 1094,1095 **** P--- 1143,1145 ---- P badart: P+ #ifndef SERVER P #ifdef DEBUG P*************** P*** 1096,1098 **** P fprintf(stderr, "Bad article '%s'\n", filename); P! #endif P FCLOSE(fp); P--- 1146,1149 ---- P fprintf(stderr, "Bad article '%s'\n", filename); P! #endif /* DEBUG */ P! #endif /* !SERVER */ P FCLOSE(fp); P*************** P*** 1119,1120 **** P--- 1170,1174 ---- P obit = bit; P+ #ifdef SERVER P+ (void) unlink(filename); P+ #endif /* SERVER */ P return 0; P*************** P*** 1198,1199 **** P--- 1252,1257 ---- P #endif /* SORTACTIVE */ P+ #ifdef SERVER P+ (void) unlink(active_name()); P+ close_server(); P+ #endif /* SERVER */ P exit(status); PIndex: recnews.c PPrereq: 2.13 P*** .d/recnews.c Wed Oct 7 16:54:32 1987 P--- recnews.c Thu Oct 15 18:30:09 1987 P*************** P*** 1,3 **** P /* P! * recnews [to newsgroup] [from user] P * P--- 1,3 ---- P /* P! * recnews [to newsgroup] [from user] [approved by] P * P*************** P*** 23,24 **** P--- 23,25 ---- P * machine.) P+ * in-gamemasters: "|/usr/lib/news/recnews mail.gamemasters '' news" P * P*************** P*** 35,37 **** P * should not allow recnews (and thus the mail interface) to be used. P! * P * 1) We leave the from line alone. Just escape the double quotes, but let the P--- 36,38 ---- P * should not allow recnews (and thus the mail interface) to be used. P! * P * 1) We leave the from line alone. Just escape the double quotes, but let the P*************** P*** 41,42 **** P--- 42,46 ---- P * Modifications by rad@tek P+ * P+ * John@ODU.EDU: add third argument to cause inews to be invoked with -a, P+ * for use with local groups for mailing lists with 2.11. P */ P*************** P*** 44,46 **** P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.13 10/23/86"; P #endif /* SCCSID */ P--- 48,50 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.14 10/15/87"; P #endif /* SCCSID */ P*************** P*** 47,53 **** P P! #include "defs.h" P P- #include <stdio.h> P- #include <ctype.h> P- P /* P--- 51,54 ---- P P! #include "params.h" P P /* P*************** P*** 90,91 **** P--- 91,93 ---- P char newsgroup[BFSZ]; /* newsgroups of message */ P+ char approved[BFSZ]; /* Approved: */ P int fromset; /* from passed on command line */ P*************** P*** 93,95 **** P P! extern char *strcat(), *strcpy(); P extern FILE *popen(); P--- 95,97 ---- P P! extern char *strcat(), *strcpy(), *index(); P extern FILE *popen(); P*************** P*** 107,109 **** P /* build inews command */ P! #ifdef IHCC P sprintf(inews, "%s/%s/%s", logdir(HOME), LIBDIR, "inews"); P--- 109,111 ---- P /* build inews command */ P! #ifdef LOGDIR P sprintf(inews, "%s/%s/%s", logdir(HOME), LIBDIR, "inews"); P*************** P*** 117,118 **** P--- 119,123 ---- P strcpy(from, argv[2]); P+ if (argc > 3 && *argv[3]) { P+ sprintf(approved,"-a %s", argv[3]); P+ } P P*************** P*** 189,193 **** P strcpy(newsgroup, to); P! sprintf(cmdbuf, "exec %s -t \"%s\" -n \"%s\" -f \"%s\"", P inews, *subject ? subject : "(none)", P! newsgroup, from); P #ifdef debug P--- 194,199 ---- P strcpy(newsgroup, to); P! sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\" %s", P inews, *subject ? subject : "(none)", P! newsgroup, from, *approved ? approved : 0); P #ifdef debug P*************** P*** 216,219 **** P } P! sprintf(cmdbuf, "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\"", P! inews, subject, newsgroup, from); P #ifdef debug P--- 222,227 ---- P } P! sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\" %s", P! inews, subject, newsgroup, from, P! *approved ? approved : 0); P #ifdef debug P*************** P*** 252,261 **** P return BLANK; P! if (strncmp(p, ">From", 5) == 0 || strncmp(p, "From", 4) == 0) P return FROM; P! if (strncmp(p, "Subj", 4)==0 || strncmp(p, "Re:", 3)==0 || P! strncmp(p, "re:", 3)==0) P return SUBJ; P! if (strncmp(p, "To", 2)==0) P return TO; P! if (strncmp(p, "\1\1\1\1", 4)==0) P return EOM; P--- 260,269 ---- P return BLANK; P! if (STRNCMP(p, ">From", 5) == 0 || STRNCMP(p, "From", 4) == 0) P return FROM; P! if (STRNCMP(p, "Subj", 4)==0 || STRNCMP(p, "Re:", 3)==0 || P! STRNCMP(p, "re:", 3)==0) P return SUBJ; P! if (STRNCMP(p, "To", 2)==0) P return TO; P! if (STRNCMP(p, "\1\1\1\1", 4)==0) P return EOM; P*************** P*** 274,276 **** P register char *p, *q; P- P if (fbuf[0] && fromset) { /* we already know who it's from */ P--- 282,283 ---- P*************** P*** 300,302 **** P q[-1] = '\0'; P! if ((p=(char *)index(fbuf,'\n')) != NULL) P *p = '\0'; P--- 307,309 ---- P q[-1] = '\0'; P! if ((p=index(fbuf,'\n')) != NULL) P *p = '\0'; PIndex: rfuncs.c PPrereq: 2.41 P*** .d/rfuncs.c Thu Oct 8 00:23:50 1987 P--- rfuncs.c Thu Oct 15 18:30:11 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.41 10/7/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.42 10/15/87"; P #endif /* SCCSID */ P*************** P*** 259,261 **** P while (bit <= ngsize) { P! (void) sprintf(filename, "%s/%ld", dirname(groupdir), bit); P if (access(filename, 4) P--- 259,277 ---- P while (bit <= ngsize) { P! #ifdef SERVER P! if ((fp = getarticle(groupdir,bit,"ARTICLE")) != NULL) { P! strcpy(filename, article_name()); P! (void) fclose(fp); P! fp = NULL; P! } else { P! #ifdef DEBUG P! fprintf(stderr, "Bad article '%s/%d'\n", groupdir, P! bit); P! #endif /* DEBUG */ P! clear(bit); P! nextbit(); P! continue; P! } P! #else /* !SERVER */ P! (void) sprintf(filename, "%s/%ld", dirname(groupdir), bit); P! #endif /* !SERVER */ P if (access(filename, 4) P*************** P*** 301,302 **** P--- 317,321 ---- P (void) fclose(fp); P+ #ifdef SERVER P+ (void) unlink(filename); /* get rid of temp file */ P+ #endif /* SERVER */ P fp = NULL; P*************** P*** 624,625 **** P--- 643,645 ---- P afp = xfopen(p, "r"); P+ P #else /* !SORTACTIVE */ P*************** P*** 744,745 **** P--- 764,766 ---- P struct hbuf hh; P+ #ifndef SERVER P register DIR *dirp; P*************** P*** 746,747 **** P--- 767,769 ---- P register struct direct *dir; P+ #endif /* !SERVER */ P register FILE *fp_art; P*************** P*** 753,755 **** P char *gets(); P! P /* This should get the numbers from the active file XXX */ P--- 775,792 ---- P char *gets(); P! #ifdef SERVER P! int lowgp,highgp; P! char workspace[256]; P! if (*lgroup == ' ' || *lgroup == '\0') return; P! strcpy(workspace, set_group(lgroup)); P! if (*workspace != CHAR_OK) { P! printf("Group %s is invalid: \n%s\n", lgroup, workspace); P! return; P! } P! /* We assume that the server will return a line of this format */ P! (void) sscanf(workspace, "%s %ld %ld %ld", bfr, &i, &lowgp, &highgp); P! if (i == 0) { P! printf("There are no articles in %s\n", lgroup); P! return; P! } P! #else /* !SERVER */ P /* This should get the numbers from the active file XXX */ P*************** P*** 759,760 **** P--- 796,798 ---- P } P+ #endif /* !SERVER */ P entries = 0; P*************** P*** 765,766 **** P--- 803,807 ---- P } P+ #ifdef SERVER P+ for(i = lowgp; i < highgp; i++){ P+ #else /* !SERVER */ P while ((dir = readdir(dirp)) != NULL) { P*************** P*** 769,770 **** P--- 810,812 ---- P i = atoi(dir->d_name); P+ #endif /* !SERVER */ P if ((i < 1) || (i > pngsize)) P*************** P*** 793,795 **** P--- 835,848 ---- P for (lg_entry = lg_array; *lg_entry != 0 && int_sig == 0; lg_entry++) { P+ #ifdef SERVER P+ /* we'll see if just getting the header will work here */ P+ if ((fp_art = getarticle(lgroup, *lg_entry, "HEAD")) != NULL) { P+ strcpy(filename, article_name()); P+ (void) fclose(fp_art); P+ fp_art = NULL; P+ } P+ else P+ continue; P+ #else /* !SERVER */ P (void) sprintf(filename, "%s/%d", dirname(lgroup), *lg_entry); P+ #endif /* !SERVER */ P fp_art = fopen(filename, "r"); P*************** P*** 815,816 **** P--- 868,872 ---- P (void) fclose(fp_art); P+ #ifdef SERVER P+ (void) unlink(filename); P+ #endif /* SERVER */ P } P*************** P*** 817,822 **** P (void) fflush(stdout); P! P closedir(dirp); P (void) signal(SIGINT, old_sig); /* restore to old value */ P- P printf("[Press RETURN to continue]"); P--- 873,878 ---- P (void) fflush(stdout); P! #ifndef SERVER P closedir(dirp); P+ #endif /* !SERVER */ P (void) signal(SIGINT, old_sig); /* restore to old value */ P printf("[Press RETURN to continue]"); P*************** P*** 840,841 **** P--- 896,898 ---- P } P+ #endif /* !SMALL_ADDRESS_SPACE */ P P*************** P*** 849,850 **** P } P- #endif /* !SMALL_ADDRESS_SPACE */ P--- 906 ---- PIndex: sendbatch.sh PPrereq: 1.12 P*** .d/sendbatch.sh Thu Oct 8 00:23:53 1987 P--- sendbatch.sh Thu Oct 15 18:30:12 1987 P*************** P*** 1,2 **** P! : '@(#)sendbatch.sh 1.12 10/7/87' P P--- 1,2 ---- P! : '@(#)sendbatch.sh 1.13 10/15/87' P P*************** P*** 44,46 **** P testit="yes" P! while test $? -eq 0 -a \( \( -n "$testit" -s BATCHDIR/$rmt \) -o -s BATCHDIR/$rmt.work -o \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do P--- 44,46 ---- P testit="yes" P! while test $? -eq 0 -a \( \( -n "$testit" -a -s BATCHDIR/$rmt \) -o -s BATCHDIR/$rmt.work -o \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do PIndex: visual.c PPrereq: 1.37 P*** .d/visual.c Thu Oct 8 00:24:28 1987 P--- visual.c Thu Oct 15 18:30:17 1987 P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.37 10/7/87"; P #endif /* SCCSID */ P--- 6,8 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.38 10/15/87"; P #endif /* SCCSID */ P*************** P*** 151,153 **** P--- 151,155 ---- P */ P+ #ifndef SERVER P static char goodone[BUFLEN]; /* last decent article */ P+ #endif /* !SERVER */ P static char ogroupdir[BUFLEN]; /* last groupdir */ P*************** P*** 217,219 **** P--- 219,223 ---- P break; P+ #ifndef SERVER P (void) strcpy(goodone, filename); P+ #endif /* !SERVER */ P if (SigTrap) P*************** P*** 895,897 **** P--- 899,905 ---- P } P+ #ifdef SERVER P+ (void) sprintf(bfr, "%s/%s", BIN, "postnews"); P+ #else /* !SERVER */ P (void) sprintf(bfr, "%s/%s %s", BIN, "postnews", goodone); P+ #endif /* !SERVER */ P shcmd(bfr, CWAIT); P*************** P*** 1020,1021 **** P--- 1028,1030 ---- P P+ #ifndef SERVER P of = xart_open(goodone, "r"); P*************** P*** 1028,1030 **** P--- 1037,1041 ---- P putc('\n', rfp); P+ #endif /* !SERVER */ P } P+ P fflush(rfp); P*************** P*** 1132,1133 **** P--- 1143,1147 ---- P int noaccess; P+ #ifdef SERVER P+ char workspace[256]; P+ #else /* !SERVER */ P register DIR *dirp; P*************** P*** 1134,1135 **** P--- 1148,1150 ---- P register struct direct *dir; P+ #endif /* !SERVER */ P long nextnum, tnum; P*************** P*** 1136,1138 **** P long atol(); P- P noaccess = 0; P--- 1151,1152 ---- P*************** P*** 1181,1182 **** P--- 1195,1203 ---- P rcreadok = 2; /* have seen >= 1 article */ P+ #ifdef SERVER P+ if ((fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P+ goto badart; P+ strcpy(filename, article_name()); P+ (void) fclose(fp); P+ fp = NULL; P+ #else /* !SERVER */ P (void) sprintf(filename, "%s/%ld", dirname(groupdir), bit); P*************** P*** 1184,1185 **** P--- 1205,1207 ---- P strcpy(filename, goodone); P+ #endif /* !SERVER */ P if (SigTrap == SIGHUP) P*************** P*** 1194,1195 **** P--- 1216,1222 ---- P noaccess = 0; P+ #ifdef SERVER P+ if (*groupdir == ' ' || *groupdir == '\0' || P+ set_group(groupdir) == NULL) P+ goto nextart; P+ #else /* !SERVER */ P dirp = opendir(dirname(groupdir)); P*************** P*** 1200,1202 **** P--- 1227,1244 ---- P } P+ #endif /* !SERVER */ P nextnum = rflag ? minartno - 1 : ngsize + 1; P+ #ifdef SERVER P+ tnum = nextnum; P+ for(;;){ P+ (void) sprintf(bfr,"STAT %ld",tnum); P+ put_server(bfr); P+ (void) get_server(workspace,sizeof(workspace)); P+ if (*workspace != CHAR_OK) { P+ if (rflag) P+ tnum++; P+ else P+ tnum--; P+ continue; P+ } P+ #else /* !SERVER */ P while ((dir = readdir(dirp)) != NULL) { P*************** P*** 1207,1208 **** P--- 1249,1251 ---- P continue; P+ #endif /* !SERVER */ P if (rflag ? (tnum > nextnum && tnum < bit) P*************** P*** 1210,1213 **** P--- 1253,1261 ---- P nextnum = tnum; P+ #ifdef SERVER P+ break; /* not exactly right */ P+ #endif /* SERVER */ P } P+ #ifndef SERVER P closedir(dirp); P+ #endif /* !SERVER */ P if (rflag ? (nextnum >= bit) : (nextnum <= bit)) P*************** P*** 1249,1250 **** P--- 1297,1301 ---- P obit = bit; P+ #ifdef SERVER P+ (void) unlink(filename); P+ #endif /* SERVER */ P return 0; P*************** P*** 2645,2646 **** P--- 2696,2701 ---- P #endif /* SORTACTIVE */ P+ #ifdef SERVER P+ (void) unlink(active_name()); P+ close_server(); P+ #endif /* SERVER */ P if (ospeed) { /* is == 0, we haven't been in raw mode yet */ P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.12... ' sed 's/^P//' >patch.12 <<\PSHAREND PPath: mcvax!uunet!seismo!rick PFrom: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: news 2.11 src patch #12 PMessage-ID: <44180@beno.seismo.CSS.GOV> PDate: 4 Nov 87 19:45:04 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 1675 P PDescription: P This is patch #12 for news 2.11 src. P P Fixes from Stan Barber for the NNTP server code: P 1. The mailpaths file is no longer needed for posting to P moderated groups. The article will be sent to the server host P which will do the mailing. P 2. The 'L' and 'l' commands did not work in readnews and vnews. P They will work with either nntp 1.3 or nntp 1.4 now. P 3. Modifications were made to the nntp initialization code to P allow the use of nntp clientlib from either nntp 1.3 or nntp P 1.4. Some functions still require nntp 1.4, but as originally P written, the version 1.3 nntp clientlib would not work. Now P it will. P 4. postnews was modified to cleanup all the temporary files it P creates when using nntp. It will also work correctly for P followups. It did not do this correctly in the original release. P 5. As distributed, the nntp code would not compile unless you P had already moved the code needed to create nntpxmit into the P news src directory. That is now no longer necessary. P Various minor cleanups. P Sendbatch now is a lot smarter about how much it will queue up P at once. If MAXBATCH is set, it will only queue up that many P bytes per invocation. Default is 100,000,000 for backwards P compatibility. P checkgroups output now has some lines preceeded by # so you could P just run the output through "sh" if you agreeded with it. P Fix expire to run correctly on non-DBM systems. P Fullname now should understand ATT style GCOS fields better. P Add -v flag to inews to print message-id (useful with Superceeds line) P Fix PREFIX macro to be case independent like prefix subroutine. P Fix recnews -a to work on machines that don't allow null dereferencing. P PFix: P cd to the src directory and apply the following patch. P PIndex: Makefile.dst PPrereq: 1.26 P*** .d/Makefile.dst Sun Oct 18 18:02:45 1987 P--- Makefile.dst Wed Nov 4 12:49:14 1987 P*************** P*** 1,2 **** P! # '@(#)Makefile.dst 1.26 10/15/87' P # Generic Makefile. P--- 1,2 ---- P! # '@(#)Makefile.dst 1.27 11/4/87' P # Generic Makefile. P*************** P*** 30,32 **** P--- 30,35 ---- P UUXFLAGS = -r -z P+ MAXPERBATCH = 1000000000 P P+ #NNTP NNTPDIR = NNTPSRC P+ P LNRNEWS = ln P*************** P*** 36,38 **** P P! #NNTP SERVER= -DSERVER P P--- 39,41 ---- P P! #NNTP SERVER= -DSERVER -I$(NNTPDIR)/common P P*************** P*** 96,98 **** P P! #NNTP CSRCS = NNTPSRC/common/clientlib.c nntp.c P P--- 99,101 ---- P P! #NNTP CSRCS = $(NNTPDIR)/common/clientlib.c nntp.c P P*************** P*** 189,192 **** P P! #NNTP clientlib.o: NNTPSRC/common/clientlib.c P! #NNTP $(CC) $(CFLAGS) -c NNTPSRC/common/clientlib.c P P--- 192,195 ---- P P! #NNTP clientlib.o: $(NNTPDIR)/common/clientlib.c P! #NNTP $(CC) $(CFLAGS) -c $(NNTPDIR)/common/clientlib.c P P*************** P*** 307,308 **** P--- 310,312 ---- P -e "s%UUXFLAGS%$(UUXFLAGS)%g" \ P+ -e "s%MAXPERBATCH%$(MAXPERBATCH)%g" \ P -e "s%BATCHDIR%$(BATCHDIR)%g" sendbatch.sh > sendbatch P PIndex: checkgroups.sh PPrereq: 1.23 P*** .d/checkgroups.sh Wed Oct 7 16:48:31 1987 P--- checkgroups.sh Wed Nov 4 12:49:15 1987 P*************** P*** 1,3 **** P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.23 9/24/87' P P--- 1,3 ---- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.24 11/4/87' P P*************** P*** 69,74 **** P ( P! echo "The following newsgroups are non-standard." P! sed "s/^/ /" /tmp/$$remove P echo "" P! echo "You can remove them by executing the commands:" P echo \ LIBDIR/rmgroup `cat /tmp/$$remove` P--- 69,74 ---- P ( P! echo "# The following newsgroups are non-standard." P! sed "s/^/# /" /tmp/$$remove P echo "" P! echo "# You can remove them by executing the commands:" P echo \ LIBDIR/rmgroup `cat /tmp/$$remove` P*************** P*** 81,86 **** P ( P! echo "The following newsgroups were missing and should be added." P! sed "s/^/ /" /tmp/$$add P echo "" P! echo "You can do this by executing the command(s):" P for i in `cat /tmp/$$add.unmod` P--- 81,86 ---- P ( P! echo "# The following newsgroups were missing and should be added." P! sed "s/^/# /" /tmp/$$add P echo "" P! echo "# You can do this by executing the command(s):" P for i in `cat /tmp/$$add.unmod` P*************** P*** 100,105 **** P ( P! echo "The following newsgroups are not moderated and are marked moderated." P! sed "s/^/ /" /tmp/$$ismod P echo "" P! echo "You can correct this by executing the command(s):" P for i in `cat /tmp/$$ismod` P--- 100,105 ---- P ( P! echo "# The following newsgroups are not moderated and are marked moderated." P! sed "s/^/# /" /tmp/$$ismod P echo "" P! echo "# You can correct this by executing the command(s):" P for i in `cat /tmp/$$ismod` P*************** P*** 115,120 **** P ( P! echo "The following newsgroups are moderated and not marked so." P! sed "s/^/ /" /tmp/$$notmod P echo "" P! echo "You can correct this by executing the command(s):" P for i in `cat /tmp/$$notmod` P--- 115,120 ---- P ( P! echo "# The following newsgroups are moderated and not marked so." P! sed "s/^/# /" /tmp/$$notmod P echo "" P! echo "# You can correct this by executing the command(s):" P for i in `cat /tmp/$$notmod` P*************** P*** 134,135 **** P--- 134,136 ---- P then P+ PATH=/bin:$PATH P mail $1 P*************** P*** 142,143 **** P rm -f /tmp/$$* P- P--- 143 ---- PIndex: control.c PPrereq: 2.55 P*** .d/control.c Thu Oct 8 00:19:19 1987 P--- control.c Wed Nov 4 12:49:17 1987 P*************** P*** 21,23 **** P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.55 10/7/87"; P #endif /* SCCSID */ P--- 21,23 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.56 11/4/87"; P #endif /* SCCSID */ P*************** P*** 26,28 **** P P! #define eq(msg) (msg[0] == cargv[0][0] && strcmp(msg, cargv[0]) == 0) P P--- 26,28 ---- P P! #define eq(msg) (STRCMP(msg, cargv[0]) == 0) P P*************** P*** 65,67 **** P P! if (strncmp(h->title, "cmsg ", 5) == 0) { P register char *cp1, *cp2; P--- 65,67 ---- P P! if (STRNCMP(h->title, "cmsg ", 5) == 0) { P register char *cp1, *cp2; P*************** P*** 171,173 **** P error("ihave: Too few arguments."); P! if (strncmp(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P--- 171,173 ---- P error("ihave: Too few arguments."); P! if (STRNCMP(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P*************** P*** 256,258 **** P error("sendme: Too few arguments."); P! if (strncmp(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P--- 256,258 ---- P error("sendme: Too few arguments."); P! if (STRNCMP(PATHSYSNAME, argv[argc - 1], SNLN) == 0) P return 0; P*************** P*** 348,351 **** P /* local or ORGDISTRIB */ P! int can_change = (strcmp(header.distribution, "local") == 0) || P! (strcmp(header.distribution, ORGDISTRIB) == 0); P # else /* ! ORGDISTRIB */ P--- 348,351 ---- P /* local or ORGDISTRIB */ P! int can_change = (STRCMP(header.distribution, "local") == 0) || P! (STRCMP(header.distribution, ORGDISTRIB) == 0); P # else /* ! ORGDISTRIB */ P*************** P*** 352,354 **** P /* local only */ P! int can_change = strcmp(header.distribution, "local") == 0; P # endif /* ORGDISTRIB */ P--- 352,354 ---- P /* local only */ P! int can_change = STRCMP(header.distribution, "local") == 0; P # endif /* ORGDISTRIB */ P*************** P*** 379,381 **** P p -= 3; P! if (argc > 2 && strcmp(argv[2], "moderated") == 0) { P if (*p == 'm') { P--- 379,381 ---- P p -= 3; P! if (argc > 2 && STRCMP(argv[2], "moderated") == 0) { P if (*p == 'm') { P*************** P*** 462,464 **** P fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P! (argc > 2 && strcmp(argv[2], "moderated") == 0) P ? 'm' : 'y'); P--- 462,464 ---- P fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P! (argc > 2 && STRCMP(argv[2], "moderated") == 0) P ? 'm' : 'y'); P*************** P*** 546,551 **** P */ P! if (!strcmp(ORGDISTRIB, header.distribution) P! || !strcmp("local", header.distribution)) P #else /* !ORGDISTRIB */ P! if (!strcmp("local", header.distribution)) P #endif /* !ORGDISTRIB */ P--- 546,551 ---- P */ P! if (!STRCMP(ORGDISTRIB, header.distribution) P! || !STRCMP("local", header.distribution)) P #else /* !ORGDISTRIB */ P! if (!STRCMP("local", header.distribution)) P #endif /* !ORGDISTRIB */ P*************** P*** 644,646 **** P } P! if (strcmp(p, "cancelled") == 0) { P *q = '\0'; P--- 644,646 ---- P } P! if (STRCMP(p, "cancelled") == 0) { P *q = '\0'; P*************** P*** 652,656 **** P #ifdef ORGDISTRIB P! strcmp(header.distribution, ORGDISTRIB) == 0 || P #endif /* ORGDISTRIB */ P! strcmp(header.distribution, "local") == 0)) P su = 1; P--- 652,656 ---- P #ifdef ORGDISTRIB P! STRCMP(header.distribution, ORGDISTRIB) == 0 || P #endif /* ORGDISTRIB */ P! STRCMP(header.distribution, "local") == 0)) P su = 1; P*************** P*** 684,686 **** P *r = '\0'; P! if (!su && strncmp(whatsisname, poster,strlen(poster))) { P error("Not contributor: posted by %s, and you are %s", poster, whatsisname); P--- 684,686 ---- P *r = '\0'; P! if (!su && STRNCMP(whatsisname, poster, strlen(poster))) { P error("Not contributor: posted by %s, and you are %s", poster, whatsisname); P*************** P*** 867,869 **** P #endif /* MMDF */ P- execl("/usr/bin/mailx", "mail", sendto, (char *)NULL); P execl("/usr/bin/mail", "mail", sendto, (char *)NULL); P--- 867,868 ---- P*************** P*** 871,872 **** P--- 870,872 ---- P execl("/bin/mail", "mail", sendto, (char *)NULL); P+ execl("/usr/bin/mailx", "mail", sendto, (char *)NULL); P _exit(1); P*************** P*** 990,1007 **** P P! if (strcmp(msg, "ihave") == 0 || strcmp(msg, "sendbad") == 0 || P! strcmp(msg, "sendme") == 0) { P return; /* no restrictions */ P! } else if (strcmp(msg, "newgroup") == 0) { P suser(); P! } else if (strcmp(msg, "rmgroup") == 0) { P suser(); P! } else if (strcmp(msg, "sendsys") == 0) { P suser(); P! } else if (strcmp(msg, "checkgroups") == 0) { P suser(); P! } else if (strcmp(msg, "version") == 0) { P return; /* no restrictions */ P! } else if (strcmp(msg, "cancel") == 0) { P return; /* no restrictions at this level */ P! } else if (strcmp(msg, "delsub") == 0) { P if (!PREFIX(header.nbuf, "to.")) { P--- 990,1007 ---- P P! if (STRCMP(msg, "ihave") == 0 || STRCMP(msg, "sendbad") == 0 || P! STRCMP(msg, "sendme") == 0) { P return; /* no restrictions */ P! } else if (STRCMP(msg, "newgroup") == 0) { P suser(); P! } else if (STRCMP(msg, "rmgroup") == 0) { P suser(); P! } else if (STRCMP(msg, "sendsys") == 0) { P suser(); P! } else if (STRCMP(msg, "checkgroups") == 0) { P suser(); P! } else if (STRCMP(msg, "version") == 0) { P return; /* no restrictions */ P! } else if (STRCMP(msg, "cancel") == 0) { P return; /* no restrictions at this level */ P! } else if (STRCMP(msg, "delsub") == 0) { P if (!PREFIX(header.nbuf, "to.")) { PIndex: expire.c PPrereq: 2.55 P*** .d/expire.c Sun Oct 18 18:03:26 1987 P--- expire.c Wed Nov 4 12:49:18 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.55 10/15/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.56 11/4/87"; P #endif /* SCCSID */ P*************** P*** 363,364 **** P--- 363,365 ---- P ohfd = xfopen(ARTFILE, "r"); P+ nhfd = xfopen(NARTFILE, "w"); P #else P*************** P*** 365,368 **** P ohfd = nexthistfile((FILE *)NULL); P #endif /* DBM */ P- nhfd = xfopen(NARTFILE, "w"); P } P--- 366,369 ---- P ohfd = nexthistfile((FILE *)NULL); P+ nhfd = xfopen(ARTFILE, "w"); P #endif /* DBM */ P } PIndex: fullname.c PPrereq: 1.12 P*** .d/fullname.c Wed Oct 7 16:50:45 1987 P--- fullname.c Wed Nov 4 12:49:19 1987 P*************** P*** 16,18 **** P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.12 9/24/87"; P #endif /* SCCSID */ P--- 16,18 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.13 11/4/87"; P #endif /* SCCSID */ P*************** P*** 127,129 **** P { P! if (*p == '-' && isspace(p[1])) { P bp = buf; P--- 127,129 ---- P { P! if (*p == '-' && (isdigit(p[-1]) || isspace(p[-1]))) { P bp = buf; PIndex: funcs2.c PPrereq: 1.22 P*** .d/funcs2.c Sun Oct 18 18:03:38 1987 P--- funcs2.c Wed Nov 4 12:49:20 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.22 10/15/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.23 11/4/87"; P #endif /* SCCSID */ P*************** P*** 203,211 **** P lasttime = getdate(datestr, &Now); P! if (lasttime < 0 && P! sscanf(datestr, "%s %s %s %s %s", junk, month, day, tod, year) == 5) { P! (void) sprintf(bfr, "%s %s, %s %s", month, day, year, tod); P! lasttime = getdate(bfr, &Now); P if (lasttime < 0) { P! logerr("Unparsable date \"%s\"", datestr); P! datestr = "now"; /* better than nothing */ P lasttime = Now.time; P--- 203,214 ---- P lasttime = getdate(datestr, &Now); P! if (lasttime < 0) { P! logerr("Unparsable date \"%s\"", datestr); P! if (sscanf(datestr, "%s %s %s %s %s", junk, month, day, tod, P! year) == 5) { P! (void) sprintf(bfr, "%s %s, %s %s", month, day, year, P! tod); P! lasttime = getdate(bfr, &Now); P! } P if (lasttime < 0) { P! datestr = "now"; /* better than nothing */ P lasttime = Now.time; P*************** P*** 340,342 **** P ptr = hptr->replyto; P! #endif P (void) strcpy(tbuf, ptr); P--- 343,345 ---- P ptr = hptr->replyto; P! #endif /* !INTERNET */ P (void) strcpy(tbuf, ptr); P*************** P*** 348,349 **** P--- 351,353 ---- P } P+ #ifndef SERVER P #ifdef SunIII P*************** P*** 350,352 **** P if (ptr = rindex(tbuf, '.')) { P! if (PREFIX(++ptr, "OZ")) { P /* some people only allow it in lower case ... */ P--- 354,356 ---- P if (ptr = rindex(tbuf, '.')) { P! if (prefix(++ptr, "OZ")) { P /* some people only allow it in lower case ... */ P*************** P*** 406,408 **** P if (sscanf(mbuf, "%*s %s", modadd) != 1) P! xerror("backbone address corrupted"); P (void) fclose(mfd); P--- 410,412 ---- P if (sscanf(mbuf, "%*s %s", modadd) != 1) P! xerror("internet address corrupted"); P (void) fclose(mfd); P*************** P*** 429,430 **** P--- 433,435 ---- P #endif /* !SunIII */ P+ #endif /* !SERVER */ P return tbuf; PIndex: inews.c PPrereq: 2.82 P*** .d/inews.c Sun Oct 18 18:03:53 1987 P--- inews.c Wed Nov 4 12:49:22 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.82 10/15/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.83 11/4/87"; P #endif /* SCCSID */ P*************** P*** 93,94 **** P--- 93,96 ---- P 'r', '\0', FALSE, UNPROC, UNKNOWN, header.replyto, P+ #define vflag options[17].flag P+ 'v', '\0', FALSE, UNPROC, UNKNOWN, filename, P '\0', '\0', 0, 0, 0, (char *)NULL P*************** P*** 159,161 **** P #ifdef SPOOLNEWS P! if (argc > 1 && !strcmp(*(argv+1), "-S")) { P argc--; P--- 161,163 ---- P #ifdef SPOOLNEWS P! if (argc > 1 && !STRCMP(*(argv+1), "-S")) { P argc--; P*************** P*** 180,182 **** P } else { /* expire is running */ P! if (argc > 1 && !strcmp(*(argv+1), "-S")) P exit(42); /* inform rnews -U by exit status */ P--- 182,184 ---- P } else { /* expire is running */ P! if (argc > 1 && !STRCMP(*(argv+1), "-S")) P exit(42); /* inform rnews -U by exit status */ P*************** P*** 183,185 **** P } P! if (argc > 1 && !strcmp(*(argv+1), "-U")) { P /* can't unspool while things are locked */ P--- 185,187 ---- P } P! if (argc > 1 && !STRCMP(*(argv+1), "-U")) { P /* can't unspool while things are locked */ P*************** P*** 1031,1032 **** P--- 1033,1038 ---- P if(exitcode == 0) { P+ if (vflag) { P+ printf("%s\n", header.ident); P+ fflush(stdout); P+ } P /* article has passed all the checks, so work in background */ P*************** P*** 1093,1095 **** P if ((cp = rindex(header.title, '-')) != NULL P! && !strcmp(--cp, " - (nf)")) P *cp = '\0'; P--- 1099,1101 ---- P if ((cp = rindex(header.title, '-')) != NULL P! && !STRCMP(--cp, " - (nf)")) P *cp = '\0'; P*************** P*** 1268,1270 **** P /* stop when get to last known good parent */ P! if (strcmp(sysbuf, parent) == 0) P break; P--- 1274,1276 ---- P /* stop when get to last known good parent */ P! if (STRCMP(sysbuf, parent) == 0) P break; PIndex: nntp.c PPrereq: 2.2 P*** .d/nntp.c Sun Oct 18 18:04:03 1987 P--- nntp.c Wed Nov 4 12:49:23 1987 P*************** P*** 16,18 **** P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.2 10/15/87"; P #endif /* SCCSID */ P--- 16,18 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.3 11/4/87"; P #endif /* SCCSID */ P*************** P*** 21,22 **** P--- 21,25 ---- P P+ /* from nntp's common directory */ P+ #include "conf.h" P+ P static char *nntpserver; P*************** P*** 34,36 **** P /* open connection to nntpserver if appropriate */ P! P nntpserver = getserverbyfile(SERVER_FILE); P--- 37,41 ---- P /* open connection to nntpserver if appropriate */ P! #ifdef SERVER_HOST P! nntpserver = SERVER_HOST; P! #else /* !SERVER_HOST */ P nntpserver = getserverbyfile(SERVER_FILE); P*************** P*** 42,43 **** P--- 47,49 ---- P } P+ #endif /* !SERVER_HOST */ P response = server_init(nntpserver); P*************** P*** 48,49 **** P--- 54,56 ---- P } P+ #ifndef SERVER_HOST P if (handle_server_response(response, nntpserver) < 0) { P*************** P*** 52,53 **** P--- 59,61 ---- P } P+ #endif /* !SERVER_HOST */ P return 0; P*************** P*** 114,123 **** P return NULL; P! if (strcmp(newsgroup, last_group)) { P! (void) sprintf(nntpbfr, "GROUP %s", newsgroup); P! put_server(nntpbfr); P! (void) get_server(ser_line, sizeof(ser_line)); P! if (*ser_line != CHAR_OK) P! return NULL; P! strcpy(last_group, newsgroup); P! } P return &ser_line[0]; P--- 122,129 ---- P return NULL; P! (void) sprintf(nntpbfr, "GROUP %s", newsgroup); P! put_server(nntpbfr); P! (void) get_server(ser_line, sizeof(ser_line)); P! if (*ser_line != CHAR_OK) P! return NULL; P! strcpy(last_group, newsgroup); P return &ser_line[0]; P*************** P*** 137,140 **** P bzero(article_file_name, sizeof(article_file_name)); P! if (set_group(newsgroup) == NULL) P! return NULL; P strcpy(article_file_name, "/tmp/nsart.XXXXXX"); P--- 143,148 ---- P bzero(article_file_name, sizeof(article_file_name)); P! if (strcmp(newsgroup,last_group)){ P! if (set_group(newsgroup) == NULL) P! return NULL; P! } P strcpy(article_file_name, "/tmp/nsart.XXXXXX"); P*************** P*** 228,230 **** P */ P- P sync_server() P--- 236,237 ---- PIndex: params.h PPrereq: 2.25 P*** .d/params.h Sun Oct 18 18:04:06 1987 P--- params.h Wed Nov 4 12:49:23 1987 P*************** P*** 4,6 **** P P! /* @(#)params.h 2.25 10/15/87 */ P P--- 4,6 ---- P P! /* @(#)params.h 2.26 11/4/87 */ P P*************** P*** 159,161 **** P #define STRNCMP(a,b,n) ((*(a) != *(b)) ? (*(a)-*(b)) : strncmp(a, b, n)) P! #define PREFIX(a,b) ((*(a) != *(b)) ? FALSE : prefix((a)+1, (b)+1)) P P--- 159,162 ---- P #define STRNCMP(a,b,n) ((*(a) != *(b)) ? (*(a)-*(b)) : strncmp(a, b, n)) P! extern char charmap[]; P! #define PREFIX(a,b) ((charmap[*(a)] != charmap[*(b)]) ? FALSE : prefix((a)+1, (b)+1)) P PIndex: postnews.c PPrereq: 1.33 P*** .d/postnews.c Sun Oct 18 18:04:16 1987 P--- postnews.c Wed Nov 4 12:49:24 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.33 10/15/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.34 11/4/87"; P #endif /* SCCSID */ P*************** P*** 26,28 **** P extern int ROOTID; P! # endif P #define APPEND 1 P--- 26,28 ---- P extern int ROOTID; P! # endif /* !ROOTID */ P #define APPEND 1 P*************** P*** 74,75 **** P--- 74,96 ---- P xerror("Can only followup to articles in %s", SPOOL); P+ #ifdef SERVER P+ { P+ int artnum; P+ char * group, *p; P+ strcpy (buf,argv[1]); P+ if ((group = rindex(buf,'/')) == NULL) P+ xerror("Can't get article number"); P+ *group = '\0'; P+ artnum = atoi(++group); P+ if (artnum == 0) P+ xerror("Can't get article number"); P+ group = &buf[strlen(SPOOL) + 1]; P+ for (p=group; *p ;++p) P+ if (*p == '/') P+ *p = '.'; P+ if (getarticle(group,artnum,"ARTICLE") == NULL) P+ xerror("Can't find article"); P+ } P+ followup(article_name()); P+ (void) strcpy(original, article_name()); P+ #else /* !SERVER */ P followup(argv[1]); P*************** P*** 76,77 **** P--- 97,99 ---- P (void) strcpy(original, argv[1]); P+ #endif /* !SERVER */ P } else P*************** P*** 110,112 **** P #ifdef SERVER P! if (getarticle(ng, num, "ARTICLE") == NULL) P goto nothere; P--- 132,134 ---- P #ifdef SERVER P! if (getarticle(ng, atoi(num), "ARTICLE") == NULL) P goto nothere; P*************** P*** 123,125 **** P--- 145,151 ---- P (void) close(fd); P+ #ifdef SERVER P+ printf("\narticle %s in %s\n", num, ng); P+ #else /* !SERVER */ P printf("\narticle %s\n", original); P+ #endif /* !SERVER */ P if (article_line(original, "From: ", buf)) P*************** P*** 157,159 **** P if (pre_checks()) P! exit(1); P P--- 183,185 ---- P if (pre_checks()) P! xxit(1); P P*************** P*** 175,177 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 201,203 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 495,497 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 521,523 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 500,502 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 526,528 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 506,508 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 532,534 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 520,522 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 546,548 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 534,536 **** P (void) UNLINK(tempfname); P! exit(1); P } P--- 560,562 ---- P (void) UNLINK(tempfname); P! xxit(1); P } P*************** P*** 715,719 **** P } P- P (void) UNLINK(tempfname); P! exit(0); P } P--- 741,744 ---- P } P (void) UNLINK(tempfname); P! xxit(0); P } P*************** P*** 738,740 **** P fprintf(stderr,"You're not in /etc/passwd\n"); P! exit(1); P } P--- 763,765 ---- P fprintf(stderr,"You're not in /etc/passwd\n"); P! xxit(1); P } P*************** P*** 828,830 **** P fprintf(stderr,"Too many EOFs\n"); P! exit(1); P } P--- 853,855 ---- P fprintf(stderr,"Too many EOFs\n"); P! xxit(1); P } P*************** P*** 838,840 **** P printf("%s\n", mesg); P! exit(1); P } P--- 863,865 ---- P printf("%s\n", mesg); P! xxit(1); P } P*************** P*** 1097,1099 **** P printf("encoding failed"); P! exit(2); P } P--- 1122,1124 ---- P printf("encoding failed"); P! xxit(2); P } P*************** P*** 1148,1149 **** P--- 1173,1178 ---- P { P+ #ifdef SERVER P+ (void) UNLINK(original); P+ (void) UNLINK(active_name()); P+ #endif /* SERVER */ P exit(i); PIndex: readr.c PPrereq: 2.64 P*** .d/readr.c Fri Oct 16 18:22:16 1987 P--- readr.c Wed Nov 4 12:49:26 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.64 10/16/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.65 11/4/87"; P #endif /* SCCSID */ P*************** P*** 98,100 **** P fprintf(stderr, "readr()\n"); P! #endif P if (aflag) { P--- 98,100 ---- P fprintf(stderr, "readr()\n"); P! #endif /* DEBUG */ P if (aflag) { P*************** P*** 136,138 **** P fp, ftell(fp), bit, groupdir, filename); P! #endif P #ifndef SERVER P--- 136,138 ---- P fp, ftell(fp), bit, groupdir, filename); P! #endif /* DEBUG */ P #ifndef SERVER P*************** P*** 160,162 **** P int (*ocont)(); P! #endif P (void) setjmp(sigjmpbuf); P--- 160,162 ---- P int (*ocont)(); P! #endif /* SIGCONT */ P (void) setjmp(sigjmpbuf); P*************** P*** 185,187 **** P ocont = signal(SIGCONT, catchcont); P! #endif P pp = fgets(bptr, BUFLEN, stdin); P--- 185,187 ---- P ocont = signal(SIGCONT, catchcont); P! #endif /* SIGCONT */ P pp = fgets(bptr, BUFLEN, stdin); P*************** P*** 191,193 **** P (void) signal(SIGCONT, ocont); P! #endif P if (pp != NULL) P--- 191,193 ---- P (void) signal(SIGCONT, ocont); P! #endif /* SIGCONT */ P if (pp != NULL) P*************** P*** 198,200 **** P if (SigTrap != SIGCONT) P! #endif P fprintf(ofp, "\n"); P--- 198,200 ---- P if (SigTrap != SIGCONT) P! #endif /* SIGCONT */ P fprintf(ofp, "\n"); P*************** P*** 455,457 **** P /* mail reply */ P! #endif P case 'r': P--- 455,457 ---- P /* mail reply */ P! #endif /* !NOSHELL */ P case 'r': P*************** P*** 581,583 **** P--- 581,588 ---- P tfilename = filename; P+ #ifdef SERVER P+ (void) sprintf(bfr,"%s/%s %s/%s/%ld", BIN, "postnews", P+ SPOOL,groupdir,bit); P+ #else /* !SERVER */ P (void) sprintf(bfr,"%s/%s %s", BIN, "postnews", tfilename); P+ #endif /* !SERVER */ P (void) system(bfr); P*************** P*** 962,964 **** P else P! #endif P tprint(fd, ofp, FALSE); P--- 967,969 ---- P else P! #endif /* PAGE */ P tprint(fd, ofp, FALSE); P*************** P*** 1033,1035 **** P fprintf(stderr, "article: %s/%ld\n", groupdir, bit); P! #endif P if (rcreadok) P--- 1038,1040 ---- P fprintf(stderr, "article: %s/%ld\n", groupdir, bit); P! #endif /* DEBUG */ P if (rcreadok) P*************** P*** 1037,1039 **** P #ifdef SERVER P! if ((fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P goto badart; P--- 1042,1044 ---- P #ifdef SERVER P! if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P goto badart; P*************** P*** 1062,1064 **** P fprintf(stderr, "filename = '%s'\n", filename); P! #endif P /* Decide if we want to show this article. */ P--- 1067,1069 ---- P fprintf(stderr, "filename = '%s'\n", filename); P! #endif /* DEBUG */ P /* Decide if we want to show this article. */ PIndex: recnews.c PPrereq: 2.14 P*** .d/recnews.c Sun Oct 18 18:04:27 1987 P--- recnews.c Wed Nov 4 12:49:27 1987 P*************** P*** 48,50 **** P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.14 10/15/87"; P #endif /* SCCSID */ P--- 48,50 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.15 11/4/87"; P #endif /* SCCSID */ P*************** P*** 111,115 **** P sprintf(inews, "%s/%s/%s", logdir(HOME), LIBDIR, "inews"); P! #else P sprintf(inews, "%s/%s", LIBDIR, "inews"); P! #endif P P--- 111,115 ---- P sprintf(inews, "%s/%s/%s", logdir(HOME), LIBDIR, "inews"); P! #else /* !LOGDIR */ P sprintf(inews, "%s/%s", LIBDIR, "inews"); P! #endif /* !LOGDIR */ P P*************** P*** 120,123 **** P if (argc > 3 && *argv[3]) { P! sprintf(approved,"-a %s", argv[3]); P! } P P--- 120,124 ---- P if (argc > 3 && *argv[3]) { P! sprintf(approved," -a \"%s\"", argv[3]); P! } else P! approved[0] = '\0'; P P*************** P*** 195,199 **** P sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\" %s", P inews, *subject ? subject : "(none)", P! newsgroup, from, *approved ? approved : 0); P #ifdef debug P--- 196,200 ---- P sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\"%s", P inews, *subject ? subject : "(none)", P! newsgroup, from, approved); P #ifdef debug P*************** P*** 223,227 **** P sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\" %s", P! inews, subject, newsgroup, from, P! *approved ? approved : 0); P #ifdef debug P--- 224,227 ---- P sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\"%s", P! inews, subject, newsgroup, from, approved); P #ifdef debug PIndex: rfuncs.c PPrereq: 2.42 P*** .d/rfuncs.c Sun Oct 18 18:04:33 1987 P--- rfuncs.c Wed Nov 4 12:49:29 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.42 10/15/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.43 11/4/87"; P #endif /* SCCSID */ P*************** P*** 35,37 **** P fprintf(stderr, "nextng()\n"); P! #endif P curpos = ftell(actfp); P--- 35,37 ---- P fprintf(stderr, "nextng()\n"); P! #endif /* DEBUG */ P curpos = ftell(actfp); P*************** P*** 41,43 **** P fprintf(stderr, "next:\n"); P! #endif P if (actdirect == BACKWARD) { P--- 41,43 ---- P fprintf(stderr, "next:\n"); P! #endif /* DEBUG */ P if (actdirect == BACKWARD) { P*************** P*** 61,63 **** P fprintf(stderr, "bfr = '%s'\n", bfr); P! #endif P P--- 61,63 ---- P fprintf(stderr, "bfr = '%s'\n", bfr); P! #endif /* DEBUG */ P P*************** P*** 111,113 **** P name, ngsize, minartno); P! #endif P (void) strcpy(groupdir, name); P--- 111,113 ---- P name, ngsize, minartno); P! #endif /* DEBUG */ P (void) strcpy(groupdir, name); P*************** P*** 161,163 **** P fprintf(stderr, "Group: %s, all read\n", groupdir); P! #endif P groupdir[0] = 0; P--- 161,163 ---- P fprintf(stderr, "Group: %s, all read\n", groupdir); P! #endif /* DEBUG */ P groupdir[0] = 0; P*************** P*** 282,284 **** P fprintf(stderr, "Bad article '%s'\n", filename); P! #endif P if (fp != NULL) { P--- 282,284 ---- P fprintf(stderr, "Bad article '%s'\n", filename); P! #endif /* DEBUG */ P if (fp != NULL) { P*************** P*** 306,308 **** P h.from[0] ? h.from : P! #endif P h.path, ctime(&h.subtime)); P--- 306,308 ---- P h.from[0] ? h.from : P! #endif /* INTERNET */ P h.path, ctime(&h.subtime)); P*************** P*** 365,367 **** P } P! #endif P P--- 365,367 ---- P } P! #endif /* TMAIL */ P P*************** P*** 777,783 **** P int lowgp,highgp; P! char workspace[256]; P! if (*lgroup == ' ' || *lgroup == '\0') return; P! strcpy(workspace, set_group(lgroup)); P! if (*workspace != CHAR_OK) { P! printf("Group %s is invalid: \n%s\n", lgroup, workspace); P return; P--- 777,782 ---- P int lowgp,highgp; P! char *workspace; P! if (*lgroup == ' ' || *lgroup == '\0' || P! (workspace = set_group(lgroup)) == NULL) { P! printf("Group %s is invalid.\n", lgroup); P return; PIndex: sendbatch.sh PPrereq: 1.13 P*** .d/sendbatch.sh Sun Oct 18 18:04:35 1987 P--- sendbatch.sh Wed Nov 4 12:49:29 1987 P*************** P*** 1,2 **** P! : '@(#)sendbatch.sh 1.13 10/15/87' P P--- 1,2 ---- P! : '@(#)sendbatch.sh 1.14 11/4/87' P P*************** P*** 4,5 **** P--- 4,6 ---- P LIM=50000 P+ MAXBATCH=MAXPERBATCH P CMD='LIBDIR/batch BATCHDIR/$rmt $BLIM' P*************** P*** 33,34 **** P--- 34,37 ---- P continue;; P+ -m*) MAXBATCH=`expr "$rmt" : '-m\(.*\)'` P+ continue;; P esac P*************** P*** 35,36 **** P--- 38,49 ---- P P+ if [ -s /tmp/uuq.output ] ; then P+ q=`echo "$rmt" | sed 's/\(.......\).*/\1/'` P+ q=`awk "\\$1 == \\"$q:\\" { print \\$4;exit}" </tmp/uuq.output` P+ if [ ! -z "$q" -a \( "$q" -gt $MAXBATCH \) ] ; P+ then P+ echo $rmt already has $q bytes queued P+ continue P+ fi P+ fi P+ P if test -n "$COMP" P*************** P*** 43,46 **** P : make sure $? is zero P! testit="yes" P! while test $? -eq 0 -a \( \( -n "$testit" -a -s BATCHDIR/$rmt \) -o -s BATCHDIR/$rmt.work -o \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do P--- 56,62 ---- P : make sure $? is zero P! sentbytes=0 P! while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ P! \( \( $sentbytes -eq 0 -a -s BATCHDIR/$rmt \) -o \ P! -s BATCHDIR/$rmt.work -o \ P! \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do P*************** P*** 61,63 **** P fi P! testit= P fi P--- 77,79 ---- P fi P! sentbytes=`expr $sentbytes + $LIM` P fi PIndex: visual.c PPrereq: 1.38 P*** .d/visual.c Sun Oct 18 18:04:51 1987 P--- visual.c Wed Nov 4 12:49:32 1987 P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.38 10/15/87"; P #endif /* SCCSID */ P--- 6,8 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.39 11/4/87"; P #endif /* SCCSID */ P*************** P*** 42,44 **** P #define SECPRLEN 81 /* length of secondary prompter */ P! #else P #define PRLINE (ROWS-1)/* prompter line */ P--- 42,44 ---- P #define SECPRLEN 81 /* length of secondary prompter */ P! #else /* !STATTOP */ P #define PRLINE (ROWS-1)/* prompter line */ P*************** P*** 47,49 **** P #define SECPRLEN 100 /* length of secondary prompter */ P! #endif P P--- 47,49 ---- P #define SECPRLEN 100 /* length of secondary prompter */ P! #endif /* !STATTOP */ P P*************** P*** 134,136 **** P static int endsuba; /* end of sub-article in digest */ P! #endif P P--- 134,136 ---- P static int endsuba; /* end of sub-article in digest */ P! #endif /* DIGPAGE */ P P*************** P*** 138,140 **** P FILE *debugf; /* file to write debugging info on */ P! #endif P P--- 138,140 ---- P FILE *debugf; /* file to write debugging info on */ P! #endif /* MYDEBUG */ P P*************** P*** 154,155 **** P--- 154,156 ---- P #endif /* !SERVER */ P+ P static char ogroupdir[BUFLEN]; /* last groupdir */ P*************** P*** 179,181 **** P setbuf(debugf, (char *)NULL); P! #endif P if (aflag) { P--- 180,182 ---- P setbuf(debugf, (char *)NULL); P! #endif /* MYDEBUG */ P if (aflag) { P*************** P*** 202,204 **** P } P! #endif P ttysave(); P--- 203,205 ---- P } P! #endif /* MYDB */ P ttysave(); P*************** P*** 252,256 **** P || endsuba > 0 && endsuba < artlines P! #else P if (artlines > dlinno + ARTWLEN P! #endif P || (prflags & HDRONLY) && artlines > hdrend) { P--- 253,257 ---- P || endsuba > 0 && endsuba < artlines P! #else /* !DIGPAGE */ P if (artlines > dlinno + ARTWLEN P! #endif /* !DIGPAGE */ P || (prflags & HDRONLY) && artlines > hdrend) { P*************** P*** 299,303 **** P if (c == ckill || c == cwerase) { P! #else P if (c == ckill) { P! #endif P if (countset == 0) P--- 300,304 ---- P if (c == ckill || c == cwerase) { P! #else /* !TIOCGLTC */ P if (c == ckill) { P! #endif /* !TIOCGLTC */ P if (countset == 0) P*************** P*** 390,392 **** P } P! #endif P else if ((appfile(fp, dlinno + 2 * ARTWLEN), artread) P--- 391,393 ---- P } P! #endif /* DIGPAGE */ P else if ((appfile(fp, dlinno + 2 * ARTWLEN), artread) P*************** P*** 794,796 **** P } P! #endif P if (h->followid[0] == '\0') { P--- 795,797 ---- P } P! #endif /* MYDB */ P if (h->followid[0] == '\0') { P*************** P*** 900,902 **** P #ifdef SERVER P! (void) sprintf(bfr, "%s/%s", BIN, "postnews"); P #else /* !SERVER */ P--- 901,904 ---- P #ifdef SERVER P! (void) sprintf(bfr, "%s/%s %s/%s/%ld", BIN, "postnews", P! SPOOL,groupdir,bit); P #else /* !SERVER */ P*************** P*** 938,940 **** P if (c != cwerase) P! #endif P { P--- 940,942 ---- P if (c != cwerase) P! #endif /* TIOCGLTC */ P { P*************** P*** 1037,1039 **** P putc('\n', rfp); P! #endif /* !SERVER */ P } P--- 1039,1041 ---- P putc('\n', rfp); P! #endif /* !SERVER */ P } P*************** P*** 1196,1198 **** P #ifdef SERVER P! if ((fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P goto badart; P--- 1198,1200 ---- P #ifdef SERVER P! if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P goto badart; P*************** P*** 1473,1477 **** P (void) sprintf(linebuf, "From: %s", hp->from); P! #else P (void) sprintf(linebuf, "Path: %s", tailpath(hp)); P! #endif P if (fname[0] || (hp->organization[0] && !hflag)) { P--- 1475,1479 ---- P (void) sprintf(linebuf, "From: %s", hp->from); P! #else /* !INTERNET */ P (void) sprintf(linebuf, "Path: %s", tailpath(hp)); P! #endif /* !INTERNET */ P if (fname[0] || (hp->organization[0] && !hflag)) { P*************** P*** 1546,1548 **** P P! #endif P P--- 1548,1550 ---- P P! #endif /* MYDB */ P P*************** P*** 1703,1705 **** P } P! #endif P } else { P--- 1705,1707 ---- P } P! #endif /* TIOCGLTC */ P } else { P*************** P*** 1751,1753 **** P (void) signal(SIGTTOU, SIG_DFL); P! #endif P } P--- 1753,1755 ---- P (void) signal(SIGTTOU, SIG_DFL); P! #endif /* SIGTSTP */ P } P*************** P*** 1770,1772 **** P (void) signal(SIGTTOU, SIG_IGN); P! #endif P (void) close(0); P--- 1772,1774 ---- P (void) signal(SIGTTOU, SIG_IGN); P! #endif /* SIGTSTP */ P (void) close(0); P*************** P*** 1810,1812 **** P (void) signal(SIGTTOU, onstop); P! #endif P return retval; P--- 1812,1814 ---- P (void) signal(SIGTTOU, onstop); P! #endif /* SIGTSTP */ P return retval; P*************** P*** 1842,1844 **** P P! #endif P P--- 1844,1846 ---- P P! #endif /* DIGPAGE */ P P*************** P*** 1986,1988 **** P count = endsuba - dlinno; P! #endif P if ((prflags & NEWART) == 0) P--- 1988,1990 ---- P count = endsuba - dlinno; P! #endif /* DIGPAGE */ P if ((prflags & NEWART) == 0) P*************** P*** 2004,2006 **** P mvaddstr(PRLINE, 0, prompt); P! #else P if (strlen(secpr) <= COLS) P--- 2006,2008 ---- P mvaddstr(PRLINE, 0, prompt); P! #else /* !STATOP */ P if (strlen(secpr) <= COLS) P*************** P*** 2007,2009 **** P mvaddstr(PRLINE, 0, prompt); P! #endif P mvaddstr(PRLINE, 59, timestr); P--- 2009,2011 ---- P mvaddstr(PRLINE, 0, prompt); P! #endif /* !STATOP */ P mvaddstr(PRLINE, 59, timestr); P*************** P*** 2052,2054 **** P alflag++; P! #endif P } P--- 2054,2056 ---- P alflag++; P! #endif /* !SIGTSTP */ P } P*************** P*** 2140,2142 **** P int oflags; /* fcntl flags (for nodelay read) */ P! #endif P P--- 2142,2144 ---- P int oflags; /* fcntl flags (for nodelay read) */ P! #endif /* USG */ P P*************** P*** 2149,2153 **** P register c; P! #if defined(BSD4_2) || defined(BSD4_1C) P int readfds, exceptfds; P! #endif P P--- 2151,2155 ---- P register c; P! #ifdef BSD4_2 P int readfds, exceptfds; P! #endif /* BSD4_2 */ P P*************** P*** 2169,2171 **** P } P! #endif P #ifdef SIGTSTP P--- 2171,2173 ---- P } P! #endif /* USG */ P #ifdef SIGTSTP P*************** P*** 2177,2179 **** P #endif /* SIGTSTP */ P! #if defined(BSD4_2) || defined(BSD4_1C) P /* Use a select because it can be interrupted. */ P--- 2179,2181 ---- P #endif /* SIGTSTP */ P! #ifdef BSD4_2 P /* Use a select because it can be interrupted. */ P*************** P*** 2183,2185 **** P break; P! #endif P innleft = read(0, inbuf, INBUFSIZ); P--- 2185,2187 ---- P break; P! #endif /* BSD4_2 */ P innleft = read(0, inbuf, INBUFSIZ); P*************** P*** 2210,2213 **** P xxit(0); P! #endif P! #endif P if (c == '\f') { P--- 2212,2215 ---- P xxit(0); P! #endif /* !CBREAK */ P! #endif /* !USG */ P if (c == '\f') { P*************** P*** 2243,2245 **** P int count; P! #endif P #ifdef STATTOP P--- 2245,2247 ---- P int count; P! #endif /* FIONREAD */ P #ifdef STATTOP P*************** P*** 2246,2250 **** P if (innleft > 0) P! #else P if (innleft > 0 || alflag) P! #endif P return 1; P--- 2248,2252 ---- P if (innleft > 0) P! #else /* !STATOP */ P if (innleft > 0 || alflag) P! #endif /* !STATOP */ P return 1; P*************** P*** 2265,2267 **** P } P! #endif P #ifdef FIONREAD P--- 2267,2269 ---- P } P! #endif /* USG */ P #ifdef FIONREAD P*************** P*** 2271,2274 **** P return 1; P! #endif P! #endif P return 0; P--- 2273,2276 ---- P return 1; P! #endif /* FIONREAD */ P! #endif /* USG || FIONREAD */ P return 0; P*************** P*** 2286,2288 **** P (void) ioctl(0, TCFLSH, (char *)0); P! #else P #ifdef TIOCFLUSH P--- 2288,2290 ---- P (void) ioctl(0, TCFLSH, (char *)0); P! #else /* !USG */ P #ifdef TIOCFLUSH P*************** P*** 2289,2291 **** P (void) ioctl(0, TIOCFLUSH, (char *)0); P! #else P struct sgttyb tty; P--- 2291,2293 ---- P (void) ioctl(0, TIOCFLUSH, (char *)0); P! #else /* !TIOCFLUSH */ P struct sgttyb tty; P*************** P*** 2293,2296 **** P (void) ioctl(0, TIOCSETP, &tty); P! #endif P! #endif P innleft = 0; P--- 2295,2298 ---- P (void) ioctl(0, TIOCSETP, &tty); P! #endif /* !TIOCFLUSH */ P! #endif /* !USG */ P innleft = 0; P*************** P*** 2317,2321 **** P int mask; P! #else P unsigned oalarm; P! #endif P P--- 2319,2323 ---- P int mask; P! #else /* !BSD4_2 */ P unsigned oalarm; P! #endif /* !BSD4_2 */ P P*************** P*** 2323,2327 **** P mask = sigblock(1 << (SIGALRM-1)); P! #else P oalarm = alarm(0); P! #endif P for (p = outbuf ; p < outnext ; p += i) { P--- 2325,2329 ---- P mask = sigblock(1 << (SIGALRM-1)); P! #else /* !BSD4_2 */ P oalarm = alarm(0); P! #endif /* !BSD4_2 */ P for (p = outbuf ; p < outnext ; p += i) { P*************** P*** 2337,2341 **** P sigsetmask(mask); P! #else P (void) alarm(oalarm); P! #endif P } P--- 2339,2343 ---- P sigsetmask(mask); P! #else /* !BSD4_2 */ P (void) alarm(oalarm); P! #endif /* !BSD4_2 */ P } P*************** P*** 2406,2408 **** P static struct ltchars oldltchars, newltchars; P! #endif P P--- 2408,2410 ---- P static struct ltchars oldltchars, newltchars; P! #endif /* TIOCGLTC */ P P*************** P*** 2416,2418 **** P struct tchars tchars; /* special characters, including interrupt */ P! #endif P #ifdef SIGTSTP P--- 2418,2420 ---- P struct tchars tchars; /* special characters, including interrupt */ P! #endif /* CBREAK */ P #ifdef SIGTSTP PIndex: patchlevel.h PPrereq: 11 P*** .d/patchlevel.h Fri Oct 16 18:22:11 1987 P--- patchlevel.h Wed Nov 4 12:49:32 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 11 P P! #define NEWS_VERSION "B 2.11 10/15/87" P--- 1,3 ---- P! #define PATCHLEVEL 12 P P! #define NEWS_VERSION "B 2.11 11/04/87" PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.13... ' sed 's/^P//' >patch.13 <<\PSHAREND PPath: mcvax!uunet!seismo!rick PFrom: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: news 2.11 src patch #13 PMessage-ID: <44192@beno.seismo.CSS.GOV> PDate: 23 Nov 87 20:02:37 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 2089 P PDescription: P This is patch 13 of the news sources. It addresses the following P problems (p) and includes several new features (f): P P (p) - The "H" flag in the sys file was broken some versions ago P causing parts of the history data to be thrown away before it could P be effectively used by the use of the flag in the sys file. This P code has been corrected. P P (f) - Support for NFS client systems which mount LIBDIR and SPOOLDIR P directories located on a NFS server. P P (f) - LIBDIR/moderators lists the name of the moderators that can P post to a given moderated group locally. Moderators no longer have P to remember to include an Approved: header in their messages. P P (f) - new MODFILEONLY switch in defs.dist. Turning this switch on P causes inews to ignore Approved: headers in locally submitted P articles. All local moderators *must* be listed in P LIBDIR/moderators when this switch is in use. P P (f) - The fascist and moderator code will accept groups of users P (etc/group) as well as a list of users in the LIBDIR/authorized and P LIBDIR/moderators files, respectively. Truly a hack - a backslash P preceding the username signifies a group name instead. P P (f) - Bug groups ala M.I.T. mail to BUGS-XXXX bboards. P LIBDIR/buggroups contains an entry for each newsgroup that defines P the beginning of a newsgroup hierarchy of "bug" groups. Posting to P a non-existent sub-newsgroup under the declared hierarchy causes P the posting to be sent to the declared newsgroup instead. P P (f) - recnews update to take advantage of the -x switch in inews. P You may now specify that a certain site in the sys file should not P receive the incoming posting no matter what when gatewaying a mail P message into the news system. P PFix: P cd to the src directory and apply the following patch. P PIndex: Makefile.dst PPrereq: 1.27 P*** .d/Makefile.dst Wed Nov 4 14:56:12 1987 P--- Makefile.dst Thu Nov 19 16:54:08 1987 P*************** P*** 1,2 **** P! # '@(#)Makefile.dst 1.27 11/4/87' P # Generic Makefile. P--- 1,2 ---- P! # '@(#)Makefile.dst 1.28 11/19/87' P # Generic Makefile. P*************** P*** 41,42 **** P--- 41,50 ---- P P+ # Order is important here P+ INST = full P+ #NFSCLIENT INST = nfs P+ P+ #NFSCLIENT NFSCLIENT= -DNFSCLIENT P+ NFSSPOOLDIR = /nfsnews/$(SPOOLDIR) P+ NFSLIBDIR = /nfsnews/$(LIBDIR) P+ P DEFS = -DRNEWS=\"$(BINDIR)/rnews\" -DSPOOLDIR=\"$(SPOOLDIR)\" \ P*************** P*** 44,46 **** P -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P! -DNEWSGRP=\"$(NEWSGRP)\" ${SERVER} P P--- 52,54 ---- P -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P! -DNEWSGRP=\"$(NEWSGRP)\" ${SERVER} ${NFSCLIENT} P P*************** P*** 118,120 **** P SCRIPTS = sendbatch rmgroup checkgroups P! OTHERS = inews $(UTILS) $(SCRIPTS) P COMMANDS = readnews checknews postnews vnews P--- 126,129 ---- P SCRIPTS = sendbatch rmgroup checkgroups P! NFSOTHERS = inews P! OTHERS = $(NFSOTHERS) $(UTILS) $(SCRIPTS) P COMMANDS = readnews checknews postnews vnews P*************** P*** 122,126 **** P # dependencies P! all: $(P) $(OTHERS) $(COMMANDS) P P! install: all help vnews.help installit P chmod 755 ./installit P--- 131,141 ---- P # dependencies P! all: $(INST)all P P! fullall: $(P) $(OTHERS) $(COMMANDS) P! P! nfsall: $(P) $(NFSOTHERS) $(COMMANDS) P! P! install: $(INST)install P! P! fullinstall: all help vnews.help installit P chmod 755 ./installit P*************** P*** 149,150 **** P--- 164,179 ---- P P+ nfsinstall: nfsall help vnews.help P+ chmod 755 ./installit P+ -test -d $(DESTDIR)$(BINDIR) || mkdir $(DESTDIR)$(BINDIR) P+ -test -d $(DESTDIR)$(LIBDIR) || mkdir $(DESTDIR)$(LIBDIR) P+ for i in $(COMMANDS); do \ P+ ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P+ $(DESTDIR)$(BINDIR); \ P+ done P+ cp help vnews.help $(DESTDIR)$(LIBDIR) P+ ./installit -m 6755 -o root -g $(NEWSGRP) -s inews \ P+ $(DESTDIR)$(LIBDIR) P+ -rm -f $(DESTDIR)$(BINDIR)/rnews P+ #VMS vms -v @euninstal P+ P defs.h: defs.dist localize.sh Makefile.dst Makefile P*************** P*** 159,161 **** P P! update: install.sh makeactive.sh P sh install.sh $(SPOOLDIR) $(LIBDIR) $(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) P--- 188,192 ---- P P! update: $(INST)update P! P! fullupdate: install.sh makeactive.sh P sh install.sh $(SPOOLDIR) $(LIBDIR) $(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) P*************** P*** 162,163 **** P--- 193,200 ---- P chmod 6755 $(LIBDIR)/inews P+ P+ nfsupdate: install.sh P+ sh install.sh $(SPOOLDIR) $(LIBDIR) $(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) $(NFSSPOOLDIR) $(NFSLIBDIR) P+ chown root $(LIBDIR)/inews P+ chmod 6755 $(LIBDIR)/inews P+ P P PIndex: control.c PPrereq: 2.56 P*** .d/control.c Wed Nov 4 14:56:35 1987 P--- control.c Thu Nov 19 16:54:11 1987 P*************** P*** 21,23 **** P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.56 11/4/87"; P #endif /* SCCSID */ P--- 21,23 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.57 11/19/87"; P #endif /* SCCSID */ P*************** P*** 146,147 **** P--- 146,148 ---- P P+ #ifndef NFSCLIENT P /* P*************** P*** 599,600 **** P--- 600,602 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 619,620 **** P--- 621,623 ---- P error("cancel: Too few arguments."); P+ #ifndef NFSCLIENT P (void) strcpy(whatsisname, senderof(&header)); P*************** P*** 691,692 **** P--- 694,696 ---- P } P+ #endif /* !NFSCLIENT */ P return 0; P*************** P*** 694,695 **** P--- 698,700 ---- P P+ #ifndef NFSCLIENT P /* P*************** P*** 779,780 **** P--- 784,786 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 970,971 **** P--- 976,978 ---- P P+ #ifndef NFSCLIENT P /* P*************** P*** 1016,1017 **** P--- 1023,1025 ---- P } P+ #endif /* !NFSCLIENT */ P P PIndex: defs.dist PPrereq: 2.59 P*** .d/defs.dist Sun Oct 18 18:03:03 1987 P--- defs.dist Thu Nov 19 16:54:11 1987 P*************** P*** 16,18 **** P P! /* @(#)defs.dist 2.59 10/15/87 */ P P--- 16,18 ---- P P! /* @(#)defs.dist 2.60 11/19/87 */ P P*************** P*** 92,93 **** P--- 92,96 ---- P /* #define ORGDISTRIB "froozum" /* For organization wide control message handling */ P+ /* #define MODFILEONLY /* define when local postings to moderated */ P+ /* groups must be approved by the contents */ P+ /* of the $(LIB)/moderators file */ P P*************** P*** 131 **** P--- 134,154 ---- P #endif /* M_XENIX */ P+ P+ /* for NFS Support */ P+ #ifdef NFSCLIENT /* NFSSYSNAME found in $(LIB)/nfssysname */ P+ # define NFSCMDFORMAT "/usr/ucb/rsh %s /usr/lib/news/inews -p < %s" P+ # define NFSCMDARGS NFSSYSNAME,ARTICLE P+ /* If NFSCLIENT is flagged in Makefile, then we're compiling code P+ * for an NFS client system. In this case, inews on the client is P+ * expected to only do some preliminary checking. The full check is P+ * expected to happen on the host NFSCLIENT. The two statements above P+ * are used to form a command which is called by system(command) in the P+ * code. The two arguments are most probably the only pieces of P+ * information that one will need from within the program. The first P+ * argument (NFSSYSNAME) is the name of the master system that is P+ * suppose to perform the final checks and post the article. The P+ * second argument (ARTicle) is a string which contains the /tmp P+ * file name of the file that has the article to be posted. Note: P+ * all program and file names should be fully qualified with directory P+ * names for security purposes!!!! P+ */ P+ #endif /* NFSCLIENT */ P PIndex: funcs.c PPrereq: 2.36 P*** .d/funcs.c Thu Oct 8 00:20:21 1987 P--- funcs.c Thu Nov 19 16:54:13 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.36 10/7/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.37 11/19/87"; P #endif /* SCCSID */ P*************** P*** 638,639 **** P--- 638,641 ---- P char facuser[BUFLEN], facgroups[BUFLEN], factemp[BUFLEN]; P+ char *getgrplist(); P+ char *grplist = NULL; P register char *facptr; P*************** P*** 647,652 **** P facfd = fopen(factemp, "r"); P! P! if (facfd != NULL) { /* If no such file, we go with the global default */ P! while (fscanf(facfd, "%[^:]:%s\n", facuser, factemp) != EOF) P! { P if (feof(facfd)) P--- 649,652 ---- P facfd = fopen(factemp, "r"); P! if (facfd != NULL) { /* If no such file, use global default only */ P! while (fscanf(facfd, "%[^:]:%s\n", facuser, factemp) != EOF) { P if (feof(facfd)) P*************** P*** 653,655 **** P break; P! if (strncmp(facuser, user, BUFLEN) == 0) { P (void) strcat(facgroups, ","); P--- 653,665 ---- P break; P! if (facuser[0] == '#') continue; P! if (facuser[0] == '\\') { P! if (!grplist) grplist = getgrplist(user); P! facptr = facuser; P! facptr++; P! if (ngmatch(facptr, grplist)) { P! (void) strcat(facgroups, ","); P! (void) strcat(facgroups, factemp); P! continue; P! } P! } else if (STRNCMP(facuser, user, BUFLEN) == 0) { P (void) strcat(facgroups, ","); P*************** P*** 694 **** P--- 704,753 ---- P #endif /* FASCIST */ P+ P+ /* This routine is meant to be called only once. On a system with a P+ * large /etc/group file, this routine is a HOG!!!!! In order to save P+ * ourselves from pain, this routine will look up groups for "user" P+ * the first time. After that, it will always return the same results... P+ */ P+ P+ char * P+ getgrplist(user) P+ register char *user; P+ { P+ register struct group *gr; P+ register struct passwd *pw; P+ register char **cp; P+ register int len; P+ static int grpdone = FALSE; P+ static char grplist[LBUFLEN]; P+ P+ #ifdef DEBUG P+ fprintf(stderr, "getgrplist entered...\n"); P+ #endif /* DEBUG */ P+ P+ if (grpdone == FALSE) { P+ #ifdef DEBUG P+ fprintf(stderr, "... actually reading /etc/group...\n"); P+ #endif /* DEBUG */ P+ pw = getpwnam(user); P+ setgrent(); P+ while (gr = getgrent()) { P+ if (pw) if (pw->pw_gid == gr->gr_gid) { P+ strcat(grplist, gr->gr_name); P+ strcat(grplist, ","); P+ continue; P+ } P+ for (cp = gr->gr_mem; cp && *cp; cp++) P+ if (STRCMP(*cp, user) == 0) { P+ strcat(grplist, gr->gr_name); P+ strcat(grplist, ","); P+ break; P+ } P+ } P+ if ((len = strlen(grplist))) grplist[len-1] = '\0'; P+ grpdone = TRUE; P+ } P+ #ifdef DEBUG P+ fprintf(stderr, "Group list - %s\n", grplist); P+ #endif /* DEBUG */ P+ return grplist; P+ } P PIndex: iextern.c PPrereq: 2.18 P*** .d/iextern.c Wed Oct 7 16:52:10 1987 P--- iextern.c Thu Nov 19 16:54:13 1987 P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)iextern.c 2.18 9/24/87"; P #endif /* SCCSID */ P--- 6,8 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)iextern.c 2.19 11/19/87"; P #endif /* SCCSID */ P*************** P*** 34 **** P--- 34,36 ---- P char is_mod[NAMELEN]; /* contains newsgroup if moderated */ P+ int is_mod_file_okay; /* true if /usr/lib/news/moderators */ P+ /* okays posting by the user */ P PIndex: ifuncs.c PPrereq: 2.66 P*** .d/ifuncs.c Thu Oct 8 00:21:23 1987 P--- ifuncs.c Thu Nov 19 16:54:17 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.66 10/7/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.67 11/19/87"; P #endif /* SCCSID */ P*************** P*** 64,65 **** P--- 64,66 ---- P P+ #ifndef NFSCLIENT P #ifndef GENERICPATH P*************** P*** 472,473 **** P--- 473,475 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 546,547 **** P--- 548,550 ---- P P+ #ifndef NFSCLIENT P idlock(lcident); P*************** P*** 577,578 **** P--- 580,582 ---- P #endif /* !DBM */ P+ #endif /* !NFSCLIENT */ P histline[0] = '\0'; P*************** P*** 580,581 **** P--- 584,586 ---- P addhist("\t"); P+ #ifndef NFSCLIENT P #ifdef DEBUG P*************** P*** 584,585 **** P--- 589,593 ---- P return FALSE; P+ #else /* NFSCLIENT */ P+ return TRUE; P+ #endif /* NFSCLIENT */ P } P*************** P*** 602,603 **** P--- 610,612 ---- P #endif /* !DBM */ P+ char tmphline[PATHLEN]; P P*************** P*** 626,628 **** P /* We assume that history has already been called, calling dbminit. */ P! p = index(hline, '\t'); P if (p) P--- 635,638 ---- P /* We assume that history has already been called, calling dbminit. */ P! strcpy(tmphline,hline); P! p = index(tmphline, '\t'); P if (p) P*************** P*** 629,632 **** P *p = 0; P! lcase(hline); P! lhs.dptr = hline; P lhs.dsize = strlen(lhs.dptr) + 1; P--- 639,642 ---- P *p = 0; P! lcase(tmphline); P! lhs.dptr = tmphline; P lhs.dsize = strlen(lhs.dptr) + 1; P*************** P*** 788,790 **** P */ P! ngfcheck(isproc) P { P--- 798,801 ---- P */ P! ngfcheck(user, isproc, is_mod_init) P! char *user; P { P*************** P*** 793,795 **** P register int i, j; P! register int ngcount, okcount, havealiased; P register int pass; P--- 804,806 ---- P register int i, j; P! register int ngcount, okcount, dorecheck; P register int pass; P*************** P*** 796,797 **** P--- 807,809 ---- P char * ngs[sizeof header.nbuf / 2]; P+ char * ngsbug[sizeof header.nbuf / 2]; P char uses[sizeof header.nbuf / 2]; P*************** P*** 800,803 **** P P! havealiased = ngcount = 0; P! is_mod[0] = '\0'; P /* P--- 812,828 ---- P P! /* uses values P! ** 0 - haven't seen the newsgroup name anyplace P! ** 1 - write newsgroup name back into Newsgroup: line P! ** 2 - exact newsgroup name found in active or aliases file P! ** 3 - newsgroup name found as prefix in bugs file (but not #2) P! ** 4 - (2) plus name in bugs file P! */ P! P! #define NGUNSEEN 0 P! #define NGOK 1 P! #define NGALIAS 2 P! #define NGBUGS 3 P! #define NGABUGS 4 P! P! ngcount = 0; P /* P*************** P*** 814,815 **** P--- 839,842 ---- P ngs[ngcount] = cp; P+ ngsbug[ngcount] = (char *) NULL; P+ uses[ngcount] = NGUNSEEN; P do { P*************** P*** 830,832 **** P } P! uses[ngcount] = 1; /* it should go in "Newsgroups" line */ P ++ngcount; P--- 857,859 ---- P } P! uses[ngcount] = NGOK; /* it should go in "Newsgroups" line */ P ++ngcount; P*************** P*** 837,839 **** P recheck: P! okcount = 0; P rewind(actfp); clearerr(actfp); P--- 864,868 ---- P recheck: P! dorecheck = okcount = 0; P! is_mod[0] = '\0'; P! is_mod_file_okay = is_mod_init; P rewind(actfp); clearerr(actfp); P*************** P*** 842,847 **** P continue; /* strange line in input! */ P- /* newsgroup 12345 12345 X */ P- /* cp + 01234567890123 */ P- if (!isproc && cp[13] == 'n') P- continue; /* can't post to this group! */ P *cp = '\0'; P--- 871,872 ---- P*************** P*** 848,854 **** P for (i = 0; i < ngcount; ++i) P! if (uses[i] >= 1 && STRCMP(bfr, ngs[i]) == 0) { P! uses[i] = 2; /* it should be localized too */ P! if (cp[13] == 'm') P! strcpy(is_mod, bfr); P! ++okcount; P } P--- 873,890 ---- P for (i = 0; i < ngcount; ++i) P! if (STRCMP(bfr, ngs[i]) == NGUNSEEN) { /* localize? */ P! /* newsgroup 12345 12345 X */ P! /* cp + 01234567890123 */ P! if (!isproc && cp[13] == 'n') P! uses[i] = NGOK; P! else { P! if (uses[i] < NGALIAS) P! uses[i] = NGALIAS; P! if (cp[13] == 'm') { P! strcpy(is_mod, bfr); P! if (!is_mod_file_okay) P! is_mod_file_okay = P! mod_file_okay(user,bfr); P! } P! ++okcount; P! } P } P*************** P*** 855,856 **** P--- 891,929 ---- P } P+ /* P+ ** See what groups we can find in the bugs file P+ */ P+ if ((f = fopen(BUGFILE, "r")) != NULL) { P+ while (fgets(bfr, BUFLEN, f) == bfr) { P+ if (bfr[0] == '#') P+ continue; P+ cp = index(bfr, '\n'); P+ *cp = '.'; P+ for (i = 0; i < ngcount; ++i) { P+ register int bfrlen = strlen(bfr); P+ register int ngslen = strlen(ngs[i]); P+ if (uses[i] == NGBUGS || uses[i] == NGABUGS) P+ continue; P+ if (PREFIX(ngs[i], bfr) || P+ (bfrlen-1 == ngslen && P+ !STRNCMP(ngs[i], bfr, ngslen))) { P+ if (uses[i] == NGALIAS) P+ uses[i] = NGABUGS; P+ else { P+ bfr[bfrlen-1] = '\0'; P+ cp = "Bug group %s -> %s [ok]"; P+ log(cp, ngs[i], bfr); P+ if (ngsbug[i] == (char *) NULL) P+ ngsbug[i] = ngs[i]; P+ ngs[i] = AllocCpy(bfr); P+ bfr[bfrlen-1] = '.'; P+ uses[i] = NGBUGS; P+ okcount++; P+ dorecheck++; P+ } P+ } P+ } P+ } P+ (void) fclose(f); P+ } P+ P #ifdef ALWAYSALIAS P*************** P*** 859,863 **** P /* P! ** Handle groups absent from active file. P */ P! if (havealiased == 0 && okcount < ngcount) { P /* P--- 932,936 ---- P /* P! ** Handle groups absent from active and bug_groups files. P */ P! if (okcount < ngcount) { P /* P*************** P*** 866,868 **** P f = xfopen(ALIASES, "r"); P! while (okcount < ngcount && fscanf(f, "%s %s%*[^\n]", abuf, bfr) == 2) P for (i = 0; i < ngcount; ++i) { P--- 939,944 ---- P f = xfopen(ALIASES, "r"); P! while (okcount < ngcount && P! fscanf(f, "%s %s%*[^\n]", abuf, bfr) == 2) { P! if (abuf[0] == '#') P! continue; P for (i = 0; i < ngcount; ++i) { P*************** P*** 869,871 **** P #ifndef ALWAYSALIAS P! if (uses[i] == 2) P continue; P--- 945,947 ---- P #ifndef ALWAYSALIAS P! if (uses[i] > NGOK && uses[i] != NGBUGS) P continue; P*************** P*** 872,885 **** P #endif /* ALWAYSALIAS */ P! if (STRCMP(ngs[i], abuf) != 0) P continue; P! if (isproc) P cp = "Aliased newsgroup %s to %s"; P! else P cp = "Please change %s to %s"; P logerr(cp, abuf, bfr); P ngs[i] = AllocCpy(bfr); P! uses[i] = 2; P! ++havealiased; P! ++okcount; P } P (void) fclose(f); P--- 948,975 ---- P #endif /* ALWAYSALIAS */ P! cp = (char *) NULL; P! if (uses[i] == NGBUGS) P! if (STRCMP(ngsbug[i], abuf) == 0) P! cp = "Aliased newsgroup %s to %s"; P! if (cp == (char *) NULL) { P! if (STRCMP(ngs[i], abuf) != 0) P continue; P! if (isproc) P cp = "Aliased newsgroup %s to %s"; P! else P cp = "Please change %s to %s"; P+ } P logerr(cp, abuf, bfr); P+ if (uses[i] == NGBUGS) { P+ free(ngs[i]); P+ ngsbug[i] = (char *) NULL; P+ } P ngs[i] = AllocCpy(bfr); P! ++dorecheck; P! #ifdef ALWAYSALIAS P! if (uses[i] != NGBUGS) P! #endif /* ALWAYSALIAS */ P! ++okcount; P! uses[i] = NGALIAS; P } P+ } P (void) fclose(f); P*************** P*** 886,888 **** P for (i = 0; i < ngcount; ++i) { P! if (uses[i] == 2) P continue; P--- 976,978 ---- P for (i = 0; i < ngcount; ++i) { P! if (uses[i] > NGOK) P continue; P*************** P*** 902,912 **** P newssave(infp, (char *) NULL); P- /* P- * Unfortunately, if you alias an unmoderated group to a P- * moderated group, you must recheck the active file to see P- * if the new group is moderated. Rude but necessary. P- */ P- if (havealiased) P- goto recheck; P } P /* P ** Zap duplicates. P--- 992,1005 ---- P newssave(infp, (char *) NULL); P } P+ P /* P+ * Unfortunately, if you alias an unmoderated group to a P+ * moderated group, you must recheck the active file to see P+ * if the new group is moderated. Rude but necessary. P+ */ P+ P+ if (dorecheck) P+ goto recheck; P+ P+ /* P ** Zap duplicates. P*************** P*** 914,926 **** P for (i = 0; i < ngcount - 1; ++i) { P! if (uses[i] == 0) P continue; P! for (j = i + 1; j < ngcount; ++j) { P! if (uses[j] == 0) P continue; P if (STRCMP(ngs[i], ngs[j]) != 0) P! continue; P! logerr("Duplicate %s removed", ngs[j]); P! if (uses[i] < uses[j]) P! uses[i] = uses[j]; P! uses[j] = 0; P } P--- 1007,1063 ---- P for (i = 0; i < ngcount - 1; ++i) { P! if (uses[i] == NGUNSEEN) P continue; P! for (j = i + 1; ((j < ngcount) && (uses[i] != NGUNSEEN)); ++j){ P! register int kill = -1; P! register int keep = -1; P! if (uses[j] == NGUNSEEN) P continue; P+ if (uses[i] == NGABUGS || uses[j] == NGABUGS) { P+ register int k = i; P+ register int l = j; P+ if (uses[i] == NGABUGS && uses[j] == NGABUGS) { P+ if (strlen(ngs[j]) < strlen(ngs[i])) { P+ k = j; P+ l = i; P+ } P+ } else if (uses[i] == NGABUGS) { P+ k = j; P+ l = i; P+ } P+ strcpy(bfr, ngs[k]); P+ strcat(bfr, "."); P+ if (PREFIX(ngs[l], bfr)) { P+ kill = k; P+ keep = l; P+ if (uses[k] != NGBUGS || P+ ngsbug[l] == (char *) NULL) P+ logerr("Duplicate %s removed", P+ ngs[k]); P+ } P+ } P+ if (kill < 0) { P if (STRCMP(ngs[i], ngs[j]) != 0) P! continue; P! keep = i; P! kill = j; P! if (uses[j] != NGBUGS) P! logerr("Duplicate %s removed", ngs[j]); P! if (uses[i] < uses[j]) P! uses[i] = uses[j]; P! } P! if (kill >= 0) { P! if (uses[kill] == NGBUGS) { P! if (ngsbug[keep] == (char *) NULL) P! ngsbug[keep] = ngsbug[kill]; P! else if (ngsbug[kill] != (char*) NULL){ P! sprintf(bfr, "%s,%s", P! ngsbug[keep], P! ngsbug[kill]); P! if (ngsbug[keep] < tbuf || ngsbug[keep] > &tbuf[sizeof tbuf - 1]) P! free(ngsbug[keep]); P! ngsbug[keep] = AllocCpy(bfr); P! } P! } P! uses[kill] = NGUNSEEN; P! } P } P*************** P*** 946,948 **** P continue; P! j = strlen(ngs[i]); P if (j + 2 > avail) { P--- 1083,1088 ---- P continue; P! if (pass == 1) P! j = strlen(ngsbug[i] == (char *) NULL ? ngs[i] : ngsbug[i]); P! else P! j = strlen(ngs[i]); P if (j + 2 > avail) { P*************** P*** 951,953 **** P } P! (void) strcpy(cp, ngs[i]); P cp += j; P--- 1091,1097 ---- P } P! if (pass == 1) P! (void) strcpy(cp, P! ngsbug[i] == (char *) NULL ? ngs[i] : ngsbug[i]); P! else P! (void) strcpy(cp, ngs[i]); P cp += j; P*************** P*** 965,967 **** P */ P! for (i = 0; i < ngcount; ++i) P if (ngs[i] < tbuf || ngs[i] > &tbuf[sizeof tbuf - 1]) P--- 1109,1111 ---- P */ P! for (i = 0; i < ngcount; ++i) { P if (ngs[i] < tbuf || ngs[i] > &tbuf[sizeof tbuf - 1]) P*************** P*** 968,970 **** P--- 1112,1124 ---- P free(ngs[i]); P+ if (ngsbug[i] < tbuf || ngsbug[i] > &tbuf[sizeof tbuf - 1]) P+ free(ngsbug[i]); P+ } P return nbuf[0] == '\0'; P+ P+ #undef NGUNSEEN 0 P+ #undef NGOK 1 P+ #undef NGALIAS 2 P+ #undef NGBUGS 3 P+ #undef NGABUGS 4 P+ P } P*************** P*** 971,972 **** P--- 1125,1168 ---- P P+ /* Check $LIB/moderators to see if user is listed as a known moderator P+ * of the newsgroup in ngname..... return TRUE if user is ok. P+ */ P+ P+ mod_file_okay(user, ngname) P+ char *user, *ngname; P+ { P+ FILE *mfd; P+ char *grplist = NULL; P+ char *p, *getgrplist(); P+ int ret = FALSE; P+ char mfn[BUFLEN], mgrp[BUFLEN], mlist[LBUFLEN]; P+ P+ sprintf(mfn, "%s/%s", LIB, "moderators"); P+ mfd = fopen(mfn, "r"); P+ if (mfd != NULL) P+ while ((!ret) && fscanf(mfd, "%[^:]:%s\n", mgrp, mlist) != EOF) { P+ if (feof(mfd)) break; P+ if (mgrp[0] == '#') continue; P+ if (!STRCMP(ngname, mgrp)) { P+ while (*(p = ((p = rindex(mlist, ',')) ? p : mlist )) P+ && (ret == FALSE)) { P+ if (*p == ',') { P+ *p = '\0'; P+ p++; P+ } P+ if (*p == '\\') { P+ *p = '\0'; P+ p++; P+ if (!grplist) P+ grplist = getgrplist(user); P+ if (ngmatch(p,grplist)) ret = TRUE; P+ } else if (!STRCMP(p, user)) P+ ret = TRUE; P+ *p = '\0'; P+ } P+ } P+ } P+ fclose(mfd); P+ return ret; P+ } P+ P /* P*************** P*** 1427,1429 **** P i = DEADTIME; P! while (link(SUBFILE, LOCKFILE)) { P if (errno != EEXIST) P--- 1623,1625 ---- P i = DEADTIME; P! while (link(SEQFILE, LOCKFILE)) { P if (errno != EEXIST) P*************** P*** 1444,1445 **** P--- 1640,1645 ---- P #endif /* !VMS */ P+ P+ #ifdef NFSCLIENT P+ #define PROC 0004 P+ #endif /* NFSCLIENT */ P P PIndex: inews.c PPrereq: 2.83 P*** .d/inews.c Wed Nov 4 14:57:35 1987 P--- inews.c Thu Nov 19 16:54:20 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.83 11/4/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.84 11/19/87"; P #endif /* SCCSID */ P*************** P*** 80,82 **** P 'c', ' ', FALSE, UNKNOWN,UNKNOWN, header.ctlmsg, P! 'C', ' ', FALSE, UNKNOWN,CREATENG, header.ctlmsg, P #define hflag options[9].flag P--- 80,83 ---- P 'c', ' ', FALSE, UNKNOWN,UNKNOWN, header.ctlmsg, P! #define COPT 'C' P! COPT, ' ', FALSE, UNKNOWN,CREATENG, header.ctlmsg, P #define hflag options[9].flag P*************** P*** 139,140 **** P--- 140,142 ---- P actfp = xfopen(ACTIVE, "r+"); P+ #ifndef NFSCLIENT P #ifdef LOCKF P*************** P*** 192,193 **** P--- 194,196 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 194,195 **** P--- 197,199 ---- P if (!STRNCMP(ptr+1, "rnews", 5)) { P+ #ifndef NFSCLIENT P mode = PROC; P*************** P*** 199,200 **** P--- 203,212 ---- P } P+ #else /* NFSCLIENT */ P+ mfd = mailhdr((struct hbuf *)NULL, "Improper use of INEWS"); P+ if (mfd != NULL) { P+ fprintf(mfd,"System: %s\n\nINEWS is running improperly as RNEWS on slave NFS site by user %s.\n", LOCALSYSNAME, username); P+ (void) mclose(mfd); P+ exit(1); P+ } P+ #endif /* NFSCLIENT */ P #ifdef NICENESS P*************** P*** 240,242 **** P--- 252,258 ---- P (void) ftime(&Now); P+ #ifndef NFSCLIENT P if (uid == 0 && duid == 0) { P+ #else /* NFSCLIENT */ P+ if (duid == 0) { P+ #endif /* NFSCLIENT */ P /* P*************** P*** 245,246 **** P--- 261,269 ---- P * when root invokes a setuid program. P+ * P+ * On NFS slave systems, inews is setuid to ROOT. This allows P+ * inews to setuid/gid (real and effective) to NEWSUSR and P+ * NEWSGRP respectively. This *must* happen so that the "rsh" P+ * program will run as user NEWSUSR and not as the user running P+ * inews. "rsh" runs as the "real" user even when the program P+ * calling it is setuid. P */ P*************** P*** 302,303 **** P--- 325,332 ---- P found:; P+ #ifdef NFSCLIENT P+ if (optpt->optlet == COPT) { P+ fprintf(stderr, "Cannot create new newsgroups from an NFS slave system.\n\n"); P+ xxit(1); P+ } P+ #endif /* NFSCLIENT */ P if (optpt->flag == TRUE || (mode != UNKNOWN && P*************** P*** 353,354 **** P--- 382,384 ---- P P+ #ifndef NFSCLIENT P if (mode == CREATENG) P*************** P*** 355,356 **** P--- 385,387 ---- P createng(); P+ #endif /* !NFSCLIENT */ P P*************** P*** 457,458 **** P--- 488,497 ---- P if (mode == PROC) { P+ #ifdef NFSCLIENT P+ mfd = mailhdr((struct hbuf *)NULL, "Improper use of INEWS"); P+ if (mfd != NULL) { P+ fprintf(mfd,"System: %s\n\nINEWS is running improperly as RNEWS on slave NFS site by user %s.\n", LOCALSYSNAME, username); P+ (void) mclose(mfd); P+ exit(1); P+ } P+ #else /* !NFSCLIENT */ P checkbatch(); P*************** P*** 472,473 **** P--- 511,513 ---- P xxit(0); P+ #endif /* !NFSCLIENT */ P } P*************** P*** 497,499 **** P--- 537,541 ---- P #endif /* FASCIST */ P+ #ifndef NFSCLIENT P ctlcheck(); P+ #endif /* !NFSCLIENT */ P } P*************** P*** 500,501 **** P--- 542,544 ---- P P+ #ifndef NFSCLIENT P if (mode == CREATENG) P*************** P*** 502,503 **** P--- 545,547 ---- P createng(); P+ #endif /* !NFSCLIENT */ P P*************** P*** 532,533 **** P--- 576,578 ---- P LOCALSYSNAME, f); P+ #ifndef NFSCLIENT P (void) sprintf(cbuf, "touch %s;chmod 666 %s", f, f); P*************** P*** 538,539 **** P--- 583,587 ---- P fprintf(mfd, "Corrective action failed - check suid bits.\n"); P+ #else /* NFSCLIENT */ P+ fprintf(mfd, "Corrective action must take place on \"%s\", the master NFS news system.\n", NFSSYSNAME); P+ #endif /* NFSCLIENT */ P (void) mclose(mfd); P*************** P*** 559,560 **** P--- 607,609 ---- P LOCALSYSNAME, dir); P+ #ifndef NFSCLIENT P (void) mkdir(dir, 0775); P*************** P*** 564,565 **** P--- 613,617 ---- P fprintf(mfd, "Corrective action failed - check suid bits.\n"); P+ #else /* NFSCLIENT */ P+ fprintf(mfd, "Corrective action must take place on \"%s\", the master NFS news system.\n", NFSSYSNAME); P+ #endif /* NFSCLIENT */ P (void) mclose(mfd); P*************** P*** 611,612 **** P--- 663,665 ---- P P+ #ifndef NFSCLIENT P dospool(batchcmd, dolhwrite) P*************** P*** 836,837 **** P--- 889,891 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 855,858 **** P /* Clean up Newsgroups: line */ P! if (!is_ctl && mode != CREATENG) P! is_invalid = ngfcheck(mode == PROC); P P--- 909,917 ---- P /* Clean up Newsgroups: line */ P! if (!is_ctl && mode != CREATENG) { P! #ifdef MODFILEONLY P! if (mode <= UNPROC) header.approved[0] = '\0'; P! #endif /* MODFILEONLY */ P! is_invalid = P! ngfcheck(username, mode == PROC, header.approved[0] != '\0'); P! } P P*************** P*** 876,877 **** P--- 935,937 ---- P P+ #ifndef NFSCLIENT P if (is_invalid) { P*************** P*** 901,902 **** P--- 961,963 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 903,950 **** P if (is_mod[0] != '\0' /* one of the groups is moderated */ P! && header.approved[0] == '\0') { /* and unapproved */ P! struct hbuf mhdr; P! FILE *mfd, *mhopen(); P! register char *p; P! char modadd[BUFLEN], *replyname(); P #ifdef DONTFOWARD P! if(mode == PROC) { P! logerr("Unapproved article in moderated group %s", P! is_mod); P! if (localize("junk")) P! savehist(histline); P! goto writeout; P! } P #endif /* DONTFORWARD */ P! fprintf(stderr,"%s is moderated and may not be posted to", P! is_mod); P! fprintf(stderr," directly.\nYour article is being mailed to"); P! fprintf(stderr," the moderator who will post it for you.\n"); P! /* Let's find a path to the backbone */ P! sprintf(bfr, "%s/mailpaths", LIB); P! mfd = xfopen(bfr, "r"); P! do { P! if (fscanf(mfd, "%s %s", bfr, modadd) != 2) P! xerror("Can't find backbone in %s/mailpaths", P! LIB); P! } while (STRCMP(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); P! (void) fclose(mfd); P! /* fake a header for mailhdr */ P! mhdr.from[0] = '\0'; P! mhdr.replyto[0] = '\0'; P! p = is_mod; P! while (*++p) P! if (*p == '.') P! *p = '-'; P! sprintf(mhdr.path, modadd, is_mod); P! mfd = mhopen(&mhdr); P! if (mfd == NULL) P! xerror("Can't send mail to %s", mhdr.path); P! fprintf(mfd, "To: %s\n", replyname(&mhdr)); P! lhwrite(&header, mfd); P! putc('\n', mfd); P! while ((c = getc(infp)) != EOF) P! putc(c, mfd); P! mclose(mfd); P! log("Article mailed to %s", mhdr.path); P! xxit(0); P } P--- 964,1020 ---- P if (is_mod[0] != '\0' /* one of the groups is moderated */ P! && header.approved[0] == '\0') { /* and unapproved */ P! if (is_mod_file_okay) { P! (void) sprintf(header.approved, "%s@%s", P! username, FROMSYSNAME); P! } else { P! struct hbuf mhdr; P! FILE *mfd, *mhopen(); P! register char *p; P! char modadd[BUFLEN], *replyname(); P! #ifndef NFSCLIENT P #ifdef DONTFOWARD P! if(mode == PROC) { P! logerr("Unapproved article in moderated group %s", P! is_mod); P! if (localize("junk")) P! savehist(histline); P! goto writeout; P! } P #endif /* DONTFORWARD */ P! #endif /* !NFSCLIENT */ P! fprintf(stderr,"%s is moderated and may not ", is_mod); P! fprintf(stderr,"be posted to directly.\nYour "); P! fprintf(stderr, "article is being mailed to the "); P! fprintf(stderr, "moderator who will post it for "); P! fprintf(stderr, "you.\n"); P! /* Let's find a path to the backbone */ P! sprintf(bfr, "%s/mailpaths", LIB); P! mfd = xfopen(bfr, "r"); P! do { P! if (fscanf(mfd, "%s %s", bfr, modadd) != 2) P! xerror("Can't find backbone in %s/mailpaths", P! LIB); P! } while (STRCMP(bfr, "backbone") != 0 P! && !ngmatch(is_mod, bfr)); P! (void) fclose(mfd); P! /* fake a header for mailhdr */ P! mhdr.from[0] = '\0'; P! mhdr.replyto[0] = '\0'; P! p = is_mod; P! while (*++p) P! if (*p == '.') P! *p = '-'; P! sprintf(mhdr.path, modadd, is_mod); P! mfd = mhopen(&mhdr); P! if (mfd == NULL) P! xerror("Can't send mail to %s", mhdr.path); P! fprintf(mfd, "To: %s\n", replyname(&mhdr)); P! lhwrite(&header, mfd); P! putc('\n', mfd); P! while ((c = getc(infp)) != EOF) P! putc(c, mfd); P! mclose(mfd); P! log("Article mailed to %s", mhdr.path); P! xxit(0); P! } P } P*************** P*** 951,952 **** P--- 1021,1023 ---- P P+ #ifndef NFSCLIENT P if (mode != PROC && spool_news != DONT_SPOOL) { P*************** P*** 962,963 **** P--- 1033,1035 ---- P } P+ #endif /* !NFSCLIENT */ P P*************** P*** 965,966 **** P--- 1037,1039 ---- P exitcode = control(&header); P+ #ifndef NFSCLIENT P if (localize("control") && exitcode != 0) P*************** P*** 993,994 **** P--- 1066,1068 ---- P } P+ #endif /* !NFSCLIENT */ P } P*************** P*** 1039,1040 **** P--- 1113,1115 ---- P if (mode != PROC) { P+ #ifndef NFSCLIENT P int pid; P*************** P*** 1057,1058 **** P--- 1132,1143 ---- P broadcast(mode==PROC); P+ #else /* NFSCLIENT */ P+ int status; P+ char command[LBUFLEN]; P+ P+ (void) sprintf(command, NFSCMDFORMAT, NFSCMDARGS); P+ status = system(command); P+ (void) unlink(ARTICLE); P+ exit(status); P+ } P+ #endif /* NFSCLIENT */ P } P*************** P*** 1080,1081 **** P--- 1165,1167 ---- P break; P+ #ifndef NFSCLIENT P if (mode == PROC) { /* zap trailing empty lines */ P*************** P*** 1118,1119 **** P--- 1204,1206 ---- P } P+ #endif /* !NFSCLIENT */ P if (mode != PROC && tty && STRCMP(bfr, ".\n") == 0) P*************** P*** 1216,1217 **** P--- 1303,1306 ---- P P+ #ifndef NFSCLIENT P+ P /* P*************** P*** 1404 **** P--- 1493,1494 ---- P } P+ #endif /* !NFSCLIENT */ P PIndex: install.sh PPrereq: 1.18 P*** .d/install.sh Wed Oct 7 16:53:04 1987 P--- install.sh Thu Nov 19 16:54:21 1987 P*************** P*** 1,6 **** P! : '@(#)install.sh 1.18 9/24/87' P P! if test "$#" != 6 P then P! echo "usage: $0 spooldir libdir bindir nuser ngroup ostype" P exit 1 P--- 1,6 ---- P! : '@(#)install.sh 1.19 11/19/87' P P! if test "$#" -lt 6 P then P! echo "usage: $0 spooldir libdir bindir nuser ngroup ostype [nfs_spooldir nfs_libdir]" P exit 1 P*************** P*** 13,14 **** P--- 13,16 ---- P OSTYPE=$6 P+ NFSSPOOLDIR=$7 P+ NFSLIBDIR=$8 P P*************** P*** 31,33 **** P v7) SYSNAME=`uuname -l` P! touch $LIBDIR/history.pag $LIBDIR/history.dir;; P *) echo "$0: Unknown Ostype" P--- 33,42 ---- P v7) SYSNAME=`uuname -l` P! if test "$NFSSPOOLDIR" = "" P! then P! touch $LIBDIR/history.pag $LIBDIR/history.dir P! else P! rm -f $LIBDIR/history.dir $LIBDIR/history.pag P! ln -s $NFSLIBDIR/history.dir $LIBDIR/history.dir P! ln -s $NFSLIBDIR/history.pag $LIBDIR/history.pag P! fi;; P *) echo "$0: Unknown Ostype" P*************** P*** 43,54 **** P : Ensure SPOOLDIR exists P! for i in $SPOOLDIR $SPOOLDIR/.rnews P! do P! if test ! -d $i P! then P! mkdir $i P! fi P! chmod 777 $i P! chown $NEWSUSR $i P! chgrp $NEWSGRP $i P! done P P--- 52,72 ---- P : Ensure SPOOLDIR exists P! if test "$NFSSPOOLDIR" = "" P! then P! for i in $SPOOLDIR $SPOOLDIR/.rnews P! do P! if test ! -d $i P! then P! mkdir $i P! fi P! chmod 777 $i P! chown $NEWSUSR $i P! chgrp $NEWSGRP $i P! done P! else P! rm -rf $SPOOLDIR P! ln -s $NFSSPOOLDIR $SPOOLDIR P! chmod 777 $SPOOLDIR P! chown $NEWSUSR $SPOOLDIR P! chgrp $NEWSGRP $SPOOLDIR P! fi P P*************** P*** 58,60 **** P : Ensure certain files in LIBDIR exist P! touch $LIBDIR/history $LIBDIR/active $LIBDIR/log $LIBDIR/errlog $LIBDIR/users P chmod 666 $LIBDIR/users P--- 76,86 ---- P : Ensure certain files in LIBDIR exist P! if test "$NFSLIBDIR" = "" P! then P! touch $LIBDIR/history $LIBDIR/active P! else P! rm -f $LIBDIR/history $LIBDIR/active P! ln -s $NFSLIBDIR/history $LIBDIR/history P! ln -s $NFSLIBDIR/active $LIBDIR/active P! fi P! touch $LIBDIR/log $LIBDIR/errlog $LIBDIR/users P chmod 666 $LIBDIR/users P*************** P*** 62,63 **** P--- 88,91 ---- P : If no sys file, make one. P+ if test "$NFSLIBDIR" = "" P+ then P if test ! -f $LIBDIR/sys P*************** P*** 74,75 **** P--- 102,107 ---- P fi P+ else P+ rm -f $LIBDIR/sys P+ ln -s $NFSLIBDIR/sys $LIBDIR/sys P+ fi P P*************** P*** 82,83 **** P--- 114,117 ---- P : If no mailpaths, make one. P+ if test "$NFSLIBDIR" = "" P+ then P if test ! -s $LIBDIR/mailpaths P*************** P*** 91,95 **** P fi P P! sh makeactive.sh $LIBDIR $SPOOLDIR $NEWSUSR $NEWSGRP P P for i in $LIBDIR/ngfile $BINDIR/inews $LIBDIR/localgroups $LIBDIR/moderators \ P--- 125,141 ---- P fi P+ else P+ rm -f $LIBDIR/mailpaths P+ ln -s $NFSLIBDIR/mailpaths $LIBDIR/mailpaths P+ fi P P! if test "$NFSLIBDIR" = "" P! then P! sh makeactive.sh $LIBDIR $SPOOLDIR $NEWSUSR $NEWSGRP P! else P! rm -f $LIBDIR/newsgroups P! ln -s $NFSLIBDIR/newsgroups $LIBDIR/newsgroups P! fi P P+ if test "$NFSLIBDIR" = "" P+ then P for i in $LIBDIR/ngfile $BINDIR/inews $LIBDIR/localgroups $LIBDIR/moderators \ P*************** P*** 117,118 **** P--- 163,165 ---- P fi P+ fi P P*************** P*** 129,130 **** P--- 176,183 ---- P : if no aliases file, make one P+ if test "$NFSLIBDIR" != "" P+ then P+ rm -f $LIBDIR/aliases P+ ln -s $NFSLIBDIR/aliases $LIBDIR/aliases P+ rm -f $LIBDIR/aliases.new P+ else P if test ! -f $LIBDIR/aliases P*************** P*** 151,152 **** P--- 204,206 ---- P fi P+ fi P P*************** P*** 153,154 **** P--- 207,210 ---- P : if no distributions file, make one P+ if test "$NFSLIBDIR" = "" P+ then P if test ! -f $LIBDIR/distributions P*************** P*** 165,166 **** P--- 221,226 ---- P echo site particpates in a regional distribution such as '"ba"' or '"dc"'. P+ fi P+ else P+ rm -f $LIBDIR/distributions P+ ln -s $NFSLIBDIR/distributions $LIBDIR/distributions P fi P PIndex: iparams.h PPrereq: 2.17 P*** .d/iparams.h Fri Nov 21 16:04:36 1986 P--- iparams.h Thu Nov 19 16:54:21 1987 P*************** P*** 4,6 **** P P! /* @(#)iparams.h 2.17 11/21/86 */ P P--- 4,6 ---- P P! /* @(#)iparams.h 2.18 11/19/87 */ P P*************** P*** 20,21 **** P--- 20,25 ---- P P+ #ifdef NFSCLIENT P+ extern char *NFSSYSNAME; P+ #endif /* NFSCLIENT */ P+ P struct msgtype { P*************** P*** 29,31 **** P extern FILE *infp, *actfp; P! extern int tty, is_ctl; P extern char filename[BUFLEN], is_mod[NAMELEN], not_here[SBUFLEN], *DFLTNG; P--- 33,35 ---- P extern FILE *infp, *actfp; P! extern int tty, is_ctl, is_mod_file_okay; P extern char filename[BUFLEN], is_mod[NAMELEN], not_here[SBUFLEN], *DFLTNG; P PIndex: localize.client P*** /dev/null Thu Nov 19 16:28:13 1987 P--- localize.client Thu Nov 19 16:54:22 1987 P*************** P*** 0 **** P--- 1,168 ---- P+ # -- DISCUSSION -- P+ # P+ # With this latest release of the Netnews software, it may appear to some that P+ # the new NNTP support code and the new NFS support code do more or less the P+ # same thing. You're probably asking yourself, "What are the differences if P+ # any and what do I go by to help me choose which way to go?" Well, first let P+ # me say that neither method is better than the other. I can clearly see a P+ # use for both models right here at Rutgers University. And, that's what we P+ # really have here - two different models - two different means of supporting P+ # a distributed network news system. The difference between the two is P+ # mostly one of administration. P+ # P+ # The NNTP extensions to the Netnews code allow your users to take advantage P+ # of something that only rn users were able to take advantage of up until now. P+ # Now, your users may use their favorite user interface program to access the P+ # news from a distant host. Administratively, the NNTP model implies that P+ # complete control of the news system is done solely on the master NNTP P+ # server. If you do not need the ability to have some level of control at the P+ # client system level, use of the NNTP extensions is definitely the way to go. P+ # P+ # The NFS extensions allows for local administration of the news system at the P+ # client level. Right after installation, most of the administrative files in P+ # LIBDIR will simply be soft links to the same files on the NFS master. P+ # However, you can break these links and create actual files on the client. P+ # Certainly, some files must remain as links. Files such as "active" or P+ # "newsgroups" should always remain as links to the master NFS system for P+ # instance. The ability to break links may, for example, allow you to choose P+ # a different set of users to apply the fascist code to or name a moderator of P+ # a moderated newsgroup but only allow him to post from his client (and not P+ # from the NFS master news server), etc... Essentially, the NFS client P+ # version of inews is a stripped down version of the real thing. The only P+ # thing it doesn't do is attempt to write to NFSSPOOLDIR and NFSLIBDIR. All P+ # consistency checks performed by the real inews in the normal case are P+ # performed by the NFS client version on the local system. So, if you're P+ # environment is such that you need local administrative control on the client P+ # systems, the use of the NFS extensions is your best bet. P+ # P+ # P+ # -- INSTALLATION -- P+ # P+ # The file "localize.client" is a slightly modified copy of the shell script P+ # used at Rutgers University to establish a particular system as a news NFS P+ # client system. One should be familiar with NFS before attempting to use P+ # this new feature. News should be installed on the master NFS server before P+ # attempting to install it on client system(s). P+ # P+ # The NFSCLIENT code is enabled by including the NFSCLIENT (non-optional), P+ # NFSSPOOLDIR (optional) and NFSLIBDIR (optional) definitions in your Makefile P+ # edit script. NFSSPOOLDIR and NFSLIBDIR are needed only during the initial P+ # installation of the code and are, in fact, only used by the Makefile when P+ # calling the install.sh script. NFSSPOOLDIR and NFSLIBDIR default to P+ # /nfsnews/$(SPOOLDIR) and /nfsnews/$(LIBDIR) where "nfsnews" is expected to P+ # be a mount point or soft link on the local system which ultimately points at P+ # the master system. P+ # P+ # With the NFSCLIENT code enabled the Makefile and installation scripts will P+ # do the following: P+ # P+ # o - On an NFS client system, only a small number of the programs in P+ # this source directory need to be compiled. Makefile will be P+ # configured to compile only those modules. P+ # P+ # o - The installation script will attempt to install only those P+ # modules compiled. It will also attempt to establish a soft link P+ # from SPOOLDIR to NFSSPOOLDIR. It will create a local LIBDIR, P+ # install a very select group of programs in it and attempt to create P+ # soft links from the local LIBDIR configuration files to those found P+ # in NFSLIBDIR. Obviously, news should be installed on the master NFS P+ # server first. P+ # P+ # *NOTE* - You will need to create a file called LIBDIR/nfssysname. In it, P+ # place the fully qualified host name of the system which is to act as the NFS P+ # news server. You do this right after installing the software. P+ # P+ # P+ # -- CAVEATS -- P+ # P+ # Under the default configuration, an NFS client will attempt to use P+ # "rsh" to send news from the client to the server. To make this P+ # work, inews on the client will set itself to run both real and P+ # effectively as the "news" user. Unfortunately, rsh requires that P+ # the real uid match between the two systems. The hidden implication P+ # here is that the .rhosts file in the news home directory on the P+ # master NFS system will have to be modified to allow all clients to P+ # rsh to it. P+ # P+ # If you look below, you'll see that edits have been made to P+ # NFSCMDFORMAT and NFSCMDARGS which are located in defs.dist. In P+ # effect, you may change the program that inews attempts to use to P+ # deliver articles to the NFS server. In this example, I'm using a P+ # modified nntpxmit which will accept a host name and a file name as P+ # its arguments. For those of you who are aware of how nntpxmit P+ # works, the new -a switch says that the file contains the actual P+ # article as opposed to a list of filenames containing articles. This P+ # feature will be supported in nntpxmit 1.4. With the new nntpxmit, P+ # the .rhosts hacking mentioned above will not be needed. P+ # P+ # -- BUGS -- P+ # P+ # I don't know of any. This code has been running at Rutgers since P+ # version 2.10.3 of news. P+ # P+ # I have not attempted to run this code together with Stan Barber's P+ # nntp support code. Offhand, I'm guessing that you'll be in for some P+ # nasty surprises if you attempt to do so. P+ # P+ # -- WHERE TO FIND HELP -- P+ # P+ # This script and a real working knowledge of NFS is all one really P+ # needs. However, I'm am willing to answer most any question P+ # regarding the NFS support code. My address and telephone number are P+ # given below.... P+ # P+ # Mel Pleasant P+ # (201) 932-2023 -- uucp: {most-any-backbone-site}!rutgers!pleasant P+ # internet: pleasant@RUTGERS.EDU P+ # P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed - Makefile <<'EOF' P+ /HOME=/s/exptools// P+ /NEWSGRP/s/news/daemon/ P+ /BATCHDIR/s;batch;newsbatch/batch; P+ /BINDIR/s;bin;local/bin; P+ /UUXFLAGS/s/-r -z/-r -z -n -gd/ P+ /LNRNEWS/s/ln/ln -s/ P+ g/^#NFSCLIENT /s/// P+ g/^#V7 /s/// P+ g/^#USG /d P+ g/^#BSD4_3 /d P+ g/^#BSD4_2 /s/// P+ g/^#BSD4_1 /d P+ g/#NOTVMS/s/#NOTVMS.*// P+ w P+ q P+ EOF P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed - defs.h <<'EOF' P+ /ROOTID/s/10/100/ P+ /N_UMASK/s/000/022/ P+ /DFLTSUB/s/general,all.announce/all,all.all/ P+ /ADMSUB/s/general,all.announce/announce,all.announce,general,all.general/ P+ /DFTXMIT/s/-z/-z -gd/ P+ s;uux;/usr/bin/uux; P+ /UXMIT/s/-z/-z -gd/ P+ s;uux;/usr/bin/uux; P+ /DFTEDITOR/s;vi;/bin/emacs; P+ /INTERNET/s;/\* ;; P+ /MYDOMAIN/s/\.UUCP// P+ /GHNAME/s;/\* ;; P+ /DOXREFS/s;/\* ;; P+ /BSD4_2/s;/\* ;; P+ /ALWAYSALIAS/s;/\* ;; P+ /SENDMAIL/s;/\* ;; P+ /MYORG/s/Frobozz Inc., St. Louis/Rutgers Univ., New Brunswick, N.J./ P+ /FASCIST/s;/\* ;; P+ s/all\.all/systems.dev/ P+ /ORGDISTRIB/s;/\* ;; P+ s/froozum/ru/ P+ /MODFILEONLY/s;/\* ;; P+ /NFSCMDFORMAT/s;".*";"/usr/lib/news/nntpxmit -a \\"%s\\" \\"%s\\""; P+ /NFSCMDARGS/s/NFSSYSNAME,ARTICLE/ARTICLE,NFSSYSNAME/ P+ w P+ q P+ EOF P PIndex: params.h PPrereq: 2.26 P*** .d/params.h Wed Nov 4 14:57:43 1987 P--- params.h Thu Nov 19 16:54:23 1987 P*************** P*** 4,6 **** P P! /* @(#)params.h 2.26 11/4/87 */ P P--- 4,6 ---- P P! /* @(#)params.h 2.27 11/19/87 */ P P*************** P*** 67,69 **** P extern char *SPOOL, *LIB, *BIN, *SUBFILE, *ACTIVE; P! extern char *LOCKFILE, *SEQFILE, *ARTFILE; P extern char *news_version, *Progname; P--- 67,69 ---- P extern char *SPOOL, *LIB, *BIN, *SUBFILE, *ACTIVE; P! extern char *LOCKFILE, *SEQFILE, *ARTFILE, *BUGFILE; P extern char *news_version, *Progname; P PIndex: pathinit.c PPrereq: 1.24 P*** .d/pathinit.c Thu Oct 8 00:22:31 1987 P--- pathinit.c Thu Nov 19 16:54:24 1987 P*************** P*** 36,38 **** P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.24 10/7/87"; P #endif /* SCCSID */ P--- 36,38 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.25 11/19/87"; P #endif /* SCCSID */ P*************** P*** 58,62 **** P char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; P P! int c_cancel(), c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), P c_sendsys(), c_version(), c_checkgroups(), c_unimp(); P P--- 58,67 ---- P char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; P+ int c_cancel(); P P! #ifdef NFSCLIENT P! char *NFSSYSNAME; P! #else /* !NFSCLIENT */ P! int c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), P c_sendsys(), c_version(), c_checkgroups(), c_unimp(); P+ #endif /* !NFSCLIENT */ P P*************** P*** 64,65 **** P--- 69,71 ---- P "cancel", NULL, c_cancel, P+ #ifndef NFSCLIENT P "newgroup", NULL, c_newgroup, P*************** P*** 73,74 **** P--- 79,81 ---- P "delsub", NULL, c_unimp, P+ #endif /* !NFSCLIENT */ P NULL, NULL, NULL P*************** P*** 78,80 **** P #if defined(INEW) || defined(READ) P! char *ALIASES; P #endif /* INEW || READ */ P--- 85,87 ---- P #if defined(INEW) || defined(READ) P! char *ALIASES, *BUGFILE; P #endif /* INEW || READ */ P*************** P*** 123,125 **** P--- 130,146 ---- P extern char *mydomain(); P+ #endif /* CHKN */ P P+ #ifdef HOME P+ /* Relative to the home directory of user HOME */ P+ (void) sprintf(bfr, "%s/%s", logdir(HOME), SPOOLDIR); P+ SPOOL = AllocCpy(bfr); P+ (void) sprintf(bfr, "%s/%s", logdir(HOME), LIBDIR); P+ LIB = AllocCpy(bfr); P+ #else /* !HOME */ P+ /* Fixed paths defined in Makefile */ P+ SPOOL = AllocCpy(SPOOLDIR); P+ LIB = AllocCpy(LIBDIR); P+ #endif /* !HOME */ P+ P+ #ifndef CHKN P uname(&ubuf); P*************** P*** 154,167 **** P P- #ifdef HOME P- /* Relative to the home directory of user HOME */ P- (void) sprintf(bfr, "%s/%s", logdir(HOME), SPOOLDIR); P- SPOOL = AllocCpy(bfr); P- (void) sprintf(bfr, "%s/%s", logdir(HOME), LIBDIR); P- LIB = AllocCpy(bfr); P- #else /* !HOME */ P- /* Fixed paths defined in Makefile */ P- SPOOL = AllocCpy(SPOOLDIR); P- LIB = AllocCpy(LIBDIR); P- #endif /* !HOME */ P- P #ifdef LOGDIR P--- 175,176 ---- P*************** P*** 200,201 **** P--- 209,211 ---- P Sprintf(ALIASES, "%s/aliases", LIB); P+ Sprintf(BUGFILE, "%s/buggroups", LIB); P # endif /* READ || INEW */ P*************** P*** 204,205 **** P--- 214,216 ---- P Sprintf(SEQFILE, "%s/seq", LIB); P+ #ifndef NFSCLIENT P Sprintf(ARTICLE, "%s/.arXXXXXX", SPOOL); P*************** P*** 206,207 **** P--- 217,223 ---- P Sprintf(INFILE, "%s/.inXXXXXX", SPOOL); P+ #else /* NFSCLIENT */ P+ Sprintf(ARTICLE, "/tmp/.arXXXXXX", SPOOL); P+ Sprintf(INFILE, "/tmp/.inXXXXXX", SPOOL); P+ parse_nfssysname(); P+ #endif /* NFSCLIENT */ P /* P*************** P*** 352,353 **** P--- 368,397 ---- P #endif /* NOTIFY */ P+ #ifdef NFSCLIENT P+ parse_nfssysname() P+ { P+ FILE *nfsfd; P+ extern FILE *mailhdr(); P+ char *nfsp; P+ char buf[BUFSIZ]; P+ P+ sprintf(buf, "%s/nfssysname", LIB); P+ P+ if ((nfsfd = fopen(buf, "r"))) { P+ (void) fgets(buf, sizeof buf, nfsfd); P+ (void) fclose(nfsfd); P+ if (nfsp = index(buf, '\n')) *nfsp = '\0'; P+ NFSSYSNAME = AllocCpy(buf); P+ return; P+ } P+ P+ if (nfsfd = mailhdr((struct hbuf *)NULL, "Missing File")) { P+ (void) fprintf(nfsfd, "Can't find %s.\n\n", buf); P+ (void) fprintf(nfsfd, "On an NFS client, inews cannot "); P+ (void) fprintf(nfsfd, "operate without this file.\n"); P+ (void) mclose(nfsfd); P+ } P+ P+ xerror("Can't find %s.\nComplain to your new/systems manager.\n", buf); P+ } P+ #endif /* NFSCLIENT */ P #endif /* INEW */ P PIndex: postnews.c PPrereq: 1.34 P*** .d/postnews.c Wed Nov 4 14:57:57 1987 P--- postnews.c Thu Nov 19 16:54:27 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.34 11/4/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.35 11/19/87"; P #endif /* SCCSID */ P*************** P*** 107,109 **** P getpr("In what newsgroup was the article posted? ",ng); P! if (!valid_ng(ng, &i, &j, &canpost)) P if (canpost == 'i' ) P--- 107,109 ---- P getpr("In what newsgroup was the article posted? ",ng); P! if (!valid_ng(ng, &i, &j, &canpost, TRUE)) P if (canpost == 'i' ) P*************** P*** 304,306 **** P #endif /* !SERVER */ P! if (valid_ng(buf, &i, &i, &canpost)) { P if (n++ != 0) P--- 304,306 ---- P #endif /* !SERVER */ P! if (valid_ng(buf, &i, &i, &canpost, FALSE)) { P if (n++ != 0) P*************** P*** 925,929 **** P /* verify that newsgroup exists, and get number of entries */ P! valid_ng(ng, maxart, minart, canpost) P! char *ng; P long *maxart, *minart; P char *canpost; P--- 925,931 ---- P /* verify that newsgroup exists, and get number of entries */ P! valid_ng(ng, maxart, minart, canpost, exact) P! char *ng; P! P long *maxart, *minart; P+ int exact; P char *canpost; P*************** P*** 930,933 **** P { P! char ng_check[BUFLEN], ng_read[BUFLEN]; P FILE *fp; P P--- 932,936 ---- P { P! char ng_check[BUFLEN], ng_read[BUFLEN], *cp; P FILE *fp; P+ int found_ng; P P*************** P*** 964,966 **** P } P! *canpost = 'i'; P *maxart = 0; P--- 967,969 ---- P } P! (void) fclose(fp); P *maxart = 0; P*************** P*** 967,970 **** P *minart = 0; P (void) fclose(fp); P! return FALSE; P } P--- 970,992 ---- P *minart = 0; P+ *canpost = 'i'; P+ if (exact) { P+ return FALSE; P+ } P+ if ((fp = fopen(BUGFILE, "r")) == NULL) { P+ return FALSE; P+ } P+ found_ng = FALSE; P+ while (!found_ng && fgets(ng_check, BUFLEN, fp) == ng_check) { P+ if (ng_check[0] == '#') P+ continue; P+ cp = index(ng_check, '\n'); P+ *cp = '.'; P+ if (prefix(ng, ng_check)) P+ found_ng = TRUE; P+ } P (void) fclose(fp); P! if (!found_ng) P! return FALSE; P! *canpost = 'y'; P! return TRUE; P } P PIndex: process.c PPrereq: 2.17 P*** .d/process.c Wed Dec 17 18:23:25 1986 P--- process.c Thu Nov 19 16:54:28 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.17 12/16/86"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.18 11/19/87"; P #endif /* SCCSID */ P*************** P*** 40,41 **** P--- 40,42 ---- P 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, P+ 'A', '\0', FALSE, OPTION, UNKNOWN, UNKNOWN,(char *)NULL, P #ifdef TMAIL P PIndex: recnews.c PPrereq: 2.15 P*** .d/recnews.c Wed Nov 4 14:58:14 1987 P--- recnews.c Thu Nov 19 16:54:30 1987 P*************** P*** 1,3 **** P /* P! * recnews [to newsgroup] [from user] [approved by] P * P--- 1,3 ---- P /* P! * recnews [to newsgroup] [from user] [approved by] [exclude site] P * P*************** P*** 45,46 **** P--- 45,48 ---- P * for use with local groups for mailing lists with 2.11. P+ * pleasant@rutgers.EDU: add fourth argument which uses the -x switch in inews P+ * P */ P*************** P*** 48,50 **** P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.15 11/4/87"; P #endif /* SCCSID */ P--- 50,52 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.16 11/19/87"; P #endif /* SCCSID */ P*************** P*** 92,93 **** P--- 94,96 ---- P char approved[BFSZ]; /* Approved: */ P+ char not_this_site[BFSZ]; /* Don't post to this site */ P int fromset; /* from passed on command line */ P*************** P*** 123,124 **** P--- 126,131 ---- P approved[0] = '\0'; P+ if (argc > 4 && *argv[4]) { P+ sprintf(not_this_site, " -x \"%s\"", argv[4]); P+ } else P+ not_this_site[0] = '\0'; P P*************** P*** 176,178 **** P case INCLUSIVE: P! sprintf(cmdbuf,"exec %s -p", inews); P pipe = popen(cmdbuf,"w"); P--- 183,185 ---- P case INCLUSIVE: P! sprintf(cmdbuf,"exec %s%s -p", inews, not_this_site); P pipe = popen(cmdbuf,"w"); P*************** P*** 196,200 **** P sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\"%s", P inews, *subject ? subject : "(none)", P! newsgroup, from, approved); P #ifdef debug P--- 203,207 ---- P sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P inews, *subject ? subject : "(none)", P! newsgroup, from, approved, not_this_site); P #ifdef debug P*************** P*** 224,227 **** P sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\"%s", P! inews, subject, newsgroup, from, approved); P #ifdef debug P--- 231,235 ---- P sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P! inews, subject, newsgroup, from, approved, P! not_this_site); P #ifdef debug P PIndex: uname.c PPrereq: 2.16 P*** .d/uname.c Wed Oct 7 16:55:03 1987 P--- uname.c Thu Nov 19 16:54:31 1987 P*************** P*** 23,25 **** P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.16 9/24/87"; P #endif /* SCCSID */ P--- 23,25 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.17 11/19/87"; P #endif /* SCCSID */ P*************** P*** 43,44 **** P--- 43,46 ---- P gethostname(uptr->nodename, sizeof (uptr->nodename)); P+ for (cp = uptr->nodename; *cp == '\0'; cp++) P+ if (isupper(*cp)) *cp = tolower(*cp); P cp = mydomain(); P PIndex: patchlevel.h PPrereq: 12 P*** .d/patchlevel.h Wed Nov 4 14:46:19 1987 P--- patchlevel.h Thu Nov 19 17:28:23 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 12 P P! #define NEWS_VERSION "B 2.11 11/04/87" P--- 1,3 ---- P! #define PATCHLEVEL 13 P P! #define NEWS_VERSION "B 2.11 11/19/87" PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.14... ' sed 's/^P//' >patch.14 <<\PSHAREND PFrom mcvax!uunet!seismo!rick Mon Dec 7 16:52:17 MET 1987 PArticle 855 of news.software.b: PPath: mcvax!uunet!seismo!rick P>From: rick@seismo.CSS.GOV (Rick Adams) PNewsgroups: news.software.b PSubject: 2.11 news src patch #14 PKeywords: last one for 1987 PMessage-ID: <44204@beno.seismo.CSS.GOV> PDate: 4 Dec 87 07:50:54 GMT POrganization: Center for Seismic Studies, Arlington, VA PLines: 1369 P PDescription: P This is patch #14 for news 2.11 src. It is expected to be stable P and does not introduce major new features. P P Many minor cleanups. P Changes to Makefile to make $(DESTDIR) work completely. P sendbatch now supports MINDISKFREE and will not batch up news P if there is not a least that much free space on /usr/spool. P LOCKING is an acceptable define for those with the locking() call. P recnews now avoids using popen and has its own routine to P exec the command. This avoids having the shell interpreting P special characters that we don't want it to. P PFix: P cd to the src directory and apply the following patch. P PIndex: Makefile.dst PPrereq: 1.28 P*** .d/Makefile.dst Mon Nov 23 19:13:12 1987 P--- Makefile.dst Tue Dec 1 18:51:32 1987 P*************** P*** 1,2 **** P! # '@(#)Makefile.dst 1.28 11/19/87' P # Generic Makefile. P--- 1,2 ---- P! # '@(#)Makefile.dst 1.30 12/1/87' P # Generic Makefile. P*************** P*** 31,32 **** P--- 31,34 ---- P MAXPERBATCH = 1000000000 P+ MINDISKFREE = 0 P+ SPOOL_DISK = /usr/spool P P*************** P*** 49,53 **** P P! DEFS = -DRNEWS=\"$(BINDIR)/rnews\" -DSPOOLDIR=\"$(SPOOLDIR)\" \ P! -DBATCHDIR=\"$(BATCHDIR)\" -DLIBDIR=\"$(LIBDIR)\" \ P! -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P -DNEWSGRP=\"$(NEWSGRP)\" ${SERVER} ${NFSCLIENT} P--- 51,56 ---- P P! DEFS = -DRNEWS=\"$(DESTDIR)$(BINDIR)/rnews\" \ P! -DSPOOLDIR=\"$(DESTDIR)$(SPOOLDIR)\" \ P! -DBATCHDIR=\"$(DESTDIR)$(BATCHDIR)\" -DLIBDIR=\"$(DESTDIR)$(LIBDIR)\" \ P! -DBINDIR=\"$(DESTDIR)$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ P -DNEWSGRP=\"$(NEWSGRP)\" ${SERVER} ${NFSCLIENT} P*************** P*** 71,73 **** P #USG LIBS = P! #USG LINTFLAGS = ${DEFS} ${NETINCLUDE} P #V7 CFLAGS = ${DEBUG} -DDBM ${DEFS} ${SCCSID} ${VFORK} ${NETINCLUDE} P--- 74,76 ---- P #USG LIBS = P! #USG LINTFLAGS = -DUSG ${DEFS} ${NETINCLUDE} P #V7 CFLAGS = ${DEBUG} -DDBM ${DEFS} ${SCCSID} ${VFORK} ${NETINCLUDE} P*************** P*** 90,92 **** P #VMS VFORK= P! #VMS FIXACTIVE = /etc/vmstounix $(LIBDIR)/active P P--- 93,95 ---- P #VMS VFORK= P! #VMS FIXACTIVE = /etc/vmstounix $(DESTDIR)$(LIBDIR)/active P P*************** P*** 191,194 **** P fullupdate: install.sh makeactive.sh P! sh install.sh $(SPOOLDIR) $(LIBDIR) $(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) P! chmod 6755 $(LIBDIR)/inews P P--- 194,197 ---- P fullupdate: install.sh makeactive.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(NEWSUSR) $(DESTDIR)$(NEWSGRP) $(DESTDIR)$(OSTYPE) P! chmod 6755 $(DESTDIR)$(LIBDIR)/inews P P*************** P*** 195,199 **** P nfsupdate: install.sh P! sh install.sh $(SPOOLDIR) $(LIBDIR) $(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) $(NFSSPOOLDIR) $(NFSLIBDIR) P! chown root $(LIBDIR)/inews P! chmod 6755 $(LIBDIR)/inews P P--- 198,202 ---- P nfsupdate: install.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(NEWSUSR) $(DESTDIR)$(NEWSGRP) $(DESTDIR)$(OSTYPE) $(DESTDIR)$(NFSSPOOLDIR) $(DESTDIR)$(NFSLIBDIR) P! chown root $(DESTDIR)$(LIBDIR)/inews P! chmod 6755 $(DESTDIR)$(LIBDIR)/inews P P*************** P*** 205,215 **** P lint: ilint vlint rlint elint plint olint P! ilint: defs.h params.h iparams.h header.h $(ISRCS) pathinit.c P lint $(LINTFLAGS) $(ISRCS) -DINEW pathinit.c P! vlint: defs.h params.h rparams.h header.h $(VSRCS) pathinit.c P lint $(LINTFLAGS) $(VSRCS) -DREAD pathinit.c P! rlint: defs.h params.h rparams.h header.h $(RSRCS) pathinit.c P lint $(LINTFLAGS) $(RSRCS) -DREAD pathinit.c P! elint: defs.h params.h iparams.h header.h $(ESRCS) pathinit.c P lint $(LINTFLAGS) $(ESRCS) -DEXP pathinit.c P! plint: defs.h params.h iparams.h header.h $(PSRCS) pathinit.c P lint $(LINTFLAGS) $(PSRCS) -DREAD pathinit.c P--- 208,218 ---- P lint: ilint vlint rlint elint plint olint P! ilint: defs.h params.h iparams.h header.h patchlevel.h $(ISRCS) pathinit.c P lint $(LINTFLAGS) $(ISRCS) -DINEW pathinit.c P! vlint: defs.h params.h rparams.h header.h patchlevel.h $(VSRCS) pathinit.c P lint $(LINTFLAGS) $(VSRCS) -DREAD pathinit.c P! rlint: defs.h params.h rparams.h header.h patchlevel.h $(RSRCS) pathinit.c P lint $(LINTFLAGS) $(RSRCS) -DREAD pathinit.c P! elint: defs.h params.h iparams.h header.h patchlevel.h $(ESRCS) pathinit.c P lint $(LINTFLAGS) $(ESRCS) -DEXP pathinit.c P! plint: defs.h params.h iparams.h header.h patchlevel.h $(PSRCS) pathinit.c P lint $(LINTFLAGS) $(PSRCS) -DREAD pathinit.c P*************** P*** 226,228 **** P readnews: $(P) $(ROBJECTS) P! $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(LIBS) $(NETLIB) P #VMS mv readnews.exe readnews P--- 229,231 ---- P readnews: $(P) $(ROBJECTS) P! $(CC) $(LFLAGS) $(ROBJECTS) -o readnews $(NETLIB) $(LIBS) P #VMS mv readnews.exe readnews P*************** P*** 258,260 **** P postnews: $(P) $(POBJECTS) P! $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews $(NETLIB) P #VMS mv postnews.exe postnews P--- 261,263 ---- P postnews: $(P) $(POBJECTS) P! $(CC) $(CFLAGS) $(LFLAGS) $(POBJECTS) -o postnews $(NETLIB) $(LIBS) P #VMS mv postnews.exe postnews P*************** P*** 283,285 **** P vnews: $(P) $(VOBJECTS) P! $(CC) $(LFLAGS) $(VOBJECTS) -o $@ $(TERMLIB) $(LIBS) $(NETLIB) P #VMS mv vnews.exe vnews P--- 286,288 ---- P vnews: $(P) $(VOBJECTS) P! $(CC) $(LFLAGS) $(VOBJECTS) -o $@ $(TERMLIB) $(NETLIB) $(LIBS) P #VMS mv vnews.exe vnews P*************** P*** 302,304 **** P uurec: uurec.c defs.h Makefile P! $(CC) $(CFLAGS) $(LFLAGS) uurec.c -o uurec P #VMS mv uurec.exe uurec P--- 305,307 ---- P uurec: uurec.c defs.h Makefile P! $(CC) $(CFLAGS) $(LFLAGS) uurec.c -o uurec $(LIBS) P #VMS mv uurec.exe uurec P*************** P*** 306,308 **** P recnews: recnews.c defs.h header.h params.h Makefile P! $(CC) $(CFLAGS) $(LFLAGS) recnews.c -o recnews P #VMS mv recnews.exe recnews P--- 309,311 ---- P recnews: recnews.c defs.h header.h params.h Makefile P! $(CC) $(CFLAGS) $(LFLAGS) recnews.c -o recnews $(LIBS) P #VMS mv recnews.exe recnews P*************** P*** 310,312 **** P sendnews: sendnews.o defs.h P! $(CC) $(LFLAGS) sendnews.o -o sendnews P #VMS mv sendnews.exe sendnews P--- 313,315 ---- P sendnews: sendnews.o defs.h P! $(CC) $(LFLAGS) sendnews.o -o sendnews $(LIBS) P #VMS mv sendnews.exe sendnews P*************** P*** 314,316 **** P batch: batch.c Makefile defs.h P! $(CC) $(CFLAGS) $(LFLAGS) batch.c -o batch P #VMS mv batch.exe batch P--- 317,319 ---- P batch: batch.c Makefile defs.h P! $(CC) $(CFLAGS) $(LFLAGS) batch.c -o batch $(LIBS) P #VMS mv batch.exe batch P*************** P*** 318,320 **** P encode: encode.c P! $(CC) $(CFLAGS) $(LFLAGS) encode.c -o encode P #VMS mv encode.exe encode P--- 321,323 ---- P encode: encode.c P! $(CC) $(CFLAGS) $(LFLAGS) encode.c -o encode $(LIBS) P #VMS mv encode.exe encode P*************** P*** 322,324 **** P decode: decode.c P! $(CC) $(CFLAGS) $(LFLAGS) decode.c -o decode P #VMS mv decode.exe decode P--- 325,327 ---- P decode: decode.c P! $(CC) $(CFLAGS) $(LFLAGS) decode.c -o decode $(LIBS) P #VMS mv decode.exe decode P*************** P*** 326,328 **** P caesar: caesar.c Makefile P! $(CC) $(CFLAGS) $(LFLAGS) caesar.c -o caesar -lm P #VMS mv caesar.exe caesar P--- 329,331 ---- P caesar: caesar.c Makefile P! $(CC) $(CFLAGS) $(LFLAGS) caesar.c -o caesar -lm $(LIBS) P #VMS mv caesar.exe caesar P*************** P*** 330,332 **** P compress: compress.c P! $(CC) $(CFLAGS) $(LFLAGS) -o compress compress.c P #VMS mv compress.exe compress P--- 333,335 ---- P compress: compress.c P! $(CC) $(CFLAGS) $(LFLAGS) -o compress compress.c $(LIBS) P #VMS mv compress.exe compress P*************** P*** 334,336 **** P recmail: recmail.c defs.h params.h header.h P! $(CC) $(CFLAGS) $(LFLAGS) recmail.c -o recmail P #VMS mv recmail.exe recmail P--- 337,339 ---- P recmail: recmail.c defs.h params.h header.h P! $(CC) $(CFLAGS) $(LFLAGS) recmail.c -o recmail $(LIBS) P #VMS mv recmail.exe recmail P*************** P*** 341,343 **** P checknews: $(P) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) -o checknews $(NETLIB) P #VMS mv checknews.exe checknews P--- 344,346 ---- P checknews: $(P) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) P! $(CC) $(LFLAGS) checknews.o process.o cpathinit.o rextern.o $(NNTP) $(CLIENTLIB) -o checknews $(NETLIB) $(LIBS) P #VMS mv checknews.exe checknews P*************** P*** 345,347 **** P sendbatch: sendbatch.sh Makefile P! sed -e "s%LIBDIR%$(LIBDIR)%g" \ P -e "s%UUXFLAGS%$(UUXFLAGS)%g" \ P--- 348,350 ---- P sendbatch: sendbatch.sh Makefile P! sed -e "s%LIBDIR%$(DESTDIR)$(LIBDIR)%g" \ P -e "s%UUXFLAGS%$(UUXFLAGS)%g" \ P*************** P*** 348,350 **** P -e "s%MAXPERBATCH%$(MAXPERBATCH)%g" \ P! -e "s%BATCHDIR%$(BATCHDIR)%g" sendbatch.sh > sendbatch P #VMS /etc/unixtovms sendbatch P--- 351,355 ---- P -e "s%MAXPERBATCH%$(MAXPERBATCH)%g" \ P! -e "s%MINDISKFREE%$(MINDISKFREE)%g" \ P! -e "s%SPOOL_DISK%$(SPOOL_DISK)%g" \ P! -e "s%BATCHDIR%$(DESTDIR)$(BATCHDIR)%g" sendbatch.sh > sendbatch P #VMS /etc/unixtovms sendbatch P*************** P*** 352,356 **** P rmgroup: rmgroup.sh Makefile P! sed -e "s%LIBDIR%$(LIBDIR)%g" \ P -e "s%FIXACTIVE%$(FIXACTIVE)%g" \ P! -e "s%SPOOLDIR%$(SPOOLDIR)%g" rmgroup.sh > rmgroup P #VMS /etc/unixtovms rmgroup P--- 357,361 ---- P rmgroup: rmgroup.sh Makefile P! sed -e "s%LIBDIR%$(DESTDIR)$(LIBDIR)%g" \ P -e "s%FIXACTIVE%$(FIXACTIVE)%g" \ P! -e "s%SPOOLDIR%$(DESTDIR)$(SPOOLDIR)%g" rmgroup.sh > rmgroup P #VMS /etc/unixtovms rmgroup P*************** P*** 358,360 **** P checkgroups: checkgroups.sh Makefile P! sed -e "s%LIBDIR%$(LIBDIR)%g" checkgroups.sh > checkgroups P #VMS /etc/unixtovms checkgroups P--- 363,365 ---- P checkgroups: checkgroups.sh Makefile P! sed -e "s%LIBDIR%$(DESTDIR)$(LIBDIR)%g" checkgroups.sh > checkgroups P #VMS /etc/unixtovms checkgroups P*************** P*** 400,411 **** P P! $(LIBDIR): P! mkdir $(LIBDIR) P! chmod 755 $(LIBDIR) P! chown $(NEWSUSR) $(LIBDIR) P! chgrp $(NEWSGRP) $(LIBDIR) P P! $(BINDIR): P! mkdir $(BINDIR) P! chmod 755 $(BINDIR) P! chown $(NEWSUSR) $(BINDIR) P! chgrp $(NEWSGRP) $(BINDIR) P--- 405,416 ---- P P! $(DESTDIR)$(LIBDIR): P! mkdir $(DESTDIR)$(LIBDIR) P! chmod 755 $(DESTDIR)$(LIBDIR) P! chown $(NEWSUSR) $(DESTDIR)$(LIBDIR) P! chgrp $(NEWSGRP) $(DESTDIR)$(LIBDIR) P P! $(DESTDIR)$(BINDIR): P! mkdir $(DESTDIR)$(BINDIR) P! chmod 755 $(DESTDIR)$(BINDIR) P! chown $(NEWSUSR) $(DESTDIR)$(BINDIR) P! chgrp $(NEWSGRP) $(DESTDIR)$(BINDIR) P PIndex: batch.c PPrereq: 1.19 P*** .d/batch.c Thu Oct 8 00:19:06 1987 P--- batch.c Mon Nov 30 18:47:06 1987 P*************** P*** 34,36 **** P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.19 10/7/87"; P #endif /* SCCSID */ P--- 34,36 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.20 11/30/87"; P #endif /* SCCSID */ P*************** P*** 113,116 **** P *cp = '\n'; P! if (sbuf.st_size == 0) P continue; P nbytes += sbuf.st_size; P--- 113,118 ---- P *cp = '\n'; P! if (sbuf.st_size == 0) { P! (void) fclose(nfd); P continue; P+ } P nbytes += sbuf.st_size; P*************** P*** 213,215 **** P P! #if !defined(BSD4_2) P rename(from, to) P--- 215,217 ---- P P! #ifndef RENAMESUB P rename(from, to) P*************** P*** 224,225 **** P } P! #endif /* !BSD4_2 */ P--- 226,227 ---- P } P! #endif /* !RENAMESUB */ P PIndex: checknews.c PPrereq: 2.30 P*** .d/checknews.c Sun Oct 18 18:02:57 1987 P--- checknews.c Mon Nov 30 18:47:07 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.30 10/15/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)checknews.c 2.31 11/30/87"; P #endif /* SCCSID */ P*************** P*** 266,275 **** P continue; P- if (index(rcbuf, ',') != NULL) { P- if (verbose > 1) P- printf("Comma in %s newsrc line\n", bfr); P- else { P- isnews++; P- continue; P- } P- } P while (*ptr) P--- 266,267 ---- P*************** P*** 296,298 **** P } P! contin:; P } P--- 288,297 ---- P } P! if (index(rcbuf, ',') != NULL) { P! if (verbose > 1) P! printf("Comma in %s newsrc line\n", bfr); P! else { P! isnews++; P! continue; P! } P! } P } P PIndex: defs.dist PPrereq: 2.60 P*** .d/defs.dist Mon Nov 23 19:13:15 1987 P--- defs.dist Mon Nov 30 18:46:35 1987 P*************** P*** 16,18 **** P P! /* @(#)defs.dist 2.60 11/19/87 */ P P--- 16,18 ---- P P! /* @(#)defs.dist 2.61 11/30/87 */ P P*************** P*** 70,71 **** P--- 70,72 ---- P /* #define LOCKF /* If you have the lockf() sys call */ P+ /* #define LOCKING /* If you have the locking() sys call */ P /* #define DOGETUSER /* Always do 'getuser' so can't fake name */ P*************** P*** 74,75 **** P--- 75,77 ---- P /* #define READDIR /* your system has readdir() in libc */ P+ /* #define RENAMESUB /* your system has rename() in libc */ P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P PIndex: expire.c PPrereq: 2.56 P*** .d/expire.c Wed Nov 4 14:56:58 1987 P--- expire.c Mon Nov 30 18:47:10 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.56 11/4/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.57 11/30/87"; P #endif /* SCCSID */ P*************** P*** 97,99 **** P struct hbuf h; P! int rmlock(); P time_t today; P--- 97,99 ---- P struct hbuf h; P! int xxit(); P time_t today; P*************** P*** 114,116 **** P P! uid = pw->pw_uid; P if ((gp = getgrnam(NEWSGRP)) == NULL) P--- 114,116 ---- P P! duid = uid = pw->pw_uid; P if ((gp = getgrnam(NEWSGRP)) == NULL) P*************** P*** 117,119 **** P xerror("Cannot get NEWSGRP gr entry"); P! gid = gp->gr_gid; P (void) setgid(gid); P--- 117,119 ---- P xerror("Cannot get NEWSGRP gr entry"); P! dgid = gid = gp->gr_gid; P (void) setgid(gid); P*************** P*** 122,126 **** P if (signal(SIGHUP, SIG_IGN) != SIG_IGN) P! signal(SIGHUP, rmlock); P if (signal(SIGINT, SIG_IGN) != SIG_IGN) P! signal(SIGINT, rmlock); P expincr = DFLTEXP; P--- 122,128 ---- P if (signal(SIGHUP, SIG_IGN) != SIG_IGN) P! signal(SIGHUP, xxit); P if (signal(SIGINT, SIG_IGN) != SIG_IGN) P! signal(SIGINT, xxit); P! if (signal(SIGTERM, SIG_IGN) != SIG_IGN) P! signal(SIGTERM, xxit); P expincr = DFLTEXP; P*************** P*** 1205,1206 **** P--- 1207,1220 ---- P { P+ if (i) { P+ #ifdef DBM P+ char tempname[BUFLEN]; P+ (void) UNLINK(NARTFILE); P+ (void) sprintf(tempname,"%s.pag", NARTFILE); P+ (void) UNLINK(tempname); P+ (void) sprintf(tempname,"%s.dir", NARTFILE); P+ (void) UNLINK(tempname); P+ #else /* !DBM */ P+ (void) UNLINK(ARTFILE); P+ #endif /* !DBM */ P+ } P rmlock(); P PIndex: funcs.c PPrereq: 2.37 P*** .d/funcs.c Mon Nov 23 19:13:17 1987 P--- funcs.c Mon Nov 30 18:46:37 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.37 11/19/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.38 11/30/87"; P #endif /* SCCSID */ P*************** P*** 25,27 **** P #include <errno.h> P! #if defined(USG) || defined(BSD4_2) || defined(BSD4_1C) P #include <fcntl.h> P--- 25,27 ---- P #include <errno.h> P! #if defined(USG) || defined(BSD4_2) P #include <fcntl.h> P*************** P*** 432,434 **** P if (access(logfname, 0) == 0 && (logfile = fopen(logfname, "a")) != NULL) { P! #if defined(USG) || defined(BSD4_2) || defined(BSD4_1C) P int flags; P--- 432,434 ---- P if (access(logfname, 0) == 0 && (logfile = fopen(logfname, "a")) != NULL) { P! #if defined(USG) || defined(BSD4_2) P int flags; P*************** P*** 522,524 **** P P! #if !defined(BSD4_2) && !defined(BSD4_1C) P /* P--- 522,524 ---- P P! #ifdef MKDIRSUB P /* P*************** P*** 581,583 **** P } P! #endif /* !BSD4_2 && ! BSD4_1C */ P #ifndef USG P--- 581,597 ---- P } P! #endif /* !BSD4_2 */ P! P! #ifndef RENAMESUB P! rename(from,to) P! register char *from, *to; P! { P! (void) unlink(to); P! if (link(from, to) < 0) P! return -1; P! P! (void) unlink(from); P! return 0; P! } P! #endif /* !RENAMESUB */ P! P #ifndef USG P PIndex: funcs2.c PPrereq: 1.23 P*** .d/funcs2.c Wed Nov 4 14:57:12 1987 P--- funcs2.c Mon Nov 30 18:47:13 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.23 11/4/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.24 11/30/87"; P #endif /* SCCSID */ P*************** P*** 681,695 **** P #endif P- P- #if !defined(BSD4_2) P- rename(from,to) P- register char *from, *to; P- { P- (void) unlink(to); P- if (link(from, to) < 0) P- return -1; P- P- (void) unlink(from); P- return 0; P- } P- #endif /* !BSD4_2 */ P P--- 681,682 ---- P PIndex: getdate.y PPrereq: 2.16 P*** .d/getdate.y Wed Oct 7 16:51:38 1987 P--- getdate.y Mon Nov 30 18:47:14 1987 P*************** P*** 5,7 **** P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.16 9/24/87 */ P P--- 5,7 ---- P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.17 11/30/87 */ P P*************** P*** 559,561 **** P P! return sdate; P } P--- 559,565 ---- P P! /* P! ** Have to do *something* with a legitimate -1 so it's distinguishable P! ** from the error return value. (Alternately could set errno on error.) P! */ P! return (sdate == -1) ? 0 : sdate; P } P PIndex: ifuncs.c PPrereq: 2.67 P*** .d/ifuncs.c Mon Nov 23 19:13:21 1987 P--- ifuncs.c Tue Dec 1 16:29:57 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.67 11/19/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.69 12/1/87"; P #endif /* SCCSID */ P*************** P*** 407,409 **** P } else { P! ofp = xfopen(mktemp(TRANS), "w"); P if (afmt) { P--- 407,410 ---- P } else { P! MKTEMP(TRANS); P! ofp = xfopen(TRANS, "w"); P if (afmt) { P*************** P*** 726,728 **** P (void) strcpy(tempname, "/tmp/LTMP.XXXXXX"); P! (void) mktemp(tempname); P (void) strcpy(lockname, "/tmp/L"); P--- 727,729 ---- P (void) strcpy(tempname, "/tmp/LTMP.XXXXXX"); P! MKTEMP(tempname); P (void) strcpy(lockname, "/tmp/L"); P*************** P*** 1112,1114 **** P free(ngs[i]); P! if (ngsbug[i] < tbuf || ngsbug[i] > &tbuf[sizeof tbuf - 1]) P free(ngsbug[i]); P--- 1113,1116 ---- P free(ngs[i]); P! if (ngsbug[i] != NULL && P! (ngsbug[i] < tbuf || ngsbug[i] > &tbuf[sizeof tbuf - 1])) P free(ngsbug[i]); P*************** P*** 1140,1145 **** P mfd = fopen(mfn, "r"); P! if (mfd != NULL) P! while ((!ret) && fscanf(mfd, "%[^:]:%s\n", mgrp, mlist) != EOF) { P! if (feof(mfd)) break; P! if (mgrp[0] == '#') continue; P if (!STRCMP(ngname, mgrp)) { P--- 1142,1150 ---- P mfd = fopen(mfn, "r"); P! if (mfd == NULL) P! return FALSE; P! while ((!ret) && fscanf(mfd, "%[^:]:%s\n", mgrp, mlist) != EOF) { P! if (feof(mfd)) P! break; P! if (mgrp[0] == '#') P! continue; P if (!STRCMP(ngname, mgrp)) { P*************** P*** 1147,1161 **** P && (ret == FALSE)) { P! if (*p == ',') { P *p = '\0'; P- p++; P- } P- if (*p == '\\') { P- *p = '\0'; P- p++; P- if (!grplist) P- grplist = getgrplist(user); P- if (ngmatch(p,grplist)) ret = TRUE; P- } else if (!STRCMP(p, user)) P- ret = TRUE; P- *p = '\0'; P } P--- 1152,1164 ---- P && (ret == FALSE)) { P! if (*p == ',') P! *p++ = '\0'; P! if (*p == '\\') { P! *p++ = '\0'; P! if (!grplist) P! grplist = getgrplist(user); P! if (ngmatch(p,grplist)) P! ret = TRUE; P! } else if (!STRCMP(p, user)) P! ret = TRUE; P *p = '\0'; P } P*************** P*** 1303,1306 **** P break; /* fits in buffer */ P! if (!tfilename) P! tfilename = mktemp("/tmp/unbnewsXXXXXX"); P if ((fd = creat(tfilename, 0666)) < 0) { P--- 1306,1311 ---- P break; /* fits in buffer */ P! if (!tfilename) { P! tfilename = "/tmp/unbnewsXXXXXX"; P! MKTEMP(tfilename); P! } P if ((fd = creat(tfilename, 0666)) < 0) { P*************** P*** 1385,1387 **** P while ((wpid = wait(&exstat)) >= 0 && wpid != pid); P! (void) unlink(tfilename); P } while (fgets(cmd, BUFLEN, infp) != NULL); P--- 1390,1393 ---- P while ((wpid = wait(&exstat)) >= 0 && wpid != pid); P! if (tfilename) P! (void) unlink(tfilename); P } while (fgets(cmd, BUFLEN, infp) != NULL); P PIndex: inews.c PPrereq: 2.84 P*** .d/inews.c Mon Nov 23 19:13:24 1987 P--- inews.c Mon Nov 30 18:46:43 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.84 11/19/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.85 11/30/87"; P #endif /* SCCSID */ P*************** P*** 100,102 **** P FILE *mailhdr(); P! extern int errno; P P--- 100,102 ---- P FILE *mailhdr(); P! extern int errno, xxit(); P P*************** P*** 187,188 **** P--- 187,189 ---- P } P+ (void) signal(SIGTERM, xxit); P if (argc > 1 && !STRCMP(*(argv+1), "-U")) { P*************** P*** 676,678 **** P (void) sprintf(sfile, "%s/.spXXXXXX", SPOOL); P! sp = xfopen(mktemp(sfile), "w"); P if (batchcmd != NULL) { P--- 677,680 ---- P (void) sprintf(sfile, "%s/.spXXXXXX", SPOOL); P! MKTEMP(sfile); P! sp = xfopen(sfile, "w"); P if (batchcmd != NULL) { P*************** P*** 933,935 **** P /* Write article to temp file. */ P! tfp = xfopen(mktemp(ARTICLE), "w"); P P--- 935,938 ---- P /* Write article to temp file. */ P! MKTEMP(ARTICLE); P! tfp = xfopen(ARTICLE, "w"); P P*************** P*** 1157,1159 **** P P! tmpfp = xfopen(mktemp(INFILE), "w"); P for ( ; ; ) { P--- 1160,1163 ---- P P! MKTEMP(INFILE); P! tmpfp = xfopen(INFILE, "w"); P for ( ; ; ) { P PIndex: nntp.c PPrereq: 2.3 P*** .d/nntp.c Wed Nov 4 14:57:39 1987 P--- nntp.c Mon Nov 30 18:47:16 1987 P*************** P*** 16,18 **** P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.3 11/4/87"; P #endif /* SCCSID */ P--- 16,18 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.4 11/30/87"; P #endif /* SCCSID */ P*************** P*** 79,81 **** P strcpy(active_file_name, "/tmp/nsact.XXXXXX"); P! (void) mktemp(active_file_name); /* make a temporary name */ P openfp = fopen(active_file_name, "w+"); /* and get ready */ P--- 79,81 ---- P strcpy(active_file_name, "/tmp/nsact.XXXXXX"); P! MKTEMP(active_file_name); /* make a temporary name */ P openfp = fopen(active_file_name, "w+"); /* and get ready */ P*************** P*** 236,237 **** P--- 236,238 ---- P */ P+ void P sync_server() P PIndex: params.h PPrereq: 2.27 P*** .d/params.h Mon Nov 23 19:13:28 1987 P--- params.h Mon Nov 30 18:46:45 1987 P*************** P*** 4,6 **** P P! /* @(#)params.h 2.27 11/19/87 */ P P--- 4,6 ---- P P! /* @(#)params.h 2.28 11/30/87 */ P P*************** P*** 16,18 **** P P! #if defined(BSD4_2) || defined(BSD4_1C) P #include <sys/time.h> P--- 16,18 ---- P P! #ifdef BSD4_2 P #include <sys/time.h> P*************** P*** 87,89 **** P extern struct passwd *getpwnam(), *getpwuid(), *getpwent(); P! extern struct group *getgrnam(); P extern time_t time(), getdate(), cgtdate(); P--- 87,90 ---- P extern struct passwd *getpwnam(), *getpwuid(), *getpwent(); P! extern struct group *getgrnam(), *getgrent(); P! extern void setgrent(); P extern time_t time(), getdate(), cgtdate(); P*************** P*** 127,128 **** P--- 128,136 ---- P #ifdef M_XENIX P+ #define LOCKING P+ #endif M_XENIX P+ P+ #ifdef LOCKING P+ # ifndef LOCKF P+ # define LOCKF P+ # endif /* LOCKF */ P /* fake SVID adivsory locking with xenix routines */ P*************** P*** 132,134 **** P #define F_TLOCK 4 P! #endif /* M_XENIX */ P P--- 140,142 ---- P #define F_TLOCK 4 P! #endif /* LOCKING */ P P*************** P*** 135,137 **** P #ifdef IHCC P! #define DOGETUSERS P #define LOGDIR P--- 143,145 ---- P #ifdef IHCC P! #define DOGETUSER P #define LOGDIR P*************** P*** 140,143 **** P #ifdef BSD4_2 P! #define MKDIR_SUB P #define READDIR P #endif /* BSD4_2 */ P--- 148,152 ---- P #ifdef BSD4_2 P! #define MKDIRSUB P #define READDIR P+ #define RENAMESUB P #endif /* BSD4_2 */ P*************** P*** 161,162 **** P--- 170,172 ---- P #define PREFIX(a,b) ((charmap[*(a)] != charmap[*(b)]) ? FALSE : prefix((a)+1, (b)+1)) P+ #define MKTEMP(a) {if (mktemp(a) == 0) xerror("mktemp(%s): ", a);} P P PIndex: postnews.c PPrereq: 1.35 P*** .d/postnews.c Mon Nov 23 19:13:31 1987 P--- postnews.c Mon Nov 30 18:46:47 1987 P*************** P*** 19,21 **** P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.35 11/19/87"; P #endif /* SCCSID */ P--- 19,21 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.36 11/30/87"; P #endif /* SCCSID */ P*************** P*** 449,451 **** P (void) strcpy(tempfname, "/tmp/postXXXXXX"); P! (void) mktemp(tempfname); P P--- 449,451 ---- P (void) strcpy(tempfname, "/tmp/postXXXXXX"); P! MKTEMP(tempfname); P P*************** P*** 887,889 **** P P! mktemp(temp2fname); P P--- 887,889 ---- P P! MKTEMP(temp2fname); P P*************** P*** 1115,1118 **** P P! (void) mktemp(headerfile); P! (void) mktemp(codedfile); P P--- 1115,1118 ---- P P! MKTEMP(headerfile); P! MKTEMP(codedfile); P P*************** P*** 1201,1214 **** P } P- P- #if !defined(BSD4_2) P- rename(from,to) P- register char *from, *to; P- { P- (void) unlink(to); P- if (link(from, to) < 0) P- return -1; P- P- (void) unlink(from); P- return 0; P- } P- #endif /* !BSD4_2 && ! BSD4_1C */ P--- 1201 ---- P PIndex: process.c PPrereq: 2.18 P*** .d/process.c Mon Nov 23 19:13:32 1987 P--- process.c Mon Nov 30 18:46:48 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.18 11/19/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)process.c 2.19 11/30/87"; P #endif /* SCCSID */ P*************** P*** 40,42 **** P 'h', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, P- 'A', '\0', FALSE, OPTION, UNKNOWN, UNKNOWN,(char *)NULL, P #ifdef TMAIL P--- 40,41 ---- P*************** P*** 50,51 **** P--- 49,51 ---- P 'K', '\0', FALSE, OPTION, ANY, UNKNOWN,(char *)NULL, P+ 'A', '\0', FALSE, OPTION, UNKNOWN, UNKNOWN,(char *)NULL, P '\0', '\0', 0, 0, 0, 0, (char *)NULL P PIndex: readr.c PPrereq: 2.65 P*** .d/readr.c Wed Nov 4 14:58:08 1987 P--- readr.c Mon Nov 30 18:47:21 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.65 11/4/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.66 11/30/87"; P #endif /* SCCSID */ P*************** P*** 118,120 **** P (void) umask(022); P! (void) mktemp(outfile); /* get "unique" file name */ P (void) close(creat(outfile,0666)); P--- 118,120 ---- P (void) umask(022); P! MKTEMP(outfile); /* get "unique" file name */ P (void) close(creat(outfile,0666)); P*************** P*** 776,778 **** P (void) strcpy(tf, tft); P! (void) mktemp(tf); P P--- 776,778 ---- P (void) strcpy(tf, tft); P! MKTEMP(tf); P P PIndex: recnews.c PPrereq: 2.16 P*** .d/recnews.c Mon Nov 23 19:13:33 1987 P--- recnews.c Fri Dec 4 02:47:46 1987 P*************** P*** 50,52 **** P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.16 11/19/87"; P #endif /* SCCSID */ P--- 50,52 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.18 12/4/87"; P #endif /* SCCSID */ P*************** P*** 96,98 **** P int fromset; /* from passed on command line */ P! char cmdbuf[BFSZ]; /* command to popen */ P P--- 96,98 ---- P int fromset; /* from passed on command line */ P! char cmdbuf[BFSZ]; /* command to pipeopen */ P P*************** P*** 99,101 **** P extern char *strcat(), *strcpy(), *index(); P! extern FILE *popen(); P char *any(); P--- 99,101 ---- P extern char *strcat(), *strcpy(), *index(); P! FILE *pipeopen(); P char *any(); P*************** P*** 183,186 **** P case INCLUSIVE: P! sprintf(cmdbuf,"exec %s%s -p", inews, not_this_site); P! pipe = popen(cmdbuf,"w"); P if (pipe == NULL){ P--- 183,186 ---- P case INCLUSIVE: P! sprintf(cmdbuf,"%s%s -p", inews, not_this_site); P! pipe = pipeopen(cmdbuf); P if (pipe == NULL){ P*************** P*** 203,205 **** P sprintf(cmdbuf, P! "exec %s -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P inews, *subject ? subject : "(none)", P--- 203,205 ---- P sprintf(cmdbuf, P! "%s -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P inews, *subject ? subject : "(none)", P*************** P*** 210,214 **** P #else P! pipe = popen(cmdbuf, "w"); P if (pipe == NULL) { P! perror("recnews: popen failed"); P exit(1); P--- 210,214 ---- P #else P! pipe = pipeopen(cmdbuf); P if (pipe == NULL) { P! perror("recnews: pipeopen failed"); P exit(1); P*************** P*** 231,233 **** P sprintf(cmdbuf, P! "exec \"%s\" -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P inews, subject, newsgroup, from, approved, P--- 231,233 ---- P sprintf(cmdbuf, P! "%s -t \"%s\" -n \"%s\" -f \"%s\"%s%s", P inews, subject, newsgroup, from, approved, P*************** P*** 238,240 **** P #else P! pipe = popen(cmdbuf, "w"); P if (pipe == NULL) { P--- 238,240 ---- P #else P! pipe = pipeopen(cmdbuf); P if (pipe == NULL) { P*************** P*** 251,252 **** P--- 251,253 ---- P } P+ pipeclose(pipe); P exit(0); P*************** P*** 340,341 **** P--- 341,436 ---- P return(NULL); P+ } P+ P+ /* P+ * This is similar to open, but made more secure. Rather than P+ * forking off a shell, you get a bare process. P+ * You can use "" to get white space into an argument, but P+ * nothing else is recognized P+ */ P+ P+ #define RDR 0 P+ #define WTR 1 P+ #define MAXARGS 20 P+ static int mopen_pid[20]; P+ P+ FILE * P+ pipeopen(cmd) P+ register char *cmd; P+ { P+ int p[2]; P+ register myside, hisside, pid; P+ P+ if(pipe(p) < 0) P+ return NULL; P+ myside = p[WTR]; P+ hisside = p[RDR]; P+ if ((pid = vfork()) == 0) { P+ char *args[MAXARGS]; P+ register char **ap = args; P+ P+ /* myside and hisside reverse roles in child */ P+ (void) close(myside); P+ (void) close(0); P+ (void) dup(hisside); P+ (void) close(hisside); P+ (void) setgid(getgid()); P+ (void) setuid(getuid()); P+ P+ while (isspace(*cmd)) P+ cmd++; P+ P+ while (*cmd != '\0') { P+ *ap++ = cmd; P+ if (ap >= &args[MAXARGS]) { P+ fprintf(stderr, "Too many args to %s", args[0]); P+ _exit(2); P+ } P+ while (*cmd && !isspace(*cmd)) { P+ if (*cmd++ == '"') { P+ register char *bcp = cmd-1; P+ while (*cmd && *cmd != '"') P+ *bcp++ = *cmd++; P+ *bcp = '\0'; P+ cmd++; P+ } P+ } P+ if (*cmd) P+ *cmd++ = '\0'; P+ while (isspace(*cmd)) P+ cmd++; P+ } P+ *ap = (char *)NULL; P+ P+ execv(args[0], args); P+ perror("pipeopen exec:"); P+ _exit(1); P+ } P+ P+ if(pid == -1) P+ return NULL; P+ P+ mopen_pid[myside] = pid; P+ (void) close(hisside); P+ return fdopen(myside, "w"); P+ } P+ P+ pipeclose(ptr) P+ FILE *ptr; P+ { P+ register f, r, (*hstat)(), (*istat)(), (*qstat)(); P+ int status; P+ P+ f = fileno(ptr); P+ (void) fclose(ptr); P+ istat = signal(SIGINT, SIG_IGN); P+ qstat = signal(SIGQUIT, SIG_IGN); P+ hstat = signal(SIGHUP, SIG_IGN); P+ while((r = wait(&status)) != mopen_pid[f] && r != -1) P+ ; P+ if(r == -1) P+ status = -1; P+ signal(SIGINT, istat); P+ signal(SIGQUIT, qstat); P+ signal(SIGHUP, hstat); P+ return status; P } P PIndex: rfuncs.c PPrereq: 2.43 P*** .d/rfuncs.c Wed Nov 4 14:58:24 1987 P--- rfuncs.c Mon Nov 30 18:47:24 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.43 11/4/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.44 11/30/87"; P #endif /* SCCSID */ P*************** P*** 253,255 **** P P! ofp = xfopen(mktemp(outfile), "w"); P if (aflag && *datebuf) P--- 253,256 ---- P P! MKTEMP(outfile); P! ofp = xfopen(outfile, "w"); P if (aflag && *datebuf) P*************** P*** 332,334 **** P (void) signal(SIGTERM, catchterm); P! (void) sprintf(bfr, "%s -f %s -T %s", TMAIL, outfile, mktemp(infile)); P fwait(fsubr(ushell, bfr, (char *)NULL)); P--- 333,336 ---- P (void) signal(SIGTERM, catchterm); P! MKTEMP(infile); P! (void) sprintf(bfr, "%s -f %s -T %s", TMAIL, outfile, infile); P fwait(fsubr(ushell, bfr, (char *)NULL)); P*************** P*** 632,634 **** P /* make a new sorted copy of ACTIVE */ P! nfp = fopen(mktemp(newactivename), "w"); P (void) chmod(newactivename, 0600); P--- 634,637 ---- P /* make a new sorted copy of ACTIVE */ P! MKTEMP(newactivename); P! nfp = fopen(newactivename, "w"); P (void) chmod(newactivename, 0600); P PIndex: rfuncs2.c PPrereq: 1.35 P*** .d/rfuncs2.c Tue Mar 24 13:51:56 1987 P--- rfuncs2.c Mon Nov 30 18:47:25 1987 P*************** P*** 18,20 **** P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.35 3/21/87"; P #endif /* SCCSID */ P--- 18,20 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.36 11/30/87"; P #endif /* SCCSID */ P*************** P*** 365,367 **** P strcpy(TRANS, "/tmp/trXXXXXX"); P! ofp = xfopen(mktemp(TRANS), "w"); P if (index(sp->s_flags, 'A') == NULL) P--- 365,368 ---- P strcpy(TRANS, "/tmp/trXXXXXX"); P! MKTEMP(TRANS); P! ofp = xfopen(TRANS, "w"); P if (index(sp->s_flags, 'A') == NULL) P PIndex: sendbatch.sh PPrereq: 1.14 P*** .d/sendbatch.sh Wed Nov 4 14:58:27 1987 P--- sendbatch.sh Tue Dec 1 18:51:34 1987 P*************** P*** 1,2 **** P! : '@(#)sendbatch.sh 1.14 11/4/87' P P--- 1,2 ---- P! : '@(#)sendbatch.sh 1.16 12/1/87' P P*************** P*** 4,6 **** P--- 4,8 ---- P LIM=50000 P+ MINDF=MINDISKFREE P MAXBATCH=MAXPERBATCH P+ SPOOLDISK=SPOOL_DISK P CMD='LIBDIR/batch BATCHDIR/$rmt $BLIM' P*************** P*** 38,40 **** P P! if [ -s /tmp/uuq.output ] ; then P q=`echo "$rmt" | sed 's/\(.......\).*/\1/'` P--- 40,51 ---- P P! df=`df $SPOOLDISK | awk "\\$6 == \\"$SPOOLDISK\" {print \\$4} P! \\$1 == \\"$SPOOLDISK\\" {print \\$3}"` P! if test ! -z "$df" -a \( "$df" -lt $MINDF \) P! then P! echo not enough space on $SPOOLDISK: $df P! continue P! fi P! P! if test -s /tmp/uuq.output P! then P q=`echo "$rmt" | sed 's/\(.......\).*/\1/'` P*************** P*** 41,43 **** P q=`awk "\\$1 == \\"$q:\\" { print \\$4;exit}" </tmp/uuq.output` P! if [ ! -z "$q" -a \( "$q" -gt $MAXBATCH \) ] ; P then P--- 52,54 ---- P q=`awk "\\$1 == \\"$q:\\" { print \\$4;exit}" </tmp/uuq.output` P! if test ! -z "$q" -a \( "$q" -gt $MAXBATCH \) P then P PIndex: visual.c PPrereq: 1.39 P*** .d/visual.c Wed Nov 4 14:58:50 1987 P--- visual.c Mon Nov 30 18:47:31 1987 P*************** P*** 6,8 **** P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.39 11/4/87"; P #endif /* SCCSID */ P--- 6,8 ---- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.40 11/30/87"; P #endif /* SCCSID */ P*************** P*** 191,193 **** P xxit(1); P! (void) mktemp(tfname); P (void) close(creat(tfname,0666)); P--- 191,193 ---- P xxit(1); P! MKTEMP(tfname); P (void) close(creat(tfname,0666)); P*************** P*** 1005,1007 **** P (void) strcpy(tf, tft); P! (void) mktemp(tf); P (void) close(creat(tf,0600)); P--- 1005,1007 ---- P (void) strcpy(tf, tft); P! MKTEMP(tf); P (void) close(creat(tf,0600)); P*************** P*** 2608,2610 **** P (void) strcpy(temp, "/tmp/vnXXXXXX"); P! (void) mktemp(temp); P fname = temp; P--- 2608,2610 ---- P (void) strcpy(temp, "/tmp/vnXXXXXX"); P! MKTEMP(temp); P fname = temp; P PIndex: patchlevel.h PPrereq: 13 P*** .d/patchlevel.h Mon Nov 23 19:13:35 1987 P--- patchlevel.h Mon Nov 30 18:47:32 1987 P*************** P*** 1,3 **** P! #define PATCHLEVEL 13 P P! #define NEWS_VERSION "B 2.11 11/19/87" P--- 1,3 ---- P! #define PATCHLEVEL 14 P P! #define NEWS_VERSION "B 2.11 12/1/87" P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.15... ' sed 's/^P//' >patch.15 <<\PSHAREND PFrom rick@uunet.UU.NET Tue Jan 24 22:26:05 1989 PPath: uunet!rick PFrom: rick@uunet.UU.NET (Rick Adams) PNewsgroups: news.software.b PSubject: Patch #15 for news 2.11 source PMessage-ID: <47348@uunet.UU.NET> PDate: 25 Jan 89 03:26:05 GMT POrganization: UUNET Communications Services, Arlington, VA PLines: 2606 P PDescription: P This single logical patch is being distributed as 3 physical P patches. You MUST install patches 15, 16 and 17 or P things won't compile. P P*** You MUST do "make update" after the "make install". P P These are patches #15, 16 & 17 for news 2.11 source. They P address the following problems: P P better integrates NFS support P better handling of "make install" P checkgroups doesn't generate the leading "|" in P egrep "|whatever" any more. P fixes the 'l' and 'L' commands of vnews and readnews. Formerly, P they were always one less than they should have been. P better handling of errors for compress/uncompress/zcat P rename MANUALLY to NORMGROUPS for consistency. P NONEWGROUPS and NORMGROUPS are now defined as a pattern, so P you can say something like: P #define NONEWGROUPS "comp,sci,news" P and it will send you mail for newgroup messages in those P groups and go ahead and do the newgroup for those that P don't match. You get the old behavior by defining them P as the pattern "all". P control messages that send you mail now include the body of the P control message in the mail. P systems with signals returning void* instead of int* can define P VOIDSIGNALS in defs.h P 4.3 BSD based systems can define SYSLOG to use the syslog P facility in place of the usual logging. (Very handy P with a network of machines and 1 admin.) P If ALLOW_LIB_EXECS is not defined (default) arbitrary commands P in /usr/lib/news will not be executable as P batch commands. If it is defined, the previous behavior occurs. P expire is much faster and no longer loses the history of expired P articles when doing a rebuild (expire -r) P expire now accepts arguments expressing time in floating point P days instead of int. So, expire -e 0.5 would expire P things over 12 hours old (Yes there are sites that do this) P fullname now better handles hyphenated names. P many places now do a much better job of checking buffer P overflow, especially when reading in a new article and P parsing the sys file. P when unparsable dates are found, the offending file name is logged. P getdate better handles some forms of dates. It was P previously confusing years with numerical time zone offsets P in some cases. P message-ids now can only contain printing characters. P messages received from OTHER machines with "local" distribution P are rejected. "local" articles should NEVER leave your P machine. local means local to that machine, not your site. P You can now transmit articles based on size. If >XXX or < YYY appear P in the third field of the sys file, then the P article will only be transmitted if the size > XXX. P E.g. P site1:world,comp:IF>50000 P site1:world,comp:F P would send all articles > 50,000 bytes via ihave/sendme P and the rest "immediately" via normal batching. P /usr/spool/news isn't clutter up by temporary and failed articles P any more. /usr/spool/news/.tmp and /usr/spool/news/.bad P get the temp and bad articles respectively. P locking is handled a little better. P Inews insists on a followup-to: line being present of you P are following up to an article posted to multiple P groups. This will only affect followups to your followup. P Similarly, postnews asks (but doesn't insist) you P to specify a folloup group. P recnews may finally get quoted arguments right. P sendbatch has lots of new options, all off by default. Look at P the shell script if you want to know what they are. P uurec is a little better at catching forged articles. P define DIRENT if your system uses struct dirent instead of struct direct P PFix: P cd to the src directory and apply the following patch P THEN apply patch 16 as well. P ********************************************************** P * You MUST do "make update" after the "make install" * P ********************************************************** P PIndex: Makefile.dst PPrereq: 1.30 P*** old/Makefile.dst Fri Dec 4 02:51:51 1987 P--- Makefile.dst Thu Jan 19 00:04:22 1989 P*************** P*** 1,2 P! # '@(#)Makefile.dst 1.30 12/1/87' P # Generic Makefile. P P--- 1,2 ----- P! # '@(#)Makefile.dst 1.33 1/19/89' P # Generic Makefile. P*************** P*** 34,36 P P! #NNTP NNTPDIR = NNTPSRC P P P--- 34,36 ----- P P! #NNTP NNTPDIR = NNTPLOC P P*************** P*** 46,47 P #NFSCLIENT INST = nfs P P P--- 46,48 ----- P #NFSCLIENT INST = nfs P+ #NNTP INST = nntp P P*************** P*** 99,101 P OBJECTS = funcs.o funcs2.o header.o ndir.o $(MISC) getdate.o P! IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o \ P $(OBJECTS) ipathinit.o P P--- 100,102 ----- P OBJECTS = funcs.o funcs2.o header.o ndir.o $(MISC) getdate.o P! IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o elock.o \ P $(OBJECTS) ipathinit.o P*************** P*** 107,110 P $(OBJECTS) visual.o virtterm.o rpathinit.o P! EXPOBJS = expire.o header.o funcs.o getdate.o iextern.o \ P! funcs2.o ndir.o $(MISC) epathinit.o P P P--- 108,111 ----- P $(OBJECTS) visual.o virtterm.o rpathinit.o P! EXPOBJS = expire.o header.o funcs.o getdate.o iextern.o elock.o \ P! funcs2.o ndir.o $(MISC) epathinit.o P P*************** P*** 113,115 P SRCS = funcs.c funcs2.c header.c P! ISRCS = inews.c ifuncs.c iextern.c control.c fullname.c $(SRCS) P PSRCS = postnews.c rextern.c funcs.c $(CSRCS) P P--- 114,116 ----- P SRCS = funcs.c funcs2.c header.c P! ISRCS = inews.c ifuncs.c iextern.c control.c fullname.c elock.c $(SRCS) P PSRCS = postnews.c rextern.c funcs.c $(CSRCS) P*************** P*** 119,121 P visual.c virtterm.c $(CSRCS) P! ESRCS = expire.c header.c funcs.c iextern.c \ P funcs2.c P P--- 120,122 ----- P visual.c virtterm.c $(CSRCS) P! ESRCS = expire.c header.c funcs.c iextern.c elock.c \ P funcs2.c P*************** P*** 130,131 P NFSOTHERS = inews P OTHERS = $(NFSOTHERS) $(UTILS) $(SCRIPTS) P P--- 131,133 ----- P NFSOTHERS = inews P+ NNTPOTHERS = P OTHERS = $(NFSOTHERS) $(UTILS) $(SCRIPTS) P*************** P*** 140,141 P P install: $(INST)install P P--- 142,145 ----- P P+ nntpall: $(P) $(NNTPOTHERS) $(COMMANDS) P+ P install: $(INST)install P*************** P*** 147,149 P for i in $(COMMANDS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(BINDIR); \ P P--- 151,153 ----- P for i in $(COMMANDS); do \ P! ./installit -c -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(BINDIR); \ P*************** P*** 150,152 P done P! cp help vnews.help $(DESTDIR)$(LIBDIR) P for i in $(UTILS); do \ P P--- 154,159 ----- P done P! for i in help vnews.help; do \ P! ./installit -c -m 644 -o $(NEWSUSR) -g $(NEWSGRP) $$i\ P! $(DESTDIR)$(LIBDIR); \ P! done P for i in $(UTILS); do \ P*************** P*** 152,154 P for i in $(UTILS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(LIBDIR); \ P P--- 159,161 ----- P for i in $(UTILS); do \ P! ./installit -c -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(LIBDIR); \ P*************** P*** 156,158 P for i in $(SCRIPTS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) $$i \ P $(DESTDIR)$(LIBDIR); \ P P--- 163,165 ----- P for i in $(SCRIPTS); do \ P! ./installit -c -m 755 -o $(NEWSUSR) -g $(NEWSGRP) $$i \ P $(DESTDIR)$(LIBDIR); \ P*************** P*** 159,161 P done P! ./installit -m 6755 -o $(NEWSUSR) -g $(NEWSGRP) -s inews \ P $(DESTDIR)$(LIBDIR) P P--- 166,168 ----- P done P! ./installit -c -m 6755 -o $(NEWSUSR) -g $(NEWSGRP) -s inews \ P $(DESTDIR)$(LIBDIR) P*************** P*** 172,174 P for i in $(COMMANDS); do \ P! ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(BINDIR); \ P P--- 179,181 ----- P for i in $(COMMANDS); do \ P! ./installit -c -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P $(DESTDIR)$(BINDIR); \ P*************** P*** 176,178 P cp help vnews.help $(DESTDIR)$(LIBDIR) P! ./installit -m 6755 -o root -g $(NEWSGRP) -s inews \ P $(DESTDIR)$(LIBDIR) P P--- 183,185 ----- P cp help vnews.help $(DESTDIR)$(LIBDIR) P! ./installit -c -m 6755 -o root -g $(NEWSGRP) -s inews \ P $(DESTDIR)$(LIBDIR) P*************** P*** 181,182 P P defs.h: defs.dist localize.sh Makefile.dst Makefile P P--- 188,200 ----- P P+ nntpinstall: nntpall help vnews.help P+ chmod 755 ./installit P+ -test -d $(DESTDIR)$(BINDIR) || mkdir $(DESTDIR)$(BINDIR) P+ -test -d $(DESTDIR)$(LIBDIR) || mkdir $(DESTDIR)$(LIBDIR) P+ for i in $(COMMANDS); do \ P+ ./installit -m 755 -o $(NEWSUSR) -g $(NEWSGRP) -s $$i \ P+ $(DESTDIR)$(BINDIR); \ P+ done P+ cp help vnews.help $(DESTDIR)$(LIBDIR) P+ #VMS vms -v @euninstal P+ P defs.h: defs.dist localize.sh Makefile.dst Makefile P*************** P*** 194,196 P fullupdate: install.sh makeactive.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(NEWSUSR) $(DESTDIR)$(NEWSGRP) $(DESTDIR)$(OSTYPE) P chmod 6755 $(DESTDIR)$(LIBDIR)/inews P P--- 212,214 ----- P fullupdate: install.sh makeactive.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) P chmod 6755 $(DESTDIR)$(LIBDIR)/inews P*************** P*** 198,200 P nfsupdate: install.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(NEWSUSR) $(DESTDIR)$(NEWSGRP) $(DESTDIR)$(OSTYPE) $(DESTDIR)$(NFSSPOOLDIR) $(DESTDIR)$(NFSLIBDIR) P chown root $(DESTDIR)$(LIBDIR)/inews P P--- 216,218 ----- P nfsupdate: install.sh P! sh install.sh $(DESTDIR)$(SPOOLDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(NEWSUSR) $(NEWSGRP) $(OSTYPE) $(DESTDIR)$(NFSSPOOLDIR) $(DESTDIR)$(NFSLIBDIR) P chown root $(DESTDIR)$(LIBDIR)/inews P*************** P*** 202,204 P P! P clean: P P--- 220,224 ----- P P! nntpupdate: P! @echo "There is no update for NNTP clients as yet." P! P clean: P*************** P*** 245,247 P getdate.o: getdate.y defs.h P! @echo "expect 8 shift/reduce conflicts" P yacc getdate.y P P--- 265,267 ----- P getdate.o: getdate.y defs.h P! @echo "expect 5 shift/reduce conflicts" P yacc getdate.y P*************** P*** 382,384 P P! digest.o: digest.c Makefile P $(CC) $(CFLAGS) -c digest.c P P--- 402,404 ----- P P! digest.o: digest.c rparams.h defs.h Makefile P $(CC) $(CFLAGS) -c digest.c P*************** P*** 384,385 P $(CC) $(CFLAGS) -c digest.c P P P--- 404,408 ----- P $(CC) $(CFLAGS) -c digest.c P+ P+ elock.o: elock.c params.h defs.h Makefile P+ $(CC) $(CFLAGS) -c elock.c P PIndex: batch.c PPrereq: 1.20 P*** old/batch.c Fri Dec 4 02:51:54 1987 P--- batch.c Wed Jan 18 14:28:51 1989 P*************** P*** 1,2 P- P /* P P--- 1 ----- P /* P*************** P*** 2,4 P /* P! * This software is Copyright (c) 1985 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1985, 1989 by Rick Adams. P * P*************** P*** 34,36 P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.20 11/30/87"; P #endif /* SCCSID */ P P--- 33,35 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.23 1/18/89"; P #endif /* SCCSID */ P*************** P*** 62,63 P long atol(); P char fname[512]; P P--- 61,63 ----- P long atol(); P+ int spooldirlen = strlen(SPOOLDIR); P char fname[512]; P*************** P*** 94,95 P P if (argc > 2) P P--- 94,100 ----- P P+ if (chdir(SPOOLDIR) < 0) { P+ logerror("chdir(%s): %s", workfile, sys_errlist[errno]); P+ exit(1); P+ } P+ P if (argc > 2) P*************** P*** 105,107 P continue; P! nfd = fopen(fname, "r"); P if (nfd == NULL) { P P--- 110,117 ----- P continue; P! /* this optimization speeds up batching significantly */ P! if (fname[0] == '/' && fname[spooldirlen-1] == '/') P! nfd = fopen(&fname[spooldirlen], "r"); P! else P! nfd = fopen(fname, "r"); P! P if (nfd == NULL) { P*************** P*** 172,173 P exit(0); P } P P--- 182,184 ----- P exit(0); P+ /*NOTREACHED*/ P } P PIndex: checkgroups.sh PPrereq: 1.24 P*** old/checkgroups.sh Wed Nov 4 14:56:19 1987 P--- checkgroups.sh Sun Jan 15 19:48:29 1989 P*************** P*** 1,3 P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.24 11/4/87' P P P--- 1,3 ----- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.25 1/15/89' P P*************** P*** 30,31 P cp /dev/null /tmp/$$b P sed -e "s;[ ].*;;" -e "s;\..*;;" -e "s;^!;;" /tmp/$$msg | sort -u | P P--- 30,32 ----- P cp /dev/null /tmp/$$b P+ pipe='' P sed -e "s;[ ].*;;" -e "s;\..*;;" -e "s;^!;;" /tmp/$$msg | sort -u | P*************** P*** 34,36 P group=`cat /tmp/$$b` P! group="${group}|^$dist[. ]" P echo "${group}" > /tmp/$$b P P--- 35,37 ----- P group=`cat /tmp/$$b` P! group="${group}${pipe}^$dist[. ]" P echo "${group}" > /tmp/$$b P*************** P*** 36,37 P echo "${group}" > /tmp/$$b P done P P--- 37,39 ----- P echo "${group}" > /tmp/$$b P+ pipe='|' P done P*************** P*** 73,75 P echo "# You can remove them by executing the commands:" P! echo \ LIBDIR/rmgroup `cat /tmp/$$remove` P echo "" P P--- 75,80 ----- P echo "# You can remove them by executing the commands:" P! for i in `cat /tmp/$$remove` P! do P! echo " LIBDIR/rmgroup $i" P! done P echo "" P PIndex: compress.c PPrereq: 1.14 P*** old/compress.c Wed Oct 7 16:49:22 1987 P--- compress.c Sun Jan 15 19:48:54 1989 P*************** P*** 1,3 P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.14 9/24/87"; P #endif /* SCCSID */ P P--- 1,3 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)compress.c 1.15 1/15/89"; P #endif /* SCCSID */ P*************** P*** 438,439 P if ((freopen(*fileptr, "r", stdin)) == NULL) { P perror(*fileptr); continue; P P--- 438,440 ----- P if ((freopen(*fileptr, "r", stdin)) == NULL) { P+ exit_stat = 1; P perror(*fileptr); continue; P*************** P*** 446,447 P *fileptr); P continue; P P--- 447,449 ----- P *fileptr); P+ exit_stat = 1; P continue; P*************** P*** 456,457 P *fileptr, maxbits, BITS); P continue; P P--- 458,460 ----- P *fileptr, maxbits, BITS); P+ exit_stat = 1; P continue; P*************** P*** 470,471 P if ((freopen(*fileptr, "r", stdin)) == NULL) { P perror(*fileptr); continue; P P--- 473,475 ----- P if ((freopen(*fileptr, "r", stdin)) == NULL) { P+ exit_stat = 1; P perror(*fileptr); continue; P*************** P*** 528,529 P if (freopen(ofname, "w", stdout) == NULL) { P perror(ofname); P P--- 532,534 ----- P if (freopen(ofname, "w", stdout) == NULL) { P+ exit_stat = 1; P perror(ofname); P PIndex: control.c PPrereq: 2.57 P*** old/control.c Mon Nov 23 19:13:14 1987 P--- control.c Sun Jan 15 19:48:55 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 21,23 P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.57 11/19/87"; P #endif /* SCCSID */ P P--- 21,23 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.58 1/15/89"; P #endif /* SCCSID */ P*************** P*** 33,34 P FILE *popen(), *mhopen(), *mailhdr(); P P P--- 33,35 ----- P FILE *popen(), *mhopen(), *mailhdr(); P+ FILE *controlmail; P P*************** P*** 189,190 P outfp = xfopen(INFILE, "a"); P outpos = ftell(outfp); P P--- 190,198 ----- P outfp = xfopen(INFILE, "a"); P+ #ifdef USG P+ /* P+ * When fopening to append, USG systems don't P+ * seek to EOF until write() is called. P+ */ P+ fseek(outfp, 0L, 2); P+ #endif P outpos = ftell(outfp); P*************** P*** 318,320 P if (fp == NULL) { P! logerr("Article %s unopenable as %s.", id, cp); P return; P P--- 326,328 ----- P if (fp == NULL) { P! log("Article %s unopenable as %s.", id, cp); P return; P*************** P*** 349,352 P /* local or ORGDISTRIB */ P! int can_change = (STRCMP(header.distribution, "local") == 0) || P! (STRCMP(header.distribution, ORGDISTRIB) == 0); P # else /* ! ORGDISTRIB */ P P--- 357,361 ----- P /* local or ORGDISTRIB */ P! int can_change = (STRCMP(header.distribution, "local") == 0) P! || (STRCMP(header.distribution, ORGDISTRIB) == 0) P! || !ngmatch(argv[1], NONEWGROUPS); P # else /* ! ORGDISTRIB */ P*************** P*** 428,430 P } P! (void) mclose(fd); P } P P--- 437,440 ----- P } P! fprintf(fd, "\n\n%s says:\n", header.path); P! controlmail = fd; P } P*************** P*** 513,515 P } P! (void) mclose(fd); P } P P--- 523,526 ----- P } P! fprintf(fd, "\n\n%s says:\n", header.path); P! controlmail = fd; P } P*************** P*** 542,544 P P! #ifdef MANUALLY P #ifdef ORGDISTRIB P P--- 553,555 ----- P P! #ifdef NORMGROUPS P #ifdef ORGDISTRIB P*************** P*** 548,550 P if (!STRCMP(ORGDISTRIB, header.distribution) P! || !STRCMP("local", header.distribution)) P #else /* !ORGDISTRIB */ P P--- 559,562 ----- P if (!STRCMP(ORGDISTRIB, header.distribution) P! || !STRCMP("local", header.distribution) P! || !ngmatch(argv[1], NORMGROUPS)) P #else /* !ORGDISTRIB */ P*************** P*** 552,554 P #endif /* !ORGDISTRIB */ P! #endif /* MANUALLY */ P shouldremove++; P P--- 564,566 ----- P #endif /* !ORGDISTRIB */ P! #endif /* NORMGROUPS */ P shouldremove++; P*************** P*** 572,574 P } P! (void) mclose(fd); P } P P--- 584,587 ----- P } P! fprintf(fd, "\n\n%s says:\n", header.path); P! controlmail = fd; P } P*************** P*** 581,583 P */ P! lock(); P (void) sprintf(bfr, "%s/rmgroup", LIB); P P--- 594,596 ----- P */ P! dolock(); P (void) sprintf(bfr, "%s/rmgroup", LIB); P*************** P*** 594,596 P } P! unlock(); P if (status) P P--- 607,609 ----- P } P! rmlock(); P if (status) P*************** P*** 692,693 P (void) unlink(nfilename); P p = q+1; P P--- 705,708 ----- P (void) unlink(nfilename); P+ if (q == NULL) P+ break; P p = q+1; P*************** P*** 729,731 P fprintf(f, "It has been sent.\n"); P! (void) mclose(f); P } P P--- 744,747 ----- P fprintf(f, "It has been sent.\n"); P! fprintf(f, "\n\n%s says:\n", header.path); P! controlmail = f; P } P*************** P*** 889,891 P { P! register f, r, (*hstat)(), (*istat)(), (*qstat)(); P int status; P P--- 905,908 ----- P { P! register int f, r; P! SIGNAL_TYPE hstat, istat, qstat; P int status; P PIndex: defs.dist PPrereq: 2.61 P*** old/defs.dist Fri Dec 4 02:51:57 1987 P--- defs.dist Tue Jan 24 15:23:59 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 16,18 P P! /* @(#)defs.dist 2.61 11/30/87 */ P P P--- 16,18 ----- P P! /* @(#)defs.dist 2.65 1/24/89 */ P P*************** P*** 49,52 P /* #define UUPROG "euuname" /* omit for uuname, put in LIBDIR */ P! #define MANUALLY /* Don't execute rmgroups, just notify. */ P! /* #define NONEWGROUPS /* Don't create new groups, just notify.*/ P /* #define SPOOLNEWS /* Spool incoming rnews, don't process */ P P--- 49,52 ----- P /* #define UUPROG "euuname" /* omit for uuname, put in LIBDIR */ P! #define NORMGROUPS "all" /* Don't execute rmgroups, just notify. */ P! /* #define NONEWGROUPS "all" /* Don't create new groups, just notify.*/ P /* #define SPOOLNEWS /* Spool incoming rnews, don't process */ P*************** P*** 75,76 P /* #define READDIR /* your system has readdir() in libc */ P /* #define RENAMESUB /* your system has rename() in libc */ P P--- 75,77 ----- P /* #define READDIR /* your system has readdir() in libc */ P+ /* #define DIRENT /* use struct dirent instead of struct direct */ P /* #define RENAMESUB /* your system has rename() in libc */ P*************** P*** 76,77 P /* #define RENAMESUB /* your system has rename() in libc */ P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P P--- 77,80 ----- P /* #define RENAMESUB /* your system has rename() in libc */ P+ /* #define VOID_SIGNALS /* signal returns a void * instead of int * */ P+ /* #define SYSLOG /* If you want errors logged via 4.3bsd syslog */ P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P*************** P*** 77,78 P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P /* #define SENDMAIL "/usr/lib/sendmail" /* command line to run "sendmail" if you have it */ P P--- 80,82 ----- P /* #define ALWAYSALIAS /* temporary kludge for conversion */ P+ /* #define ALLOW_LIB_EXECS /* allow news batches to execute commands in LIBDIR */ P /* #define SENDMAIL "/usr/lib/sendmail" /* command line to run "sendmail" if you have it */ P*************** P*** 97,98 P /* of the $(LIB)/moderators file */ P P P--- 101,105 ----- P /* of the $(LIB)/moderators file */ P+ /* #define MINFREE 5000 /* minimum number of free blocks needed in spool*/ P+ /* partition before unbatching will take place */ P+ /* USG only */ P P*************** P*** 110,111 P #define LBUFLEN 1024 /* big buffer size */ P #define SBUFLEN 32 /* small buffer size (for system names, etc) */ P P--- 117,119 ----- P #define LBUFLEN 1024 /* big buffer size */ P+ #define MBUFLEN 256 /* medium buffer size */ P #define SBUFLEN 32 /* small buffer size (for system names, etc) */ P*************** P*** 124,131 P #define NGDELIM ',' /* delimit character in news group line */ P- P- /* for NNTP */ P- #ifdef SERVER P- # include "NNTPSRC/common/response_codes.h" P- # define SERVER_FILE "SERVERFILE" P- #endif /* SERVER */ P P P--- 132,133 ----- P #define NGDELIM ',' /* delimit character in news group line */ P P PIndex: elock.c P*** old/elock.c Sun Jan 15 19:53:44 1989 P--- elock.c Thu Jan 19 00:17:32 1989 P*************** P*** 0 P P--- 1,56 ----- P+ #ifndef lint P+ static char *SccsId = "@(#)elock.c 1.3 1/19/89"; P+ #endif /* !lint */ P+ P+ #include "params.h" P+ #include <errno.h> P+ P+ #ifdef BSD4_2 P+ # include <sys/file.h> P+ #endif /* BSD4_2 */ P+ P+ #ifdef LOCKF P+ #include <unistd.h> P+ #endif /* LOCKF */ P+ P+ #if defined(BSD4_2) || defined(LOCKF) P+ static int LockFd = -1; P+ #endif P+ P+ extern int errno; P+ P+ dolock() P+ { P+ /* set up exclusive locking so inews does not run while expire does */ P+ #if defined(BSD4_2) || defined(LOCKF) P+ LockFd = open(ACTIVE, 2); P+ # ifdef LOCKF P+ if (lockf(LockFd, F_LOCK, 0L) < 0) P+ # else /* BSD4_2 */ P+ if (flock(LockFd, LOCK_EX) < 0) P+ # endif /* BSD4_2 */ P+ xerror("Can't get lock on active file for %s : %s", P+ Progname, errmsg(errno)); P+ #else /* !BSD4_2 && !LOCKF */ P+ int i = 0; P+ char afline[MBUFLEN]; P+ sprintf(afline,"%s.lock", ACTIVE); P+ while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P+ if (i++ > 5) { P+ xerror("Can't get lock on active file for %s: %s", P+ Progname, errmsg(errno)); P+ } P+ sleep(i*2); P+ } P+ #endif /* !BSD4_2 && !LOCKF */ P+ } P+ P+ rmlock() P+ { P+ #if defined(BSD4_2) || defined(LOCKF) P+ close(LockFd); P+ #else P+ sprintf(bfr, "%s.lock", ACTIVE); P+ (void) UNLINK(bfr); P+ #endif /* !BSD4_2 */ P+ } P PIndex: expire.c PPrereq: 2.57 P*** old/expire.c Fri Dec 4 02:52:00 1987 P--- expire.c Thu Jan 19 00:06:40 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.57 11/30/87"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.61 1/19/89"; P #endif /* SCCSID */ P*************** P*** 63,64 P int doupdateactive = 0; /* update ACTIVE file */ P char baduser[BUFLEN]; P P--- 63,65 ----- P int doupdateactive = 0; /* update ACTIVE file */ P+ int dontexec = 0; /* don't exec rnews -U */ P char baduser[BUFLEN]; P*************** P*** 65,66 P extern char filename[], nbuf[]; P P P--- 66,68 ----- P extern char filename[], nbuf[]; P+ double atof(); P P*************** P*** 94,96 P int ngpatlen = 0; P! char afline[BUFLEN]; P char grpsleft[BUFLEN]; P P--- 96,98 ----- P int ngpatlen = 0; P! char afline[MBUFLEN]; P char grpsleft[BUFLEN]; P*************** P*** 150,152 P argc--; P! expincr = atol(argv[1]) * DAYS; P } else if (isdigit(argv[1][2])) P P--- 152,154 ----- P argc--; P! expincr = atof(argv[1]) * DAYS; P } else if (isdigit(argv[1][2])) P*************** P*** 152,154 P } else if (isdigit(argv[1][2])) P! expincr = atol(&argv[1][2]) * DAYS; P break; P P--- 154,156 ----- P } else if (isdigit(argv[1][2])) P! expincr = atof(&argv[1][2]) * DAYS; P break; P*************** P*** 158,160 P argc--; P! dropincr = atol(argv[1]) * DAYS; P } else if (isdigit(argv[1][2])) P P--- 160,162 ----- P argc--; P! dropincr = atof(argv[1]) * DAYS; P } else if (isdigit(argv[1][2])) P*************** P*** 160,162 P } else if (isdigit(argv[1][2])) P! dropincr = atol(&argv[1][2]) * DAYS; P break; P P--- 162,164 ----- P } else if (isdigit(argv[1][2])) P! dropincr = atof(&argv[1][2]) * DAYS; P break; P*************** P*** 252,253 P break; P default: P P--- 254,258 ----- P break; P+ case 'X': /* don't exec rnews -U */ P+ dontexec++; P+ break; P default: P*************** P*** 310,311 P #endif /* PROFILING */ P #ifdef LOGDIR P P--- 315,320 ----- P #endif /* PROFILING */ P+ if (dontexec) P+ xxit(0); P+ if (vfork() > 0) /* don't hold up expire while rnews is running */ P+ xxit(0); P #ifdef LOGDIR P*************** P*** 331,333 P DIR *ngdirp = NULL; P! static struct direct *ngdir; P P P--- 340,342 ----- P DIR *ngdirp = NULL; P! static DIRECTORY_STRUCT *ngdir; P P*************** P*** 385,387 P closedir(ngdirp); P! if (fgets(afline, BUFLEN, ohfd) == NULL) P goto out; P P--- 394,396 ----- P closedir(ngdirp); P! if (fgets(afline, MBUFLEN,ohfd) == NULL) P goto out; P*************** P*** 418,420 P #ifdef DBM P! if (fgets(afline, BUFLEN, ohfd) == NULL) P break; P P--- 427,429 ----- P #ifdef DBM P! if (fgets(afline, MBUFLEN, ohfd) == NULL) P break; P*************** P*** 421,423 P #else P! if (fgets(afline, BUFLEN, ohfd) == NULL) P if (!(ohfd = nexthistfile(ohfd))) P P--- 430,432 ----- P #else P! if (fgets(afline, MBUFLEN, ohfd) == NULL) P if (!(ohfd = nexthistfile(ohfd))) P*************** P*** 429,430 P printf("article: %s", afline); P p1 = index(afline, '\t'); P P--- 438,441 ----- P printf("article: %s", afline); P+ if (afline[0] != '<') P+ continue; P p1 = index(afline, '\t'); P*************** P*** 440,442 P (void) strcpy(recdate, p1+1); P! (void) strcat(recdate, " GMT"); P rectime = cgtdate(recdate); P P--- 451,463 ----- P (void) strcpy(recdate, p1+1); P! { P! register char * tp; P! P! tp = recdate; P! if (*tp == ' ') P! ++tp; P! if (strlen(tp) == 14 && tp[2] == '/' && P! tp[5] == '/' && tp[8] == ' ' && P! tp[11] == ':') P! (void) strcat(recdate, " GMT"); P! } P rectime = cgtdate(recdate); P*************** P*** 597,599 P tm = gmtime(&rectime); P! if (fprintf(nhfd, P #ifdef USG P P--- 618,620 ----- P tm = gmtime(&rectime); P! fprintf(nhfd, P #ifdef USG P*************** P*** 605,609 P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, filename) P! == EOF) P! xerror("History write failed"); P (void) fclose(fp); P P--- 626,630 ----- P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, filename); P! if(ferror(nhfd)) P! xerror("History write failed"); P (void) fclose(fp); P*************** P*** 711,713 P h.ident, recdate); P! if (fputs(afline, nhfd) == EOF) P xerror("history write failed"); P P--- 732,735 ----- P h.ident, recdate); P! fputs(afline, nhfd); P! if (ferror(nhfd)) P xerror("history write failed"); P*************** P*** 749,751 P tm = gmtime(&rectime); P! if ( fprintf(nhfd, P #ifdef USG P P--- 771,773 ----- P tm = gmtime(&rectime); P! fprintf(nhfd, P #ifdef USG P*************** P*** 757,761 P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, mhp->mh_file) P! == EOF ) P! xerror("History write failed"); P (void) fclose(fp); P P--- 779,783 ----- P tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, mhp->mh_file); P! if (ferror(nhfd)) P! xerror("History write failed"); P (void) fclose(fp); P*************** P*** 763,764 P } P (void) pclose(nhfd); P P--- 785,822 ----- P } P+ /* P+ * lastly, see if we can fish the history of any expired P+ * articles out of the old history file P+ */ P+ if (verbose) P+ printf("Trying to extract usable expired article history\n"); P+ ohfd = xfopen(ARTFILE, "r"); P+ while (fgets(afline, MBUFLEN, ohfd) != NULL) { P+ if (afline[0] != '<') { P+ if (verbose > 4) P+ printf("Skip1: %s\n", afline); P+ continue; P+ } P+ p1 = index(afline, '\t'); P+ if (p1++ == NULL) { P+ if (verbose > 4) P+ printf("Skip2: %s\n", afline); P+ continue; P+ } P+ p1 = index(p1, '\t'); P+ if (p1++ == NULL) { P+ if (verbose > 4) P+ printf("Skip3: %s\n", afline); P+ continue; P+ } P+ if (*p1 == '\n') { P+ if (verbose > 4) P+ printf("Retain: %s", afline); P+ fputs(afline, nhfd); P+ if (ferror(nhfd)) P+ xerror("History write failed"); P+ } else { P+ if (verbose > 4) P+ printf("Skip4: %s\n", afline); P+ } P+ } P (void) pclose(nhfd); P*************** P*** 764,765 P (void) pclose(nhfd); P free ((char *)multhist); P P--- 822,824 ----- P (void) pclose(nhfd); P+ (void) fclose(ohfd); P free ((char *)multhist); P*************** P*** 788,826 P P- #if defined(BSD4_2) || defined(LOCKF) P- static int LockFd = -1; P- #endif P- P- dolock() P- { P- /* set up exclusive locking so inews does not run while expire does */ P- #if defined(BSD4_2) || defined(LOCKF) P- LockFd = open(ACTIVE, 2); P- # ifdef LOCKF P- if (lockf(LockFd, F_LOCK, 0L) < 0) P- # else /* BSD4_2 */ P- if (flock(LockFd, LOCK_EX) < 0) P- # endif /* BSD4_2 */ P- xerror("Can't get lock for expire: %s", errmsg(errno)); P- #else /* !BSD4_2 && !LOCKF */ P- int i = 0; P- sprintf(afline,"%s.lock", ACTIVE); P- while (LINK(ACTIVE, afline) < 0 && errno == EEXIST) { P- if (i++ > 5) { P- xerror("Can't get lock for expire"); P- } P- sleep(i*2); P- } P- #endif /* !BSD4_2 && !LOCKF */ P- } P- P- rmlock() P- { P- #if defined(BSD4_2) || defined(LOCKF) P- close(LockFd); P- #else P- sprintf(bfr, "%s.lock", ACTIVE); P- (void) UNLINK(bfr); P- #endif /* !BSD4_2 */ P- } P- P updateactive() P P--- 847,848 ----- P P updateactive() P*************** P*** 827,829 P { P! register char *p1; P FILE *ohfd, *nhfd; P P--- 849,851 ----- P { P! register char *p1, *p2; P FILE *ohfd, *nhfd; P*************** P*** 830,832 P DIR *ngdirp = NULL; P! static struct direct *ngdir; P P P--- 852,854 ----- P DIR *ngdirp = NULL; P! static DIRECTORY_STRUCT *ngdir; P P*************** P*** 839,843 P long maxart, minart; P! char cansub; P! int gdsize, hassubs; P! struct stat stbuf; P P P--- 861,864 ----- P long maxart, minart; P! int lineno = 0; P! char c, cansub, groupname[BUFLEN]; P P*************** P*** 843,845 P P! if (fgets(afline, BUFLEN, ohfd) == NULL) P continue; P P--- 864,866 ----- P P! if (fgets(afline, MBUFLEN, ohfd) == NULL) P continue; P*************** P*** 845,849 P continue; P! if (sscanf(afline,"%s %ld %ld %c",nbuf,&maxart, &minart, P! &cansub) < 4) P! xerror("Active file corrupt"); P if (verbose > 3) P P--- 866,873 ----- P continue; P! lineno++; P! if (sscanf(afline,"%s %ld %ld %c", groupname, &maxart, &minart, P! &cansub) < 4) { P! xerror("Line %d in active file invalid: %s", P! lineno, afline); P! } P if (verbose > 3) P*************** P*** 850,853 P printf("looking at group %s\n", nbuf); P! if (!ngmatch(nbuf, ngpat)) { P! if (fputs(afline, nhfd) == EOF) P xerror("active file write failed"); P P--- 874,878 ----- P printf("looking at group %s\n", nbuf); P! if (!ngmatch(groupname, ngpat)) { P! fputs(afline, nhfd); P! if (ferror(nhfd)) P xerror("active file write failed"); P*************** P*** 857,861 P /* Change a group name from a.b.c to a/b/c */ P! for (p1=nbuf; *p1; p1++) P! if (*p1 == '.') P! *p1 = '/'; P P P--- 882,892 ----- P /* Change a group name from a.b.c to a/b/c */ P! p1 = groupname; P! p2 = nbuf; P! while (c = *p1++) { P! if (c == '.') P! *p2++ = '/'; P! else P! *p2++ = c; P! } P! *p2 = '\0'; P P*************** P*** 861,864 P P- hassubs = stat(nbuf, &stbuf) != 0 || stbuf.st_nlink != 2; P- gdsize = strlen(nbuf); P if ((ngdirp = opendir(nbuf)) != NULL) { P P--- 892,893 ----- P P if ((ngdirp = opendir(nbuf)) != NULL) { P*************** P*** 865,877 P while (ngdir = readdir(ngdirp)) { P! nbuf[gdsize] = '/'; P! (void) strcpy(&nbuf[gdsize+1], ngdir->d_name); P! /* We have to do a stat because of micro.6809 */ P! if (hassubs && (stat(nbuf, &stbuf) < 0 || P! !(stbuf.st_mode&S_IFREG)) ) P! continue; P! n = atol(ngdir->d_name); P! if (n > 0 && n < minart) P! minart = n; P! if (n > 0 && n > maxart) P! maxart = n; P } P P--- 894,912 ----- P while (ngdir = readdir(ngdirp)) { P! register char *cp = ngdir->d_name, ch; P! n = 0; P! /* check to see if directory */ P! /* articles are all digits */ P! do { P! ch = *cp++; P! if (isdigit(ch)) P! n = n * 10 + ch - '0'; P! else P! n = -1; P! } while (n >= 0 && *cp); P! if (n > 0) { P! if (n < minart) P! minart = n; P! if (n > maxart) P! maxart = n; P! } P } P*************** P*** 879,881 P } P- afline[gdsize] = '\0'; P if (minart > maxart) P P--- 914,915 ----- P } P if (minart > maxart) P*************** P*** 882,883 P minart = maxart; P #ifdef USG P P--- 916,918 ----- P minart = maxart; P+ P #ifdef USG P*************** P*** 886,889 P maxart, minart); P! if (fprintf(nhfd,"%s %5.5ld %5.5ld %c\n", afline, maxart, P! minart, cansub) == EOF) P xerror("Active file write failed"); P P--- 921,925 ----- P maxart, minart); P! fprintf(nhfd,"%s %5.5ld %5.5ld %c\n", groupname, maxart, P! minart, cansub); P! if(ferror(nhfd)) P xerror("Active file write failed"); P*************** P*** 893,896 P maxart, minart); P! if (fprintf(nhfd,"%s %05ld %05ld %c\n", afline, maxart, P! minart, cansub) == EOF) P xerror("Active file write failed"); P P--- 929,933 ----- P maxart, minart); P! fprintf(nhfd,"%s %05ld %05ld %c\n", groupname, maxart, P! minart, cansub); P! if (ferror(nhfd)) P xerror("Active file write failed"); P PIndex: fullname.c PPrereq: 1.13 P*** old/fullname.c Wed Nov 4 14:57:01 1987 P--- fullname.c Sun Jan 15 19:48:56 1989 P*************** P*** 11,12 P * where the "junk -" is optional. P * P P--- 11,13 ----- P * where the "junk -" is optional. P+ * and the character before the '-' is a space, a digit, or a ']'. P * P*************** P*** 16,18 P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.13 11/4/87"; P #endif /* SCCSID */ P P--- 17,19 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)fullname.c 1.14 1/15/89"; P #endif /* SCCSID */ P*************** P*** 127,129 P { P! if (*p == '-' && (isdigit(p[-1]) || isspace(p[-1]))) { P bp = buf; P P--- 128,130 ----- P { P! if (*p == '-' && (isdigit(p[-1]) || isspace(p[-1]) || p[-1] == ']')) { P bp = buf; P*************** P*** 143,144 P } P *bp = '\0'; P P--- 144,147 ----- P } P+ while (bp > buf && *(bp - 1) == ' ') P+ --bp; P *bp = '\0'; P PIndex: funcs.c PPrereq: 2.38 P*** old/funcs.c Fri Dec 4 02:52:01 1987 P--- funcs.c Sun Jan 15 19:48:57 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.38 11/30/87"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs.c 2.39 1/15/89"; P #endif /* SCCSID */ P*************** P*** 29,30 P P extern char *Progname; P P--- 29,37 ----- P P+ #ifdef SYSLOG P+ #include <sys/syslog.h> P+ #ifndef LOG_NEWS P+ LOG_NEWS is officially facility 7, please update your syslog.h P+ #endif P+ #endif P+ P extern char *Progname; P*************** P*** 157,159 P int status; P! int (*onhup)(), (*onint)(); P P P--- 164,166 ----- P int status; P! SIGNAL_TYPE onhup, onint; P P*************** P*** 425,426 P P if (which) P P--- 432,445 ----- P P+ #ifdef SYSLOG P+ if (which ) { P+ openlog(Progname, 0, LOG_NEWS); P+ syslog(LOG_ERR, "%s %s\t%s", rmtsys, P+ header.ident[0] ? header.ident : username, msg); P+ } else { P+ openlog(rmtsys, 0, LOG_NEWS); P+ syslog(LOG_INFO, "%s\t%s", P+ header.ident[0] ? header.ident : username, msg); P+ } P+ #else /* !SYSLOG */ P+ P if (which) P*************** P*** 448,449 P } P } P P--- 467,470 ----- P } P+ #endif /* !SYSLOG */ P+ P } P*************** P*** 522,524 P P! #ifdef MKDIRSUB P /* P P--- 543,545 ----- P P! #ifndef MKDIRSUB P /* P PIndex: funcs2.c PPrereq: 1.24 P*** old/funcs2.c Fri Dec 4 02:52:03 1987 P--- funcs2.c Sun Jan 15 19:48:57 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1985 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1985, 1989 by Rick Adams. P * P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.24 11/30/87"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.25 1/15/89"; P #endif /* SCCSID */ P*************** P*** 24,25 P P #ifdef SunIII P P--- 24,27 ----- P P+ extern char filename[]; P+ P #ifdef SunIII P*************** P*** 125,127 P P! p = fldget(sp->s_name, p); P if (*p++ == '\0') P P--- 127,129 ----- P P! p = fldget(sp->s_name, sizeof(sp->s_name), p); P if (*p++ == '\0') P*************** P*** 138,140 P } P! p = fldget(sp->s_nbuf, p); P lcase(sp->s_nbuf); P P--- 140,142 ----- P } P! p = fldget(sp->s_nbuf, sizeof(sp->s_nbuf), p); P lcase(sp->s_nbuf); P*************** P*** 143,145 P P! p = fldget(sp->s_flags, p); P if (*p++ == '\0') P P--- 145,147 ----- P P! p = fldget(sp->s_flags, sizeof(sp->s_flags), p); P if (*p++ == '\0') P*************** P*** 147,149 P P! (void) fldget(sp->s_xmit, p); P return TRUE; P P--- 149,151 ----- P P! (void) fldget(sp->s_xmit, sizeof(sp->s_flags), p); P return TRUE; P*************** P*** 152,154 P char * P! fldget(q, p) P register char *q, *p; P P--- 154,156 ----- P char * P! fldget(q, len, p) P register char *q, *p; P*************** P*** 154,155 P register char *q, *p; P { P P--- 156,158 ----- P register char *q, *p; P+ register int len; P { P*************** P*** 158,159 P p++; P *q++ = *p++; P P--- 161,168 ----- P p++; P+ if (--len <= 0) { P+ logerr("field too long in SYSFILE: %s", p); P+ while (*p && *p++ != ':') P+ /* loop */; P+ break; P+ } P *q++ = *p++; P*************** P*** 204,206 P if (lasttime < 0) { P! logerr("Unparsable date \"%s\"", datestr); P if (sscanf(datestr, "%s %s %s %s %s", junk, month, day, tod, P P--- 213,215 ----- P if (lasttime < 0) { P! logerr("%s: Unparsable date \"%s\"", filename, datestr); P if (sscanf(datestr, "%s %s %s %s %s", junk, month, day, tod, P*************** P*** 469,471 P *p++ = '\0'; P! (void) sprintf(oidbuf, "<%s@%s.UUCP>", p, artid); P if (p) P P--- 478,480 ----- P *p++ = '\0'; P! (void) sprintf(oidbuf, "<%s@%s.uucp>", p, artid); P if (p) P*************** P*** 478,480 P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != CHAR_OK) P return NULL; P P--- 487,489 ----- P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != '2') P return NULL; P*************** P*** 483,485 P (void) get_server(workspace,sizeof(workspace)); /* get response */ P! if (*workspace != CHAR_OK) P return NULL; /* old style nntp */ P P--- 492,494 ----- P (void) get_server(workspace,sizeof(workspace)); /* get response */ P! if (*workspace != '2') P return NULL; /* old style nntp */ P*************** P*** 497,499 P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != CHAR_OK) P return NULL; P P--- 506,508 ----- P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != '2') P return NULL; P*************** P*** 519,521 P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != CHAR_OK) P return NULL; P P--- 528,530 ----- P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != '2') P return NULL; P*************** P*** 664,666 P called = 1; P! (void) dbminit(name); P } P P--- 673,676 ----- P called = 1; P! if (dbminit(name)) P! logerr("dbminit failed: %s", name); P } P*************** P*** 721,724 P FILE * P! xart_open (filename,mode) P! char *filename,*mode; P { P P--- 731,734 ----- P FILE * P! xart_open (fname,mode) P! char *fname,*mode; P { P*************** P*** 724,726 P { P! FILE *fp = art_open (filename, mode); P extern int errno; P P--- 734,736 ----- P { P! FILE *fp = art_open (fname, mode); P extern int errno; P*************** P*** 728,730 P xerror("Cannot open article %s (%s): %s\n", P! filename, mode, errmsg(errno)); P return fp; P P--- 738,740 ----- P xerror("Cannot open article %s (%s): %s\n", P! fname, mode, errmsg(errno)); P return fp; P*************** P*** 733,736 P FILE * P! art_open (filename,mode) P! char *filename,*mode; P { P P--- 743,746 ----- P FILE * P! art_open (fname,mode) P! char *fname,*mode; P { P*************** P*** 739,741 P P! if ((fp = fopen (filename, mode)) == NULL) P return NULL; P P--- 749,751 ----- P P! if ((fp = fopen (fname, mode)) == NULL) P return NULL; P*************** P*** 749,751 P /* Clean up dangling link, if we have the power. Ignore error if we don't. */ P! (void) unlink (filename); P return fp; P P--- 759,761 ----- P /* Clean up dangling link, if we have the power. Ignore error if we don't. */ P! (void) unlink (fname); P return fp; P*************** P*** 778,779 P *q = '\0'; P P P--- 788,794 ----- P *q = '\0'; P+ #ifdef SunIII P+ q = index(senderbuf, '@'); P+ if (q) P+ *q = '\0'; P+ #endif P P*************** P*** 781 P } P P--- 796,797 ----- P } P+ P PIndex: getdate.y PPrereq: 2.17 P*** old/getdate.y Fri Dec 4 02:52:05 1987 P--- getdate.y Tue Jan 17 13:09:29 1989 P*************** P*** 1,2 P! %token ID MONTH DAY MERIDIAN NUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO P %{ P P--- 1,2 ----- P! %token ID MONTH DAY MERIDIAN SNUMBER UNUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO P %{ P*************** P*** 5,7 P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.17 11/30/87 */ P P P--- 5,7 ----- P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.19 1/17/89 */ P P*************** P*** 22,24 P P! #if defined(BSD4_2) || defined (BSD4_1C) P #include <sys/time.h> P P--- 22,24 ----- P P! #if defined(BSD4_2) P #include <sys/time.h> P*************** P*** 59,61 P P! nspec: NUMBER = P {if (timeflag && dateflag && !relflag) year = $1; P P--- 59,61 ----- P P! nspec: UNUMBER = P {if (timeflag && dateflag && !relflag) year = $1; P*************** P*** 63,65 P P! tspec: NUMBER MERIDIAN = P {hh = $1; mm = 0; ss = 0; merid = $2;} P P--- 63,65 ----- P P! tspec: UNUMBER MERIDIAN = P {hh = $1; mm = 0; ss = 0; merid = $2;} P*************** P*** 65,67 P {hh = $1; mm = 0; ss = 0; merid = $2;} P! | NUMBER ':' NUMBER = P {hh = $1; mm = $3; merid = 24;} P P--- 65,67 ----- P {hh = $1; mm = 0; ss = 0; merid = $2;} P! | UNUMBER ':' UNUMBER = P {hh = $1; mm = $3; merid = 24;} P*************** P*** 67,69 P {hh = $1; mm = $3; merid = 24;} P! | NUMBER ':' NUMBER MERIDIAN = P {hh = $1; mm = $3; merid = $4;} P P--- 67,69 ----- P {hh = $1; mm = $3; merid = 24;} P! | UNUMBER ':' UNUMBER MERIDIAN = P {hh = $1; mm = $3; merid = $4;} P*************** P*** 69,71 P {hh = $1; mm = $3; merid = $4;} P! | NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; merid = 24; P P--- 69,71 ----- P {hh = $1; mm = $3; merid = $4;} P! | UNUMBER ':' UNUMBER SNUMBER = P {hh = $1; mm = $3; merid = 24; P*************** P*** 72,74 P daylight = STANDARD; ourzone = -($4%100 + 60*($4/100));} P! | NUMBER ':' NUMBER ':' NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24;} P P--- 72,74 ----- P daylight = STANDARD; ourzone = -($4%100 + 60*($4/100));} P! | UNUMBER ':' UNUMBER ':' UNUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24;} P*************** P*** 74,76 P {hh = $1; mm = $3; ss = $5; merid = 24;} P! | NUMBER ':' NUMBER ':' NUMBER MERIDIAN = P {hh = $1; mm = $3; ss = $5; merid = $6;} P P--- 74,76 ----- P {hh = $1; mm = $3; ss = $5; merid = 24;} P! | UNUMBER ':' UNUMBER ':' UNUMBER MERIDIAN = P {hh = $1; mm = $3; ss = $5; merid = $6;} P*************** P*** 76,78 P {hh = $1; mm = $3; ss = $5; merid = $6;} P! | NUMBER ':' NUMBER ':' NUMBER NUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24; P P--- 76,78 ----- P {hh = $1; mm = $3; ss = $5; merid = $6;} P! | UNUMBER ':' UNUMBER ':' UNUMBER SNUMBER = P {hh = $1; mm = $3; ss = $5; merid = 24; P*************** P*** 89,91 P {dayord = 1; dayreq = $1;} P! | NUMBER DAY = P {dayord = $1; dayreq = $2;}; P P--- 89,91 ----- P {dayord = 1; dayreq = $1;} P! | UNUMBER DAY = P {dayord = $1; dayreq = $2;}; P*************** P*** 92,94 P P! dtspec: NUMBER '/' NUMBER = P {month = $1; day = $3;} P P--- 92,94 ----- P P! dtspec: UNUMBER '/' UNUMBER = P {month = $1; day = $3;} P*************** P*** 94,96 P {month = $1; day = $3;} P! | NUMBER '/' NUMBER '/' NUMBER = P {month = $1; day = $3; year = $5;} P P--- 94,96 ----- P {month = $1; day = $3;} P! | UNUMBER '/' UNUMBER '/' UNUMBER = P {month = $1; day = $3; year = $5;} P*************** P*** 96,98 P {month = $1; day = $3; year = $5;} P! | MONTH NUMBER = P {month = $1; day = $2;} P P--- 96,98 ----- P {month = $1; day = $3; year = $5;} P! | MONTH UNUMBER = P {month = $1; day = $2;} P*************** P*** 98,100 P {month = $1; day = $2;} P! | MONTH NUMBER ',' NUMBER = P {month = $1; day = $2; year = $4;} P P--- 98,100 ----- P {month = $1; day = $2;} P! | MONTH UNUMBER ',' UNUMBER = P {month = $1; day = $2; year = $4;} P*************** P*** 100,102 P {month = $1; day = $2; year = $4;} P! | NUMBER MONTH = P {month = $2; day = $1;} P P--- 100,102 ----- P {month = $1; day = $2; year = $4;} P! | UNUMBER MONTH = P {month = $2; day = $1;} P*************** P*** 102,104 P {month = $2; day = $1;} P! | NUMBER MONTH NUMBER = P {month = $2; day = $1; year = $3;}; P P--- 102,104 ----- P {month = $2; day = $1;} P! | UNUMBER MONTH UNUMBER = P {month = $2; day = $1; year = $3;}; P*************** P*** 106,108 P P! rspec: NUMBER UNIT = P {relsec += 60L * $1 * $2;} P P--- 106,108 ----- P P! rspec: SNUMBER UNIT = P {relsec += 60L * $1 * $2;} P*************** P*** 108,110 P {relsec += 60L * $1 * $2;} P! | NUMBER MUNIT = P {relmonth += $1 * $2;} P P--- 108,110 ----- P {relsec += 60L * $1 * $2;} P! | SNUMBER MUNIT = P {relmonth += $1 * $2;} P*************** P*** 110,112 P {relmonth += $1 * $2;} P! | NUMBER SUNIT = P {relsec += $1;} P P--- 110,112 ----- P {relmonth += $1 * $2;} P! | SNUMBER SUNIT = P {relsec += $1;} P*************** P*** 217,219 P extern int yylval; P! int sign; P register char c; P P--- 217,219 ----- P extern int yylval; P! int sign = 0; P register char c; P*************** P*** 232,234 P if (!isdigit(*++lptr)) { P! /* yylval = sign; return (NUMBER); */ P return yylex(); /* skip the '-' sign */ P P--- 232,234 ----- P if (!isdigit(*++lptr)) { P! /* yylval = sign; return (UNUMBER); */ P return yylex(); /* skip the '-' sign */ P*************** P*** 235,237 P } P! } else sign = 1; P yylval = 0; P P--- 235,237 ----- P } P! } P yylval = 0; P*************** P*** 239,241 P yylval = 10*yylval + c - '0'; P- yylval *= sign; P lptr--; P P--- 239,240 ----- P yylval = 10*yylval + c - '0'; P lptr--; P*************** P*** 241,243 P lptr--; P! return (NUMBER); P P P--- 240,247 ----- P lptr--; P! if (sign < 0) P! yylval = -yylval; P! if (sign != 0) P! return SNUMBER; P! else P! return UNUMBER; P P*************** P*** 388,390 P {"now", UNIT, 0}, P! {"last", NUMBER, -1}, P {"this", UNIT, 0}, P P--- 392,394 ----- P {"now", UNIT, 0}, P! {"last", UNUMBER, -1}, P {"this", UNIT, 0}, P*************** P*** 390,404 P {"this", UNIT, 0}, P! {"next", NUMBER, 2}, P! {"first", NUMBER, 1}, P! /* {"second", NUMBER, 2}, */ P! {"third", NUMBER, 3}, P! {"fourth", NUMBER, 4}, P! {"fifth", NUMBER, 5}, P! {"sixth", NUMBER, 6}, P! {"seventh", NUMBER, 7}, P! {"eigth", NUMBER, 8}, P! {"ninth", NUMBER, 9}, P! {"tenth", NUMBER, 10}, P! {"eleventh", NUMBER, 11}, P! {"twelfth", NUMBER, 12}, P {"ago", AGO, 1}, P P--- 394,408 ----- P {"this", UNIT, 0}, P! {"next", UNUMBER, 2}, P! {"first", UNUMBER, 1}, P! /* {"second", UNUMBER, 2}, */ P! {"third", UNUMBER, 3}, P! {"fourth", UNUMBER, 4}, P! {"fifth", UNUMBER, 5}, P! {"sixth", UNUMBER, 6}, P! {"seventh", UNUMBER, 7}, P! {"eighth", UNUMBER, 8}, P! {"ninth", UNUMBER, 9}, P! {"tenth", UNUMBER, 10}, P! {"eleventh", UNUMBER, 11}, P! {"twelfth", UNUMBER, 12}, P {"ago", AGO, 1}, P PIndex: header.c PPrereq: 2.49 P*** old/header.c Thu Oct 8 00:20:52 1987 P--- header.c Sun Jan 15 19:48:58 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.49 10/7/87"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.50 1/15/89"; P #endif /* SCCSID */ P*************** P*** 85,87 P /* Newsgroup List */ P! if (hfgets(hp->nbuf, BUFLEN, fp) == NULL || !nstrip(hp->nbuf)) P return NULL; P P--- 85,87 ----- P /* Newsgroup List */ P! if (hfgets(hp->nbuf, MBUFLEN, fp) == NULL || !nstrip(hp->nbuf)) P return NULL; P*************** P*** 200,203 P #endif /* OLD */ P! case MESSAGEID: P! getfield(hp->ident, sizeof(hp->ident)); P break; P P--- 200,210 ----- P #endif /* OLD */ P! case MESSAGEID: { P! register char *cp; P! getfield(hp->ident, sizeof(hp->ident)); P! cp = hp->ident; P! do { P! if (*cp && !isprint(*cp)) P! *cp = '?'; P! } while (*cp++); P! } P break; P*************** P*** 220,223 P getfield(hp->distribution, sizeof(hp->distribution)); P! if (strcmp(hp->distribution, "net") == 0 P! || strcmp(hp->distribution, "world") == 0) P hp->distribution[0] = '\0'; P P--- 227,230 ----- P getfield(hp->distribution, sizeof(hp->distribution)); P! if (STRCMP(hp->distribution, "net") == 0 P! || STRCMP(hp->distribution, "world") == 0) P hp->distribution[0] = '\0'; P*************** P*** 223,224 P hp->distribution[0] = '\0'; P break; P P--- 230,238 ----- P hp->distribution[0] = '\0'; P+ else if (STRCMP(hp->distribution, "local") == 0 && P+ hp->path[0] != '\0' && P+ strncmp(hp->path, LOCALPATHSYSNAME, P+ strlen(LOCALPATHSYSNAME)) != 0) { P+ hp->distribution[0] = '\0'; P+ xerror("Bogus local distribution rejected"); P+ } P break; P*************** P*** 445,446 P lastsp = 1; P break; P P--- 459,464 ----- P lastsp = 1; P+ break; P+ P+ case '\n': P+ lastsp = 1; P break; P PIndex: header.h PPrereq: 2.21 P*** old/header.h Thu Oct 8 00:20:56 1987 P--- header.h Sun Jan 15 19:48:58 1989 P*************** P*** 4,6 P P! /* @(#)header.h 2.21 10/7/87 */ P P P--- 4,6 ----- P P! /* @(#)header.h 2.22 1/15/89 */ P P*************** P*** 12,14 P char path[PATHLEN]; /* Path: */ P! char nbuf[LBUFLEN]; /* Newsgroups: */ P char title[BUFLEN]; /* Subject: */ P P--- 12,14 ----- P char path[PATHLEN]; /* Path: */ P! char nbuf[MBUFLEN]; /* Newsgroups: */ P char title[BUFLEN]; /* Subject: */ P*************** P*** 16,18 P char replyto[BUFLEN]; /* Reply-To: */ P! char followid[BUFLEN]; /* References: */ P char subdate[DATELEN]; /* Date: (submission) */ P P--- 16,18 ----- P char replyto[BUFLEN]; /* Reply-To: */ P! char followid[MBUFLEN]; /* References: */ P char subdate[DATELEN]; /* Date: (submission) */ P*************** P*** 34,36 P #ifdef DOXREFS P! char xref[BUFLEN]; /* Xref: */ P #endif /* DOXREFS */ P P--- 34,36 ----- P #ifdef DOXREFS P! char xref[MBUFLEN]; /* Xref: */ P #endif /* DOXREFS */ P PIndex: ifuncs.c PPrereq: 2.69 P*** old/ifuncs.c Fri Dec 4 02:52:09 1987 P--- ifuncs.c Wed Jan 18 14:28:50 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.69 12/1/87"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.72 1/18/89"; P #endif /* SCCSID */ P*************** P*** 231,233 P if (nsent) P! log(sentbuf); P s_close(); P P--- 231,233 ----- P if (nsent) P! log("%s", sentbuf); P s_close(); P*************** P*** 251,253 P register int c; P! register char *ptr; P char TRANS[BUFLEN]; P P--- 251,253 ----- P register int c; P! register char *ptr, *size_ptr; P char TRANS[BUFLEN]; P*************** P*** 284,285 P P if (notify) P P--- 284,297 ----- P P+ /* allow specification based on size */ P+ if ((size_ptr = strpbrk(sp->s_flags, "<>")) != NULL) { P+ struct stat stbuf; P+ if (fstat(fileno(ifp), &stbuf) == 0 && ( P+ (*size_ptr == '>' && stbuf.st_size < atol(&size_ptr[1])) P+ || (*size_ptr == '<' && stbuf.st_size > atol(&size_ptr[1])) P+ )) { P+ fclose(ifp); P+ return FALSE; P+ } P+ } P+ P if (notify) P*************** P*** 337,339 P } P! (void) sprintf(TRANS, "%s/trXXXXXX", SPOOL); P } P P--- 349,351 ----- P } P! (void) sprintf(TRANS, "%s/.tmp/trXXXXXX", SPOOL); P } P*************** P*** 359,363 P } P! if (sp->s_xmit[0] == '\0') P! sprintf(sp->s_xmit, "%s/%s%s", BATCHDIR, sp->s_name, P! appmsgid ? ".ihave" : ""); P #ifdef LOGDIR P P--- 371,385 ----- P } P! P! /* if filename is an absolute pathname, use it P! * if no filename given, tack system name onto BATCHDIR P! * otherwise, tack filename onto BATCHDIR P! * P! * also, tack ".ihave" onto ihave format files P! * in BATCHDIR (should this be done for all files?) P! */ P! if (sp->s_xmit[0] != '/') { P! if (sp->s_xmit[0] == '\0') P! (void) strcpy(TRANS, sp->s_name); P! else P! (void) strcpy(TRANS, sp->s_xmit); P #ifdef LOGDIR P*************** P*** 363,366 P #ifdef LOGDIR P! (void) sprintf(TRANS, "%s/%s/%s", logdir(HOME), BATCHDIR, sp->s_xmit); P! ofp = fopen(TRANS, "a"); P #else /* !LOGDIR */ P P--- 385,387 ----- P #ifdef LOGDIR P! sprintf(sp->s_xmit, "%s/%s/%s%s", logdir(HOME), P #else /* !LOGDIR */ P*************** P*** 366,368 P #else /* !LOGDIR */ P! ofp = fopen(sp->s_xmit, "a"); P #endif /* !LOGDIR */ P P--- 387,389 ----- P #else /* !LOGDIR */ P! sprintf(sp->s_xmit, "%s/%s%s", P #endif /* !LOGDIR */ P*************** P*** 368,369 P #endif /* !LOGDIR */ P if (ofp == NULL) P P--- 389,393 ----- P #endif /* !LOGDIR */ P+ BATCHDIR, TRANS, appmsgid ? ".ihave" : ""); P+ } P+ ofp = fopen(sp->s_xmit, "a"); P if (ofp == NULL) P*************** P*** 370,372 P xerror("Cannot append to %s", sp->s_xmit); P! fprintf(ofp, "%s", appmsgid ? hh.ident : firstbufname); P #ifdef MULTICAST P P--- 394,397 ----- P xerror("Cannot append to %s", sp->s_xmit); P! fprintf(ofp, "%s", appmsgid ? hh.ident : P! firstbufname); P #ifdef MULTICAST P*************** P*** 716,718 P extern int errno; P- #ifdef VMS P int fd; P P--- 741,742 ----- P extern int errno; P int fd; P*************** P*** 718,722 P int fd; P! /* The name here is because of the peculiar properties of version numbers P! * in Eunice. We eliminate any troublesome characters also. P! */ P (void) sprintf(lockname, "/tmp/%.10s.l.1", str); P P--- 742,748 ----- P int fd; P! #ifdef VMS P! /* P! * The name here is because of the peculiar properties of version P! * numbers in Eunice. We eliminate any troublesome characters also. P! */ P (void) sprintf(lockname, "/tmp/%.10s.l.1", str); P*************** P*** 741,744 P #endif P! i = creat(tempname, 0666); P! if (i < 0) P xerror("Cannot creat %s: errno %d", tempname, errno); P P--- 767,773 ----- P #endif P! #ifndef O_EXCL P! (void) strcpy(tempname, "/tmp/LTMP.XXXXXX"); P! MKTEMP(tempname); P! fd = creat(tempname, 0666); P! if (fd < 0) P xerror("Cannot creat %s: errno %d", tempname, errno); P*************** P*** 744,746 P xerror("Cannot creat %s: errno %d", tempname, errno); P- (void) close(i); P while (link(tempname, lockname)) { P P--- 773,774 ----- P xerror("Cannot creat %s: errno %d", tempname, errno); P while (link(tempname, lockname)) { P*************** P*** 746,747 P while (link(tempname, lockname)) { P #endif /* !VMS */ P P--- 774,778 ----- P while (link(tempname, lockname)) { P+ #else /* O_EXCL */ P+ while ((fd=(open(lockname, O_EXCL|O_CREAT, 0) < 0) { P+ #endif /* O_EXCL */ P #endif /* !VMS */ P*************** P*** 759,761 P } P- #ifdef VMS P (void) close(fd); P P--- 790,791 ----- P } P (void) close(fd); P*************** P*** 761,763 P (void) close(fd); P! #endif P (void) unlink(tempname); P P--- 791,793 ----- P (void) close(fd); P! #ifndef O_EXCL P (void) unlink(tempname); P*************** P*** 763,764 P (void) unlink(tempname); P } P P--- 793,795 ----- P (void) unlink(tempname); P+ #endif P } P*************** P*** 1311,1316 P if ((fd = creat(tfilename, 0666)) < 0) { P! fprintf(stderr, "rnews: creat of \"%s\" failed", P! tfilename); P! perror(" "); P! exit(1); P } P P--- 1342,1345 ----- P if ((fd = creat(tfilename, 0666)) < 0) { P! xerror("rnews: creat of \"%s\" failed: %s", P! tfilename,errmsg(errno)); P } P*************** P*** 1319,1324 P if (wc != rc) { P! fprintf(stderr, "write of %d to \"%s\" returned %d", P! rc, tfilename, wc); P! perror(" "); P! exit(1); P } P P--- 1348,1351 ----- P if (wc != rc) { P! xerror("write of %d to \"%s\" returned %d: %s", P! rc, tfilename, wc, errmsg(errno)); P } P*************** P*** 1373,1374 P freopen(tfilename, "r", infp); P return; /* from checkbatch as if P P--- 1400,1402 ----- P freopen(tfilename, "r", infp); P+ (void) free(cp); P return; /* from checkbatch as if P*************** P*** 1381,1386 P if (wc != rc) { P! fprintf(stderr, "write of %d to pipe returned %d", P! rc, wc); P! perror("rnews: write"); P! exit(1); P } P P--- 1409,1412 ----- P if (wc != rc) { P! xerror("write of %d to pipe returned %d: %s", P! rc, wc, errmsg(errno)); P } P*************** P*** 1420,1423 P if (pipe(piped) != 0) { P! perror("checkbatch: pipe() failed"); P! exit(1); P } P P--- 1446,1448 ----- P if (pipe(piped) != 0) { P! xerror("checkbatch: pipe() failed: %s",errmsg(errno)); P } P*************** P*** 1425,1427 P while ((pid = vfork()) == -1) { P! perror("checkbatch: fork failed, waiting"); P sleep(60); P P--- 1450,1452 ----- P while ((pid = vfork()) == -1) { P! logerr("checkbatch: fork failed, waiting: %s",errmsg(errno)); P sleep(60); P*************** P*** 1439,1442 P execl(cmd, arg0, arg1, arg2, (char *) 0); P! perror("checkbatch"); P! xerror("Unable to exec %s to unpack news.", cmd); P } else { /* parent process */ P P--- 1464,1466 ----- P execl(cmd, arg0, arg1, arg2, (char *) 0); P! xerror("Unable to exec \"%s\" to unpack news: %s", cmd, errmsg(errno)); P } else { /* parent process */ P*************** P*** 1472,1473 P p++; P P P--- 1496,1504 ----- P p++; P+ if (strncmp(p, "inews", 5) != 0) { P+ #ifdef ALLOW_LIB_EXECS P+ log("Processing incoming batch with command \"%s\"", p); P+ #else /* !ALLOW_LIB_EXECS */ P+ xerror("Attempt to execute news batch with command \"%s\"", p); P+ #endif /* !ALLOW_LIB_EXECS */ P+ } P P*************** P*** 1509,1511 P (void) execvp(path, args); P! perror(path); P xxit(2); P P--- 1540,1542 ----- P (void) execvp(path, args); P! logerr("Unable to exec \"%s\" to unpack news: %s", path, errmsg(errno)); P xxit(2); P PIndex: patchlevel.h PPrereq: 14 P*** .d/patchlevel.h Fri Dec 4 02:52:37 1987 P--- patchlevel.h Sun Jan 15 19:49:02 1989 P*************** P*** 1,2 P! #define PATCHLEVEL 14 P P P--- 1,2 ----- P! #define PATCHLEVEL 15 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 12/1/87" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11 1/14/89" P P--- end of patch 15 --- P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.16... ' sed 's/^P//' >patch.16 <<\PSHAREND PFrom rick@uunet.UU.NET Tue Jan 24 22:27:17 1989 PPath: uunet!rick PFrom: rick@uunet.UU.NET (Rick Adams) PNewsgroups: news.software.b PSubject: Patch #16 for news 2.11 source PSummary: part two of three PMessage-ID: <47349@uunet.UU.NET> PDate: 25 Jan 89 03:27:17 GMT PReferences: <47348@uunet.UU.NET> POrganization: UUNET Communications Services, Arlington, VA PLines: 2084 P PDescription: P This is the second part of three patches. After applying this P you should be at patchlevel 16. P PFix: P apply this in the same manner as patch 15. P PIndex: inews.c PPrereq: 2.85 P*** old/inews.c Fri Dec 4 02:52:12 1987 P--- inews.c Tue Jan 24 15:24:00 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.85 11/30/87"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.91 1/24/89"; P #endif /* SCCSID */ P*************** P*** 28,30 P P! # if defined(F_RDLCK) && defined(F_SETLK) P struct flock news_lock; P P--- 28,30 ----- P P! # if defined(F_RDLCK) && defined(F_SETLK) && !defined(HP9K5) P struct flock news_lock; P*************** P*** 30,32 P struct flock news_lock; P! # endif /* F_RDLCK && F_SETLK */ P # endif /* LOCKF */ P P--- 30,32 ----- P struct flock news_lock; P! # endif /* F_RDLCK && F_SETLK && !HP9K5 */ P # endif /* LOCKF */ P*************** P*** 59,61 P /* Fake sys line in case they forget their own system */ P- struct srec dummy_srec = { "MEMEME", "", "all", "", "" }; P P P--- 59,60 ----- P /* Fake sys line in case they forget their own system */ P P*************** P*** 100,101 P FILE *mailhdr(); P extern int errno, xxit(); P P--- 99,101 ----- P FILE *mailhdr(); P+ extern FILE *controlmail; P extern int errno, xxit(); P*************** P*** 127,128 P FILE *mfd; /* mail file file-descriptor */ P P P--- 127,131 ----- P FILE *mfd; /* mail file file-descriptor */ P+ #if !defined(LOCKF) && !defined(BSD4_2) P+ struct stat stbuf; P+ #endif /* !LOCKF && ! BSD4_2 */ P P*************** P*** 139,140 P ptr = *argv - 1; P actfp = xfopen(ACTIVE, "r+"); P P--- 142,147 ----- P ptr = *argv - 1; P+ P+ #ifdef NFSCLIENT P+ actfp = xfopen(ACTIVE, "r"); P+ #else /* !NFSCLIENT */ P actfp = xfopen(ACTIVE, "r+"); P*************** P*** 140,142 P actfp = xfopen(ACTIVE, "r+"); P- #ifndef NFSCLIENT P #ifdef LOCKF P P--- 147,148 ----- P actfp = xfopen(ACTIVE, "r+"); P #ifdef LOCKF P*************** P*** 142,144 P #ifdef LOCKF P! # if defined(F_RDLCK) && defined(F_SETLK) P news_lock.l_type = F_RDLCK; P P--- 148,150 ----- P #ifdef LOCKF P! # if defined(F_RDLCK) && defined(F_SETLK) && !defined(HP9K5) P news_lock.l_type = F_RDLCK; P*************** P*** 145,147 P if (fcntl(fileno(actfp), F_SETLK, &news_lock) < 0) { P! # else /* !F_RDLCK */ P if (lockf(fileno(actfp), F_TLOCK, 0L) < 0) { P P--- 151,153 ----- P if (fcntl(fileno(actfp), F_SETLK, &news_lock) < 0) { P! # else /* !(F_RDLCK && F_SETLK && !HP9K5) */ P if (lockf(fileno(actfp), F_TLOCK, 0L) < 0) { P*************** P*** 147,149 P if (lockf(fileno(actfp), F_TLOCK, 0L) < 0) { P! # endif /* !F_RDLCK */ P if (errno != EAGAIN && errno != EACCES) P P--- 153,155 ----- P if (lockf(fileno(actfp), F_TLOCK, 0L) < 0) { P! # endif /* !(F_RDLCK && F_SETLK && !HP9K5) */ P if (errno != EAGAIN && errno != EACCES) P*************** P*** 155,158 P sprintf(bfr, "%s.lock", ACTIVE); P! if (LINK(ACTIVE, bfr) < 0) { P! if (errno != EEXIST) P #endif /* V7 */ P P--- 161,168 ----- P sprintf(bfr, "%s.lock", ACTIVE); P! /* assume a dead lock if the active file is over 12 hours old */ P! if (LINK(ACTIVE, bfr) < 0 && P! (errno != EEXIST || P! (stat(bfr, &stbuf) == 0 && P! (time((char *)0) - stbuf.st_mtime) < DAYS/2))) { P! if (errno != EEXIST) P #endif /* V7 */ P*************** P*** 225,227 P } P! P state = OPTION; P P--- 235,245 ----- P } P! #ifdef MINFREE P! if (space()) { /* check disk space */ P! mode = PROC; P! logerr("Out of space in %s. Saving for later processing.", P! SPOOLDIR); P! dospool((char *)NULL, FALSE); P! /* NOT REACHED */ P! } P! #endif /* MINFREE */ P state = OPTION; P*************** P*** 281,283 P P- #ifndef DOGETUSER P /* P P--- 299,300 ----- P P /* P*************** P*** 286,288 P */ P! if (isatty(fileno(stderr))) { P if ((user = getenv("USER")) == NULL) P P--- 303,309 ----- P */ P! if (isatty(fileno(stderr)) P! #ifdef DOGETUSER P! && uid == 0 /* allow root to set name in any case */ P! #endif /* !DOGETUSER */ P! ) { P if ((user = getenv("USER")) == NULL) P*************** P*** 292,294 P } P- #endif /* !DOGETUSER */ P if (user == NULL || home == NULL) P P--- 313,314 ----- P } P if (user == NULL || home == NULL) P*************** P*** 440,442 P else if (!header.path[0]) { P! (void) strcpy(header.path, forgedname); P P P--- 460,469 ----- P else if (!header.path[0]) { P! if ((p1 = rindex(forgedname, '@')) == NULL) P! (void) strcpy(header.path, forgedname); P! else { P! *p1 = '\0'; P! (void) sprintf(header.path, "%s!%s", P! p1+1, forgedname); P! *p1 = '@'; P! } P P*************** P*** 568,569 P P if (rwaccess(f)) P P--- 595,597 ----- P P+ #ifndef NFSCLIENT P if (rwaccess(f)) P*************** P*** 572,573 P exists(f) ? "Unwritable files!" : "Missing files!"); P if (mfd == NULL) P P--- 600,606 ----- P exists(f) ? "Unwritable files!" : "Missing files!"); P+ #else /* NFSCLIENT */ P+ if (exists(f)) P+ return; /* everything is ok */ P+ mfd = mailhdr((struct hbuf *)NULL, "Missing files!"); P+ #endif /* NFSCLIENT */ P if (mfd == NULL) P*************** P*** 676,678 P P! (void) sprintf(sfile, "%s/.spXXXXXX", SPOOL); P MKTEMP(sfile); P P--- 709,711 ----- P P! (void) sprintf(sfile, "%s/.tmp/spXXXXXX", SPOOL); P MKTEMP(sfile); P*************** P*** 775,776 P char firstbufname[BUFLEN]; P /* P P--- 808,812 ----- P char firstbufname[BUFLEN]; P+ P+ static char *artlinks[32]; P+ static int linkcount; P /* P*************** P*** 854,855 P /* P * This works around a bug in the 4.1bsd stdio P P--- 890,899 ----- P /* P+ * Keep track of destination file names so we can delete P+ * the article files if the write-out fails. P+ */ P+ cp = malloc(strlen(bfr)+1); P+ (void) strcpy(cp, bfr); P+ artlinks[linkcount++] = cp; P+ P+ /* P * This works around a bug in the 4.1bsd stdio P*************** P*** 937,938 P tfp = xfopen(ARTICLE, "w"); P P P--- 981,983 ----- P tfp = xfopen(ARTICLE, "w"); P+ linkcount = 0; P P*************** P*** 940,942 P if (is_invalid) { P! logerr("No valid newsgroups found, moved to junk"); P if (localize("junk")) P P--- 985,988 ----- P if (is_invalid) { P! logerr("%s: No valid newsgroups found, moved to junk", P! header.nbuf); P if (localize("junk")) P*************** P*** 1047,1049 P LOCALPATHSYSNAME, SUBFILE); P! srec = dummy_srec; P } P P--- 1093,1099 ----- P LOCALPATHSYSNAME, SUBFILE); P! strcpy(srec.s_name, "ME-dummy"); P! srec.s_nosend = NULL; P! strcpy(srec.s_nbuf, "all"); P! srec.s_flags[0] = '\0'; P! srec.s_xmit[0] = '\0'; P } P*************** P*** 1096,1098 P /* Part 2 of kludge to get around article truncation problem */ P! if (c == ' ' || c == '\t' ) P putc('\n', tfp); P P--- 1146,1148 ----- P /* Part 2 of kludge to get around article truncation problem */ P! if (c == ' ' || c == '\t' ) { P putc('\n', tfp); P*************** P*** 1098,1099 P putc('\n', tfp); P /* End of part 2 */ P P--- 1148,1152 ----- P putc('\n', tfp); P+ if (controlmail) P+ putc('\n', controlmail); P+ } P /* End of part 2 */ P*************** P*** 1100,1102 P ungetc(c, infp); P! while (fgets(bfr, BUFLEN, infp) != NULL) P fputs(bfr, tfp); P P--- 1153,1155 ----- P ungetc(c, infp); P! while (fgets(bfr, BUFLEN, infp) != NULL) { P fputs(bfr, tfp); P*************** P*** 1102,1105 P fputs(bfr, tfp); P! if (bfr[strlen(bfr)-1] != '\n') P! putc('\n',tfp); P } P P--- 1155,1164 ----- P fputs(bfr, tfp); P! if (controlmail) P! fputs(bfr, controlmail); P! } P! if (bfr[strlen(bfr)-1] != '\n') { P! putc('\n', tfp); P! if (controlmail) P! putc('\n', controlmail); P! } P } P*************** P*** 1105,1106 P } P if (ferror(tfp)) P P--- 1164,1169 ----- P } P+ if (controlmail) P+ (void) mclose(controlmail); P+ controlmail = NULL; P+ fflush(tfp); P if (ferror(tfp)) P*************** P*** 1106,1107 P if (ferror(tfp)) P xerror("Write failed for temp file"); P P--- 1169,1174 ----- P if (ferror(tfp)) P+ { P+ (void) UNLINK(ARTICLE); P+ for (c = 0; c < linkcount; c++) P+ (void) UNLINK(artlinks[c]); P xerror("Write failed for temp file"); P*************** P*** 1107,1108 P xerror("Write failed for temp file"); P (void) fclose(tfp); P P--- 1174,1181 ----- P xerror("Write failed for temp file"); P+ } P+ else P+ { P+ for (c = 0; c < linkcount; c++) P+ free(artlinks[c]); P+ } P (void) fclose(tfp); P*************** P*** 1225,1226 P (void) fclose(infp); P if (mode != PROC && P P--- 1298,1316 ----- P (void) fclose(infp); P+ if (mode != PROC && P+ index(header.nbuf,',') != NULL && P+ strlen(header.followto) == 0) { P+ /* P+ * they didn't give us a followup-to P+ * so we'll make one for them P+ */ P+ char *comma; P+ P+ /* just use the first newsgroup in the Newsgroups: line */ P+ strcpy(header.followto, header.nbuf); P+ comma = index(header.followto, ','); P+ if (comma != NULL) { /* this should always be true! */ P+ *comma = '\0'; P+ } P+ } P+ P if (mode != PROC && P*************** P*** 1244,1245 P break; P if (siglines > 4) P P--- 1334,1340 ----- P break; P+ else if (index(sbuf, '\n') == 0) { P+ fprintf(stderr, ".signature not included (long or unterminated line)\n"); P+ siglines = -1; P+ break; P+ } P if (siglines > 4) P*************** P*** 1246,1248 P fprintf(stderr,".signature not included (> 4 lines)\n"); P! else { P rewind(infp); P P--- 1341,1345 ----- P fprintf(stderr,".signature not included (> 4 lines)\n"); P! else if (siglines == 0) P! fprintf(stderr,".signature not included (empty)\n"); P! else if (siglines > 0) { P rewind(infp); P*************** P*** 1401,1403 P register DIR *dirp; P! register struct direct *dir; P register int foundsome; P P--- 1498,1500 ----- P register DIR *dirp; P! register DIRECTORY_STRUCT *dir; P register int foundsome; P*************** P*** 1408,1409 P #endif /* LOCKF */ P #ifdef VMS P P--- 1505,1510 ----- P #endif /* LOCKF */ P+ P+ #if !defined(LOCKF) && !defined(BSD4_2) P+ struct stat stbuf; P+ #endif /* !LOCKF && ! BSD4_2 */ P #ifdef VMS P*************** P*** 1422,1423 P LockFd = xfopen(SEQFILE, "r+w"); P if (lockf(fileno(LockFd), F_TLOCK, 0L) < 0) { P P--- 1523,1526 ----- P LockFd = xfopen(SEQFILE, "r+w"); P+ /* The lseek is kludge for systems with mandatory locking */ P+ lseek(fileno(LockFd), 512L, 0); P if (lockf(fileno(LockFd), F_TLOCK, 0L) < 0) { P*************** P*** 1436,1439 P errno = status; P! if (ret < 0) { P! if (errno != EEXIST) P #endif /* V7 */ P P--- 1539,1546 ----- P errno = status; P! /* assume a dead lock if the active file is over 12 hours old */ P! if (ret < 0 && P! (errno != EEXIST || P! (stat(bfr, &stbuf) == 0 && P! (time((char *)0) - stbuf.st_mtime) < DAYS/2))) { P! if (errno != EEXIST) P #endif /* V7 */ P*************** P*** 1479,1481 P if (status != 0) { P! sprintf(bfr, "../%s", dir->d_name); P (void) LINK(dir->d_name, bfr); P P--- 1586,1588 ----- P if (status != 0) { P! sprintf(bfr, "../.bad/%s", dir->d_name); P (void) LINK(dir->d_name, bfr); P*************** P*** 1481,1483 P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed, status %ld. Batch saved in %s/%s", P (long)status, SPOOL, dir->d_name); P P--- 1588,1590 ----- P (void) LINK(dir->d_name, bfr); P! logerr("rnews failed, status %ld. Batch saved in %s/.bad/%s", P (long)status, SPOOL, dir->d_name); P*************** P*** 1498 P #endif /* !NFSCLIENT */ P P--- 1605,1633 ----- P #endif /* !NFSCLIENT */ P+ P+ #ifdef MINFREE P+ #include <ustat.h> P+ /* P+ * determine if there is enough free space on the device P+ * return 0 if there is and P+ * anything appropriate if there is not P+ * written by Stan Barber (sob@bcm.tmc.edu) P+ */ P+ space() P+ { P+ struct stat file; P+ struct ustat device; P+ if (stat(SPOOLDIR,&file)) P+ return 1; /* can't stat spool */ P+ if (ustat(file.st_dev, &device)) P+ return 1; /* can't stat the device */ P+ if(device.f_tfree < MINFREE) P+ return 1; P+ return 0; P+ } P+ #else P+ int space() P+ { P+ /* I'll figure this out for BSD some other time */ P+ return(0); P+ } P+ #endif /* MINFREE */ P PIndex: install.sh PPrereq: 1.19 P*** old/install.sh Mon Nov 23 19:13:25 1987 P--- install.sh Sun Jan 15 19:49:00 1989 P*************** P*** 1,2 P! : '@(#)install.sh 1.19 11/19/87' P P P--- 1,2 ----- P! : '@(#)install.sh 1.20 1/15/89' P P*************** P*** 54,56 P then P! for i in $SPOOLDIR $SPOOLDIR/.rnews P do P P--- 54,56 ----- P then P! for i in $SPOOLDIR $SPOOLDIR/.rnews $SPOOLDIR/.bad $SPOOLDIR/.tmp P do P PIndex: localize.mport P*** old/localize.mport Sun Jan 15 19:53:47 1989 P--- localize.mport Sun Jan 15 19:49:01 1989 P*************** P*** 0 P P--- 1,44 ----- P+ # Date: Tue, 29 Nov 88 12:14:54 EST P+ # From: algor2!jeffrey@uunet.UU.NET P+ P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed - Makefile <<'EOF' P+ /^UUXFLAGS/s/-r // P+ /^COMPRESS=/d P+ /^#USG IBMFLAGS/s/=/& -Ml/ P+ /^#USG LFLAGS/s/-i// P+ /^#USG LINTFLAGS/s/-D/-Ml -D/ P+ g/^#USG /s/// P+ g/^#V7 /d P+ g/^#VMS /d P+ g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P+ g/termlib/s//curses/ P+ w P+ q P+ EOF P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed - defs.h <<'EOF' P+ /ROOTID/s/10/133/ P+ /HISTEXP/s;4\*WEEKS;DFLTEXP; P+ /TMAIL/d P+ /PAGE/s;/usr/ucb/more;/usr/bin/pg; P+ /DFTXMIT/s/-r/-gd/ P+ /UXMIT/s/-r/-gd/ P+ /NONEWGROUPS/s;/\* ;; P+ /LOCALNAME/s;/\* ;; P+ /INTERNET/s;/\* ;; P+ /DOXREFS/s;/\* ;; P+ /DOGETUSER/s;/\* ;; P+ /MKDIRSUB/s;/\* ;; P+ /MYORG/s;Frobozz Inc., St. Louis;/usr/lib/news/organization; P+ /NICENESS/s;/\* ;; P+ /NICENESS/s;4;19; P+ /SMALL_ADDRESS_SPACE/s;/\* ;; P+ w P+ q P+ EOF P PIndex: localize.nntp P*** old/localize.nntp Fri Oct 16 18:21:56 1987 P--- localize.nntp Tue Jan 17 13:09:29 1989 P*************** P*** 4,6 P # Basically, you can use the regular localize.sh you use and add those line P! # that contain #NNTP, NNTPSRC and SERVERFILE to make it work. P # The string NNTPSRC should be replaced with the location of your nntp source P P--- 4,13 ----- P # Basically, you can use the regular localize.sh you use and add those line P! # that contain #NNTP and NNTPSRC to make it work. You will need two P! # localize.sh files. One will be for the SERVER where you build the regular P! # inews and run the nntpd server. The other will be for the nntp clients. P! # On these machines, you will only build readnews, checknews, vnews and P! # postnews. You only need the parts of the nntp distribution that are in the P! # common directory to build these programs. You will also need the inews P! # program from nntp distribution. P! # P # The string NNTPSRC should be replaced with the location of your nntp source P*************** P*** 6,9 P # The string NNTPSRC should be replaced with the location of your nntp source P! # directory. The string SERVERFILE should be replaced with the location of P! # the serverfile. See the nntp (Version 1.4) instructions for more information. P # P P--- 13,15 ----- P # The string NNTPSRC should be replaced with the location of your nntp source P! # directory. P # P*************** P*** 9,12 P # P! # You will need nntp version 1.4 to make full use of these programs. They P! # make some use of the XHDR extenstion in nntp version 1.4. P # P P--- 15,20 ----- P # P! # You will need nntp version 1.5 to make full use of these programs. They P! # make some use of the XHDR extension in nntp version 1.5. They will work P! # with nntp 1.3. If you use nntp 1.4, please manually edit nntp.c to include P! # "response_codes.h". Look at the beginning of the file for details. P # P*************** P*** 13,16 P # You do not need to include any reference to the dbm library. DBM may remain P! # undefined. You may also want to remove $(OTHERS) from the line in the P! # Makefile that starts with "all:". P # P P--- 21,23 ----- P # You do not need to include any reference to the dbm library. DBM may remain P! # undefined. P # P*************** P*** 17,19 P # You may want to include the line that begins with #RESOLVE in localize.sh P! # if you want to link against the resolver library. I use it on my suns. P # P P--- 24,26 ----- P # You may want to include the line that begins with #RESOLVE in localize.sh P! # if you want to link against the resolver library. P # P*************** P*** 19,24 P # P- # You will need to create a "mailpaths" file on each host that uses these P- # programs. See the regular news documenation for information on the P- # mailpaths file. P- # P # PROBLEMS: P P--- 26,27 ----- P # P # PROBLEMS: P*************** P*** 26,28 P # 1. Distribution checking is disabled in postnews. nntp does not provide this P! # information, so postnews cannot check the article before posting. P # P P--- 29,32 ----- P # 1. Distribution checking is disabled in postnews. nntp does not provide this P! # information, so postnews cannot check the article before posting. However, P! # nntp will return status information if the article fails to post. P # P*************** P*** 35,37 P # host that uses these programs. nntp does not provide this information from P! # the server. P # P P--- 39,41 ----- P # host that uses these programs. nntp does not provide this information from P! # the server. P # P*************** P*** 40,43 P # P! # 5. XHDR support is necessary for some functions to work. This can be rewritten P! # to avoid this, but I have not done it yet. P # P P--- 44,47 ----- P # P! # 5. XHDR support is necessary for some functions to work. This can be P! # rewritten to avoid this. nntp 1.5 is available which does support this. P # P*************** P*** 68,70 P g/^#BSD4_1 /d P! g/^all:/s/$(OTHERS)// P g/#NOTVMS/s/#NOTVMS// P P--- 72,79 ----- P g/^#BSD4_1 /d P! g/^BINDIR/s/bin/local\/bin/ P! g/^NEWSUSR/s/news/usenet/ P! g/^LIBS/s/-ldbm// P! g/^LNRNEWS/s/ln/ln -s/ P! g/^RNEWS/s/$(BINDIR)/\/usr\/bin/ P! g/^UUXFLAGS/s/-r/-gN -r/ P g/#NOTVMS/s/#NOTVMS// P*************** P*** 70,74 P g/#NOTVMS/s/#NOTVMS// P! g/-DDBM/s/-DDBM// P! g/-ldbm/s/-ldbm// P! g/NNTPSRC/s/NNTPSRC/\/usr\/src\/nntp/ P w P P--- 79,82 ----- P g/#NOTVMS/s/#NOTVMS// P! g/-DDBM/s/-DDBM/-DNOSHELL/ P! g/NNTPSRC/s/NNTPSRC/\/usr\/src\/new\/nntp.1.5/ P w P*************** P*** 80,82 P ed defs.h << 'EOF' P! g/NNTPSRC/s/NNTPSRC/\usr\/src\/nntp/ P g/SERVERFILE/s/SERVERFILE/\/usr\/lib\/news\/server/ P P--- 88,101 ----- P ed defs.h << 'EOF' P! g/DOXREFS/s/^\/\* // P! g/NICENESS/s/^\/\* // P! g/PATH/s/=/=\/usr/ P! g/UUPROG/s/^\/\* // P! g/INTERNET/s/^\/\* // P! g/SENDMAIL/s/^\/\* // P! g/ORGDISTRIB/s/^\/\* // P! g/ GHNAME/s/^\/\* // P! g/ BSD4_2/s/^\/\* // P! g/GENERICPATH/s/^\/\* // P! g/GENERICFROM/s/^\/\* // P! g/NNTPSRC/s/NNTPSRC/\/usr\/src\/new\/nntp.1.5/ P g/SERVERFILE/s/SERVERFILE/\/usr\/lib\/news\/server/ P*************** P*** 92 P echo "Good Luck." P P--- 111,113 ----- P echo "Good Luck." P+ P+ P PIndex: localize.sun P*** old/localize.sun Tue Jan 24 16:14:48 1989 P--- localize.sun Tue Jan 24 16:54:40 1989 P*************** P*** 0 P P--- 1,38 ----- P+ # This works on Sun3s and Sun4s running SunOS 4.0 P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed Makefile <<'EOF' P+ /^UUXFLAGS/s/-r -z/-r -z -n -gd/ P+ g/^#V7 /s/// P+ g/^#BSD4_2 /s/// P+ g/^#BSD4_1 /d P+ g/^#USG /d P+ g/#NOTVMS/s/#NOTVMS.*// P+ /^SPOOLDIR/s;/usr/spool/news;/var/spool/news; P+ /^BATCHDIR/s;/usr/spool/batch;/var/spool/batch; P+ /^LIBDIR/s;/usr/lib/news;/var/spool/news-lib; P+ /^BINDIR/s;/usr/bin;/usr/local; P+ /^SPOOL_DISK/s;/usr/spool;/var; P+ /^LNRNEWS/s/ln/ln -s/ P+ w P+ q P+ EOF P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed - defs.h <<'EOF' P+ /N_UMASK/s/000/002/ P+ /DFTXMIT/s/-z/-z -gd/ P+ /UXMIT/s/-z/-z -gd/ P+ /NONEWGROUPS/s;/\* ;; P+ /INTERNET/s;/\* ;; P+ /GHNAME/s;/\* ;; P+ /DOXREFS/s;/\* ;; P+ /BSD4_2/s;/\* ;; P+ /LOCKF/s;/\* ;; P+ /VOID_SIGNALS/s;/\* ;; P+ /SENDMAIL/s;/\* ;; P+ w P+ q P+ EOF P PIndex: localize.v.3 P*** old/localize.v.3 Sun Jan 15 19:53:52 1989 P--- localize.v.3 Thu Jan 19 14:53:18 1989 P*************** P*** 0 P P--- 1,35 ----- P+ # Date: Wed 6 Jan 1988 21:22:55 MET P+ # Originally-From: mcvax!pan!jw@uunet.uu.net (Jamie Watson) P+ P+ rm -f Makefile P+ cp Makefile.dst Makefile P+ chmod u+w Makefile P+ ed - Makefile <<'EOF' P+ g/^#USG /s/// P+ g/^#V7 /d P+ g/^#VMS /d P+ g/^#BSD4_[123] /d P+ g/#NOTVMS/s/#NOTVMS.*// P+ g/termlib/s//curses/ P+ g/UUXFLAGS/s/-z// P+ w P+ q P+ EOF P+ rm -f defs.h P+ cp defs.dist defs.h P+ chmod u+w defs.h P+ ed - defs.h <<'EOF' P+ g/TMAIL/d P+ g/ PAGE/s;/usr/ucb/more;/usr/bin/pg; P+ g/DFTXMIT/s/-z // P+ g/UXMIT/d P+ g/DFTEDITOR/s;vi;/usr/bin/vi; P+ g/ UNAME/s;/\* ;; P+ g/LOCKF/s;/\* ;; P+ g/MKDIRSUB/s;/\* ;; P+ g/READDIR/s;/\* ;; P+ g/DIRENT/s;/\* ;; P+ g/VOID_SIGNALS/s;/\* ;; P+ w P+ q P+ EOF PIndex: makeactive.sh PPrereq: 1.24 P*** old/makeactive.sh Wed Oct 7 16:53:32 1987 P--- makeactive.sh Tue Jan 24 17:05:21 1989 P*************** P*** 2,4 P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.24 9/24/87' P LIBDIR=$1 P P--- 2,4 ----- P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.27 1/24/89' P LIBDIR=$1 P*************** P*** 8,10 P cat <<"E_O_F" | sort > /tmp/$$groups P- general Articles that should be read by everyone on your local system P comp.ai Artificial intelligence discussions. P P--- 8,9 ----- P cat <<"E_O_F" | sort > /tmp/$$groups P comp.ai Artificial intelligence discussions. P*************** P*** 11,12 P comp.ai.digest Artificial Intelligence discussions. (Moderated) P comp.arch Computer architecture. P P--- 10,15 ----- P comp.ai.digest Artificial Intelligence discussions. (Moderated) P+ comp.ai.edu Applications of Artificial Intelligence to Education. P+ comp.ai.neural-nets All aspects of neural networks. P+ comp.ai.nlang-know-rep Natural Language and Knowledge Representation. (Moderated) P+ comp.ai.vision Artificial Intelligence Vision Research. (Moderated) P comp.arch Computer architecture. P*************** P*** 12,13 P comp.arch Computer architecture. P comp.binaries.amiga Encoded public domain programs in binary. (Moderated) P P--- 15,17 ----- P comp.arch Computer architecture. P+ comp.archives Descriptions of public access archives. (Moderated) P comp.binaries.amiga Encoded public domain programs in binary. (Moderated) P*************** P*** 13,14 P comp.binaries.amiga Encoded public domain programs in binary. (Moderated) P comp.binaries.atari.st Binary-only postings for the Atari ST. (Moderated) P P--- 17,19 ----- P comp.binaries.amiga Encoded public domain programs in binary. (Moderated) P+ comp.binaries.apple2 Binary-only postings for the Apple II computer. P comp.binaries.atari.st Binary-only postings for the Atari ST. (Moderated) P*************** P*** 15,16 P comp.binaries.ibm.pc Binary-only postings for IBM PC/MS-DOS. (Moderated) P comp.binaries.mac Encoded Macintosh programs in binary. (Moderated) P P--- 20,22 ----- P comp.binaries.ibm.pc Binary-only postings for IBM PC/MS-DOS. (Moderated) P+ comp.binaries.ibm.pc.d Discussions about IBM/PC binary postings. P comp.binaries.mac Encoded Macintosh programs in binary. (Moderated) P*************** P*** 25,26 P comp.dcom.lans Local area network hardware and software. P comp.dcom.modems Data communications hardware and software. P P--- 31,34 ----- P comp.dcom.lans Local area network hardware and software. P+ comp.dcom.lans.hyperchannel Hyperchannel networks within an IP network. P+ comp.dcom.lans.v2lni Proteon Pronet/V2LNI Ring networks. P comp.dcom.modems Data communications hardware and software. P*************** P*** 29,30 P comp.doc.techreports Lists of technical reports. (Moderated) P comp.edu Computer science education. P P--- 37,39 ----- P comp.doc.techreports Lists of technical reports. (Moderated) P+ comp.editors Topics related to computerized text editing. P comp.edu Computer science education. P*************** P*** 30,31 P comp.edu Computer science education. P comp.emacs EMACS editors of different flavors. P P--- 39,41 ----- P comp.edu Computer science education. P+ comp.edu.composition Writing instruction in computer-based classrooms. P comp.emacs EMACS editors of different flavors. P*************** P*** 31,32 P comp.emacs EMACS editors of different flavors. P comp.graphics Computer graphics, art, animation, image processing. P P--- 41,43 ----- P comp.emacs EMACS editors of different flavors. P+ comp.fonts Typefonts -- design, conversion, use, etc. P comp.graphics Computer graphics, art, animation, image processing. P*************** P*** 33,35 P comp.graphics.digest Graphics software, hardware, theory, etc. (Moderated) P! comp.hypercube Massively parallel systems: hardware & software. (Moderated) P comp.lang.ada Discussion about Ada*. P P--- 44,46 ----- P comp.graphics.digest Graphics software, hardware, theory, etc. (Moderated) P! comp.ivideodisc Interactive videodiscs -- uses, potential, etc. P comp.lang.ada Discussion about Ada*. P*************** P*** 36,37 P comp.lang.apl Discussion about APL. P comp.lang.c Discussion about C. P P--- 47,49 ----- P comp.lang.apl Discussion about APL. P+ comp.lang.asm370 Programming in IBM System/370 Assembly Language. P comp.lang.c Discussion about C. P*************** P*** 38,39 P comp.lang.c++ The object-oriented C++ language. P comp.lang.forth Discussion about Forth. P P--- 50,53 ----- P comp.lang.c++ The object-oriented C++ language. P+ comp.lang.clu The CLU language & related topics. (Moderated) P+ comp.lang.eiffel The object-oriented Eiffel language. P comp.lang.forth Discussion about Forth. P*************** P*** 39,40 P comp.lang.forth Discussion about Forth. P comp.lang.fortran Discussion about FORTRAN. P P--- 53,55 ----- P comp.lang.forth Discussion about Forth. P+ comp.lang.forth.mac The CSI MacForth programming environment. P comp.lang.fortran Discussion about FORTRAN. P*************** P*** 40,41 P comp.lang.fortran Discussion about FORTRAN. P comp.lang.lisp Discussion about LISP. P P--- 55,58 ----- P comp.lang.fortran Discussion about FORTRAN. P+ comp.lang.icon Topics related to the ICON programming language. P+ comp.lang.idl IBL (Interface Description Language) related topics. P comp.lang.lisp Discussion about LISP. P*************** P*** 41,42 P comp.lang.lisp Discussion about LISP. P comp.lang.misc Different computer languages not specifically listed. P P--- 58,61 ----- P comp.lang.lisp Discussion about LISP. P+ comp.lang.lisp.franz The Franz Lisp programming language. P+ comp.lang.lisp.x The XLISP language system. P comp.lang.misc Different computer languages not specifically listed. P*************** P*** 44,45 P comp.lang.pascal Discussion about Pascal. P comp.lang.prolog Discussion about PROLOG. P P--- 63,65 ----- P comp.lang.pascal Discussion about Pascal. P+ comp.lang.postscript The PostScript Page Description Language. P comp.lang.prolog Discussion about PROLOG. P*************** P*** 45,46 P comp.lang.prolog Discussion about PROLOG. P comp.lang.smalltalk Discussion about Smalltalk 80. P P--- 65,70 ----- P comp.lang.prolog Discussion about PROLOG. P+ comp.lang.rexx The REXX command language. P+ comp.lang.scheme The Scheme Programming language. P+ comp.lang.scheme.c The Scheme language environment. P+ comp.lang.sigplan Info & announcements from ACM SIGPLAN. (Moderated) P comp.lang.smalltalk Discussion about Smalltalk 80. P*************** P*** 46,47 P comp.lang.smalltalk Discussion about Smalltalk 80. P comp.laser-printers Laser printers, hardware & software. (Moderated) P P--- 70,72 ----- P comp.lang.smalltalk Discussion about Smalltalk 80. P+ comp.lang.visual Visual programming languages. P comp.laser-printers Laser printers, hardware & software. (Moderated) P*************** P*** 48,50 P comp.lsi Large scale integrated circuits. P! comp.mail.elm Discussion and fixes for ELM mail system. P comp.mail.headers Gatewayed from the ARPA header-people list. P P--- 73,76 ----- P comp.lsi Large scale integrated circuits. P! comp.lsi.cad Electrical Computer Aided Design. P! comp.mail.elm Discussion and fixes for ELM mail system. P comp.mail.headers Gatewayed from the ARPA header-people list. P*************** P*** 51,52 P comp.mail.maps Various maps, including UUCP maps. (Moderated) P comp.mail.misc General discussions about computer mail. P P--- 77,79 ----- P comp.mail.maps Various maps, including UUCP maps. (Moderated) P+ comp.mail.mh The UCI version of the Rand Message Handling system. P comp.mail.misc General discussions about computer mail. P*************** P*** 52,53 P comp.mail.misc General discussions about computer mail. P comp.mail.uucp Mail in the uucp network environment. P P--- 79,82 ----- P comp.mail.misc General discussions about computer mail. P+ comp.mail.multi-media Multimedia Mail. P+ comp.mail.sendmail Configuring and using the BSD sendmail agent. P comp.mail.uucp Mail in the uucp network environment. P*************** P*** 54,55 P comp.misc General topics about computers not covered elsewhere. P comp.newprod Announcements of new products of interest. (Moderated) P P--- 83,85 ----- P comp.misc General topics about computers not covered elsewhere. P+ comp.music Applications of computers in music research. P comp.newprod Announcements of new products of interest. (Moderated) P*************** P*** 57,58 P comp.org.fidonet FidoNews digest, official news of FidoNet Assoc. (Moderated) P comp.org.usenix USENIX Association events and announcements. P P--- 87,89 ----- P comp.org.fidonet FidoNews digest, official news of FidoNet Assoc. (Moderated) P+ comp.org.ieee Issues and announcements about the IEEE & its members. P comp.org.usenix USENIX Association events and announcements. P*************** P*** 58,59 P comp.org.usenix USENIX Association events and announcements. P comp.os.cpm Discussion about the CP/M operating system. P P--- 89,92 ----- P comp.org.usenix USENIX Association events and announcements. P+ comp.org.usrgroup News/discussion about/from the /usr/group organization. P+ comp.os.aos Topics related to Data General's AOS/VS. P comp.os.cpm Discussion about the CP/M operating system. P*************** P*** 59,60 P comp.os.cpm Discussion about the CP/M operating system. P comp.os.eunice The SRI Eunice system. P P--- 92,94 ----- P comp.os.cpm Discussion about the CP/M operating system. P+ comp.os.cpm.amethyst Discussion of Amethyst, CP/M-80 software package. P comp.os.eunice The SRI Eunice system. P*************** P*** 62,64 P comp.os.misc General OS-oriented discussion not carried elsewhere. P! comp.os.os9 Discussions about the os9 operating system. (Moderated) P comp.os.research Operating systems and related areas. (Moderated) P P--- 96,98 ----- P comp.os.misc General OS-oriented discussion not carried elsewhere. P! comp.os.os9 Discussions about the os9 operating system. P comp.os.research Operating systems and related areas. (Moderated) P*************** P*** 64,65 P comp.os.research Operating systems and related areas. (Moderated) P comp.os.vms DEC's VAX* line of computers & VMS. P P--- 98,101 ----- P comp.os.research Operating systems and related areas. (Moderated) P+ comp.os.rsts Topics related to the PDP-11 RSTS/E operating system. P+ comp.os.v The V distributed operating system from Stanford. P comp.os.vms DEC's VAX* line of computers & VMS. P*************** P*** 65,66 P comp.os.vms DEC's VAX* line of computers & VMS. P comp.periphs Peripheral devices. P P--- 101,104 ----- P comp.os.vms DEC's VAX* line of computers & VMS. P+ comp.os.xinu The XINU operating system from Purdue (D. Comer). P+ comp.parallel Massively parallel hardware/software. (Moderated) P comp.periphs Peripheral devices. P*************** P*** 66,67 P comp.periphs Peripheral devices. P comp.protocols.appletalk Applebus hardware & software. P P--- 104,106 ----- P comp.periphs Peripheral devices. P+ comp.periphs.printers Information on printers. P comp.protocols.appletalk Applebus hardware & software. P*************** P*** 67,68 P comp.protocols.appletalk Applebus hardware & software. P comp.protocols.kermit Info about the Kermit package. (Moderated) P P--- 106,112 ----- P comp.protocols.appletalk Applebus hardware & software. P+ comp.protocols.ibm Networking with IBM mainframes. P+ comp.protocols.iso The ISO protocol stack. P+ comp.protocols.iso.dev-environ The ISO Development Environment. P+ comp.protocols.iso.x400 X400 mail protocol discussions. (Moderated) P+ comp.protocols.iso.x400.gateway X400 mail gateway discussions. (Moderated) P comp.protocols.kermit Info about the Kermit package. (Moderated) P*************** P*** 69,70 P comp.protocols.misc Various forms and types of FTP protocol. P comp.protocols.tcp-ip TCP and IP network protocols. P P--- 113,117 ----- P comp.protocols.misc Various forms and types of FTP protocol. P+ comp.protocols.nfs Discussion about the Network File System protocol. P+ comp.protocols.pcnet Topics related to PCNET (a personal computer network). P+ comp.protocols.pup The Xerox PUP network protocols. P comp.protocols.tcp-ip TCP and IP network protocols. P*************** P*** 70,71 P comp.protocols.tcp-ip TCP and IP network protocols. P comp.risks Risks to the public from computers & users. (Moderated) P P--- 117,120 ----- P comp.protocols.tcp-ip TCP and IP network protocols. P+ comp.protocols.tcp-ip.domains Topics related to Domain Style names. P+ comp.protocols.tcp-ip.ibmpc TCP/IP for IBM(-like) personal computers. P comp.risks Risks to the public from computers & users. (Moderated) P*************** P*** 71,72 P comp.risks Risks to the public from computers & users. (Moderated) P comp.society The impact of technology on society. (Moderated) P P--- 120,122 ----- P comp.risks Risks to the public from computers & users. (Moderated) P+ comp.simulation Simulation methods, problems, uses. (Moderated) P comp.society The impact of technology on society. (Moderated) P*************** P*** 72,73 P comp.society The impact of technology on society. (Moderated) P comp.sources.amiga Source code-only postings for the Amiga. (Moderated) P P--- 122,126 ----- P comp.society The impact of technology on society. (Moderated) P+ comp.society.futures Events in technology affecting future computing. P+ comp.society.women Women's roles and problems in computing (Moderated) P+ comp.software-eng Software Engineering and related topics. P comp.sources.amiga Source code-only postings for the Amiga. (Moderated) P*************** P*** 77,78 P comp.sources.games Postings of recreational software. (Moderated) P comp.sources.mac Software for the Apple Macintosh. (Moderated) P P--- 130,132 ----- P comp.sources.games Postings of recreational software. (Moderated) P+ comp.sources.games.bugs Bug reports and fixes for posted game software. P comp.sources.mac Software for the Apple Macintosh. (Moderated) P*************** P*** 79,81 P comp.sources.misc Posting of software . (Moderated) P! comp.sources.unix Postings of public-domain sources. (Moderated) P comp.sources.wanted Requests for software and fixes. P P--- 133,135 ----- P comp.sources.misc Posting of software . (Moderated) P! comp.sources.unix Postings of complete, UNIX-oriented sources. (Moderated) P comp.sources.wanted Requests for software and fixes. P*************** P*** 81,83 P comp.sources.wanted Requests for software and fixes. P! comp.std.c Discussion about C language standards. (Moderated) P comp.std.internat Discussion about international standards. P P--- 135,138 ----- P comp.sources.wanted Requests for software and fixes. P! comp.sources.x Software for the X windows system. (Moderated) P! comp.std.c Discussion about C language standards. P comp.std.internat Discussion about international standards. P*************** P*** 83,85 P comp.std.internat Discussion about international standards. P! comp.std.misc Discussion about various standards. (Moderated) P comp.std.mumps Discussion for the X11.1 committee on Mumps. (Moderated) P P--- 138,140 ----- P comp.std.internat Discussion about international standards. P! comp.std.misc Discussion about various standards. P comp.std.mumps Discussion for the X11.1 committee on Mumps. (Moderated) P*************** P*** 87,88 P comp.sys.amiga Commodore Amiga: info&uses, but no programs. P comp.sys.apollo Apollo computer systems. P P--- 142,144 ----- P comp.sys.amiga Commodore Amiga: info&uses, but no programs. P+ comp.sys.amiga.tech Technical discussion about the Amiga. P comp.sys.apollo Apollo computer systems. P*************** P*** 93,94 P comp.sys.cbm Discussion about Commodore micros. P comp.sys.dec Discussions about DEC computer systems. P P--- 149,152 ----- P comp.sys.cbm Discussion about Commodore micros. P+ comp.sys.cdc Control Data Corporation Computers (e.g., Cybers). P+ comp.sys.celerity Celerity Computers P comp.sys.dec Discussions about DEC computer systems. P*************** P*** 94,95 P comp.sys.dec Discussions about DEC computer systems. P comp.sys.hp Discussion about Hewlett-Packard equipment. P P--- 152,156 ----- P comp.sys.dec Discussions about DEC computer systems. P+ comp.sys.dec.micro DEC Micros (Rainbow, Professional 350/380) P+ comp.sys.encore Encore's MultiMax computers. P+ comp.sys.handhelds Handheld computers and programmable calculators. P comp.sys.hp Discussion about Hewlett-Packard equipment. P*************** P*** 97,99 P comp.sys.ibm.pc.digest The IBM PC, PC-XT, and PC-AT. (Moderated) P! comp.sys.intel Disucussions about Intel systems and parts. P comp.sys.m6809 Discussion about 6809's. P P--- 158,162 ----- P comp.sys.ibm.pc.digest The IBM PC, PC-XT, and PC-AT. (Moderated) P! comp.sys.ibm.pc.rt Topics related to IBM's RT computer. P! comp.sys.intel Discussions about Intel systems and parts. P! comp.sys.intel.ipsc310 Anything related to Xenix on an Intel 310. P comp.sys.m6809 Discussion about 6809's. P*************** P*** 103,104 P comp.sys.mac.digest Apple Macintosh: info&uses, but no programs. (Moderated) P comp.sys.masscomp The Masscomp line of computers. (Moderated) P P--- 166,169 ----- P comp.sys.mac.digest Apple Macintosh: info&uses, but no programs. (Moderated) P+ comp.sys.mac.hypercard The Macintosh Hypercard: info & uses. P+ comp.sys.mac.programmer Discussion by people programming the Apple Macintosh. P comp.sys.masscomp The Masscomp line of computers. (Moderated) P*************** P*** 105,106 P comp.sys.misc Discussion about computers of all kinds. P comp.sys.nsc.32k National Semiconductor 32000 series chips. P P--- 170,173 ----- P comp.sys.misc Discussion about computers of all kinds. P+ comp.sys.next Discussion about the new NeXT computer. P+ comp.sys.northstar Northstar microcomputer users. P comp.sys.nsc.32k National Semiconductor 32000 series chips. P*************** P*** 106,107 P comp.sys.nsc.32k National Semiconductor 32000 series chips. P comp.sys.pyramid Pyramid 90x computers. P P--- 173,175 ----- P comp.sys.nsc.32k National Semiconductor 32000 series chips. P+ comp.sys.proteon Proteon gateway products. P comp.sys.pyramid Pyramid 90x computers. P*************** P*** 108,110 P comp.sys.ridge Ridge 32 computers and ROS. P! comp.sys.sequent Sequent systems, (esp. Balance 8000). (Moderated) P comp.sys.sun Sun "workstation" computers. (Moderated) P P--- 176,179 ----- P comp.sys.ridge Ridge 32 computers and ROS. P! comp.sys.sequent Sequent systems, (Balance and Symmetry). P! comp.sys.sgi Silicon Graphics's Iris workstations and software. P comp.sys.sun Sun "workstation" computers. (Moderated) P*************** P*** 110,111 P comp.sys.sun Sun "workstation" computers. (Moderated) P comp.sys.tandy Discussion about TRS-80's. P P--- 179,182 ----- P comp.sys.sun Sun "workstation" computers. (Moderated) P+ comp.sys.super Supercomputers. P+ comp.sys.tahoe CCI 6/32, Harris HCX/7, & Sperry 7000 computers. P comp.sys.tandy Discussion about TRS-80's. P*************** P*** 112,113 P comp.sys.ti Discussion about Texas Instruments. P comp.sys.workstations Various workstation-type computers. (Moderated) P P--- 183,186 ----- P comp.sys.ti Discussion about Texas Instruments. P+ comp.sys.ti.explorer The Texas Instruments Explorer. P+ comp.sys.transputer The Transputer computer and OCCAM language. P comp.sys.workstations Various workstation-type computers. (Moderated) P*************** P*** 113,114 P comp.sys.workstations Various workstation-type computers. (Moderated) P comp.terminals All sorts of terminals. P P--- 186,190 ----- P comp.sys.workstations Various workstation-type computers. (Moderated) P+ comp.sys.xerox Xerox 1100 workstations and protocols. P+ comp.sys.zenith Heath terminals and related Zenith products. P+ comp.sys.zenith.z100 The Zenith Z-100 (Heath H-100) family of computers. P comp.terminals All sorts of terminals. P*************** P*** 114,115 P comp.terminals All sorts of terminals. P comp.text Text processing issues and methods. P P--- 190,193 ----- P comp.terminals All sorts of terminals. P+ comp.terminals.bitgraph The BB&N BitGraph Terminal. P+ comp.terminals.tty5620 AT&T Dot Mapped Display Terminals (5620 and BLIT). P comp.text Text processing issues and methods. P*************** P*** 115,117 P comp.text Text processing issues and methods. P! comp.text.desktop Technolgy & techniques of desktop publishing. (Moderated) P comp.unix Discussion of UNIX* features and bugs. (Moderated) P P--- 193,200 ----- P comp.text Text processing issues and methods. P! comp.text.desktop Technology & techniques of desktop publishing. P! comp.theory Theoretical Computer Science. P! comp.theory.cell-automata Discussion of all aspects of cellular automata. P! comp.theory.dynamic-sys Ergodic Theory and Dynamical Systems. P! comp.theory.info-retrieval Information Retrieval topics. (Moderated) P! comp.theory.self-org-sys Topics related to self-organization. P comp.unix Discussion of UNIX* features and bugs. (Moderated) P*************** P*** 117,118 P comp.unix Discussion of UNIX* features and bugs. (Moderated) P comp.unix.questions UNIX neophytes group. P P--- 200,204 ----- P comp.unix Discussion of UNIX* features and bugs. (Moderated) P+ comp.unix.aux The version of UNIX for Apple Macintosh II computers. P+ comp.unix.cray Cray computers and their operating systems. P+ comp.unix.microport Discussion of Microport's UNIX. P comp.unix.questions UNIX neophytes group. P*************** P*** 118,119 P comp.unix.questions UNIX neophytes group. P comp.unix.wizards Discussions, bug reports, and fixes on and for UNIX. P P--- 204,206 ----- P comp.unix.questions UNIX neophytes group. P+ comp.unix.ultrix Discussions about DEC's Ultrix. (Moderated) P comp.unix.wizards Discussions, bug reports, and fixes on and for UNIX. P*************** P*** 121,122 P comp.windows.misc Various issues about windowing systems. P comp.windows.news Sun Microsystems' NewS window system. P P--- 208,210 ----- P comp.windows.misc Various issues about windowing systems. P+ comp.windows.ms Window systems under MS/DOS. P comp.windows.news Sun Microsystems' NewS window system. P*************** P*** 135,137 P misc.misc Various discussions not fitting in any other group. P! misc.psi Paranormal abilities and experiences. (Moderated) P misc.taxes Tax laws and advice. P P--- 223,225 ----- P misc.misc Various discussions not fitting in any other group. P! misc.security Security in general, not just computers. (Moderated) P misc.taxes Tax laws and advice. P*************** P*** 148,150 P news.newsites Postings of new site announcements. P! news.software.b Discussion about B news software. P news.software.notes Notesfile software from the Univ. of Illinois. P P--- 236,239 ----- P news.newsites Postings of new site announcements. P! news.software.b Discussion about B-news-compatible software. P! news.software.nntp The Network News Transfer Protocol. P news.software.notes Notesfile software from the Univ. of Illinois. P*************** P*** 150,152 P news.software.notes Notesfile software from the Univ. of Illinois. P- news.stargate Discussion about satellite transmission of news. P news.sysadmin Comments directed to system administrators. P P--- 239,240 ----- P news.software.notes Notesfile software from the Univ. of Illinois. P news.sysadmin Comments directed to system administrators. P*************** P*** 152,155 P news.sysadmin Comments directed to system administrators. P! rec.arts.books Books of all genres, shapes, and sizes. P! rec.arts.comics The funnies, old and new. P rec.arts.drwho Discussion about Dr. Who. P P--- 240,244 ----- P news.sysadmin Comments directed to system administrators. P! rec.arts.anime Japanese animation fen discussion. P! rec.arts.books Books of all genres, and the publishing industry. P! rec.arts.comics Comic books and strips, graphic novels, sequential art. P rec.arts.drwho Discussion about Dr. Who. P*************** P*** 155,156 P rec.arts.drwho Discussion about Dr. Who. P rec.arts.movies Discussions of movies and movie making. P P--- 244,247 ----- P rec.arts.drwho Discussion about Dr. Who. P+ rec.arts.int-fiction Discussions about interactive fiction. P+ rec.arts.misc Discussions about the arts not in other groups. P rec.arts.movies Discussions of movies and movie making. P*************** P*** 159,161 P rec.arts.sf-lovers Science fiction lovers' newsgroup. P! rec.arts.startrek Star Trek, the TV show and the movies. P rec.arts.tv The boob tube, its history, and past and current shows. P P--- 250,252 ----- P rec.arts.sf-lovers Science fiction lovers' newsgroup. P! rec.arts.startrek Star Trek, the TV shows and the movies. P rec.arts.tv The boob tube, its history, and past and current shows. P*************** P*** 165,166 P rec.autos Automobiles, automotive products and laws. P rec.autos.tech Technical aspects of automobiles, et. al. P P--- 256,258 ----- P rec.autos Automobiles, automotive products and laws. P+ rec.autos.sport Discussion of organized, legal auto competitions. P rec.autos.tech Technical aspects of automobiles, et. al. P*************** P*** 170,171 P rec.boats Hobbyists interested in boating. P rec.food.cooking Food, cooking, cookbooks, and recipes. P P--- 262,265 ----- P rec.boats Hobbyists interested in boating. P+ rec.equestrian Discussion of things equestrian. P+ rec.folk-dancing Folk dances, dancers, and dancing. P rec.food.cooking Food, cooking, cookbooks, and recipes. P*************** P*** 172,174 P rec.food.drink Wines and spirits. P- rec.food.recipes Recipes from the USENET Cookbook (troff & text). (Moderated) P rec.food.veg Vegetarians. P P--- 266,267 ----- P rec.food.drink Wines and spirits. P rec.food.veg Vegetarians. P*************** P*** 182,183 P rec.games.misc Games and computer games. P rec.games.pbm Discussion about Play by Mail games. P P--- 275,277 ----- P rec.games.misc Games and computer games. P+ rec.games.moria Comments, hints, and info about the Moria game. P rec.games.pbm Discussion about Play by Mail games. P*************** P*** 183,184 P rec.games.pbm Discussion about Play by Mail games. P rec.games.rogue Discussion and hints about Rogue. P P--- 277,279 ----- P rec.games.pbm Discussion about Play by Mail games. P+ rec.games.programmer Discussion of adventure game programming. P rec.games.rogue Discussion and hints about Rogue. P*************** P*** 185,186 P rec.games.trivia Discussion about trivia. P rec.games.video Discussion about video games. P P--- 280,282 ----- P rec.games.trivia Discussion about trivia. P+ rec.games.vectrex The Vectrex game system. P rec.games.video Discussion about video games. P*************** P*** 192,194 P rec.humor.d Discussions on the content of rec.humor articles. P! rec.humor.spc The Stupid People's Court! (Moderated) P rec.mag Magazine summaries, tables of contents, etc. P P--- 288,290 ----- P rec.humor.d Discussions on the content of rec.humor articles. P! rec.humor.funny Jokes that are funny (in the moderator's opinion). (Moderated) P rec.mag Magazine summaries, tables of contents, etc. P*************** P*** 194,195 P rec.mag Magazine summaries, tables of contents, etc. P rec.mag.otherrealms Edited science fiction & fantasy "magazine". (Moderated) P P--- 290,292 ----- P rec.mag Magazine summaries, tables of contents, etc. P+ rec.mag.fsfnet A Science Fiction "fanzine." (Moderated) P rec.mag.otherrealms Edited science fiction & fantasy "magazine". (Moderated) P*************** P*** 196,197 P rec.misc General topics about recreational/participant sports. P rec.motorcycles Motorcycles and related products and laws. P P--- 293,295 ----- P rec.misc General topics about recreational/participant sports. P+ rec.models.rc Radio-controlled models for hobbyists. P rec.motorcycles Motorcycles and related products and laws. P*************** P*** 197,198 P rec.motorcycles Motorcycles and related products and laws. P rec.music.classical Discussion about classical music. P P--- 295,299 ----- P rec.motorcycles Motorcycles and related products and laws. P+ rec.music.beatles Postings about the Fab Four & their music. P+ rec.music.bluenote Discussion of jazz, blues, and related types of music. P+ rec.music.cd CDs -- availability and other discussions. P rec.music.classical Discussion about classical music. P*************** P*** 222,223 P sci.bio Biology and related sciences. P sci.crypt Different methods of data en/decryption. P P--- 323,325 ----- P sci.bio Biology and related sciences. P+ sci.bio.technology Any topic relating to biotechnology. P sci.crypt Different methods of data en/decryption. P*************** P*** 225,226 P sci.lang Natural languages, communication, etc. P sci.math Mathematical discussions and pursuits. P P--- 327,330 ----- P sci.lang Natural languages, communication, etc. P+ sci.lang.japan The Japanese language, both spoken and written. P+ sci.logic Logic -- math, philosophy & computational aspects. P sci.math Mathematical discussions and pursuits. P*************** P*** 226,227 P sci.math Mathematical discussions and pursuits. P sci.math.stat Statistics discussion. P P--- 330,332 ----- P sci.math Mathematical discussions and pursuits. P+ sci.math.num-analysis Numerical Analysis. P sci.math.stat Statistics discussion. P*************** P*** 229,231 P sci.med Medicine and its related products and regulations. P! sci.med.aids AIDS -- treatment, consequences, etc. (Moderated) P sci.misc Short-lived discussions on subjects in the sciences. P P--- 334,337 ----- P sci.med Medicine and its related products and regulations. P! sci.med.aids AIDS: treatment, pathology/biology of HIV, prevention. (Moderated) P! sci.military Discussion about science & the military. (Moderated) P sci.misc Short-lived discussions on subjects in the sciences. P*************** P*** 231,232 P sci.misc Short-lived discussions on subjects in the sciences. P sci.philosophy.tech Technical philosophy: math, science, logic, etc. P P--- 337,340 ----- P sci.misc Short-lived discussions on subjects in the sciences. P+ sci.nanotech Self-reproducing molecular-scale machines. (Moderated) P+ sci.philosophy.meta Discussions within the scope of "MetaPhilosophy." P sci.philosophy.tech Technical philosophy: math, science, logic, etc. P*************** P*** 233,234 P sci.physics Physical laws, properties, etc. P sci.research Research methods, funding, ethics, and whatever. P P--- 341,343 ----- P sci.physics Physical laws, properties, etc. P+ sci.psychology Topics related to psychology. P sci.research Research methods, funding, ethics, and whatever. P*************** P*** 238,240 P soc.culture.african Discussions about Africa & things African. P! soc.culture.celtic Group about Celtics (*not* basketball!). P soc.culture.greek Group about Greeks. P P--- 347,352 ----- P soc.culture.african Discussions about Africa & things African. P! soc.culture.arabic Technological & cultural issues, *not* politics. P! soc.culture.celtic Group about Celts (*not* basketball!). P! soc.culture.china About China and Chinese culture. P! soc.culture.esperanto The neutral international language Esperanto. P soc.culture.greek Group about Greeks. P*************** P*** 241,243 P soc.culture.indian Group for discussion about India & things Indian. P! soc.culture.jewish Group for discussion about Jewish culture & religion. P soc.culture.misc Group for discussion about other cultures. P P--- 353,356 ----- P soc.culture.indian Group for discussion about India & things Indian. P! soc.culture.japan Everything Japanese, except the Japanese language. P! soc.culture.jewish Jewish culture & religion. (cf. talk.politics.mideast) P soc.culture.misc Group for discussion about other cultures. P*************** P*** 258,259 P talk.philosophy.misc Philosophical musings on all topics. P talk.politics.misc Political discussions and ravings of all kinds. P P--- 371,373 ----- P talk.philosophy.misc Philosophical musings on all topics. P+ talk.politics.mideast Discussion & debate over Middle Eastern events. P talk.politics.misc Political discussions and ravings of all kinds. P*************** P*** 259,260 P talk.politics.misc Political discussions and ravings of all kinds. P talk.politics.theory Theory of politics and political systems. P P--- 373,375 ----- P talk.politics.misc Political discussions and ravings of all kinds. P+ talk.politics.soviet Discussion of Soviet politics, domestic and foreign. P talk.politics.theory Theory of politics and political systems. P PIndex: ndir.c PPrereq: 1.12 P*** old/ndir.c Sun Oct 18 18:04:00 1987 P--- ndir.c Sun Jan 15 19:49:01 1989 P*************** P*** 1,3 P #include "defs.h" P! #if !defined(BSD4_2) && !defined(BSD4_1C) && !defined(HP9K5) P #ifdef M_XENIX P P--- 1,3 ----- P #include "defs.h" P! #if !defined(READDIR) && !defined(BSD4_2) && !defined(HP9K5) P #ifdef M_XENIX P*************** P*** 9,11 P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.12 10/15/87"; P #endif /* SCCSID */ P P--- 9,11 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)ndir.c 1.13 1/15/89"; P #endif /* SCCSID */ P*************** P*** 142,143 P } P! #endif /* !BSD4_2 && !BSD4_1C && !HP9K5 */ P P--- 142,143 ----- P } P! #endif /* !READDIR && !BSD4_2 && !HP9K5 */ P PIndex: ndir.h PPrereq: 1.7 P*** old/ndir.h Thu Oct 8 00:22:06 1987 P--- ndir.h Sun Jan 15 19:49:01 1989 P*************** P*** 1,6 P! /* @(#)ndir.h 1.7 10/7/87 */ P! #if defined(HP9K5) P! /* He should have included it instead of this, but prevent confusion */ P! #include <ndir.h> P! #else /* other */ P #ifndef DEV_BSIZE P P--- 1,2 ----- P! /* @(#)ndir.h 1.8 1/15/89 */ P #ifndef DEV_BSIZE P*************** P*** 48,49 P #define rewinddir(dirp) seekdir((dirp), (long)0) P- #endif /* other */ P P--- 44 ----- P #define rewinddir(dirp) seekdir((dirp), (long)0) P PIndex: nntp.c PPrereq: 2.4 P*** old/nntp.c Fri Dec 4 02:52:14 1987 P--- nntp.c Sun Jan 15 19:49:01 1989 P*************** P*** 16,18 P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.4 11/30/87"; P #endif /* SCCSID */ P P--- 16,18 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)nntp.c 2.5 1/15/89"; P #endif /* SCCSID */ P*************** P*** 23,24 P #include "conf.h" P P P--- 23,31 ----- P #include "conf.h" P+ #ifdef SERVER_HOST P+ /* nntp 1.3 or earlier */ P+ #include "response_codes.h" P+ #else P+ /* nntp 1.5 or later */ P+ #include "nntp.h" P+ #endif P PIndex: params.h PPrereq: 2.28 P*** old/params.h Fri Dec 4 02:52:16 1987 P--- params.h Thu Jan 19 00:06:42 1989 P*************** P*** 4,6 P P! /* @(#)params.h 2.28 11/30/87 */ P P P--- 4,6 ----- P P! /* @(#)params.h 2.31 1/19/89 */ P P*************** P*** 105,106 P P #ifdef VMS P P--- 105,112 ----- P P+ #ifdef VOID_SIGNALS P+ typedef void (*SIGNAL_TYPE)(); P+ #else /* int signals */ P+ typedef int (*SIGNAL_TYPE)(); P+ #endif /* int signals */ P+ P #ifdef VMS P*************** P*** 129,131 P #define LOCKING P! #endif M_XENIX P P P--- 135,137 ----- P #define LOCKING P! #endif /* defined M_XENIX */ P P*************** P*** 154,159 P #ifdef READDIR P! #include <sys/dir.h> P! #else /* !READDIR */ P! #include "ndir.h" P! #endif /* !READDIR */ P P P--- 160,176 ----- P #ifdef READDIR P! # ifdef DIRENT P! # include <dirent.h> P! typedef struct dirent DIRECTORY_STRUCT; P! # else /* !DIRENT */ P! # ifdef HP9K5 P! # include <ndir.h> P! # else /* !HP9K5 */ P! # include <sys/dir.h> P! # endif /* !HP9K5 */ P! typedef struct direct DIRECTORY_STRUCT; P! # endif /* !DIRENT */ P! #else /* !READDIR */ P! # include "ndir.h" P! typedef struct direct DIRECTORY_STRUCT; P! #endif /* !READDIR */ P P*************** P*** 166,167 P P #define STRCMP(a,b) ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1)) P P--- 183,191 ----- P P+ /* The gould compiler really sucks */ P+ #ifdef gould P+ #define STRCMP(a,b) strcmp(a,b) P+ #define STRNCMP(a,b,n) strncmp(a,b,n) P+ extern char charmap[]; P+ #define PREFIX(a,b) prefix(a,b) P+ #else P #define STRCMP(a,b) ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1)) P*************** P*** 170,171 P #define PREFIX(a,b) ((charmap[*(a)] != charmap[*(b)]) ? FALSE : prefix((a)+1, (b)+1)) P #define MKTEMP(a) {if (mktemp(a) == 0) xerror("mktemp(%s): ", a);} P P--- 194,196 ----- P #define PREFIX(a,b) ((charmap[*(a)] != charmap[*(b)]) ? FALSE : prefix((a)+1, (b)+1)) P+ #endif /* gould */ P #define MKTEMP(a) {if (mktemp(a) == 0) xerror("mktemp(%s): ", a);} P PIndex: pathinit.c PPrereq: 1.25 P*** old/pathinit.c Mon Nov 23 19:13:29 1987 P--- pathinit.c Sun Jan 15 19:49:02 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 36,38 P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.25 11/19/87"; P #endif /* SCCSID */ P P--- 36,38 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)pathinit.c 1.26 1/15/89"; P #endif /* SCCSID */ P*************** P*** 215,218 P #ifndef NFSCLIENT P! Sprintf(ARTICLE, "%s/.arXXXXXX", SPOOL); P! Sprintf(INFILE, "%s/.inXXXXXX", SPOOL); P #else /* NFSCLIENT */ P P--- 215,218 ----- P #ifndef NFSCLIENT P! Sprintf(ARTICLE, "%s/.tmp/.arXXXXXX", SPOOL); P! Sprintf(INFILE, "%s/.tmp/.inXXXXXX", SPOOL); P #else /* NFSCLIENT */ P*************** P*** 307,308 P mp->m_who_to = ""; P } P P--- 307,309 ----- P mp->m_who_to = ""; P+ (void) fclose(nfd); P } P PIndex: postnews.c PPrereq: 1.36 P*** old/postnews.c Fri Dec 4 02:52:20 1987 P--- postnews.c Sun Jan 15 19:49:03 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.36 11/30/87"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.37 1/15/89"; P #endif /* SCCSID */ P*************** P*** 43,44 P char newsgroups[BUFLEN]; P char isfrom[BUFLEN]; P P--- 43,45 ----- P char newsgroups[BUFLEN]; P+ char followupto[BUFLEN]; P char isfrom[BUFLEN]; P*************** P*** 455,456 P fprintf(tf, "Newsgroups: %s\n", newsgroups); P if (distribution[0] != '\0' && STRCMP(distribution, "world")) P P--- 456,461 ----- P fprintf(tf, "Newsgroups: %s\n", newsgroups); P+ P+ if (followupto[0] != '\0') P+ fprintf(tf, "Followup-To: %s\n", followupto); P+ P if (distribution[0] != '\0' && STRCMP(distribution, "world")) P*************** P*** 460,461 P fprintf(tf, "Keywords: %s\n", keywords); P if (summary[0] != '\0') P P--- 465,467 ----- P fprintf(tf, "Keywords: %s\n", keywords); P+ P if (summary[0] != '\0') P*************** P*** 468,470 P of = xfopen(original, "r"); P! while (fgets(buf, BUFSIZ, of) != NULL) P if (buf[0] == '\n') /* skip headers */ P P--- 474,476 ----- P of = xfopen(original, "r"); P! while (fgets(buf, BUFLEN, of) != NULL) P if (buf[0] == '\n') /* skip headers */ P*************** P*** 472,474 P fprintf(tf, "In article %s, %s writes:\n", msgid, isfrom); P! while (fgets(buf, BUFSIZ, of) != NULL) P fprintf(tf, "> %s", buf); P P--- 478,480 ----- P fprintf(tf, "In article %s, %s writes:\n", msgid, isfrom); P! while (fgets(buf, BUFLEN, of) != NULL) P fprintf(tf, "> %s", buf); P*************** P*** 586,587 P P if (ngmatch(newsgroups, "rec.humor,!rec.humor.all")) { P P--- 592,602 ----- P P+ #ifdef SunIII P+ if P+ ( P+ ngmatch(newsgroups, "rec.humor,!rec.humor.all") P+ || P+ ngmatch(newsgroups, "aus.jokes,!aus.jokes.d") P+ ) P+ { P+ #else P if (ngmatch(newsgroups, "rec.humor,!rec.humor.all")) { P*************** P*** 587,588 P if (ngmatch(newsgroups, "rec.humor,!rec.humor.all")) { P if (askyes("Could this be offensive to anyone? ","")) { P P--- 602,604 ----- P if (ngmatch(newsgroups, "rec.humor,!rec.humor.all")) { P+ #endif P if (askyes("Could this be offensive to anyone? ","")) { P*************** P*** 595,597 P P! if (ngmatch(newsgroups, "comp.sources.all,!comp.sources.wanted,!comp.sources.d")) { P if (!article_line(tempfname, "Subject: ", group)) { P P--- 611,613 ----- P P! if (ngmatch(newsgroups, "comp.sources.all,!comp.sources.wanted,!comp.sources.d,!comp.sources.bugs")) { P if (!article_line(tempfname, "Subject: ", group)) { P*************** P*** 618,621 P if (ngmatch(newsgroups, "comp.sources.all")) { P! if (!ngmatch(newsgroups, "comp.sources.wanted") && P! stbuf.st_size < (4*1024)) { P printf("Your article seems rather small to be a source distribution.\n"); P P--- 634,636 ----- P if (ngmatch(newsgroups, "comp.sources.all")) { P! if (stbuf.st_size < (4*1024)) { P printf("Your article seems rather small to be a source distribution.\n"); P*************** P*** 637,638 P } P } P P--- 652,663 ----- P } P+ if (index(newsgroups, NGDELIM) != NULL && followupto[0] == '\0') { P+ printf("Your article is being posted to multiple newsgroups.\n"); P+ printf("In which newsgroup should the responses be posted?\n"); P+ printf("Newsgroups: %s\n", newsgroups); P+ printf("(If responses should be mailed to you, enter \"poster\")\n"); P+ getpr("Followup-To: ", followupto); P+ if (followupto[0] != '\0') P+ modify_article(tempfname, "Followup-To: ", followupto, P+ APPEND); P+ } P } P*************** P*** 1084,1086 P } P- P get_summary(); P P--- 1109,1110 ----- P } P get_summary(); P PIndex: patchlevel.h PPrereq: 15 P*** .d/patchlevel.h Fri Dec 4 02:52:37 1987 P--- patchlevel.h Mon Jan 23 17:22:22 1989 P*************** P*** 1,2 P! #define PATCHLEVEL 15 P P P--- 1,2 ----- P! #define PATCHLEVEL 16 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 1/14/89" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11 1/23/89" P P--- end of patch 16 --- P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.17... ' sed 's/^P//' >patch.17 <<\PSHAREND PFrom rick@uunet.UU.NET Tue Jan 24 22:28:01 1989 PPath: uunet!rick PFrom: rick@uunet.UU.NET (Rick Adams) PNewsgroups: news.software.b PSubject: Patch #17 for news 2.11 source PSummary: part three of three PMessage-ID: <47350@uunet.UU.NET> PDate: 25 Jan 89 03:28:01 GMT PReferences: <47348@uunet.UU.NET> <47349@uunet.UU.NET> POrganization: UUNET Communications Services, Arlington, VA PLines: 1441 P PDescription: P This is the third part of three patches. After applying this P you should be at patchlevel 17. P PFix: P apply this in the same manner as patch 15 and 16. P P Don't forget the "make update". P PIndex: readr.c PPrereq: 2.66 P*** old/readr.c Fri Dec 4 02:52:24 1987 P--- readr.c Sun Jan 22 22:18:21 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.66 11/30/87"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.70 1/22/89"; P #endif /* SCCSID */ P*************** P*** 32,34 P P! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr;ongsize = pngsize P #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) P P--- 32,34 ----- P P! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr P #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) P*************** P*** 53,55 P static int rfq = 0; /* for last article */ P- static long ongsize; /* Previous ngsize */ P static long pngsize; /* Printing ngsize */ P P--- 53,54 ----- P static int rfq = 0; /* for last article */ P static long pngsize; /* Printing ngsize */ P*************** P*** 56,58 P static char *bptr; /* temp pointer. */ P- static struct srec srec; /* srec for sys file entries */ P static char *tfilename; /* temporary file name */ P P--- 55,56 ----- P static char *bptr; /* temp pointer. */ P static char *tfilename; /* temporary file name */ P*************** P*** 70,72 P static FILE *fp; /* current article to be printed*/ P- static int holdup; /* 1 iff should stop before hdr */ P static int ignorenews; /* 1 iff readnews -p > /dev/null*/ P P--- 68,69 ----- P static FILE *fp; /* current article to be printed*/ P static int ignorenews; /* 1 iff readnews -p > /dev/null*/ P*************** P*** 157,159 P int nlines; P! int (*ointr)(); P #ifdef SIGCONT P P--- 154,156 ----- P int nlines; P! SIGNAL_TYPE ointr; P #ifdef SIGCONT P*************** P*** 159,161 P #ifdef SIGCONT P! int (*ocont)(); P #endif /* SIGCONT */ P P--- 156,158 ----- P #ifdef SIGCONT P! SIGNAL_TYPE ocont; P #endif /* SIGCONT */ P*************** P*** 552,554 P (void) strcpy(bfr, groupdir); P! selectng(ogroupdir, TRUE, PERHAPS); P (void) strcpy(groupdir, ogroupdir); P P--- 549,551 ----- P (void) strcpy(bfr, groupdir); P! selectng(ogroupdir, FALSE, PERHAPS); P (void) strcpy(groupdir, ogroupdir); P*************** P*** 647,649 P } P! \f P cancel_command() P P--- 644,646 ----- P } P! P cancel_command() P*************** P*** 650,651 P { P int notauthor; P P--- 647,649 ----- P { P+ register char *poster; P int notauthor; P*************** P*** 651,652 P int notauthor; P tfilename = filename; P P--- 649,652 ----- P int notauthor; P+ char *tailpath(); P+ P tfilename = filename; P*************** P*** 662,668 P readmode = SPEC; P! (void) strcpy(rcbuf, hptr->path); P! ptr1 = index(rcbuf, ' '); P! if (ptr1) P! *ptr1 = 0; P! notauthor = STRCMP(username, rcbuf); P if (uid != ROOTID && uid && notauthor) { P P--- 662,665 ----- P readmode = SPEC; P! poster = tailpath(hptr); P! notauthor = STRCMP(username, poster); P if (uid != ROOTID && uid && notauthor) { P*************** P*** 668,670 P if (uid != ROOTID && uid && notauthor) { P! fprintf(ofp, "Can't cancel what you didn't write.\n"); P return FALSE; P P--- 665,669 ----- P if (uid != ROOTID && uid && notauthor) { P! fprintf(ofp, P! "You (%s) can't cancel someone else's (%s) article.\n", P! username,poster); P return FALSE; P*************** P*** 682,684 P } P! \f P reply_command() P P--- 681,683 ----- P } P! P reply_command() P*************** P*** 829,831 P } P- \f P xmit_command() P P--- 828,829 ----- P } P xmit_command() P*************** P*** 832,833 P { P tfilename = filename; P P--- 830,837 ----- P { P+ #ifdef u370 P+ static struct srec srec; P+ #else /* !u370 */ P+ struct srec srec; P+ #endif /* !u370 */ P+ P tfilename = filename; P*************** P*** 856,858 P } P! \f P next_ng_command() P P--- 860,862 ----- P } P! P next_ng_command() P*************** P*** 891,893 P back(); P! selectng(bptr, TRUE, TRUE); P return FALSE; P P--- 895,897 ----- P back(); P! selectng(bptr, FALSE, TRUE); P return FALSE; P*************** P*** 894,896 P } P! \f P caesar_command() P P--- 898,900 ----- P } P! P caesar_command() P*************** P*** 915,917 P } P! \f P /* P P--- 919,921 ----- P } P! P /* P*************** P*** 964,966 P pout(ofp); P- holdup = TRUE; P } P P--- 968,969 ----- P pout(ofp); P } P*************** P*** 970,972 P } P! \f P /* P P--- 973,975 ----- P } P! P /* P*************** P*** 983,985 P register DIR *dirp; P! register struct direct *dir; P #endif /* !SERVER */ P P--- 986,988 ----- P register DIR *dirp; P! register DIRECTORY_STRUCT *dir; P #endif /* !SERVER */ P*************** P*** 1103,1105 P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != CHAR_OK) { P if (rflag) P P--- 1106,1108 ----- P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != '2') { P if (rflag) P*************** P*** 1258,1260 P #ifdef SERVER P! (void) unlink(active_name()); P close_server(); P P--- 1261,1266 ----- P #ifdef SERVER P! if (active_name() != NULL) P! (void) unlink(active_name()); P! if (article_name() != NULL) P! (void) unlink(article_name()); P close_server(); P PIndex: recmail.c PPrereq: 1.16 P*** old/recmail.c Wed Oct 7 16:54:25 1987 P--- recmail.c Tue Jan 17 13:09:30 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 22,24 P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.16 9/24/87"; P #endif /* SCCSID */ P P--- 22,24 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.18 1/17/89"; P #endif /* SCCSID */ P*************** P*** 39,41 P FILE *fd; P! char *tmpf; P FILE *errfd; P P--- 39,41 ----- P FILE *fd; P! static char tmpf[] = "/tmp/rmXXXXXX"; P FILE *errfd; P*************** P*** 41,43 P FILE *errfd; P! char *errf; P char linebuf[1024]; P P--- 41,43 ----- P FILE *errfd; P! static char errf[] = "/tmp/rmXXXXXX"; P char linebuf[1024]; P*************** P*** 49,51 P P! tmpf = mktemp("/tmp/rmXXXXXX"); P (void) close(creat(tmpf,0666)); P P--- 49,51 ----- P P! mktemp(tmpf); P (void) close(creat(tmpf,0666)); P*************** P*** 52,54 P fd = fopen(tmpf, "w"); P! errf = mktemp("/tmp/rmXXXXXX"); P (void) close(creat(errf,0666)); P P--- 52,54 ----- P fd = fopen(tmpf, "w"); P! mktemp(errf); P (void) close(creat(errf,0666)); P*************** P*** 67,70 P } P! else if (fputs(linebuf, fd) == EOF) P! goto werror; P if (linebuf[0] == '\n') P P--- 67,73 ----- P } P! else { P! fputs(linebuf, fd); P! if (ferror(fd)) P! goto werror; P! } P if (linebuf[0] == '\n') P*************** P*** 82,84 P while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { P! if (fputs(linebuf, fd) == EOF) { P werror: P P--- 85,88 ----- P while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { P! fputs(linebuf, fd); P! if (ferror(fd)) { P werror: P*************** P*** 162,163 P exit (0); P } P P--- 166,168 ----- P exit (0); P+ /*NOTREACHED*/ P } P PIndex: recnews.c PPrereq: 2.18 P*** old/recnews.c Fri Dec 4 02:52:27 1987 P--- recnews.c Tue Jan 17 13:09:30 1989 P*************** P*** 50,52 P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.18 12/4/87"; P #endif /* SCCSID */ P P--- 50,52 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)recnews.c 2.20 1/17/89"; P #endif /* SCCSID */ P*************** P*** 253,254 P exit(0); P } P P--- 253,255 ----- P exit(0); P+ /*NOTREACHED*/ P } P*************** P*** 390,392 P register char *bcp = cmd-1; P! while (*cmd && *cmd != '"') P *bcp++ = *cmd++; P P--- 391,398 ----- P register char *bcp = cmd-1; P! while (*cmd) { P! if(*cmd == '\\') { P! cmd++; P! *bcp++ = *cmd++; P! } else if (*cmd == '"') P! break; P *bcp++ = *cmd++; P*************** P*** 392,393 P *bcp++ = *cmd++; P *bcp = '\0'; P P--- 398,400 ----- P *bcp++ = *cmd++; P+ } P *bcp = '\0'; P*************** P*** 419,421 P { P! register f, r, (*hstat)(), (*istat)(), (*qstat)(); P int status; P P--- 426,429 ----- P { P! register int f, r; P! SIGNAL_TYPE hstat, istat, qstat; P int status; P PIndex: rfuncs.c PPrereq: 2.44 P*** old/rfuncs.c Fri Dec 4 02:52:29 1987 P--- rfuncs.c Thu Jan 19 00:06:44 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.44 11/30/87"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.47 1/19/89"; P #endif /* SCCSID */ P*************** P*** 620,622 P P! static char *newactivename = "/tmp/newsaXXXXXX"; P #endif /* SORTACTIVE */ P P--- 620,622 ----- P P! static char newactivename[] = "/tmp/newsaXXXXXX"; P #endif /* SORTACTIVE */ P*************** P*** 678,679 P if (tp->rcindex < 0) { P if (++line > LINES) P P--- 678,684 ----- P if (tp->rcindex < 0) { P+ /* P+ ** If there aren't any articles in the group, skip it. P+ */ P+ if (tp->maxart == 0) P+ continue; P if (++line > LINES) P*************** P*** 709,712 P } else { P- fprintf(stderr, "Duplicate .newsrc line or bad group %s\n", P- rcline[lastline]); P lentab[lastline] = 0; P P--- 714,715 ----- P } else { P lentab[lastline] = 0; P*************** P*** 769,771 P register DIR *dirp; P! register struct direct *dir; P #endif /* !SERVER */ P P--- 772,774 ----- P register DIR *dirp; P! register DIRECTORY_STRUCT *dir; P #endif /* !SERVER */ P*************** P*** 775,777 P unsigned int alloc_size; P! int (*old_sig) (); P extern lg_trap(); P P--- 778,780 ----- P unsigned int alloc_size; P! SIGNAL_TYPE old_sig; P extern lg_trap(); P*************** P*** 806,808 P #ifdef SERVER P! for(i = lowgp; i < highgp; i++){ P #else /* !SERVER */ P P--- 809,811 ----- P #ifdef SERVER P! for(i = lowgp; i <= highgp; i++){ P #else /* !SERVER */ P*************** P*** 898,900 P } P- #endif /* !SMALL_ADDRESS_SPACE */ P P P--- 901,902 ----- P } P P*************** P*** 908 P } P P--- 910,911 ----- P } P+ #endif /* !SMALL_ADDRESS_SPACE */ P PIndex: rfuncs2.c PPrereq: 1.36 P*** old/rfuncs2.c Fri Dec 4 02:52:30 1987 P--- rfuncs2.c Tue Jan 17 13:09:31 1989 P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.36 11/30/87"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs2.c 1.37 1/17/89"; P #endif /* SCCSID */ P*************** P*** 302,303 P */ P /* ARGSUSED */ P P--- 302,304 ----- P */ P+ #ifndef fileno P /* ARGSUSED */ P*************** P*** 303,304 P /* ARGSUSED */ P qfflush(fp) P P--- 304,306 ----- P /* ARGSUSED */ P+ #endif /* !defined fileno */ P qfflush(fp) P PIndex: sendbatch.sh PPrereq: 1.16 P*** old/sendbatch.sh Fri Dec 4 02:52:32 1987 P--- sendbatch.sh Sun Jan 15 23:04:11 1989 P*************** P*** 1,2 P! : '@(#)sendbatch.sh 1.16 12/1/87' P P P--- 1,2 ----- P! : '@(#)sendbatch.sh 1.20 1/15/89' P P*************** P*** 2,6 P P! cflags= P! LIM=50000 P! MINDF=MINDISKFREE P MAXBATCH=MAXPERBATCH P P--- 2,6 ----- P P! LIB=LIBDIR P! BATCH=BATCHDIR P! LIM=50000 P MAXBATCH=MAXPERBATCH P*************** P*** 6,9 P MAXBATCH=MAXPERBATCH P! SPOOLDISK=SPOOL_DISK P! CMD='LIBDIR/batch BATCHDIR/$rmt $BLIM' P ECHO= P P--- 6,10 ----- P MAXBATCH=MAXPERBATCH P! RNEWS=rnews P! UUX_FLAGS="UUXFLAGS" P! CMD='$LIB/batch $BATCH/$rmt $BLIM' P ECHO= P*************** P*** 11,12 P C7= P DOIHAVE= P P--- 12,14 ----- P C7= P+ cflags= P DOIHAVE= P*************** P*** 12,14 P DOIHAVE= P! RNEWS=rnews P P P--- 14,17 ----- P DOIHAVE= P! SPOOLDISK=SPOOL_DISK P! MINDF=MINDISKFREE P P*************** P*** 17,19 P case $rmt in P- -[bBC]*) cflags="$cflags $rmt"; continue;; P -s*) LIM=`expr "$rmt" : '-s\(.*\)'` P P--- 20,21 ----- P case $rmt in P -s*) LIM=`expr "$rmt" : '-s\(.*\)'` P*************** P*** 20,23 P continue;; P! -c7) COMP='| LIBDIR/compress $cflags' P! C7='| LIBDIR/encode' P ECHO='echo "#! c7unbatch"' P P--- 22,33 ----- P continue;; P! -m*) MAXBATCH=`expr "$rmt" : '-m\(.*\)'` P! continue;; P! +m*) MAXBATCH='' P! continue;; P! -r*) RNEWS=`expr "$rmt" : '-r\(.*\)'` P! continue;; P! -u*) UUX_FLAGS=`expr "$rmt" : '-u\(.*\)'` P! continue;; P! -c7) COMP='| $LIB/compress $cflags' P! C7='| $LIB/encode' P ECHO='echo "#! c7unbatch"' P*************** P*** 24,26 P continue;; P! -c) COMP='| LIBDIR/compress $cflags' P ECHO='echo "#! cunbatch"' P P--- 34,36 ----- P continue;; P! -c) COMP='| $LIB/compress $cflags' P ECHO='echo "#! cunbatch"' P*************** P*** 27,28 P continue;; P -o*) ECHO=`expr "$rmt" : '-o\(.*\)'` P P--- 37,44 ----- P continue;; P+ +c*) COMP='' P+ C7='' P+ ECHO='' P+ cflags='' P+ continue;; P+ -[bBC]*) cflags="$cflags $rmt"; continue;; P -o*) ECHO=`expr "$rmt" : '-o\(.*\)'` P*************** P*** 30,31 P continue;; P -i*) DOIHAVE=`expr "$rmt" : '-i\(.*\)'` P P--- 46,50 ----- P continue;; P+ +o*) ECHO='' P+ RNEWS=rnews P+ continue;; P -i*) DOIHAVE=`expr "$rmt" : '-i\(.*\)'` P*************** P*** 36,38 P continue;; P! -m*) MAXBATCH=`expr "$rmt" : '-m\(.*\)'` P continue;; P P--- 55,57 ----- P continue;; P! +i*) DOIHAVE='' P continue;; P*************** P*** 38,39 P continue;; P esac P P--- 57,62 ----- P continue;; P+ -D*) SPOOLDISK=`expr "$rmt" : '-D\(.*\)'` P+ continue;; P+ +D*) SPOOLDISK='' P+ continue;; P esac P*************** P*** 40,44 P P! df=`df $SPOOLDISK | awk "\\$6 == \\"$SPOOLDISK\" {print \\$4} P! \\$1 == \\"$SPOOLDISK\\" {print \\$3}"` P! if test ! -z "$df" -a \( "$df" -lt $MINDF \) P then P P--- 63,65 ----- P P! if test -n "$SPOOLDISK" P then P*************** P*** 44,47 P then P! echo not enough space on $SPOOLDISK: $df P! continue P fi P P--- 65,77 ----- P then P! df=`df $SPOOLDISK | awk ' P! $6 == "'$SPOOLDISK'" {print $4;exit} P! $1 == "'$SPOOLDISK'" && NF == 7 {print $4;exit} P! $2 == "'$SPOOLDISK'" {print $5;exit} P! $1 == "'$SPOOLDISK'" {print $3;exit} P! '` P! if test ! -z "$df" -a \( "$df" -lt $MINDF \) P! then P! echo $rmt: not enough space on $SPOOLDISK: $df P! continue P! fi P fi P*************** P*** 48,50 P P! if test -s /tmp/uuq.output P then P P--- 78,80 ----- P P! if test -n "$MAXBATCH" P then P*************** P*** 50,54 P then P! q=`echo "$rmt" | sed 's/\(.......\).*/\1/'` P! q=`awk "\\$1 == \\"$q:\\" { print \\$4;exit}" </tmp/uuq.output` P! if test ! -z "$q" -a \( "$q" -gt $MAXBATCH \) P then P P--- 80,83 ----- P then P! du=`du "/usr/spool/uucp/$rmt" | sed 's/ .*/000/'` P! if test ! -z "$du" -a \( "$du" -gt $MAXBATCH \) P then P*************** P*** 54,56 P then P! echo $rmt already has $q bytes queued P continue P P--- 83,85 ----- P then P! echo $rmt already has $du Kbytes queued P continue P*************** P*** 66,68 P P! : make sure $? is zero P sentbytes=0 P P--- 95,106 ----- P P! # only do ihave processing once, not every time through loop P! if test -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave P! then P! mv $BATCH/$rmt.ihave $BATCH/$rmt.$$ P! $LIB/inews -t "cmsg ihave $DOIHAVE" -n to.$rmt.ctl < \ P! $BATCH/$rmt.$$ P! rm $BATCH/$rmt.$$ P! fi P! P! # make sure $? is zero P sentbytes=0 P*************** P*** 69,73 P while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ P! \( \( $sentbytes -eq 0 -a -s BATCHDIR/$rmt \) -o \ P! -s BATCHDIR/$rmt.work -o \ P! \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \) P do P P--- 107,110 ----- P while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ P! \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ P! -s $BATCH/$rmt.work \) P do P*************** P*** 73,75 P do P! if test -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave P then P P--- 110,113 ----- P do P! (eval $ECHO; eval $CMD $COMP $C7) | P! if test -s $BATCH/$rmt.cmd P then P*************** P*** 75,81 P then P! mv BATCHDIR/$rmt.ihave BATCHDIR/$rmt.$$ P! LIBDIR/inews -t "cmsg ihave $DOIHAVE" -n to.$rmt.ctl < \ P! BATCHDIR/$rmt.$$ P! rm BATCHDIR/$rmt.$$ P! P else P P--- 113,115 ----- P then P! $BATCH/$rmt.cmd P else P*************** P*** 81,90 P else P! (eval $ECHO; eval $CMD $COMP $C7) | P! if test -s BATCHDIR/$rmt.cmd P! then P! BATCHDIR/$rmt.cmd P! else P! uux - UUXFLAGS $rmt!$RNEWS P! fi P! sentbytes=`expr $sentbytes + $LIM` P fi P P--- 115,117 ----- P else P! uux - $UUX_FLAGS $rmt!$RNEWS P fi P*************** P*** 90,91 P fi P done P P--- 117,119 ----- P fi P+ sentbytes=`expr $sentbytes + $LIM` P done P PIndex: sendnews.c PPrereq: 2.13 P*** old/sendnews.c Wed Oct 7 16:54:57 1987 P--- sendnews.c Tue Jan 17 13:09:31 1989 P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.13 9/24/87"; P #endif /* SCCSID */ P P--- 5,7 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)sendnews.c 2.14 1/17/89"; P #endif /* SCCSID */ P*************** P*** 77,78 P exit(0); P } P P--- 77,79 ----- P exit(0); P+ /*NOTREACHED*/ P } P PIndex: uname.c PPrereq: 2.17 P*** old/uname.c Mon Nov 23 19:13:34 1987 P--- uname.c Sun Jan 15 19:49:05 1989 P*************** P*** 1,3 P /* P! * This software is Copyright (c) 1986 by Rick Adams. P * P P--- 1,3 ----- P /* P! * This software is Copyright 1986, 1989 by Rick Adams. P * P*************** P*** 23,25 P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.17 11/19/87"; P #endif /* SCCSID */ P P--- 23,25 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)uname.c 2.18 1/15/89"; P #endif /* SCCSID */ P*************** P*** 27,29 P #ifdef BSD2_10 P! #include <shortnames.h> P #endif /* BSD2_10 */ P P--- 27,29 ----- P #ifdef BSD2_10 P! #include <short_names.h> P #endif /* BSD2_10 */ P*************** P*** 43,46 P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! for (cp = uptr->nodename; *cp == '\0'; cp++) P! if (isupper(*cp)) *cp = tolower(*cp); P cp = mydomain(); P P--- 43,47 ----- P gethostname(uptr->nodename, sizeof (uptr->nodename)); P! for (cp = uptr->nodename; *cp != '\0'; cp++) P! if (isupper(*cp)) P! *cp = tolower(*cp); P cp = mydomain(); P PIndex: uurec.c PPrereq: 2.11 P*** old/uurec.c Tue Mar 24 13:52:00 1987 P--- uurec.c Tue Jan 17 13:09:31 1989 P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.11 3/21/87"; P #endif /* SCCSID */ P P--- 5,7 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)uurec.c 2.13 1/17/89"; P #endif /* SCCSID */ P*************** P*** 32,35 P P! #ifdef debug P! # define RNEWS "cat" P #endif P P--- 32,36 ----- P P! #undef DEBUG P! #ifdef DEBUG P! # define RNEWS "/bin/cat" P #endif P*************** P*** 44,46 P { P! char buf[BFSZ], fbuf[BFSZ]; P char bfr[BFSZ], *pbfr = bfr; P P--- 45,47 ----- P { P! char buf[BFSZ], fbuf[BFSZ], senderbuf[BFSZ]; P char bfr[BFSZ], *pbfr = bfr; P*************** P*** 53,54 P frmflg = FALSE; P while (fgets(buf, BFSZ, stdin) != NULL) { P P--- 54,56 ----- P frmflg = FALSE; P+ senderbuf[0] = '\0'; P while (fgets(buf, BFSZ, stdin) != NULL) { P*************** P*** 54,56 P while (fgets(buf, BFSZ, stdin) != NULL) { P! #ifdef debug P printf("%o\t%s", mode|type(buf), buf); P P--- 56,58 ----- P while (fgets(buf, BFSZ, stdin) != NULL) { P! #ifdef DEBUG P printf("%o\t%s", mode|type(buf), buf); P*************** P*** 60,61 P case FROM | SKIPPING: P if (frmflg) P P--- 62,64 ----- P case FROM | SKIPPING: P+ strcpy(senderbuf, buf); P if (frmflg) P*************** P*** 64,65 P p = fbuf; P frmflg = TRUE; P P--- 67,71 ----- P p = fbuf; P+ #ifdef DEBUG P+ printf("From: %s\n", p); P+ #endif P frmflg = TRUE; P*************** P*** 81,83 P format = A; P! #ifdef debug P printf("format = %d\n", format); P P--- 87,89 ----- P format = A; P! #ifdef DEBUG P printf("format = %d\n", format); P*************** P*** 114,116 P fprintf(pipe, "%s\n", fbuf); P! } else P fputs(buf+1, pipe); P P--- 120,136 ----- P fprintf(pipe, "%s\n", fbuf); P! } else { P! if (senderbuf[0] != '\0') { P! register char *cp; P! #ifdef DEBUG P! printf("senderbuf: %s", P! senderbuf); P! #endif P! cp = index(senderbuf, ' '); P! if (cp != NULL) { P! fprintf(pipe, P! "Sender: %s", P! cp); P! } P! senderbuf[0] = '\0'; P! } P fputs(buf+1, pipe); P*************** P*** 116,117 P fputs(buf+1, pipe); P } P P--- 136,138 ----- P fputs(buf+1, pipe); P+ } P } P*************** P*** 130,131 P exit(0); P } P P--- 151,153 ----- P exit(0); P+ /*NOTREACHED*/ P } P*************** P*** 147,148 P P return(OTHER); P P--- 169,173 ----- P P+ if (strncmp(p, "From: ", 6) == 0) P+ return (FROM); P+ P return(OTHER); P*************** P*** 189,192 P garbled: P! strcat(buf, "???!"); P! return(buf+4); P } P P--- 214,217 ----- P garbled: P! strcat(buf, "GARBLED"); P! return(buf+7); P } P PIndex: virtterm.c PPrereq: 1.14 P*** old/virtterm.c Wed Oct 7 16:55:19 1987 P--- virtterm.c Sun Jan 15 19:49:06 1989 P*************** P*** 7,9 P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.14 9/24/87"; P #endif /* SCCSID */ P P--- 7,9 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.15 1/15/89"; P #endif /* SCCSID */ P*************** P*** 104,107 P int _dir = 1; P- int _shifttop, _shiftbot; P- int _shift; P int _scratched; P P--- 104,105 ----- P int _dir = 1; P int _scratched; P*************** P*** 108,109 P int vputc(); P P P--- 106,108 ----- P int vputc(); P+ static int _shifttop, _shiftbot, _shift; P P*************** P*** 401,403 P } P- for (; i <= bot; i++) P for (; i <= bot; i++) P P--- 400,401 ----- P } P for (; i <= bot; i++) P*************** P*** 583,585 P { P! char direct[20]; P char rel[MAXPLEN*10 + MAXLLEN*10]; /* longest move is full screen */ P P--- 581,583 ----- P { P! char direct[MAXPLEN*2]; P char rel[MAXPLEN*10 + MAXLLEN*10]; /* longest move is full screen */ P PIndex: visual.c PPrereq: 1.40 P*** old/visual.c Fri Dec 4 02:52:37 1987 P--- visual.c Sun Jan 22 22:18:19 1989 P*************** P*** 6,8 P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.40 11/30/87"; P #endif /* SCCSID */ P P--- 6,8 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.44 1/22/89"; P #endif /* SCCSID */ P*************** P*** 69,71 P P! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr;ongsize = pngsize P #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) P P--- 69,71 ----- P P! #define saveart oobit = bit;strcpy(ofilename1, filename);strcpy(ogroupdir, groupdir);hptr = h;h = hold;hold = hptr P #define NLINES(h, fp) (h->numlines[0] ? h->intnumlines : (h->intnumlines=linecnt(fp),sprintf(h->numlines, "%d", h->intnumlines), h->intnumlines)) P*************** P*** 158,160 P static int rfq = 0; /* for last article */ P- static long ongsize; /* Previous ngsize */ P static long pngsize; /* Printing ngsize */ P P--- 158,159 ----- P static int rfq = 0; /* for last article */ P static long pngsize; /* Printing ngsize */ P*************** P*** 161,163 P static char *bptr; /* temp pointer. */ P- static char *tfilename; /* temporary file name */ P static char ofilename1[BUFLEN]; /* previous file name */ P P--- 160,161 ----- P static char *bptr; /* temp pointer. */ P static char ofilename1[BUFLEN]; /* previous file name */ P*************** P*** 171,173 P static long oobit; /* last bit, really */ P- static int dgest = 0; P static FILE *fp; /* current article to be printed*/ P P--- 169,170 ----- P static long oobit; /* last bit, really */ P static FILE *fp; /* current article to be printed*/ P*************** P*** 260,262 P (void) strcpy(prompt, "more? "); P! else P #ifdef DIGPAGE P P--- 257,261 ----- P (void) strcpy(prompt, "more? "); P! else { P! int percent; P! P #ifdef DIGPAGE P*************** P*** 262,264 P #ifdef DIGPAGE P! (void) sprintf(prompt, "more(%d%%)? ", P ((((endsuba > 0) ? P P--- 261,263 ----- P #ifdef DIGPAGE P! percent = P ((((endsuba > 0) ? P*************** P*** 265,267 P endsuba : (dlinno + ARTWLEN)) - P! hdrend) * 100) / maxlinno); P #else /* !DIGPAGE */ P P--- 264,266 ----- P endsuba : (dlinno + ARTWLEN)) - P! hdrend) * 100) / maxlinno; P #else /* !DIGPAGE */ P*************** P*** 267,270 P #else /* !DIGPAGE */ P! (void) sprintf(prompt, "more(%d%%)? ", P! ((dlinno + ARTWLEN - hdrend) * 100) / maxlinno); P #endif /* !DIGPAGE */ P P--- 266,269 ----- P #else /* !DIGPAGE */ P! percent = P! ((dlinno + ARTWLEN - hdrend) * 100) / maxlinno; P #endif /* !DIGPAGE */ P*************** P*** 270,271 P #endif /* !DIGPAGE */ P } else { P P--- 269,275 ----- P #endif /* !DIGPAGE */ P+ if (percent > 100 || P+ (percent == 100 && !feof(fp))) P+ (void) sprintf(prompt, "more? "); P+ else (void) sprintf(prompt, "more(%d%%)? ", percent); P+ } P } else { P*************** P*** 686,687 P P /* escape to shell */ P P--- 690,692 ----- P P+ #ifndef NOSHELL P /* escape to shell */ P*************** P*** 717,719 P } P! P /* mail reply */ P P--- 722,724 ----- P } P! #endif /* NOSHELL */ P /* mail reply */ P*************** P*** 951,953 P { P! register char *poster, *r; P int notauthor; P P--- 956,958 ----- P { P! register char *poster; P int notauthor; P*************** P*** 953,955 P int notauthor; P! char *senderof(); P P P--- 958,960 ----- P int notauthor; P! char *tailpath(); P P*************** P*** 955,964 P P! poster = senderof(h); P! /* only compare up to '.' or ' ' */ P! r = index(poster,'.'); P! if (r == NULL) P! r = index(poster,' '); P! if (r != NULL) P! *r = '\0'; P! tfilename = filename; P notauthor = STRCMP(username, poster); P P--- 960,962 ----- P P! poster = tailpath(h); P notauthor = STRCMP(username, poster); P*************** P*** 965,967 P if (uid != ROOTID && uid && notauthor) { P! msg("Can't cancel what you didn't write."); P return; P P--- 963,966 ----- P if (uid != ROOTID && uid && notauthor) { P! msg("You (%s) can't cancel someone else's (%s) article.", P! username,poster); P return; P*************** P*** 1149,1151 P register DIR *dirp; P! register struct direct *dir; P #endif /* !SERVER */ P P--- 1148,1150 ----- P register DIR *dirp; P! register DIRECTORY_STRUCT *dir; P #endif /* !SERVER */ P*************** P*** 1166,1168 P } P- dgest = 0; P P P--- 1165,1166 ----- P } P P*************** P*** 1198,1199 P #ifdef SERVER P if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P P--- 1196,1198 ----- P #ifdef SERVER P+ if (article_name() != NULL) (void) unlink(article_name()); P if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P*************** P*** 1237,1239 P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != CHAR_OK) { P if (rflag) P P--- 1236,1238 ----- P (void) get_server(workspace,sizeof(workspace)); P! if (*workspace != '2') { P if (rflag) P*************** P*** 1740,1742 P int i; P! int (*savequit)(); P char *env[100], **envp, **oenvp; P P--- 1739,1741 ----- P int i; P! SIGNAL_TYPE savequit; P char *env[100], **envp, **oenvp; P*************** P*** 2421,2423 P int getpgrp(); P! #if defined(BSD4_2) || defined(BSD4_1C) P int tpgrp; P P--- 2420,2422 ----- P int getpgrp(); P! #if defined(BSD4_2) P int tpgrp; P*************** P*** 2699,2701 P #ifdef SERVER P! (void) unlink(active_name()); P close_server(); P P--- 2698,2703 ----- P #ifdef SERVER P! if (active_name() != NULL) P! (void) unlink(active_name()); P! if (article_name() != NULL) P! (void) unlink(article_name()); P close_server(); P PIndex: vnews.help P*** old/vnews.help Tue Mar 24 13:52:05 1987 P--- vnews.help Tue Jan 17 13:45:31 1989 P*************** P*** 1,2 P! Vnews commands: (each may be preceded by a non-negative count) P P P--- 1,2 ----- P! Vnews commands: ( may be preceded by a non-negative count) V 2.2 1/17/89 P P*************** P*** 5,7 P e Mark current article as unread < Go to article with given ID P! + Go forwards count articles p Go to parent article P - Go to previous article ug Unsubscribe to this group P P--- 5,7 ----- P e Mark current article as unread < Go to article with given ID P! + or = Go forwards count articles p Go to parent article P - Go to previous article ug Unsubscribe to this group P PIndex: patchlevel.h PPrereq: 16 P*** .d/patchlevel.h Fri Dec 4 02:52:37 1987 P--- patchlevel.h Tue Jan 24 14:52:11 1989 P*************** P*** 1,2 P! #define PATCHLEVEL 16 P P P--- 1,2 ----- P! #define PATCHLEVEL 17 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 1/23/89" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11 1/24/89" P P--- end of patch 17 --- P P PSHAREND This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.18... ' sed 's/^P//' >patch.18 <<\PSHAREND PFrom rick@uunet.UU.NET Tue Sep 12 19:10:59 1989 PPath: uunet!rick PFrom: rick@uunet.UU.NET (Rick Adams) PNewsgroups: news.software.b PSubject: patch 18 for B news 2.11 PMessage-ID: <67503@uunet.UU.NET> PDate: 12 Sep 89 23:10:59 GMT POrganization: UUNET Communications Services, Falls Church, VA PLines: 2232 P PDescription: P This is patch 18 for news 2.11. It addresses the following problems: P P Small changes to work around various compiler bugs. P fixed batch to return to BATCHDIR before renaming work file. P checkgroups no longer mails you a message if everything's ok P Fixed active file to handle a maximum of 9,999,999 messages P to avoid wraparound problem at current 99,999 P Better mail notifcation of newgroup/rmgroup P Fixed problem with control messages not allowing "local" distribution P unless ORGDISTRIB was defined. P Allow "sendsys sitename" control message, which only returns the P part of the sysfile relevant to "sitename" instead of the P entire file. P checkgroups now requires a Approved line before executing. P expire and inews/rnews now read and write a "C news" style history ile. P The intent is to allow people to run the C news expire P with instead of the B news expire. This is untested. P getdate now better handles some "english" dates. P inews now changes illegal non-printing or space characters with ? P rnews/inews noww support truly private newsgroups. If the last P field of the active file is a filename, then posting (including P via rnews) is restricted to sites in that list. P worked around a standard i/o bug in some old unix ports. P NICENESS not attempts to nice to an absolute value instead of P relative to the current niceness P Specifying both I and F in the sys file will result in both the P pathname and the message-id of the file being written out. P This is NOT backwards compatible. For the old behavior, P specify only "I" and not both "I" and "F" P make update now checks to see if you have defined LINES large P enough to support your existing active file P PFix: P cd src and make install;make update P P YOU MUST "make update" or your active file will be in the wrong P format P PIndex: Makefile.dst PPrereq: 1.33 Pdiff -c1 onews/Makefile.dst news/Makefile.dst P*** onews/Makefile.dst Thu Jan 19 00:04:22 1989 P--- news/Makefile.dst Thu Sep 7 17:54:28 1989 P*************** P*** 1,2 P! # '@(#)Makefile.dst 1.33 1/19/89' P # Generic Makefile. P P--- 1,2 ----- P! # '@(#)Makefile.dst 1.35 9/7/89' P # Generic Makefile. P*************** P*** 202,204 P @echo Localize has been run. Restart the make. P! @exit 1 P P P--- 202,204 ----- P @echo Localize has been run. Restart the make. P! @exit 1; P P*************** P*** 207,209 P @echo Localize has been run. Restart the make. P! @exit 1 P P P--- 207,209 ----- P @echo Localize has been run. Restart the make. P! @exit 1; P P*************** P*** 265,267 P getdate.o: getdate.y defs.h P! @echo "expect 5 shift/reduce conflicts" P yacc getdate.y P P--- 265,267 ----- P getdate.o: getdate.y defs.h P! @echo "expect 8 shift/reduce conflicts" P yacc getdate.y P PIndex: batch.c PPrereq: 1.23 Pdiff -c1 onews/batch.c news/batch.c P*** onews/batch.c Wed Jan 18 14:28:51 1989 P--- news/batch.c Tue Sep 5 15:19:39 1989 P*************** P*** 33,35 P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.23 1/18/89"; P #endif /* SCCSID */ P P--- 33,35 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)batch.c 1.25 9/5/89"; P #endif /* SCCSID */ P*************** P*** 95,97 P if (chdir(SPOOLDIR) < 0) { P! logerror("chdir(%s): %s", workfile, sys_errlist[errno]); P exit(1); P P--- 95,97 ----- P if (chdir(SPOOLDIR) < 0) { P! logerror("chdir(%s): %s", SPOOLDIR, sys_errlist[errno]); P exit(1); P*************** P*** 151,152 P } P } P P--- 151,156 ----- P } P+ } P+ if (chdir(BATCHDIR) < 0) { P+ logerror("chdir(%s): %s", BATCHDIR, sys_errlist[errno]); P+ exit(1); P } P PIndex: checkgroups.sh PPrereq: 1.25 Pdiff -c1 onews/checkgroups.sh news/checkgroups.sh P*** onews/checkgroups.sh Sun Jan 15 19:48:29 1989 P--- news/checkgroups.sh Fri Sep 1 18:23:00 1989 P*************** P*** 1,3 P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.25 1/15/89' P P P--- 1,3 ----- P : check active file for missing or extra newsgroups P! : '@(#)checkgroups 1.26 9/1/89' P P*************** P*** 7,9 P fi P! echo "" >/tmp/$$out P # Read first line of stdin. If of the form "-n group", then only check P P--- 7,9 ----- P fi P! cp /dev/null /tmp/$$out P # Read first line of stdin. If of the form "-n group", then only check P*************** P*** 67,69 P P- echo "" >>/tmp/$$out P if test -s /tmp/$$remove P P--- 67,68 ----- P P if test -s /tmp/$$remove P PIndex: control.c PPrereq: 2.58 Pdiff -c1 onews/control.c news/control.c P*** onews/control.c Sun Jan 15 19:48:55 1989 P--- news/control.c Tue Sep 5 15:19:40 1989 P*************** P*** 21,23 P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.58 1/15/89"; P #endif /* SCCSID */ P P--- 21,23 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.60 9/5/89"; P #endif /* SCCSID */ P*************** P*** 355,358 P # ifdef NONEWGROUPS P! # ifdef ORGDISTRIB P! /* local or ORGDISTRIB */ P int can_change = (STRCMP(header.distribution, "local") == 0) P P--- 355,357 ----- P # ifdef NONEWGROUPS P! /* local allowed */ P int can_change = (STRCMP(header.distribution, "local") == 0) P*************** P*** 358,359 P int can_change = (STRCMP(header.distribution, "local") == 0) P || (STRCMP(header.distribution, ORGDISTRIB) == 0) P P--- 357,360 ----- P int can_change = (STRCMP(header.distribution, "local") == 0) P+ # ifdef ORGDISTRIB P+ /* or ORGDISTRIB */ P || (STRCMP(header.distribution, ORGDISTRIB) == 0) P*************** P*** 359,364 P || (STRCMP(header.distribution, ORGDISTRIB) == 0) P- || !ngmatch(argv[1], NONEWGROUPS); P- # else /* ! ORGDISTRIB */ P- /* local only */ P- int can_change = STRCMP(header.distribution, "local") == 0; P # endif /* ORGDISTRIB */ P P--- 360,361 ----- P || (STRCMP(header.distribution, ORGDISTRIB) == 0) P # endif /* ORGDISTRIB */ P*************** P*** 364,365 P # endif /* ORGDISTRIB */ P # else /* ! NONEWGROUPS */ P P--- 361,363 ----- P # endif /* ORGDISTRIB */ P+ || !ngmatch(argv[1], NONEWGROUPS); P # else /* ! NONEWGROUPS */ P*************** P*** 386,390 P /* Now check if it's correctly moderated/unmoderated */ P! while (*p++) P! ; P! p -= 3; P if (argc > 2 && STRCMP(argv[2], "moderated") == 0) { P P--- 384,388 ----- P /* Now check if it's correctly moderated/unmoderated */ P! /* name 0000000 0000000 X */ P! /* 12345678901234567 */ P! p += 17; P if (argc > 2 && STRCMP(argv[2], "moderated") == 0) { P*************** P*** 403,405 P # ifdef NOTIFY P! (void) sprintf(subjline, P "Newsgroup %s changed from %smoderated to %smoderated", P P--- 401,404 ----- P # ifdef NOTIFY P! if (can_change) P! (void) sprintf(subjline, P "Newsgroup %s changed from %smoderated to %smoderated", P*************** P*** 407,408 P *p=='y' ? "un" : ""); P fd = mailhdr((struct hbuf *)NULL, subjline); P P--- 406,412 ----- P *p=='y' ? "un" : ""); P+ else P+ (void) sprintf(subjline, P+ "Change newsgroup %s from %smoderated to %smoderated", P+ argv[1], *p=='y' ? "" : "un", P+ *p=='y' ? "un" : ""); P fd = mailhdr((struct hbuf *)NULL, subjline); P*************** P*** 472,474 P (void) fseek(actfp, 0L, 2); clearerr(actfp); P! fprintf(actfp, "%s 00000 00001 %c\n", argv[1], P (argc > 2 && STRCMP(argv[2], "moderated") == 0) P P--- 476,478 ----- P (void) fseek(actfp, 0L, 2); clearerr(actfp); P! fprintf(actfp, "%s 0000000 0000000 %c\n", argv[1], P (argc > 2 && STRCMP(argv[2], "moderated") == 0) P*************** P*** 495,497 P # ifdef NOTIFY P! (void) sprintf(subjline, "Newsgroup %s created", argv[1]); P fd = mailhdr((struct hbuf *)NULL, subjline); P P--- 499,504 ----- P # ifdef NOTIFY P! if (didcreate) P! (void) sprintf(subjline, "Newsgroup %s created", argv[1]); P! else P! (void) sprintf(subjline, "Create newsgroup %s", argv[1]); P fd = mailhdr((struct hbuf *)NULL, subjline); P*************** P*** 554,555 P #ifdef NORMGROUPS P #ifdef ORGDISTRIB P P--- 561,564 ----- P #ifdef NORMGROUPS P+ /* Allow local removals */ P+ if (!STRCMP("local", header.distribution) P #ifdef ORGDISTRIB P*************** P*** 555,561 P #ifdef ORGDISTRIB P! /* P! * Allow local as well as organizational removals P! */ P! if (!STRCMP(ORGDISTRIB, header.distribution) P! || !STRCMP("local", header.distribution) P || !ngmatch(argv[1], NORMGROUPS)) P P--- 564,568 ----- P #ifdef ORGDISTRIB P! /* as well as organizational removals */ P! || !STRCMP(ORGDISTRIB, header.distribution) P! #endif /* ORGDISTRIB */ P || !ngmatch(argv[1], NORMGROUPS)) P*************** P*** 561,565 P || !ngmatch(argv[1], NORMGROUPS)) P- #else /* !ORGDISTRIB */ P- if (!STRCMP("local", header.distribution)) P- #endif /* !ORGDISTRIB */ P #endif /* NORMGROUPS */ P P--- 568,569 ----- P || !ngmatch(argv[1], NORMGROUPS)) P #endif /* NORMGROUPS */ P*************** P*** 638,640 P if (line == NULL) { P- struct tm *tm; P log("Can't cancel %s: non-existent", argv[1]); P P--- 642,643 ----- P if (line == NULL) { P log("Can't cancel %s: non-existent", argv[1]); P*************** P*** 641,650 P (void) time(&t); P! tm = localtime(&t); P! #ifdef USG P! sprintf(bfr,"%s\t%2.2d/%2.2d/%d %2.2d:%2.2d\tcancelled", P! #else /* !USG */ P! sprintf(bfr,"%s\t%02d/%02d/%d %02d:%02d\tcancelled", P! #endif /* !USG */ P! argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour, P! tm->tm_min); P savehist(bfr); P P--- 644,646 ----- P (void) time(&t); P! sprintf(bfr,"%s\t%ld\tcancelled", argv[1], t); P savehist(bfr); P*************** P*** 737,739 P register FILE *f, *u; P! int c; P P P--- 733,736 ----- P register FILE *f, *u; P! register int len; P! register char *cp; P P*************** P*** 740,747 P #ifdef NOTIFY P! f = mailhdr((struct hbuf *)NULL, "sendsys control message"); P! if (f != NULL) { P! fprintf(f, "%s requested your %s/sys file.\n", header.path, LIB); P! fprintf(f, "It has been sent.\n"); P! fprintf(f, "\n\n%s says:\n", header.path); P! controlmail = f; P } P P--- 737,746 ----- P #ifdef NOTIFY P! if (argc < 2) { P! f = mailhdr((struct hbuf *)NULL, "sendsys control message"); P! if (f != NULL) { P! fprintf(f, "%s requested your %s/sys file.\n", header.path, LIB); P! fprintf(f, "It has been sent.\n"); P! fprintf(f, "\n\n%s says:\n", header.path); P! controlmail = f; P! } P } P*************** P*** 750,754 P u = fopen(SUBFILE, "r"); P! if (f != NULL && u != NULL) { P! while ((c=getc(u)) != EOF) P! putc(c, f); P (void) fclose(u); P P--- 749,755 ----- P u = fopen(SUBFILE, "r"); P! if (f == NULL || u == NULL) P! return 0; P! if (argc < 2) { P! while (len = fread(bfr, 1, sizeof bfr, u)) P! fwrite(bfr, 1, len, f); P (void) fclose(u); P*************** P*** 755,756 P (void) mclose(f); P } P P--- 756,758 ----- P (void) mclose(f); P+ return 0; P } P*************** P*** 756,757 P } P return 0; P P--- 758,776 ----- P } P+ cp = argv[argc -1]; P+ len = strlen(cp); P+ while (fgets(bfr, sizeof bfr, u) != NULL) { P+ while (STRNCMP(bfr, cp, len) == 0 && (bfr[len] == ':' P+ || bfr[len] == '/')) { P+ register char *ch, c; P+ do { P+ ch = bfr; P+ while (c= *ch++) P+ putc(c, f); P+ c = ch[-3]; /* looking for trailing \ */ P+ } while (fgets(bfr, sizeof bfr, u) != NULL P+ && c == '\\'); P+ } P+ } P+ (void) fclose(u); P+ (void) mclose(f); P return 0; P*************** P*** 788,789 P P (void) setuid(geteuid()); P P--- 807,812 ----- P P+ if (header.approved[0] == '\0') { P+ logerr("checkgroups: not approved"); P+ return 1; P+ } P (void) setuid(geteuid()); P*************** P*** 881,882 P (void) close(hisside); P (void) setgid(gid); P P--- 904,906 ----- P (void) close(hisside); P+ unlock(); P (void) setgid(gid); PIndex: expire.c PPrereq: 2.61 Pdiff -c1 onews/expire.c news/expire.c P*** onews/expire.c Thu Jan 19 00:06:40 1989 P--- news/expire.c Fri Sep 1 18:23:21 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.61 1/19/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.63 9/1/89"; P #endif /* SCCSID */ P*************** P*** 348,349 P (void) close(creat(DIRFILE, 0666)); P initdbm(NARTFILE); P P--- 348,350 ----- P (void) close(creat(DIRFILE, 0666)); P+ (void) close(creat(NARTFILE, 0666)); P initdbm(NARTFILE); P*************** P*** 438,439 P printf("article: %s", afline); P if (afline[0] != '<') P P--- 439,441 ----- P printf("article: %s", afline); P+ h.expdate[0] = '\0'; P if (afline[0] != '<') P*************** P*** 446,448 P *p1 = '\t'; P! p2 = index(p1 + 1, '\t'); P if (!p2) P P--- 448,450 ----- P *p1 = '\t'; P! p2 = rindex(p1 + 1, '\t'); P if (!p2) P*************** P*** 462,464 P } P! rectime = cgtdate(recdate); P *p2++ = '\t'; P P--- 464,474 ----- P } P! p3 = index(recdate, '~'); P! if (p3) { P! *p3++ = '\0'; P! rectime = cgtdate(recdate); P! exptime = atol(p3); P! } else { P! rectime = cgtdate(recdate); P! exptime = rectime + expincr; P! } P *p2++ = '\t'; P*************** P*** 511,513 P if (!ngmatch(nbuf, ngpat) || P! ((rectime+expincr > today) && !dorebuild && P !frflag && !usepost && recdate[0] != ' ')) P P--- 521,523 ----- P if (!ngmatch(nbuf, ngpat) || P! (exptime > today && !dorebuild && P !frflag && !usepost && recdate[0] != ' ')) P*************** P*** 515,517 P if (!dorebuild && !frflag && !usepost && P! recdate[0] != ' ') { P grpsleft[0] = '\0'; P P--- 525,527 ----- P if (!dorebuild && !frflag && !usepost && P! recdate[0] != ' ') { P grpsleft[0] = '\0'; P*************** P*** 615,617 P if ((cp = index(h.nbuf, NGDELIM)) == NULL) { P- struct tm *tm; P saveit: P P--- 625,626 ----- P if ((cp = index(h.nbuf, NGDELIM)) == NULL) { P saveit: P*************** P*** 617,628 P saveit: P! tm = gmtime(&rectime); P! fprintf(nhfd, P! #ifdef USG P! "%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", P! #else /* !USG */ P! "%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", P! #endif /* !USG */ P! h.ident, h.expdate[0] ? " " : "", P! tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, filename); P if(ferror(nhfd)) P P--- 626,634 ----- P saveit: P! fprintf(nhfd, "%s\t%ld", P! h.ident, rectime); P! if (h.expdate[0]) P! fprintf(nhfd, "~%ld", P! (long) cgtdate(h.expdate)); P! P! fprintf(nhfd, "\t%s\n", filename); P if(ferror(nhfd)) P*************** P*** 697,698 P exptime = newtime; P if (frflag ? strcmp(baduser,h.from)==0 : today >= exptime) { P P--- 703,705 ----- P exptime = newtime; P+ P if (frflag ? strcmp(baduser,h.from)==0 : today >= exptime) { P*************** P*** 732,734 P h.ident, recdate); P! fputs(afline, nhfd); P if (ferror(nhfd)) P P--- 739,751 ----- P h.ident, recdate); P! if (h.expdate[0] == '\0') P! fputs(afline, nhfd); P! else { P! register char *rcp = rindex(recdate, ' '); P! if (rcp && STRCMP(rcp, " GMT") == 0) P! rcp = '\0'; P! fprintf(nhfd, "%s\t%s~%ld%s\n", h.ident, P! recdate[0] == ' '? recdate+1 : recdate, P! exptime, rindex(afline, '\t')); P! } P! P if (ferror(nhfd)) P*************** P*** 744,746 P register struct multhist *mhp; P- struct tm *tm; P for (mhp = multhist; mhp < multhist+mh_size && mhp->mh_ident != NULL; mhp++) P P--- 761,762 ----- P register struct multhist *mhp; P for (mhp = multhist; mhp < multhist+mh_size && mhp->mh_ident != NULL; mhp++) P*************** P*** 770,781 P } P! tm = gmtime(&rectime); P! fprintf(nhfd, P! #ifdef USG P! "%s\t%s%2.2d/%2.2d/%d %2.2d:%2.2d\t%s\n", P! #else /* !USG */ P! "%s\t%s%02d/%02d/%d %02d:%02d\t%s\n", P! #endif /* !USG */ P! h.ident, h.expdate[0] ? " " : "", P! tm->tm_mon+1, tm->tm_mday, tm->tm_year, P! tm->tm_hour, tm->tm_min, mhp->mh_file); P if (ferror(nhfd)) P P--- 786,792 ----- P } P! fprintf(nhfd, "%s\t%ld", h.ident, rectime); P! if (h.expdate[0]) P! fprintf(nhfd, "~%ld", P! (long) cgtdate(h.expdate)); P! fprintf(nhfd,"\t%s\n", mhp->mh_file); P if (ferror(nhfd)) P*************** P*** 862,864 P int lineno = 0; P! char c, cansub, groupname[BUFLEN]; P P P--- 873,875 ----- P int lineno = 0; P! char c, cansub, groupname[BUFLEN], restofline[BUFLEN]; P P*************** P*** 867,870 P lineno++; P! if (sscanf(afline,"%s %ld %ld %c", groupname, &maxart, &minart, P! &cansub) < 4) { P xerror("Line %d in active file invalid: %s", P P--- 878,882 ----- P lineno++; P! restofline[0] = '\0'; P! if (sscanf(afline,"%s %ld %ld %c%s", groupname, &maxart, P! &minart, &cansub, restofline) < 4) { P xerror("Line %d in active file invalid: %s", P*************** P*** 919,921 P if (verbose > 4) P! printf("\tmaxart = %5.5ld, minart = %5.5ld\n", P maxart, minart); P P--- 931,933 ----- P if (verbose > 4) P! printf("\tmaxart = %7.7ld, minart = %7.7ld\n", P maxart, minart); P*************** P*** 921,923 P maxart, minart); P! fprintf(nhfd,"%s %5.5ld %5.5ld %c\n", groupname, maxart, P minart, cansub); P P--- 933,935 ----- P maxart, minart); P! fprintf(nhfd,"%s %7.7ld %7.7ld %c\n", groupname, maxart, P minart, cansub); P*************** P*** 927,929 P if (verbose > 4) P! printf("\tmaxart = %05ld, minart = %05ld\n", P maxart, minart); P P--- 939,941 ----- P if (verbose > 4) P! printf("\tmaxart = %07ld, minart = %07ld\n", P maxart, minart); P*************** P*** 929,932 P maxart, minart); P! fprintf(nhfd,"%s %05ld %05ld %c\n", groupname, maxart, P! minart, cansub); P if (ferror(nhfd)) P P--- 941,945 ----- P maxart, minart); P! fprintf(nhfd,"%s %07ld %07ld %c%s%s\n", groupname, maxart, P! minart, cansub, restofline[0] != '\0' ? " " : "", P! restofline); P if (ferror(nhfd)) P PIndex: funcs2.c PPrereq: 1.25 Pdiff -c1 onews/funcs2.c news/funcs2.c P*** onews/funcs2.c Sun Jan 15 19:48:57 1989 P--- news/funcs2.c Fri Sep 1 18:23:22 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.25 1/15/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)funcs2.c 1.26 9/1/89"; P #endif /* SCCSID */ P*************** P*** 206,207 P char junk[40],month[40],day[30],tod[60],year[50]; P static time_t lasttime; P P--- 206,208 ----- P char junk[40],month[40],day[30],tod[60],year[50]; P+ register char *cp; P static time_t lasttime; P*************** P*** 211,213 P return lasttime; P! lasttime = getdate(datestr, &Now); P if (lasttime < 0) { P P--- 212,222 ----- P return lasttime; P! strncpy(lastdatestr, datestr, BUFLEN); P! cp = index(lastdatestr, '~'); P! if (cp) P! *cp = '\0'; P! P! lasttime = atol(lastdatestr); P! if (lasttime > 600000000L) P! return lasttime; P! lasttime = getdate(lastdatestr, &Now); P if (lasttime < 0) { P*************** P*** 213,216 P if (lasttime < 0) { P! logerr("%s: Unparsable date \"%s\"", filename, datestr); P! if (sscanf(datestr, "%s %s %s %s %s", junk, month, day, tod, P year) == 5) { P P--- 222,225 ----- P if (lasttime < 0) { P! logerr("%s: Unparsable date \"%s\"", filename, lastdatestr); P! if (sscanf(lastdatestr, "%s %s %s %s %s", junk, month, day, tod, P year) == 5) { P*************** P*** 221,223 P if (lasttime < 0) { P! datestr = "now"; /* better than nothing */ P lasttime = Now.time; P P--- 230,232 ----- P if (lasttime < 0) { P! strcpy(lastdatestr, "now"); /* better than nothing */ P lasttime = Now.time; P*************** P*** 225,227 P } P- strncpy(lastdatestr, datestr, BUFLEN); P return lasttime; P P--- 234,235 ----- P } P return lasttime; PIndex: getdate.y PPrereq: 2.19 Pdiff -c1 onews/getdate.y news/getdate.y P*** onews/getdate.y Tue Jan 17 13:09:29 1989 P--- news/getdate.y Fri Sep 1 18:23:23 1989 P*************** P*** 5,7 P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.19 1/17/89 */ P P P--- 5,7 ----- P /* University of North Carolina at Chapel Hill */ P! /* @(#)getdate.y 2.20 9/1/89 */ P P*************** P*** 105,107 P P- P rspec: SNUMBER UNIT = P P--- 105,106 ----- P P rspec: SNUMBER UNIT = P*************** P*** 108,109 P {relsec += 60L * $1 * $2;} P | SNUMBER MUNIT = P P--- 107,110 ----- P {relsec += 60L * $1 * $2;} P+ | UNUMBER UNIT = P+ {relsec += 60L * $1 * $2;} P | SNUMBER MUNIT = P*************** P*** 110,111 P {relmonth += $1 * $2;} P | SNUMBER SUNIT = P P--- 111,114 ----- P {relmonth += $1 * $2;} P+ | UNUMBER MUNIT = P+ {relmonth += $1 * $2;} P | SNUMBER SUNIT = P*************** P*** 112,113 P {relsec += $1;} P | UNIT = P P--- 115,118 ----- P {relsec += $1;} P+ | UNUMBER SUNIT = P+ {relsec += $1;} P | UNIT = P*************** P*** 272,274 P char *name; P! int type, value; P }; P P--- 277,280 ----- P char *name; P! int type; P! long value; P }; PIndex: header.c PPrereq: 2.50 Pdiff -c1 onews/header.c news/header.c P*** onews/header.c Sun Jan 15 19:48:58 1989 P--- news/header.c Fri Sep 1 18:23:24 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.50 1/15/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)header.c 2.51 9/1/89"; P #endif /* SCCSID */ P*************** P*** 205,207 P do { P! if (*cp && !isprint(*cp)) P *cp = '?'; P P--- 205,208 ----- P do { P! if (*cp && (isspace(*cp) || P! !isprint(*cp))) P *cp = '?'; P*************** P*** 232,233 P hp->path[0] != '\0' && P strncmp(hp->path, LOCALPATHSYSNAME, P P--- 233,238 ----- P hp->path[0] != '\0' && P+ #ifdef GENERICPATH P+ strncmp(hp->path, PATHSYSNAME, P+ strlen(PATHSYSNAME)) != 0) { P+ #else /* !GENERICPATH */ P strncmp(hp->path, LOCALPATHSYSNAME, P*************** P*** 234,235 P strlen(LOCALPATHSYSNAME)) != 0) { P hp->distribution[0] = '\0'; P P--- 239,241 ----- P strlen(LOCALPATHSYSNAME)) != 0) { P+ #endif /* !GENERICPATH */ P hp->distribution[0] = '\0'; PIndex: header.h PPrereq: 2.22 Pdiff -c1 onews/header.h news/header.h P*** onews/header.h Sun Jan 15 19:48:58 1989 P--- news/header.h Fri Sep 1 18:23:25 1989 P*************** P*** 4,6 P P! /* @(#)header.h 2.22 1/15/89 */ P P P--- 4,6 ----- P P! /* @(#)header.h 2.23 9/1/89 */ P P*************** P*** 20,21 P char expdate[DATELEN]; /* Expires: */ P char ctlmsg[PATHLEN]; /* Control: */ P P--- 20,22 ----- P char expdate[DATELEN]; /* Expires: */ P+ time_t exptime; /* Expire time in secs */ P char ctlmsg[PATHLEN]; /* Control: */ P*************** P*** 27,29 P int intnumlines; /* Integer version */ P! char keywords[BUFLEN]; /* Keywords: */ P char summary[BUFLEN]; /* Summary: */ P P--- 28,30 ----- P int intnumlines; /* Integer version */ P! char keywords[MBUFLEN]; /* Keywords: */ P char summary[BUFLEN]; /* Summary: */ P PIndex: ifuncs.c PPrereq: 2.72 Pdiff -c1 onews/ifuncs.c news/ifuncs.c P*** onews/ifuncs.c Wed Jan 18 14:28:50 1989 P--- news/ifuncs.c Tue Sep 12 16:58:15 1989 P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.72 1/18/89"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.77 9/12/89"; P #endif /* SCCSID */ P*************** P*** 22,23 P #include "iparams.h" P P P--- 22,26 ----- P #include "iparams.h" P+ #if defined(BSD4_2) || defined(USG) P+ #include <fcntl.h> P+ #endif /* BSD || USG */ P P*************** P*** 282,284 P /* I: append messageid to file. implies F flag */ P! int appmsgid = maynotify && (index(sp->s_flags, 'I') != NULL); P P P--- 285,287 ----- P /* I: append messageid to file. implies F flag */ P! int appmsgid = (index(sp->s_flags, 'I') != NULL); P P*************** P*** 284,285 P P /* allow specification based on size */ P P--- 287,293 ----- P P+ if (appmsgid && !appfile && !maynotify) { P+ appmsgid = FALSE; P+ appfile = TRUE; P+ } P+ P /* allow specification based on size */ P*************** P*** 389,391 P #endif /* !LOGDIR */ P! BATCHDIR, TRANS, appmsgid ? ".ihave" : ""); P } P P--- 397,400 ----- P #endif /* !LOGDIR */ P! BATCHDIR, TRANS, P! (appmsgid && !appfile) ? ".ihave" : ""); P } P*************** P*** 392,393 P ofp = fopen(sp->s_xmit, "a"); P if (ofp == NULL) P P--- 401,405 ----- P ofp = fopen(sp->s_xmit, "a"); P+ #ifdef F_SETFL P+ (void) fcntl(fileno(ofp), F_SETFL, O_APPEND); P+ #endif /* F_SETFL */ P if (ofp == NULL) P*************** P*** 394,397 P xerror("Cannot append to %s", sp->s_xmit); P! fprintf(ofp, "%s", appmsgid ? hh.ident : P! firstbufname); P #ifdef MULTICAST P P--- 406,412 ----- P xerror("Cannot append to %s", sp->s_xmit); P! if (appfile && appmsgid) P! fprintf(ofp, "%s\t%s", firstbufname, hh.ident); P! else P! fprintf(ofp, "%s", appmsgid ? hh.ident : P! firstbufname); P #ifdef MULTICAST P*************** P*** 775,777 P #else /* O_EXCL */ P! while ((fd=(open(lockname, O_EXCL|O_CREAT, 0) < 0) { P #endif /* O_EXCL */ P P--- 790,792 ----- P #else /* O_EXCL */ P! while ((fd=open(lockname, O_EXCL|O_CREAT, 0)) < 0) { P #endif /* O_EXCL */ P*************** P*** 906,910 P if (STRCMP(bfr, ngs[i]) == NGUNSEEN) { /* localize? */ P! /* newsgroup 12345 12345 X */ P! /* cp + 01234567890123 */ P! if (!isproc && cp[13] == 'n') P uses[i] = NGOK; P P--- 921,965 ----- P if (STRCMP(bfr, ngs[i]) == NGUNSEEN) { /* localize? */ P! /* newsgroup 1234567 1234567 X optional-fname */ P! /* cp + 01234567890123456789 */ P! if (cp[18] == ' ' && cp[19] != '\0') { P! int ok2post = 0; P! char buf2[BUFLEN], pbuf[MBUFLEN]; P! register char *cp2, *cp3; P! /* check for private groups P! * only sites listed in the file P! * specified can post P! */ P! cp2 = index(&cp[19], '\n'); P! if (cp2) P! *cp2 = '\0'; P! cp2 = pbuf; P! cp3 = header.path; P! while (*cp3 &&index(NETCHRS, *cp3) == 0) P! *cp2++ = *cp3++; P! *cp2 = '\0'; P! f = xfopen(&cp[19], "r"); P! while (!ok2post) { P! register int c; P! cp2 = buf2; P! while ((c=getc(f)) != EOF) { P! if (c == '\n') { P! *cp2 = '\0'; P! break; P! } P! *cp2++ = c; P! } P! if (c == EOF) P! break; P! if (STRCMP(pbuf, buf2) == 0) { P! ok2post = 1; P! break; P! } P! } P! (void) fclose(f); P! if (!ok2post) { P! logerr("%s is not authorized to post to %s", pbuf, ngs[i]); P! return TRUE; P! } P! } P! if (!isproc && cp[17] == 'n') { P uses[i] = NGOK; P*************** P*** 910,912 P uses[i] = NGOK; P! else { P if (uses[i] < NGALIAS) P P--- 965,967 ----- P uses[i] = NGOK; P! } else { P if (uses[i] < NGALIAS) P*************** P*** 913,915 P uses[i] = NGALIAS; P! if (cp[13] == 'm') { P strcpy(is_mod, bfr); P P--- 968,970 ----- P uses[i] = NGALIAS; P! if (cp[17] == 'm') { P strcpy(is_mod, bfr); P*************** P*** 1150,1156 P P! #undef NGUNSEEN 0 P! #undef NGOK 1 P! #undef NGALIAS 2 P! #undef NGBUGS 3 P! #undef NGABUGS 4 P P P--- 1205,1211 ----- P P! #undef NGUNSEEN P! #undef NGOK P! #undef NGALIAS P! #undef NGBUGS P! #undef NGABUGS P P*************** P*** 1176,1179 P while ((!ret) && fscanf(mfd, "%[^:]:%s\n", mgrp, mlist) != EOF) { P- if (feof(mfd)) P- break; P if (mgrp[0] == '#') P P--- 1231,1232 ----- P while ((!ret) && fscanf(mfd, "%[^:]:%s\n", mgrp, mlist) != EOF) { P if (mgrp[0] == '#') P*************** P*** 1400,1402 P freopen(tfilename, "r", infp); P! (void) free(cp); P return; /* from checkbatch as if P P--- 1453,1456 ----- P freopen(tfilename, "r", infp); P! setbuf(infp, (char *) NULL); P! (void) free(cp); P return; /* from checkbatch as if PIndex: inews.c PPrereq: 2.91 Pdiff -c1 onews/inews.c news/inews.c P*** onews/inews.c Tue Jan 24 15:24:00 1989 P--- news/inews.c Fri Sep 1 18:23:27 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.91 1/24/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.92 9/1/89"; P #endif /* SCCSID */ P*************** P*** 55,56 P int spool_news = DONT_SPOOL; P P P--- 55,58 ----- P int spool_news = DONT_SPOOL; P+ static char *artlinks[32]; P+ static int linkcount; P P*************** P*** 223,226 P #ifdef NICENESS P! if (nice(0) < NICENESS) P! (void) nice(NICENESS); P #endif /* NICENESS */ P P--- 225,228 ----- P #ifdef NICENESS P! if ((i=nice(0)) < NICENESS) P! (void) nice(NICENESS-i); P #endif /* NICENESS */ P*************** P*** 237,243 P if (space()) { /* check disk space */ P! mode = PROC; P! logerr("Out of space in %s. Saving for later processing.", P! SPOOLDIR); P! dospool((char *)NULL, FALSE); P! /* NOT REACHED */ P } P P--- 239,242 ----- P if (space()) { /* check disk space */ P! spool_news = DOSPOOL; P! logerr("Out of space in %s.", SPOOLDIR); P } P*************** P*** 306,308 P && uid == 0 /* allow root to set name in any case */ P! #endif /* !DOGETUSER */ P ) { P P--- 305,307 ----- P && uid == 0 /* allow root to set name in any case */ P! #endif /* DOGETUSER */ P ) { P*************** P*** 809,812 P P- static char *artlinks[32]; P- static int linkcount; P /* P P--- 808,809 ----- P P /* P*************** P*** 837,839 P if (STRCMP(bfr, ngname) == 0) { P! if (ngsize < 0 || ngsize > 99998) { P logerr("found bad ngsize %ld ng %s, setting to 1", ngsize, bfr); P P--- 834,836 ----- P if (STRCMP(bfr, ngname) == 0) { P! if (ngsize < 0 || ngsize > 9999998L) { P logerr("found bad ngsize %ld ng %s, setting to 1", ngsize, bfr); P*************** P*** 906,909 P /* P! * Has to be same size as old because of %05d. P! * This will overflow with 99999 articles. P */ P P--- 903,906 ----- P /* P! * Has to be same size as old because of %07d. P! * This will overflow with 9,999,999 articles. P */ P*************** P*** 909,911 P */ P! fprintf(actfp, "%s %05ld", ngname, ngsize+1); P #if defined(USG) || defined(MG1) P P--- 906,908 ----- P */ P! fprintf(actfp, "%s %07ld", ngname, ngsize+1); P #if defined(USG) || defined(MG1) P*************** P*** 946,948 P struct srec srec; /* struct for sys file lookup */ P- struct tm *tm, *gmtime(); P int is_invalid = FALSE; P P--- 943,944 ----- P struct srec srec; /* struct for sys file lookup */ P int is_invalid = FALSE; P*************** P*** 948,949 P int is_invalid = FALSE; P int exitcode = 0; P P--- 944,946 ----- P int is_invalid = FALSE; P+ int junked = FALSE; P int exitcode = 0; P*************** P*** 963,974 P P! (void) time(&now); P! tm = gmtime(&now); P! if (header.expdate[0]) P! addhist(" "); P! #ifdef USG P! sprintf(bfr,"%2.2d/%2.2d/%d %2.2d:%2.2d\t", P! #else /* !USG */ P! sprintf(bfr,"%02d/%02d/%d %02d:%02d\t", P! #endif /* !USG */ P! tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min); P addhist(bfr); P P--- 960,962 ----- P P! sprintf(bfr, "%ld", time(&now)); P addhist(bfr); P*************** P*** 974,975 P addhist(bfr); P log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL P P--- 962,968 ----- P addhist(bfr); P+ if (header.expdate[0]) { P+ sprintf(bfr,"~%ld",(long) cgtdate(header.expdate)); P+ addhist(bfr); P+ } P+ addhist("\t"); P log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL P*************** P*** 987,989 P header.nbuf); P! if (localize("junk")) P savehist(histline); P P--- 980,982 ----- P header.nbuf); P! if (localize("junk")) { P savehist(histline); P*************** P*** 989,990 P savehist(histline); P exitcode = 1; P P--- 982,985 ----- P savehist(histline); P+ junked = TRUE; P+ } P exitcode = 1; P*************** P*** 996,998 P logerr("Orphaned Response, moved to junk"); P! if (localize("junk")) P savehist(histline); P P--- 991,993 ----- P logerr("Orphaned Response, moved to junk"); P! if (localize("junk")) { P savehist(histline); P*************** P*** 998,999 P savehist(histline); P exitcode = 1; P P--- 993,998 ----- P savehist(histline); P+ /* P+ junked = TRUE; P+ */ P+ } P exitcode = 1; P*************** P*** 1005,1007 P logerr("Article too old, moved to junk"); P! if (localize("junk")) P savehist(histline); P P--- 1004,1006 ----- P logerr("Article too old, moved to junk"); P! if (localize("junk")) { P savehist(histline); P*************** P*** 1007,1008 P savehist(histline); P exitcode = 1; P P--- 1006,1009 ----- P savehist(histline); P+ junked = TRUE; P+ } P exitcode = 1; P*************** P*** 1220,1222 P xxit((mode == PROC && filename[0] == '\0') ? 0 : P! (exitcode < 0 ? 0 : exitcode)); P } P P--- 1221,1223 ----- P xxit((mode == PROC && filename[0] == '\0') ? 0 : P! (exitcode < 0 || junked ? 0 : exitcode)); P } PIndex: makeactive.sh PPrereq: 1.27 Pdiff -c1 onews/makeactive.sh news/makeactive.sh P*** onews/makeactive.sh Tue Jan 24 17:05:21 1989 P--- news/makeactive.sh Thu Sep 7 17:54:30 1989 P*************** P*** 2,4 P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.27 1/24/89' P LIBDIR=$1 P P--- 2,4 ----- P : "Usage: sh makeactive.sh LIBDIR SPOOLDIR NEWSUSR NEWSGRP" P! : '@(#)makeactive 1.29 9/7/89' P LIBDIR=$1 P*************** P*** 13,14 P comp.ai.nlang-know-rep Natural Language and Knowledge Representation. (Moderated) P comp.ai.vision Artificial Intelligence Vision Research. (Moderated) P P--- 13,15 ----- P comp.ai.nlang-know-rep Natural Language and Knowledge Representation. (Moderated) P+ comp.ai.shells Artificial intelligence applied to shells. (Moderated) P comp.ai.vision Artificial Intelligence Vision Research. (Moderated) P*************** P*** 56,58 P comp.lang.icon Topics related to the ICON programming language. P! comp.lang.idl IBL (Interface Description Language) related topics. P comp.lang.lisp Discussion about LISP. P P--- 57,59 ----- P comp.lang.icon Topics related to the ICON programming language. P! comp.lang.idl IDL (Interface Description Language) related topics. P comp.lang.lisp Discussion about LISP. P*************** P*** 80,81 P comp.mail.multi-media Multimedia Mail. P comp.mail.sendmail Configuring and using the BSD sendmail agent. P P--- 81,83 ----- P comp.mail.multi-media Multimedia Mail. P+ comp.mail.mush The Mail User's Shell (MUSH). P comp.mail.sendmail Configuring and using the BSD sendmail agent. P*************** P*** 94,95 P comp.os.eunice The SRI Eunice system. P comp.os.minix Discussion of Tanenbaum's MINIX system. P P--- 96,98 ----- P comp.os.eunice The SRI Eunice system. P+ comp.os.mach The MACH OS from CMU & other places. P comp.os.minix Discussion of Tanenbaum's MINIX system. P*************** P*** 111,112 P comp.protocols.iso.x400.gateway X400 mail gateway discussions. (Moderated) P comp.protocols.kermit Info about the Kermit package. (Moderated) P P--- 114,116 ----- P comp.protocols.iso.x400.gateway X400 mail gateway discussions. (Moderated) P+ comp.protocols.kerberos The Kerberos authentification server. P comp.protocols.kermit Info about the Kermit package. (Moderated) P*************** P*** 119,120 P comp.protocols.tcp-ip.ibmpc TCP/IP for IBM(-like) personal computers. P comp.risks Risks to the public from computers & users. (Moderated) P P--- 123,125 ----- P comp.protocols.tcp-ip.ibmpc TCP/IP for IBM(-like) personal computers. P+ comp.realtime Issues related to real-time computing. P comp.risks Risks to the public from computers & users. (Moderated) P*************** P*** 124,125 P comp.society.women Women's roles and problems in computing (Moderated) P comp.software-eng Software Engineering and related topics. P P--- 129,131 ----- P comp.society.women Women's roles and problems in computing (Moderated) P+ comp.soft-sys.andrew The Andrew system from CMU. P comp.software-eng Software Engineering and related topics. P*************** P*** 133,134 P comp.sources.misc Posting of software . (Moderated) P comp.sources.unix Postings of complete, UNIX-oriented sources. (Moderated) P P--- 139,141 ----- P comp.sources.misc Posting of software . (Moderated) P+ comp.sources.sun Software for Sun workstations. (Moderated) P comp.sources.unix Postings of complete, UNIX-oriented sources. (Moderated) P*************** P*** 141,142 P comp.std.unix Discussion for the P1003 committee on UNIX. (Moderated) P comp.sys.amiga Commodore Amiga: info&uses, but no programs. P P--- 148,150 ----- P comp.std.unix Discussion for the P1003 committee on UNIX. (Moderated) P+ comp.sw.components Software components and related technology. P comp.sys.amiga Commodore Amiga: info&uses, but no programs. P*************** P*** 161,162 P comp.sys.intel.ipsc310 Anything related to Xenix on an Intel 310. P comp.sys.m6809 Discussion about 6809's. P P--- 169,171 ----- P comp.sys.intel.ipsc310 Anything related to Xenix on an Intel 310. P+ comp.sys.isis The ISIS distributed system from Cornell. P comp.sys.m6809 Discussion about 6809's. P*************** P*** 169,170 P comp.sys.masscomp The Masscomp line of computers. (Moderated) P comp.sys.misc Discussion about computers of all kinds. P P--- 178,180 ----- P comp.sys.masscomp The Masscomp line of computers. (Moderated) P+ comp.sys.mips Systems based on MIPS chips. P comp.sys.misc Discussion about computers of all kinds. P*************** P*** 202,203 P comp.unix.cray Cray computers and their operating systems. P comp.unix.microport Discussion of Microport's UNIX. P P--- 212,214 ----- P comp.unix.cray Cray computers and their operating systems. P+ comp.unix.i386 Versions of Unix running on Intel 80386-based boxes. P comp.unix.microport Discussion of Microport's UNIX. P*************** P*** 204,206 P comp.unix.questions UNIX neophytes group. P! comp.unix.ultrix Discussions about DEC's Ultrix. (Moderated) P comp.unix.wizards Discussions, bug reports, and fixes on and for UNIX. P P--- 215,217 ----- P comp.unix.questions UNIX neophytes group. P! comp.unix.ultrix Discussions about DEC's Ultrix. P comp.unix.wizards Discussions, bug reports, and fixes on and for UNIX. P*************** P*** 207,208 P comp.unix.xenix Discussion about the Xenix OS. P comp.windows.misc Various issues about windowing systems. P P--- 218,220 ----- P comp.unix.xenix Discussion about the Xenix OS. P+ comp.virus Computer viruses & security. (Moderated) P comp.windows.misc Various issues about windowing systems. P*************** P*** 209,211 P comp.windows.ms Window systems under MS/DOS. P! comp.windows.news Sun Microsystems' NewS window system. P comp.windows.x Discussion about the X Window System. P P--- 221,223 ----- P comp.windows.ms Window systems under MS/DOS. P! comp.windows.news Sun Microsystems' NeWS window system. P comp.windows.x Discussion about the X Window System. P*************** P*** 213,214 P misc.consumers.house Discussion about owning and maintaining a house. P misc.forsale Short, tasteful postings about items for sale. P P--- 225,227 ----- P misc.consumers.house Discussion about owning and maintaining a house. P+ misc.emerg-services Forum for paramedics & other first responders. P misc.forsale Short, tasteful postings about items for sale. P*************** P*** 216,217 P misc.headlines Current interest: drug testing, terrorism, etc. P misc.invest Investments and the handling of money. P P--- 229,231 ----- P misc.headlines Current interest: drug testing, terrorism, etc. P+ misc.headlines.unitex International news from the UN & related. (Moderated) P misc.invest Investments and the handling of money. P*************** P*** 230,231 P news.announce.important General announcements of interest to all. (Moderated) P news.announce.newusers Explanatory postings for new users. (Moderated) P P--- 244,246 ----- P news.announce.important General announcements of interest to all. (Moderated) P+ news.announce.newgroups Calls for newgroups & announcements of same. (Moderated) P news.announce.newusers Explanatory postings for new users. (Moderated) P*************** P*** 236,237 P news.newsites Postings of new site announcements. P news.software.b Discussion about B-news-compatible software. P P--- 251,254 ----- P news.newsites Postings of new site announcements. P+ news.newusers.questions Q & A for users new to the Usenet. P+ news.software.anu-news VMS B-news software from Australian National Univ. P news.software.b Discussion about B-news-compatible software. P*************** P*** 253,254 P rec.arts.tv.soaps Postings about soap operas. P rec.arts.wobegon "A Prairie Home Companion" radio show discussion. P P--- 270,272 ----- P rec.arts.tv.soaps Postings about soap operas. P+ rec.arts.tv.uk Discussions of telly shows from the UK. P rec.arts.wobegon "A Prairie Home Companion" radio show discussion. P*************** P*** 259,260 P rec.aviation Aviation rules, means, and methods. P rec.bicycles Bicycles, related products and laws. P P--- 277,279 ----- P rec.aviation Aviation rules, means, and methods. P+ rec.backcountry Activities in the Great Outdoors. P rec.bicycles Bicycles, related products and laws. P*************** P*** 286,287 P rec.ham-radio.packet Discussion about packet radio setups. P rec.humor Jokes and the like. May be somewhat offensive. P P--- 305,307 ----- P rec.ham-radio.packet Discussion about packet radio setups. P+ rec.ham-radio.swap Offers to trade and swap radio equipment. P rec.humor Jokes and the like. May be somewhat offensive. P*************** P*** 299,300 P rec.music.classical Discussion about classical music. P rec.music.folk Folks discussing folk music of various sorts. P P--- 319,322 ----- P rec.music.classical Discussion about classical music. P+ rec.music.dementia Discussion of comedy and novelty music. P+ rec.music.dylan Discussion of Bob's works & music. P rec.music.folk Folks discussing folk music of various sorts. P*************** P*** 304,305 P rec.music.misc Music lovers' group. P rec.music.synth Synthesizers and computer music. P P--- 326,328 ----- P rec.music.misc Music lovers' group. P+ rec.music.newage "New Age" music discussions. P rec.music.synth Synthesizers and computer music. P*************** P*** 311,313 P rec.scuba Hobbyists interested in SCUBA diving. P! rec.skiing Hobbyists interested in skiing. P rec.skydiving Hobbyists interested in skydiving. P P--- 334,336 ----- P rec.scuba Hobbyists interested in SCUBA diving. P! rec.skiing Hobbyists interested in snow skiing. P rec.skydiving Hobbyists interested in skydiving. P*************** P*** 321,322 P rec.woodworking Hobbyists interested in woodworking. P sci.astro Astronomy discussions and information. P P--- 344,346 ----- P rec.woodworking Hobbyists interested in woodworking. P+ sci.aeronautics The science of aeronautics & related technology. P sci.astro Astronomy discussions and information. P*************** P*** 324,325 P sci.bio.technology Any topic relating to biotechnology. P sci.crypt Different methods of data en/decryption. P P--- 348,350 ----- P sci.bio.technology Any topic relating to biotechnology. P+ sci.chem Chemistry and related sciences. P sci.crypt Different methods of data en/decryption. P*************** P*** 325,326 P sci.crypt Different methods of data en/decryption. P sci.electronics Circuits, theory, electrons and discussions. P P--- 350,352 ----- P sci.crypt Different methods of data en/decryption. P+ sci.edu Science education. P sci.electronics Circuits, theory, electrons and discussions. P*************** P*** 326,327 P sci.electronics Circuits, theory, electrons and discussions. P sci.lang Natural languages, communication, etc. P P--- 352,355 ----- P sci.electronics Circuits, theory, electrons and discussions. P+ sci.energy Discussions about energy, science & technology. P+ sci.environment Discussions about the environment and ecology. P sci.lang Natural languages, communication, etc. P*************** P*** 335,336 P sci.med.aids AIDS: treatment, pathology/biology of HIV, prevention. (Moderated) P sci.military Discussion about science & the military. (Moderated) P P--- 363,365 ----- P sci.med.aids AIDS: treatment, pathology/biology of HIV, prevention. (Moderated) P+ sci.med.physics Issues of physics in medical testing/care. P sci.military Discussion about science & the military. (Moderated) P*************** P*** 341,342 P sci.physics Physical laws, properties, etc. P sci.psychology Topics related to psychology. P P--- 370,372 ----- P sci.physics Physical laws, properties, etc. P+ sci.physics.fusion Info on fusion, esp. "cold" fusion. P sci.psychology Topics related to psychology. P*************** P*** 343,344 P sci.research Research methods, funding, ethics, and whatever. P sci.space Space, space programs, space related research, etc. P P--- 373,375 ----- P sci.research Research methods, funding, ethics, and whatever. P+ sci.skeptic Skeptics discussing psuedo-science. P sci.space Space, space programs, space related research, etc. P*************** P*** 346,347 P soc.college College, college activities, campus life, etc. P soc.culture.african Discussions about Africa & things African. P P--- 377,379 ----- P soc.college College, college activities, campus life, etc. P+ soc.couples Discussions for couples (cf. soc.singles). P soc.culture.african Discussions about Africa & things African. P*************** P*** 348,349 P soc.culture.arabic Technological & cultural issues, *not* politics. P soc.culture.celtic Group about Celts (*not* basketball!). P P--- 380,382 ----- P soc.culture.arabic Technological & cultural issues, *not* politics. P+ soc.culture.asian.american Issues & discussion about Asian-Americans. P soc.culture.celtic Group about Celts (*not* basketball!). P*************** P*** 352,353 P soc.culture.greek Group about Greeks. P soc.culture.indian Group for discussion about India & things Indian. P P--- 385,387 ----- P soc.culture.greek Group about Greeks. P+ soc.culture.hongkong Discussions pertaining to Hong Kong. P soc.culture.indian Group for discussion about India & things Indian. P*************** P*** 356,357 P soc.culture.misc Group for discussion about other cultures. P soc.human-nets Computer aided communications digest. (Moderated) P P--- 390,395 ----- P soc.culture.misc Group for discussion about other cultures. P+ soc.culture.nordic Discussion about culture up north. P+ soc.culture.taiwan Discussion about things Taiwanese. P+ soc.culture.turkish Discussion about things Turkish. P+ soc.feminism Discussion of feminism & feminist issues. (Moderated) P soc.human-nets Computer aided communications digest. (Moderated) P*************** P*** 364,365 P soc.religion.christian Christianity and related topics. (Moderated) P soc.roots Genealogical matters. P P--- 402,404 ----- P soc.religion.christian Christianity and related topics. (Moderated) P+ soc.rights.human Human rights & activism (e.g., Amnesty International). P soc.roots Genealogical matters. P*************** P*** 366,368 P soc.singles Newsgroup for single people, their activities, etc. P! soc.women Women's rights, discrimination, etc. P talk.abortion All sorts of discussions and arguments on abortion. P P--- 405,407 ----- P soc.singles Newsgroup for single people, their activities, etc. P! soc.women Issues related to women, their problems & relationships. P talk.abortion All sorts of discussions and arguments on abortion. P*************** P*** 371,372 P talk.philosophy.misc Philosophical musings on all topics. P talk.politics.mideast Discussion & debate over Middle Eastern events. P P--- 410,412 ----- P talk.philosophy.misc Philosophical musings on all topics. P+ talk.politics.guns The politics of firearm ownership and (mis)use. P talk.politics.mideast Discussion & debate over Middle Eastern events. P*************** P*** 375,376 P talk.politics.theory Theory of politics and political systems. P talk.religion.misc Religious, ethical, & moral implications. P P--- 415,417 ----- P talk.politics.theory Theory of politics and political systems. P+ talk.rape Discussions on stopping rape; not to be crossposted. P talk.religion.misc Religious, ethical, & moral implications. P*************** P*** 384,387 P cat <<'E_O_F' >>$LIBDIR/active P! control 00000 00001 P! junk 00000 00001 P E_O_F P P--- 425,428 ----- P cat <<'E_O_F' >>$LIBDIR/active P! control 0000000 0000000 P! junk 0000000 0000000 P E_O_F P*************** P*** 389,390 P else P : make sure it is in the new format P P--- 430,433 ----- P else P+ : increase max article number if necessary P+ sed 's/ \([0-9][0-9][0-9][0-9][0-9]\) \([0-9][0-9][0-9][0-9][0-9]\) / 00\1 00\2 /' $LIBDIR/active>$LIBDIR/nactive && mv $LIBDIR/nactive $LIBDIR/active P : make sure it is in the new format P*************** P*** 400,402 P 2) ed - $LIBDIR/active << 'EOF' P! 1,$s/$/ 00001/ P w P P--- 443,445 ----- P 2) ed - $LIBDIR/active << 'EOF' P! 1,$s/$/ 0000000/ P w P*************** P*** 431 P rm -f /tmp/$$* P P--- 474,482 ----- P rm -f /tmp/$$* P+ P+ nlines=`wc -l < $LIBDIR/active` P+ set - `grep '^#define LINES' defs.h` P+ if test $nlines -gt $3 P+ then P+ echo "WARNING: active file has more than $3 lines" P+ echo "Increase LINES in defs.h" P+ fi PIndex: params.h PPrereq: 2.31 Pdiff -c1 onews/params.h news/params.h P*** onews/params.h Thu Jan 19 00:06:42 1989 P--- news/params.h Fri Sep 1 18:23:28 1989 P*************** P*** 4,6 P P! /* @(#)params.h 2.31 1/19/89 */ P P P--- 4,6 ----- P P! /* @(#)params.h 2.32 9/1/89 */ P P*************** P*** 133,137 P P! #ifdef M_XENIX P! #define LOCKING P! #endif /* defined M_XENIX */ P P P--- 133,137 ----- P P! #if defined(M_XENIX) && !defined(LOCKF) && !defined(LOCKING) P! #define LOCKING P! #endif /* M_XENIX */ P P*************** P*** 191,193 P #define STRCMP(a,b) ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1)) P! #define STRNCMP(a,b,n) ((*(a) != *(b)) ? (*(a)-*(b)) : strncmp(a, b, n)) P extern char charmap[]; P P--- 191,193 ----- P #define STRCMP(a,b) ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1)) P! #define STRNCMP(a,b,n) ((*(a) != *(b)) ? (int)(*(a)-*(b)) : strncmp(a, b, n)) P extern char charmap[]; PIndex: patchlevel.h PPrereq: 17 Pdiff -c1 onews/patchlevel.h news/patchlevel.h P*** onews/patchlevel.h Tue Jan 24 15:49:36 1989 P--- news/patchlevel.h Tue Sep 12 17:02:43 1989 P*************** P*** 1,2 P! #define PATCHLEVEL 17 P P P--- 1,2 ----- P! #define PATCHLEVEL 18 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 1/24/89" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11 9/12/89" PIndex: postnews.c PPrereq: 1.37 Pdiff -c1 onews/postnews.c news/postnews.c P*** onews/postnews.c Sun Jan 15 19:49:03 1989 P--- news/postnews.c Fri Sep 1 18:23:31 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.37 1/15/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.40 9/1/89"; P #endif /* SCCSID */ P*************** P*** 43,45 P char newsgroups[BUFLEN]; P! char followupto[BUFLEN]; P char isfrom[BUFLEN]; P P--- 43,45 ----- P char newsgroups[BUFLEN]; P! char followto[BUFLEN]; P char isfrom[BUFLEN]; P*************** P*** 46,48 P char msgid[BUFLEN]; P! char keywords[BUFLEN]; P char summary[BUFLEN]; P P--- 46,48 ----- P char msgid[BUFLEN]; P! char keywords[MBUFLEN]; P char summary[BUFLEN]; P*************** P*** 457,460 P P! if (followupto[0] != '\0') P! fprintf(tf, "Followup-To: %s\n", followupto); P P P--- 457,460 ----- P P! if (followto[0] != '\0') P! fprintf(tf, "Followup-To: %s\n", followto); P P*************** P*** 652,654 P } P! if (index(newsgroups, NGDELIM) != NULL && followupto[0] == '\0') { P printf("Your article is being posted to multiple newsgroups.\n"); P P--- 652,654 ----- P } P! if (index(newsgroups, NGDELIM) != NULL && followto[0] == '\0') { P printf("Your article is being posted to multiple newsgroups.\n"); P*************** P*** 657,662 P printf("(If responses should be mailed to you, enter \"poster\")\n"); P! getpr("Followup-To: ", followupto); P! if (followupto[0] != '\0') P! modify_article(tempfname, "Followup-To: ", followupto, P! APPEND); P } P P--- 657,662 ----- P printf("(If responses should be mailed to you, enter \"poster\")\n"); P! getpr("Followup-To: ", followto); P! if (followto[0] != '\0') P! modify_article(tempfname, "Followup-To: ", followto, P! REPLACE); P } P*************** P*** 974,976 P default: P! printf("Active file (%s) corrupted. ", ACTIVE); P byebye("Seek help!"); P P--- 974,976 ----- P default: P! printf("Active file corrupt: %s", ng_read); P byebye("Seek help!"); PIndex: readnews.c PPrereq: 2.33 Pdiff -c1 onews/readnews.c news/readnews.c P*** onews/readnews.c Sun Oct 18 18:04:20 1987 P--- news/readnews.c Thu Sep 7 17:54:31 1989 P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.33 10/15/87"; P #endif /* SCCSID */ P P--- 5,7 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)readnews.c 2.34 9/7/89"; P #endif /* SCCSID */ P*************** P*** 126,128 P if (++line > LINES) P! xerror("Too many options."); P if ((rcline[line] = malloc((unsigned)(strlen(ptr) + 1))) == NULL) P P--- 126,128 ----- P if (++line > LINES) P! xerror("Too many options. Increase LINES in defs.h"); P if ((rcline[line] = malloc((unsigned)(strlen(ptr) + 1))) == NULL) P*************** P*** 170,172 P if (++line > LINES) P! xerror("Too many options."); P if ((rcline[line] = malloc((unsigned)(strlen(ptr) + 1))) == NULL) P P--- 170,172 ----- P if (++line > LINES) P! xerror("Too many options. Increase LINES in defs.h"); P if ((rcline[line] = malloc((unsigned)(strlen(ptr) + 1))) == NULL) PIndex: recmail.c PPrereq: 1.18 Pdiff -c1 onews/recmail.c news/recmail.c P*** onews/recmail.c Tue Jan 17 13:09:30 1989 P--- news/recmail.c Tue Sep 12 16:58:15 1989 P*************** P*** 18,20 P * It is similar to sendmail -t, but only assumes /bin/mail. P! * To use your own mailer, e. g. nmail, compile with -DMAILER=my_mailer. P */ P P--- 18,20 ----- P * It is similar to sendmail -t, but only assumes /bin/mail. P! * To use your own mailer, e. g. nmail, compile with -DMAILPROGRAM=my_mailer. P */ P*************** P*** 22,24 P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.18 1/17/89"; P #endif /* SCCSID */ P P--- 22,24 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)recmail.c 1.19 9/12/89"; P #endif /* SCCSID */ P*************** P*** 27,30 P P! #ifndef MAILER P! #define MAILER "/bin/mail" P #endif P P--- 27,30 ----- P P! #ifndef MAILPROGRAM P! #define MAILPROGRAM "/bin/mail" P #endif P*************** P*** 30,32 P #endif P! char mailer[] = MAILER; P P P--- 30,32 ----- P #endif P! char mailer[] = MAILPROGRAM; P PIndex: rextern.c PPrereq: 2.17 Pdiff -c1 onews/rextern.c news/rextern.c P*** onews/rextern.c Fri Nov 21 16:04:49 1986 P--- news/rextern.c Tue Sep 12 16:58:15 1989 P*************** P*** 5,7 P #ifdef SCCSID P! static char *SccsId = "@(#)rextern.c 2.17 11/21/86"; P #endif /* SCCSID */ P P--- 5,7 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)rextern.c 2.18 9/12/89"; P #endif /* SCCSID */ P*************** P*** 47,49 P P- #ifndef MAILER P char *MAILER; P P--- 47,48 ----- P P char *MAILER; P*************** P*** 49,52 P char *MAILER; P- #endif P- P char *PAGER = ""; P P--- 48,49 ----- P char *MAILER; P char *PAGER = ""; PIndex: rfuncs.c PPrereq: 2.47 Pdiff -c1 onews/rfuncs.c news/rfuncs.c P*** onews/rfuncs.c Thu Jan 19 00:06:44 1989 P--- news/rfuncs.c Thu Sep 7 17:54:32 1989 P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.47 1/19/89"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)rfuncs.c 2.49 9/7/89"; P #endif /* SCCSID */ P*************** P*** 421,423 P if (++line > LINES) P! xerror("Too many newsgroups"); P ptr[0] = oldptr; P P--- 421,423 ----- P if (++line > LINES) P! xerror("Too many newsgroups. Increase LINES in defs.h"); P ptr[0] = oldptr; P*************** P*** 654,656 P &tp->minart, &tp->yn) != 4) P! xerror("Active file corrupt"); P delta = tp->maxart - tp->minart; P P--- 654,656 ----- P &tp->minart, &tp->yn) != 4) P! xerror("Active file corrupt: %s", aline); P delta = tp->maxart - tp->minart; PIndex: sendbatch.sh PPrereq: 1.20 Pdiff -c1 onews/sendbatch.sh news/sendbatch.sh P*** onews/sendbatch.sh Sun Jan 15 23:04:11 1989 P--- news/sendbatch.sh Fri Sep 1 18:23:33 1989 P*************** P*** 1,2 P! : '@(#)sendbatch.sh 1.20 1/15/89' P P P--- 1,2 ----- P! : '@(#)sendbatch.sh 1.21 9/1/89' P P*************** P*** 17,19 P P! for rmt in $* P do P P--- 17,19 ----- P P! for rmt P do P*************** P*** 61,62 P continue;; P esac P P--- 61,64 ----- P continue;; P+ -f*) MINDF=`expr "$rmt" : '-f\(.*\)'` P+ continue;; P esac P*************** P*** 78,80 P P! if test -n "$MAXBATCH" P then P P--- 80,82 ----- P P! if test -n "$MAXBATCH" -a -d /usr/spool/uucp/$rmt P then P*************** P*** 106,108 P sentbytes=0 P! while test $? -eq 0 -a $sentbytes -le $MAXBATCH -a \ P \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ P P--- 108,110 ----- P sentbytes=0 P! while test $? -eq 0 -a $sentbytes -le "$MAXBATCH" -a \ P \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ PIndex: virtterm.c PPrereq: 1.15 Pdiff -c1 onews/virtterm.c news/virtterm.c P*** onews/virtterm.c Sun Jan 15 19:49:06 1989 P--- news/virtterm.c Fri Sep 1 18:23:35 1989 P*************** P*** 7,9 P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.15 1/15/89"; P #endif /* SCCSID */ P P--- 7,9 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)virtterm.c 1.16 9/1/89"; P #endif /* SCCSID */ P*************** P*** 1003,1004 P AM = XN = 1; P } P P--- 1003,1025 ----- P AM = XN = 1; P+ } P+ free((char *) _virt[0].l); P+ free((char *) _virt); P+ { P+ char *thelines; P+ int i; P+ char *malloc(); P+ P+ thelines = malloc(2 * ROWS * COLS); P+ _virt = (struct line *)malloc(2 * ROWS * sizeof (struct line)); P+ _actual = _virt + ROWS; P+ for (i = 0; i < ROWS; i++) { P+ _virt[i].len = 0; P+ _virt[i].flags = 0; P+ _actual[i].len = 0; P+ _actual[i].flags = 0; P+ _virt[i].l = thelines; P+ thelines += COLS; P+ _actual[i].l = thelines; P+ thelines += COLS; P+ } P } PIndex: visual.c PPrereq: 1.44 Pdiff -c1 onews/visual.c news/visual.c P*** onews/visual.c Sun Jan 22 22:18:19 1989 P--- news/visual.c Tue Sep 12 16:58:17 1989 P*************** P*** 6,8 P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.44 1/22/89"; P #endif /* SCCSID */ P P--- 6,8 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)visual.c 1.46 9/12/89"; P #endif /* SCCSID */ P*************** P*** 170,171 P static FILE *fp; /* current article to be printed*/ P P P--- 170,172 ----- P static FILE *fp; /* current article to be printed*/ P+ static char savebuf[BUFLEN]; P P*************** P*** 351,352 P int i; P long nart, Hoffset; P P--- 352,354 ----- P int i; P+ int sawlong; P long nart, Hoffset; P*************** P*** 520,522 P { P- static char savebuf[BUFLEN]; P int wflags; P P--- 522,523 ----- P { P int wflags; P*************** P*** 762,763 P (void) fseek(fp, 0L, 0); P for (i = 0; i < ARTWLEN; i++) { P P--- 763,765 ----- P (void) fseek(fp, 0L, 0); P+ sawlong = FALSE; P for (i = 0; i < ARTWLEN; i++) { P*************** P*** 765,767 P break; P! if (linebuf[0] == '\n') P break; P P--- 767,769 ----- P break; P! if (linebuf[0] == '\n' && !sawlong) P break; P*************** P*** 767,768 P break; P linebuf[COLS] = '\0'; P P--- 769,771 ----- P break; P+ sawlong = index(linebuf, '\n') == NULL; P linebuf[COLS] = '\0'; P P PSHAREND echo done This is a shell archive; extract with /bin/sh echo -n 'Extracting patch.19... ' sed 's/^P//' >patch.19 <<\PSHAREND PFrom rick@uunet.UU.NET Mon Oct 30 23:10:04 1989 PPath: uunet!rick PFrom: rick@uunet.UU.NET (Rick Adams) PNewsgroups: news.software.b PSubject: Patch 19 for B news 2.11 src PMessage-ID: <71135@uunet.UU.NET> PDate: 31 Oct 89 04:10:04 GMT POrganization: UUNET Communications Services, Falls Church, VA PLines: 648 P P PDescription: P This is patch 19 for news 2.11. It addresses the following problems: P P Fixes buffering problem with rnews. P Several typos introduced in patch 18 fixed. P If no articles are in a group, minarticle will be one P more than maxarticle in active file (like C news) P expire -I and -i now work P version control message no longer includes header of message P in response. P version control message NOTIFYs usenet if NOTIFY is enabled. P new localize.xenix P if cancel control message arrives and is not propagated P (due to cancel failing), dont save the control message, P only the history of it. P PFix: P cd src and make install P PIndex: control.c PPrereq: 2.60 Pdiff -c1 onews/control.c news/control.c P*** onews/control.c Tue Sep 12 17:56:08 1989 P--- news/control.c Sun Oct 29 20:44:14 1989 P*************** P*** 21,23 P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.60 9/5/89"; P #endif /* SCCSID */ P P--- 21,23 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)control.c 2.61 10/29/89"; P #endif /* SCCSID */ P*************** P*** 476,478 P (void) fseek(actfp, 0L, 2); clearerr(actfp); P! fprintf(actfp, "%s 0000000 0000000 %c\n", argv[1], P (argc > 2 && STRCMP(argv[2], "moderated") == 0) P P--- 476,478 ----- P (void) fseek(actfp, 0L, 2); clearerr(actfp); P! fprintf(actfp, "%s 0000000 0000001 %c\n", argv[1], P (argc > 2 && STRCMP(argv[2], "moderated") == 0) P*************** P*** 787,788 P P f = mailhdr(&header, "Our news version"); P P--- 787,799 ----- P P+ #ifdef NOTIFY P+ if (argc < 2) { P+ f = mailhdr((struct hbuf *)NULL, "version control message"); P+ if (f != NULL) { P+ fprintf(f, "%s requested your news version.\n", header.path); P+ fprintf(f, "It has been sent.\n"); P+ fprintf(f, "\n\n%s says:\n", header.path); P+ controlmail = f; P+ } P+ } P+ #endif /* NOTIFY */ P f = mailhdr(&header, "Our news version"); P*************** P*** 791,794 P fprintf(f, "Currently running news version %s.\n\n", news_version); P- fprintf(f, "The header of your message follows:\n\n"); P- (void) hwrite(&header, f); P (void) mclose(f); P P--- 802,803 ----- P fprintf(f, "Currently running news version %s.\n\n", news_version); P (void) mclose(f); P PIndex: expire.c PPrereq: 2.63 Pdiff -c1 onews/expire.c news/expire.c P*** onews/expire.c Tue Sep 12 17:56:10 1989 P--- news/expire.c Sun Oct 29 20:44:14 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.63 9/1/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)expire.c 2.64 10/29/89"; P #endif /* SCCSID */ P*************** P*** 468,470 P rectime = cgtdate(recdate); P! exptime = atol(p3); P } else { P P--- 468,474 ----- P rectime = cgtdate(recdate); P! exptime = rectime + expincr; P! newtime = atol(p3); P! if (ignorexp == 0 P! || (ignorexp == 1 && newtime < exptime) ) P! exptime = newtime; P } else { P*************** P*** 927,929 P if (minart > maxart) P! minart = maxart; P P P--- 931,933 ----- P if (minart > maxart) P! minart = maxart + 1; P PIndex: ifuncs.c PPrereq: 2.77 Pdiff -c1 onews/ifuncs.c news/ifuncs.c P*** onews/ifuncs.c Tue Sep 12 17:56:19 1989 P--- news/ifuncs.c Sun Oct 29 20:44:15 1989 P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.77 9/12/89"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)ifuncs.c 2.78 10/29/89"; P #endif /* SCCSID */ P*************** P*** 27,28 P extern long localize(); P P P--- 27,29 ----- P extern long localize(); P+ extern char *infpbuf; P P*************** P*** 401,405 P ofp = fopen(sp->s_xmit, "a"); P- #ifdef F_SETFL P- (void) fcntl(fileno(ofp), F_SETFL, O_APPEND); P- #endif /* F_SETFL */ P if (ofp == NULL) P P--- 402,403 ----- P ofp = fopen(sp->s_xmit, "a"); P if (ofp == NULL) P*************** P*** 406,407 P xerror("Cannot append to %s", sp->s_xmit); P if (appfile && appmsgid) P P--- 404,409 ----- P xerror("Cannot append to %s", sp->s_xmit); P+ #if defined(F_SETFL) && !defined(MULTICAST) P+ (void) fcntl(fileno(ofp), F_SETFL, O_APPEND); P+ #endif /* F_SETFL */ P+ #ifdef MULTICAST P if (appfile && appmsgid) P*************** P*** 411,413 P firstbufname); P- #ifdef MULTICAST P while (--mc >= 0) P P--- 413,414 ----- P firstbufname); P while (--mc >= 0) P*************** P*** 414,416 P fprintf(ofp, " %s", *sysnames++); P- #endif /* !MULTICAST */ P putc('\n', ofp); P P--- 415,416 ----- P fprintf(ofp, " %s", *sysnames++); P putc('\n', ofp); P*************** P*** 416,417 P putc('\n', ofp); P (void) fclose(ofp); P P--- 416,424 ----- P putc('\n', ofp); P+ #else /* !MULTICAST */ P+ if (appfile && appmsgid) P+ fprintf(ofp, "%s\t%s\n", firstbufname, hh.ident); P+ else P+ fprintf(ofp, "%s\n", appmsgid ? hh.ident : P+ firstbufname); P+ #endif /* !MULTICAST */ P (void) fclose(ofp); P*************** P*** 1333,1335 P int c; P- char *cp; P P P--- 1340,1341 ----- P int c; P P*************** P*** 1365,1369 P tfilename = 0; P! cp = malloc((unsigned)BUFSIZ); P! if (cp != NULL) P! setbuf(infp, cp); P do { P P--- 1371,1375 ----- P tfilename = 0; P! infpbuf = malloc((unsigned)BUFSIZ); P! if (infpbuf != NULL) P! setbuf(infp, infpbuf); P do { P*************** P*** 1454,1456 P setbuf(infp, (char *) NULL); P! (void) free(cp); P return; /* from checkbatch as if P P--- 1460,1463 ----- P setbuf(infp, (char *) NULL); P! (void) free(infpbuf); P! infpbuf = NULL; P return; /* from checkbatch as if P*************** P*** 1480,1484 P } /* while a batch */ P! cp = malloc((unsigned)BUFSIZ); P! if (cp != NULL) P! setbuf(infp, cp); P if (c != EOF) P P--- 1487,1491 ----- P } /* while a batch */ P! infpbuf = malloc((unsigned)BUFSIZ); P! if (infpbuf != NULL) P! setbuf(infp, infpbuf); P if (c != EOF) P PIndex: inews.c PPrereq: 2.92 Pdiff -c1 onews/inews.c news/inews.c P*** onews/inews.c Tue Sep 12 17:56:22 1989 P--- news/inews.c Sun Oct 29 20:44:17 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.92 9/1/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)inews.c 2.93 10/29/89"; P #endif /* SCCSID */ P*************** P*** 103,104 P extern int errno, xxit(); P P P--- 103,105 ----- P extern int errno, xxit(); P+ char *infpbuf = NULL; P P*************** P*** 239,241 P if (space()) { /* check disk space */ P! spool_news = DOSPOOL; P logerr("Out of space in %s.", SPOOLDIR); P P--- 240,242 ----- P if (space()) { /* check disk space */ P! spool_news = DO_SPOOL; P logerr("Out of space in %s.", SPOOLDIR); P*************** P*** 524,525 P checkbatch(); P (void) signal(SIGHUP, SIG_IGN); P P--- 525,531 ----- P checkbatch(); P+ if (infpbuf == NULL) { /* make sure do buffered reads */ P+ infpbuf = malloc((unsigned)BUFSIZ); P+ if (infpbuf != NULL) P+ setbuf(infp, infpbuf); P+ } P (void) signal(SIGHUP, SIG_IGN); P*************** P*** 1088,1090 P #ifndef NFSCLIENT P! if (localize("control") && exitcode != 0) P savehist(histline); P P--- 1094,1096 ----- P #ifndef NFSCLIENT P! if (exitcode != 0) P savehist(histline); P*************** P*** 1090,1091 P savehist(histline); P } else { P P--- 1096,1099 ----- P savehist(histline); P+ else P+ localize("control"); P } else { P*************** P*** 1183,1184 P (void) fclose(infp); P if(exitcode == 0) { P P--- 1191,1196 ----- P (void) fclose(infp); P+ if (infpbuf) { P+ (void) free(infpbuf); P+ infpbuf = NULL; P+ } P if(exitcode == 0) { P*************** P*** 1297,1299 P } P! if (*filename) P (void) fclose(infp); P P--- 1309,1311 ----- P } P! if (*filename) { P (void) fclose(infp); P*************** P*** 1299,1300 P (void) fclose(infp); P if (mode != PROC && P P--- 1311,1317 ----- P (void) fclose(infp); P+ if (infpbuf) { P+ (void) free(infpbuf); P+ infpbuf = NULL; P+ } P+ } P if (mode != PROC && PIndex: localize.xenix Pdiff -c1 onews/localize.xenix news/localize.xenix P*** onews/localize.xenix Fri Oct 16 18:22:08 1987 P--- news/localize.xenix Sun Oct 29 20:44:17 1989 P*************** P*** 1,2 P- # P # This is correct for the P P--- 1 ----- P # This is correct for the P*************** P*** 2,4 P # This is correct for the P! # XENIX (empty) 5.0 iAPX286 1 1006 (empty) P # version. There are so many versions of xenix out there P P--- 1,3 ----- P # This is correct for the P! # SCO XENIX 286 release 2.2.3 P # version. There are so many versions of xenix out there P*************** P*** 11,12 P ed - Makefile <<'EOF' P g/^#USG /s/// P P--- 10,23 ----- P ed - Makefile <<'EOF' P+ /^HOME/s/^HOME/#HOME/ P+ /^UUXFLAGS/s/ -r -z/ -r/ P+ /^SPOOL_DISK/s/\/usr\/spool// P+ /^DEFS/;a P+ -DMAILPROGRAM=\"/usr/bin/mail\" \ P+ . P+ /^fullinstall:/+3;a P+ -test -d $(DESTDIR)$(BATCHDIR) || mkdir $(DESTDIR)$(BATCHDIR) P+ chmod 777 $(DESTDIR)$(BATCHDIR) P+ chown $(NEWSUSR) $(DESTDIR)$(BATCHDIR) P+ chgrp $(NEWSGRP) $(DESTDIR)$(BATCHDIR) P+ . P g/^#USG /s/// P*************** P*** 17,19 P g/^MISC *=/s/$/ uname.o/ P- g/^UUXFLAGS/s//UUXFLAGS =/ P g/^IBMFLAGS/s/$/ -M2l -LARGE -DM_XENIX/ P P--- 28,29 ----- P g/^MISC *=/s/$/ uname.o/ P g/^IBMFLAGS/s/$/ -M2l -LARGE -DM_XENIX/ P*************** P*** 25,28 P g/-o readnews/s/-o/-m readnews.map -F 3000 -o/ P! g/-o vnews /s/-o/-F 5000 -m vnews.map -o / P! g/-o checknews/s/-o/-F E000 -o/ P g/-o expire/s/-o/-F A000 -o/ P P--- 35,38 ----- P g/-o readnews/s/-o/-m readnews.map -F 3000 -o/ P! /^vnews:/+1;s/-o $@ /-F 5000 -m vnews.map -o vnews/ P! /^checknews:/+1;s/$(LFLAGS)/$(LFLAGS) -F E000/ P g/-o expire/s/-o/-F A000 -o/ P*************** P*** 40,41 P ed - defs.h <<'EOF' P g/#define TMAIL/s//\/\* #define TMAIL/ P P--- 50,54 ----- P ed - defs.h <<'EOF' P+ /ROOTID/s/10/100/ P+ /N_UMASK/s/000/022/ P+ /DFLTSUB/s/general,all.announce/all/ P g/#define TMAIL/s//\/\* #define TMAIL/ P*************** P*** 41,44 P g/#define TMAIL/s//\/\* #define TMAIL/ P! g/\/usr\/ucb\/more/s//\/usr\/bin\/more/ P! g/uux - -r -z/s//uux - / P g/uucpname/s//systemid/ P P--- 54,58 ----- P g/#define TMAIL/s//\/\* #define TMAIL/ P! /PAGE/s/\/usr\/ucb\/more/\/usr\/bin\/more/ P! /DFTXMIT/s/uux - -r -z/uux - -r/ P! /UXMIT/s/uux -r -z -c/uux -r/ P g/uucpname/s//systemid/ P*************** P*** 46,47 P g/\/\* #define UUNAME/s/...// P w P P--- 60,62 ----- P g/\/\* #define UUNAME/s/...// P+ /MYORG/s/Frobozz Inc., St. Louis/My Organization, Inc., Hometown, ST/ P w P PIndex: postnews.c PPrereq: 1.40 Pdiff -c1 onews/postnews.c news/postnews.c P*** onews/postnews.c Tue Sep 12 17:56:28 1989 P--- news/postnews.c Sun Oct 29 20:44:18 1989 P*************** P*** 19,21 P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.40 9/1/89"; P #endif /* SCCSID */ P P--- 19,21 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)postnews.c 1.41 10/29/89"; P #endif /* SCCSID */ P*************** P*** 777,779 P register char *p; P! int i; P char *getenv(); P P--- 777,779 ----- P register char *p; P! int i = 0; P char *getenv(); PIndex: readr.c PPrereq: 2.70 Pdiff -c1 onews/readr.c news/readr.c P*** onews/readr.c Sun Jan 22 22:18:21 1989 P--- news/readr.c Sun Oct 29 20:44:19 1989 P*************** P*** 18,20 P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.70 1/22/89"; P #endif /* SCCSID */ P P--- 18,20 ----- P #ifdef SCCSID P! static char *SccsId = "@(#)readr.c 2.71 10/29/89"; P #endif /* SCCSID */ P*************** P*** 75,76 P /* to match declaration in visual.c */ P P P--- 75,79 ----- P /* to match declaration in visual.c */ P+ #ifdef SERVER P+ static int clrtmp = 0; P+ #endif P P*************** P*** 144,145 P xxit(0); /* kludge! drop when qfflush works */ P return; P P--- 147,153 ----- P xxit(0); /* kludge! drop when qfflush works */ P+ #ifdef SERVER P+ if (clrtmp) P+ (void) unlink(filename); P+ clrtmp = 0; P+ #endif P return; P*************** P*** 191,193 P break; P! if (!SigTrap) P return; P P--- 199,206 ----- P break; P! if (!SigTrap) { P! #ifdef SERVER P! if (clrtmp) P! (void) unlink(filename); P! clrtmp = 0; P! #endif P return; P*************** P*** 193,194 P return; P #ifdef SIGCONT P P--- 206,208 ----- P return; P+ } P #ifdef SIGCONT P*************** P*** 209,210 P cout(ofp); P } P P--- 223,229 ----- P cout(ofp); P+ #ifdef SERVER P+ if (clrtmp) P+ (void) unlink(filename); P+ clrtmp = 0; P+ #endif P } P*************** P*** 1045,1046 P #ifdef SERVER P if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P P--- 1064,1068 ----- P #ifdef SERVER P+ if (clrtmp) P+ unlink(filename); P+ clrtmp = 0; P if (bit == 0 || (fp = getarticle(groupdir, bit, "ARTICLE")) == NULL) P*************** P*** 1047,1048 P goto badart; P strcpy(filename, article_name()); P P--- 1069,1071 ----- P goto badart; P+ clrtmp = 1; P strcpy(filename, article_name()); P*************** P*** 1178,1182 P obit = bit; P- #ifdef SERVER P- (void) unlink(filename); P- #endif /* SERVER */ P return 0; P P--- 1201,1202 ----- P obit = bit; P return 0; P PIndex: sendbatch.sh PPrereq: 1.21 Pdiff -c1 onews/sendbatch.sh news/sendbatch.sh P*** onews/sendbatch.sh Tue Sep 12 17:56:35 1989 P--- news/sendbatch.sh Sun Oct 29 20:44:19 1989 P*************** P*** 1,2 P! : '@(#)sendbatch.sh 1.21 9/1/89' P P P--- 1,2 ----- P! : '@(#)sendbatch.sh 1.22 10/29/89' P P*************** P*** 26,27 P continue;; P -r*) RNEWS=`expr "$rmt" : '-r\(.*\)'` P P--- 26,31 ----- P continue;; P+ -p*) MAXPERRUN=`expr "$rmt" : '-p\(.*\)'` P+ continue;; P+ +p*) MAXPERRUN='' P+ continue;; P -r*) RNEWS=`expr "$rmt" : '-r\(.*\)'` P*************** P*** 64,65 P esac P P P--- 68,73 ----- P esac P+ if test ! -n "$MAXPERRUN" P+ then P+ MAXPERRUN=$MAXBATCH P+ fi P P*************** P*** 108,110 P sentbytes=0 P! while test $? -eq 0 -a $sentbytes -le "$MAXBATCH" -a \ P \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ P P--- 116,123 ----- P sentbytes=0 P! bytes_this_batch=`expr $MAXBATCH - $du` P! if test $bytes_this_batch -gt $MAXPERRUN P! then P! bytes_this_batch=$MAXPERRUN P! fi P! while test $? -eq 0 -a $sentbytes -le $bytes_this_batch -a \ P \( \( $sentbytes -eq 0 -a -s $BATCH/$rmt \) -o \ P PIndex: patchlevel.h PPrereq: 18 Pdiff -c1 onews/patchlevel.h news/patchlevel.h P*** onews/patchlevel.h Tue Sep 12 17:56:27 1989 P--- news/patchlevel.h Thu Oct 12 23:28:00 1989 P*************** P*** 1,2 P! #define PATCHLEVEL 18 P P P--- 1,2 ----- P! #define PATCHLEVEL 19 P P*************** P*** 2,3 P P! #define NEWS_VERSION "B 2.11 9/12/89" P P--- 2,3 ----- P P! #define NEWS_VERSION "B 2.11.19 10/30/89" P P PSHAREND echo done exit