Thread View: news.software.nntp
2 messages
2 total messages
Started by Stan Barber
Sun, 06 Jan 1991 04:32
rn patch #54
Author: Stan Barber
Date: Sun, 06 Jan 1991 04:32
Date: Sun, 06 Jan 1991 04:32
327 lines
9800 bytes
9800 bytes
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
Proposed change to NEXT command in NNTP (was Re: rn patch #54)
Author: Rich Wales
Date: Fri, 18 Jan 1991 08:24
Date: Fri, 18 Jan 1991 08:24
68 lines
4403 bytes
4403 bytes
In article <4528@lib.tmc.edu> rrn@lib.tmc.edu (Stan Barber) posted patch #54 for RN 4.3 -- including a bug fix I reported having to do with RN's tendency to toss unread articles in newsgroups where some unread arti- cles had expired or been cancelled. I'd like to discuss this bug in a bit more detail, and propose a minor (and upward-compatible) change to the NNTP "NEXT" command which would allow a much more efficient fix than the one I recommended (and which Stan adopted in patch #54). I mentioned this idea in the bug report I sent to Stan, but I'd like to present it for more general discussion in case someone else sees a problem with it or has a better idea. The reason for the bug in RN was apparently that the RN author thought an NNTP "NEXT" command would find the first available article after the set of unavailable articles previously sought via "ARTICLE" commands. (That is, RN would ask for an article by number within the current news- group; and, if said "ARTICLE" command failed because the article with that number was gone, RN would use a "NEXT" command to move past that point to the next article that was still around.) However, the above approach didn't work, because the "ARTICLE" command does not update the NNTP server's current article pointer if the article requested does not exist. Thus, in the above scenario, the "NEXT" com- mand would start with the last =successfully= read article -- which could be anywhere in the newsgroup, and in particular could easily be after the series of unavailable articles if the user were reading arti- cles by topic (via ^N). There doesn't seem to be any elegant solution to this problem under the current NNTP protocol. The only thing to do (and the solution used in patch #54) is to use a succession of "ARTICLE" commands (each with a number that is one higher than the last) until an article is found that =is= available. If a user is coming back to a newsgroup where a lot of articles have expired since the last time he looked at it -- but he wants to read whatever is there now instead of just "catching up" -- the process of having RN ask for several dozen (or several hundred) expired articles, one at a time, can be painful. So, here's my proposal: I propose that the NNTP "NEXT" command be modified to permit an optional article number as an argument. An NNTP server, in this case, would tem- porarily set the current article pointer to this value, then perform the search for a next article from that point. If no "next article" were found, the old value of the current article pointer would be restored, so the command would end up having no effect on the server's state. A "NEXT" command without an article number argument would continue to work exactly as it does now. Since a "NEXT" command cannot currently have an argument at all, adding this extra feature to NNTP servers would not break any existing clients. Further -- since NNTP currently rejects a "NEXT" command with an argu- ment anyway (with a "501" error code) -- it would be easy for RN to downgrade gracefully to the old behavior. RN could first use a "NEXT nnnn" to find the next article after an unavailable article. If this worked, great. If not, RN would revert to the "slow but sure" solution in patch #54 (i.e., ask for articles one at a time until something was found). Comments on this proposal? -- Rich Wales <wales@CS.UCLA.EDU> // UCLA Computer Science Department 3531 Boelter Hall // Los Angeles, CA 90024-1596 // +1 (213) 825-5683 "I could be chasing an untamed ornithoid without cause."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads