Xref: utzoo comp.sources.bugs:2763 news.software.nntp:1020 news.software.b:6497 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!bcm!lib!lib.tmc.edu From: rrn@lib.tmc.edu (Stan Barber) Newsgroups: comp.sources.bugs,news.software.nntp,news.software.b Subject: rn 4.3 Patch 53 Summary: Patch 53 fixes the cancel problem when hiding hosts in a domain. Message-ID: <4509@lib.tmc.edu> Date: 31 Dec 90 07:26:41 GMT Sender: sob@lib.tmc.edu Followup-To: poster Organization: Texas Medical Center, Houston Lines: 1082 This is an official patch for rn 4.3. This is patch 53. 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 January, 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: Fixes the problem of cancelling an article from rn when HIDDENNET (formerly hidden) is defined. Added some better support for NeXT. [Provided by eps@toaster.sfsu.edu.] Fixes a spelling problem in Pnews. cd to your rn source directory and patch away Index: Configure Prereq 4.3.2.34 *** Configure Mon Dec 31 00:14:07 1990 --- ../rn53/Configure Mon Dec 31 00:07:46 1990 *************** *** 3,9 # If these # comments don't work, trim them. Don't worry about the other # shell scripts, Configure will trim # comments from them for you. # ! # $Header: Configure,v 4.3.2.34 90/11/22 17:49:31 sob Exp $ # # $Log: Configure,v $ # Revision 4.3.2.34 90/11/22 17:49:31 sob --- 3,9 ----- # If these # comments don't work, trim them. Don't worry about the other # shell scripts, Configure will trim # comments from them for you. # ! # $Header: Configure,v 4.3.2.37 90/12/30 03:46:54 sob Exp $ # # $Log: Configure,v $ # Revision 4.3.2.37 90/12/30 03:46:54 sob *************** *** 6,11 # $Header: Configure,v 4.3.2.34 90/11/22 17:49:31 sob Exp $ # # $Log: Configure,v $ # Revision 4.3.2.34 90/11/22 17:49:31 sob # Fixed bug in "hidden" code. # --- 6,21 ----- # $Header: Configure,v 4.3.2.37 90/12/30 03:46:54 sob Exp $ # # $Log: Configure,v $ + # Revision 4.3.2.37 90/12/30 03:46:54 sob + # Changed "hidden" to "hiddennet" to be like nntp and bnews. + # Made it possible to cancel articles if hiddennet is defined. + # + # Revision 4.3.2.36 90/12/30 03:31:17 sob + # Better NeXT support and some other problems corrected. + # + # Revision 4.3.2.35 90/12/04 02:51:20 sob + # Removed redundant "addcflags" label + # # Revision 4.3.2.34 90/11/22 17:49:31 sob # Fixed bug in "hidden" code. # *************** *** 10,16 # Fixed bug in "hidden" code. # # Revision 4.3.2.33 90/11/22 13:42:44 sob ! # Added support for the Uniq System V.2 OS (courtesy of a3@rivm.nl & # frans@rivm.nl). # Added support for making all mail and news appear to come from the domain # itself instead of individual hosts within a domain. --- 20,26 ----- # Fixed bug in "hidden" code. # # Revision 4.3.2.33 90/11/22 13:42:44 sob ! # Added support for the Uniq System V.3 OS (courtesy of a3@rivm.nl & # frans@rivm.nl). # Added support for making all mail and news appear to come from the domain # itself instead of individual hosts within a domain. *************** *** 170,175 inews='' grep='' egrep='' ypmatch='' contains='' lib='' --- 180,186 ----- inews='' grep='' egrep='' + nidump='' ypmatch='' contains='' lib='' *************** *** 250,257 serverfile='' NNTPSRC='' CONFIG='' ! hidden='' ! addcflags='' echo "Beginning of configuration questions for rn kit." : Eunice requires " " instead of "", can you believe it --- 261,267 ----- serverfile='' NNTPSRC='' CONFIG='' ! hiddennet='' echo "Beginning of configuration questions for rn kit." : Eunice requires " " instead of "", can you believe it *************** *** 355,361 EOH echo $n "[Type carriage return to continue] $c" . myread - : a3@rivm.nl: frans@rivm.nl: n and c get changed by config.sh -- so save them Xn=$n Xc=$c : get old answers, if there is a config file out there --- 365,370 ----- EOH echo $n "[Type carriage return to continue] $c" . myread Xn=$n Xc=$c : get old answers, if there is a config file out there *************** *** 362,368 if test -f config.sh; then echo " " echo "(Fetching default answers from your old config.sh file...)" ! . config.sh fi : a3@rivm.nl: frans@rivm.nl: n and c get changed by config.sh -- restore them n=$Xn --- 371,377 ----- if test -f config.sh; then echo " " echo "(Fetching default answers from your old config.sh file...)" ! . ./config.sh fi n=$Xn c=$Xc *************** *** 364,370 echo "(Fetching default answers from your old config.sh file...)" . config.sh fi - : a3@rivm.nl: frans@rivm.nl: n and c get changed by config.sh -- restore them n=$Xn c=$Xc --- 373,378 ----- echo "(Fetching default answers from your old config.sh file...)" . ./config.sh fi n=$Xn c=$Xc *************** *** 648,653 echo "This looks like a Pyramid to me." fi if bsd; then getuidgid=define else --- 656,678 ----- echo "This looks like a Pyramid to me." fi + : check for NeXT + cat <<'EOT' >next.c + #ifdef NeXT + exit 0 + #else + exit 1 + #endif + EOT + $cpp next.c | grep exit >next + chmod 755 next + $eunicefix next + rm next.c + if next; then + echo "My, you really ARE on a NeXT." + addcflags='-bsd' + fi + if bsd; then getuidgid=define else *************** *** 674,680 if s5uniq; then echo "This looks like Uniq. What a pity." socketlib="-lnet -lhdb -lbbn -lstr" ! addcflags="-DR_UNIQ -DUSG" # -DR_UNIQ and -DUSG are needed for ~nntp/common/clientlib.c fi --- 699,705 ----- if s5uniq; then echo "This looks like Uniq. What a pity." socketlib="-lnet -lhdb -lbbn -lstr" ! rrninclude="-DR_UNIQ -DUSG" # -DR_UNIQ and -DUSG are needed for ~nntp/common/clientlib.c fi *************** *** 770,776 chmod 755 loc $eunicefix loc loclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep" ! trylist="test inews egrep more pg Mcc ypmatch" for file in $loclist; do xxx=`loc $file $file $pth` eval $file=$xxx --- 795,801 ----- chmod 755 loc $eunicefix loc loclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep" ! trylist="test inews egrep more pg Mcc nidump ypmatch" for file in $loclist; do xxx=`loc $file $file $pth` eval $file=$xxx *************** *** 852,857 status=$? if $test $status -ne 0 ; then $echo "YP installed, but not operational. We won't use it." else $echo "YP installed and operational." fi --- 877,883 ----- status=$? if $test $status -ne 0 ; then $echo "YP installed, but not operational. We won't use it." + ypmatch="" else $echo "YP installed and operational." fi *************** *** 858,863 ;; esac if $test "$ypmatch" = "ypmatch"; then ypmatch="" fi --- 884,892 ----- ;; esac + if $test "$nidump" = "nidump"; then + nidump="" + fi if $test "$ypmatch" = "ypmatch"; then ypmatch="" fi *************** *** 910,915 name=\`$expr x\$1 : '..\([^/]*\)'\` if $test "$ypmatch" != ""; then dir=\`$ypmatch \$name passwd 2>/dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/"'\` fi if $test "\$dir" = ""; then dir=\`$sed /dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/"'\` + elif $test "$nidump" != ""; then + dir=\`$nidump passwd / | $sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\` fi if $test "\$dir" = ""; then dir=\`$sed - #endif - #include #include #define _SYS_TYPES.H /* For some ANSI C compilers */ --- 91,96 ----- * */ #include #include #include *************** *** 92,98 #include #include - #define _SYS_TYPES.H /* For some ANSI C compilers */ #include #include --- 93,98 ----- #include #include #include #include #include "config.h" /* generated by installation script */ *************** *** 95,101 #define _SYS_TYPES.H /* For some ANSI C compilers */ #include #include ! #ifndef isalnum # define isalnum(c) (isalpha(c) || isdigit(c)) #endif --- 95,104 ----- #include #include #include ! #include "config.h" /* generated by installation script */ ! #ifdef WHOAMI ! # include ! #endif #ifndef isalnum # define isalnum(c) (isalpha(c) || isdigit(c)) #endif *************** *** 735,741 /* how to cancel an article, continued */ #ifndef CANCELHEADER #ifdef INTERNET ! # define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within rn.\n" #else # define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nReply-To: %L@%H.UUCP (%N)\nDistribution: %D\nOrganization: %o\n" #endif --- 738,744 ----- /* how to cancel an article, continued */ #ifndef CANCELHEADER #ifdef INTERNET ! # define CANCELHEADER "From: %L@%H (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within rn.\n" #else # define CANCELHEADER "From:%L@%H.UUCP (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n" #endif *************** *** 737,743 #ifdef INTERNET # define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within rn.\n" #else ! # define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nReply-To: %L@%H.UUCP (%N)\nDistribution: %D\nOrganization: %o\n" #endif #endif --- 740,746 ----- #ifdef INTERNET # define CANCELHEADER "From: %L@%H (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within rn.\n" #else ! # define CANCELHEADER "From:%L@%H.UUCP (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n" #endif #endif Index: intrp.c Prereq: 4.3.2.8 *** intrp.c Mon Dec 31 00:14:22 1990 --- ../rn53/intrp.c Mon Dec 31 00:08:06 1990 *************** *** 1,4 ! /* $Header: intrp.c,v 4.3.2.8 90/11/22 13:52:27 sob Exp $ * * $Log: intrp.c,v $ * Revision 4.3.2.8 90/11/22 13:52:27 sob --- 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,6 /* $Header: intrp.c,v 4.3.2.8 90/11/22 13:52:27 sob Exp $ * * $Log: intrp.c,v $ * Revision 4.3.2.8 90/11/22 13:52:27 sob * Made changes to keep preprocessors from complaining. * --- 1,13 ----- /* $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. + * + * Revision 4.3.2.9 90/12/30 03:48:11 sob + * Changed "hidden" to "hiddennet" to be like nntp and bnews. + * Made it possible to cancel articles if hiddennet is defined. + * * Revision 4.3.2.8 90/11/22 13:52:27 sob * Made changes to keep preprocessors from complaining. * *************** *** 67,72 char orgname[] = ORGNAME; /* name of this site */ #ifdef GETHOSTNAME char *hostname; # undef SITENAME --- 74,80 ----- char orgname[] = ORGNAME; /* name of this site */ + #ifndef HIDDENNET #ifdef GETHOSTNAME char *hostname; # undef SITENAME *************** *** 90,95 # endif /* PHOSTNAME */ # endif /* DOUNAME */ #endif /* GETHOSTNAME */ #ifdef TILDENAME static char *tildename = Nullch; --- 98,104 ----- # endif /* PHOSTNAME */ # endif /* DOUNAME */ #endif /* GETHOSTNAME */ + #endif /*HIDDENNET */ #ifdef TILDENAME static char *tildename = Nullch; *************** *** 150,156 headname = savestr(filexp(HEADNAME)); /* name of this site (%H) */ ! #ifdef GETHOSTNAME gethostname(buf,sizeof buf); hostname = savestr(buf); --- 159,165 ----- headname = savestr(filexp(HEADNAME)); /* name of this site (%H) */ ! #ifndef HIDDENNET #ifdef GETHOSTNAME gethostname(buf,sizeof buf); hostname = savestr(buf); *************** *** 177,182 #endif #endif sitename = savestr(SITENAME); } /* expand filename via %, ~, and $ interpretation */ --- 186,194 ----- #endif #endif sitename = savestr(SITENAME); + #else + sitename = savestr(DOMAIN); + #endif } /* expand filename via %, ~, and $ interpretation */ Index: Pnews.SH Prereq: 4.3.2.10 *** Pnews.SH Mon Dec 31 00:15:00 1990 --- ../rn53/Pnews.SH Mon Dec 31 00:08:48 1990 *************** *** 4,10 echo "Extracting Pnews (with variable substitutions)" $spitshell >Pnews <Pnews </dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"` ! fi if $test "$fullname" = ""; then fullname=`$sed /dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"` ! elif $test "$nidump" != ""; then ! fullname=`$nidump passwd / | $sed -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"` ! fi if $test "$fullname" = ""; then fullname=`$sed /dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"` fi if $test "$fullname" = ""; then ! fullname=`$sed /dev/null | $sed -e "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q"` ! fi if $test "$fullname" = ""; then fullname=`$sed /dev/null | $sed -e "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q"` ! fi if $test "$fullname" = ""; then fullname=`$sed Rnmail <Rnmail <