rrn@lib.tmc.edu (Stan Barber) (01/06/91)
Description: This is an official patch for rn 4.3. This is patch 54. If you need the other patches, you can get them via the Archive Server by sending mail to "archive-server@bcm.tmc.edu" with the subject line of the form "send public rn.XX.patch". Note that only patches 41 and later are available from this resource at this time. Once rn 4.4 is released, the patches to rn 4.3 will be removed. The fully patched rn kit is also available via anonymous ftp from lib.tmc.edu and gazette.bcm.tmc.edu. Look in public/rn. Special note: rn 4.4 will be released in February, 1991. Other patches to rn 4.3 may be released before the rn 4.4 release, but there will be no patch upgrading rn 4.3 to rn 4.4. Please plan to get to fresh copy of the rn kit when 4.4 is released. It will be available via the archive-server@bcm.tmc.edu at that time. This patch fixes the following problems or adds the following new features: [From eggert@twinsun.com] GNU grep 1.5 (the latest version) objects to Pnews's regular expression '^[A-Z][A-Za-z\-]*: *$', saying: ``grep: Unbalanced [''. As a result, Pnews posts nothing. The regular expression itself is slightly wrong: '\' is not a special character inside [...], so [...\...] is merely a character set that includes '\'; the '\' should be deleted. However, GNU grep 1.5 has a bug: '[X-]' is not handled correctly. Although this bug will be fixed in a later version of GNU grep, 1.5 is in widespread use, so it's best to avoid this bug. Lines that look like empty header lines are filtered from the message body as well as the message header. This mangles the body of legal messages. [From whales@cs.ucla.edu] The "fast skip patch" when using NNTP does not work. To reproduce the bug, go into a newsgroup and use the "M" command to mark a series of three or more expired article numbers to return. Then use "q" to leave the newsgroup, "-" to return to it, and "=" to display the subject lines. Now, read the last article in the newsgroup, and type a ^N to search by subject for the next article. RN will indicate it is "skipping" articles, and before long will mark the entire news- group as read. [From edward@twg.com] The News Administrator can't cancel articles that aren't his but are from his site. This happens because "newsuid" is not getting initialized. Fix: cd to your rn source directory and patch away Index: Pnews.SH Prereq: 4.3.2.13 *** Pnews.SH Sat Jan 5 15:17:03 1991 --- ../rn/Pnews.SH Sat Jan 5 15:18:50 1991 *************** *** 4,10 echo "Extracting Pnews (with variable substitutions)" $spitshell >Pnews <<!GROK!THIS! $startsh ! # $Header: Pnews.SH,v 4.3.2.13 90/12/30 03:47:57 sob Exp $ # # $Log: Pnews.SH,v $ # Revision 4.3.2.13 90/12/30 03:47:57 sob --- 4,10 ----- echo "Extracting Pnews (with variable substitutions)" $spitshell >Pnews <<!GROK!THIS! $startsh ! # $Header: Pnews.SH,v 4.3.2.14 91/01/05 15:18:19 sob Exp $ # # $Log: Pnews.SH,v $ # Revision 4.3.2.14 91/01/05 15:18:19 sob *************** *** 7,12 # $Header: Pnews.SH,v 4.3.2.13 90/12/30 03:47:57 sob Exp $ # # $Log: Pnews.SH,v $ # Revision 4.3.2.13 90/12/30 03:47:57 sob # Changed "hidden" to "hiddennet" to be like nntp and bnews. # Made it possible to cancel articles if hiddennet is defined. --- 7,15 ----- # $Header: Pnews.SH,v 4.3.2.14 91/01/05 15:18:19 sob Exp $ # # $Log: Pnews.SH,v $ + # Revision 4.3.2.14 91/01/05 15:18:19 sob + # Changed the header purge code to use sed instead of grep. + # # Revision 4.3.2.13 90/12/30 03:47:57 sob # Changed "hidden" to "hiddennet" to be like nntp and bnews. # Made it possible to cancel articles if hiddennet is defined. *************** *** 510,517 fi case "$tryinews" in yes) ! if $grep -v '^[A-Z][A-Za-z\-]*: *$' $tmpart | $inews -h ; then ! : null else state=rescue --- 513,520 ----- fi case "$tryinews" in yes) ! if $sed '1,/^[ ]*$/{/^[A-Z][-A-Za-z0-9]*:[ ]*$/d;}' $tmpart | ! $inews -h ; then : null else state=rescue Index: ng.c Prereq: 4.3.2.8 *** ng.c Sat Jan 5 15:16:45 1991 --- ../rn54/ng.c Sat Jan 5 14:58:19 1991 *************** *** 1,4 ! /* $Header: ng.c,v 4.3.2.8 90/11/22 16:14:17 sob Exp $ * * $Log: ng.c,v $ * Revision 4.3.2.8 90/11/22 16:14:17 sob --- 1,4 ----- ! /* $Header: ng.c,v 4.3.2.9 91/01/05 14:56:47 sob Exp $ * * $Log: ng.c,v $ * Revision 4.3.2.9 91/01/05 14:56:47 sob *************** *** 1,6 /* $Header: ng.c,v 4.3.2.8 90/11/22 16:14:17 sob Exp $ * * $Log: ng.c,v $ * Revision 4.3.2.8 90/11/22 16:14:17 sob * Added changes to accomodate picky C preprocessors * --- 1,9 ----- /* $Header: ng.c,v 4.3.2.9 91/01/05 14:56:47 sob Exp $ * * $Log: ng.c,v $ + * Revision 4.3.2.9 91/01/05 14:56:47 sob + * Removed bogus "fast skip" for NNTP. + * * Revision 4.3.2.8 90/11/22 16:14:17 sob * Added changes to accomodate picky C preprocessors * *************** *** 398,423 oneless(i); art = newart - 1; } ! #endif ! #else ! { ! char ser_line[256]; ! ART_NUM newart; ! ! put_server("NEXT"); ! if (get_server(ser_line, sizeof (ser_line)) < 0) { ! fprintf(stderr, ! "rrn: unexpected close of server socket.\n"); ! finalize(1); ! } ! if (ser_line[0] != CHAR_OK) ! newart = lastart + 1; ! else ! newart = atoi(ser_line+4); ! for (i=art; i<newart; i++) ! oneless(i); ! art = newart - 1; ! } #endif /* SERVER */ break; } --- 401,407 ----- oneless(i); art = newart - 1; } ! #endif /* READDIR */ #endif /* SERVER */ break; } Index: intrp.c Prereq: 4.3.2.10 *** intrp.c Sat Jan 5 15:16:34 1991 --- ../rn54/intrp.c Sat Jan 5 15:22:06 1991 *************** *** 1,4 ! /* $Header: intrp.c,v 4.3.2.10 90/12/31 00:02:55 sob Exp $ * * $Log: intrp.c,v $ * Revision 4.3.2.10 90/12/31 00:02:55 sob --- 1,4 ----- ! /* $Header: intrp.c,v 4.3.2.11 90/12/31 11:47:44 sob Exp $ * * $Log: intrp.c,v $ * Revision 4.3.2.11 90/12/31 11:47:44 sob *************** *** 1,6 /* $Header: intrp.c,v 4.3.2.10 90/12/31 00:02:55 sob Exp $ * * $Log: intrp.c,v $ * Revision 4.3.2.10 90/12/31 00:02:55 sob * Moved HIDDENET to remove unneeded cruft. * --- 1,9 ----- /* $Header: intrp.c,v 4.3.2.11 90/12/31 11:47:44 sob Exp $ * * $Log: intrp.c,v $ + * Revision 4.3.2.11 90/12/31 11:47:44 sob + * NEWSADMIN could not cancel articles because it was not getting set. + * * Revision 4.3.2.10 90/12/31 00:02:55 sob * Moved HIDDENET to remove unneeded cruft. * *************** *** 125,130 /* get environmental stuff */ /* get home directory */ homedir = getenv("HOME"); --- 128,144 ----- /* get environmental stuff */ + #ifdef NEWSADMIN + #ifdef GETPWENT + { + struct passwd *getpwnam(); + struct passwd *pwd = getpwnam(NEWSADMIN); + + if (pwd != NULL) + newsuid = pwd->pw_uid; + } + #endif /* GETPWENT */ + #endif /* NEWSADMIN */ /* get home directory */ homedir = getenv("HOME"); *************** *** 182,190 hostname = savestr(buf); pclose(pipefp); } ! #endif ! #endif ! #endif sitename = savestr(SITENAME); #else sitename = savestr(DOMAIN); --- 196,204 ----- hostname = savestr(buf); pclose(pipefp); } ! #endif /* PHOSTNAME */ ! #endif /* DOUNAME */ ! #endif /* GETHOSTNAME */ sitename = savestr(SITENAME); #else sitename = savestr(DOMAIN); Index: rn.c Prereq: 4.3.2.10 *** rn.c Sat Jan 5 15:16:58 1991 --- ../rn54/rn.c Sat Jan 5 15:05:37 1991 *************** *** 9,16 * RRN/RN: 11/01/89 */ ! static char rnid[] = "@(#)$Header: rn.c,v 4.3.2.10 90/12/30 22:58:24 sob Exp $"; ! static char patchlevel[] = "Patch #: 53"; /* $Log: rn.c,v $ * Revision 4.3.2.10 90/12/30 22:58:24 sob --- 9,16 ----- * RRN/RN: 11/01/89 */ ! static char rnid[] = "@(#)$Header: rn.c,v 4.3.2.11 91/01/04 22:58:24 sob Exp $"; ! static char patchlevel[] = "Patch #: 54"; /* $Log: rn.c,v $ * Revision 4.3.2.11 91/01/04 22:58:24 sob *************** *** 13,18 static char patchlevel[] = "Patch #: 53"; /* $Log: rn.c,v $ * Revision 4.3.2.10 90/12/30 22:58:24 sob * Checkpoint for patch 53 * --- 13,21 ----- static char patchlevel[] = "Patch #: 54"; /* $Log: rn.c,v $ + * Revision 4.3.2.11 91/01/04 22:58:24 sob + * Checkpoint for patch 54 + * * Revision 4.3.2.10 90/12/30 22:58:24 sob * Checkpoint for patch 53 * Index: patchlevel Prereq: 53 *** patchlevel Sat Jan 5 15:16:25 1991 --- ../rn54/patchlevel Sat Jan 5 15:05:37 1991 *************** *** 1,2 ! Patch #: 53 --- 1,2 ----- ! Patch #: 54