saitoh@icsts1.osaka-u.junet (SAITOH Akinori) (04/03/88)
Caution: This is NOT an official patch. Description: This is a patch for "1.24 11/4/87" version of checkgroups. With unauthorized checkgroups control message, LIBDIR/newsgroups will be destroyed. To avoid this, I modified checkgroups not to change "LIBDIR/newsgroups" but to create "LIBDIR/newsgroups.new" instead. And notify news system manager to update "LIBDIR/newsgroups". Checkgroups.sh is NOT changed but single line inserted to Makefile.dst and a ed-script templet file "checkgroups.ed" is created. Remember: In future ,when you get an official patch for checkgroups.sh, delete the inserted line in Makefile.dst. Fix: cd to the src directory and apply the following patch. SAITOH akinori (SAITOH is my family name) saitoh@icsts1.osaka-u.junet (saitoh%icsts1.osaka-u.junet@relay.cs.net) ------------------------------------------------------------ Index: Makefile.dst *** org/Makefile.dst Tue Jan 5 18:06:08 1988 --- Makefile.dst Sat Apr 2 01:57:19 1988 *************** *** 362,367 **** --- 362,368 ---- checkgroups: checkgroups.sh Makefile sed -e "s%LIBDIR%$(DESTDIR)$(LIBDIR)%g" checkgroups.sh > checkgroups + sed -e "s%LIBDIR%$(DESTDIR)$(LIBDIR)%g" checkgroups.ed |ed - checkgroups #VMS /etc/unixtovms checkgroups sendnews.o: sendnews.c defs.h Index: checkgroups.ed *** org/checkgroups.ed Sat Apr 2 01:58:29 1988 --- checkgroups.ed Sat Apr 2 02:25:49 1988 *************** *** 0 **** --- 1,31 ---- + 1 + /^$/ + i + # Modify not to automaticaly update /usr/lib/news/newsgroups. + # But create /usr/lib/news/newsgroups.new instead. + # SAITOH akinori ; Sat Apr 2 02:05:27 JST 1988 + # saitoh@icsts1.osaka-u.junet (saitoh%icsts1.osaka-u.junet@relay.cs.net) + . + /^fi/ + a + cp LIBDIR/newsgroups LIBDIR/newsgroups.new + . + .+1,$s;LIBDIR/newsgroups;LIBDIR/newsgroups.new; + $ + ?^if.*/tmp/$$out? + i + sort LIBDIR/newsgroups >/tmp/$$org + if sort LIBDIR/newsgroups.new | cmp - /tmp/$$org 2>&1 > /dev/null ;then + rm LIBDIR/newsgroups.new + else + ( + echo "# LIBDIR/newsgroups should be changed." + echo "# New newsgroups list is storeed in LIBDIR/newsgrups.new" + echo "# You can correct this by executing the commands:" + echo "mv LIBDIR/newsgroups LIBDIR/newsgroups.old" + echo "mv LIBDIR/newsgroups.new LIBDIR/newsgroups" + )2>&1 >> /tmp/$$out + fi + + . + w + q