Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!vsi1!lmb From: lmb@vicom.com (Larry Blair) Newsgroups: news.software.b Subject: Re: Cnews lets outside control messages create groups Message-ID: <1989Jul16.050248.16940@vicom.com> Date: 16 Jul 89 05:02:48 GMT References: <1989Jul7.174914.22890@ivucsb.sba.ca.us> <1989Jul9.040539.28044@utzoo.uucp> <1989Jul9.185601.28603@ladc.bull.com> <1989Jul10.045219.3927@utstat.uucp> Reply-To: lmb@vicom.COM (Larry Blair) Organization: VICOM Systems Inc., San Jose, CA Lines: 102 In article <1989Jul10.045219.3927@utstat.uucp> geoff@utstat.uucp (Geoff Collyer) writes: => >Edit /usr/lib/newsbin/ctl/newgroup to do whatever you want. It's a shell => >file. See notebook/ctlmsg for some insight into how control messages work, => >if you haven't looked at it already. => Yeah, I could do that. If I had time. It seems to me, though, that there => should be a configuration parameter somewhere that would do the job for me, => a la NORMGROUP/NONEWGROUP in B news. = =Henry and I are in the business of providing tools, not solutions to the =wrong problems. We cannot possibly guess what everyone in the world is =going to want, nor do we want to distribute a gargantuan distribution =consisting of the union of all possible wish lists. We are interested =in genuine bug reports, but failing to behave like B news (as opposed to =failing to meet RFC 1036) is not a bug. I'm afraid we don't have a lot =of sympathy for people who can't be bothered to make one-line changes to =shell scripts. If the distribution merely doesn't do what you want, you =have the source and an editor. Creating newgroups and, particularly, changing the moderation status of existing groups automatically is insanity. The default behavior should not execute newgroup commands. => I've noticed this too. And, Geoff, I think what Todd means is that C news => should notify the news admin, _without_ performing the newgroup/rmgroup. => Then the news admin (me) could manually create or remove the group. = =Again, read the source; newgroup and rmgroup do nothing destructive. Changing the moderation status _is_ destructive. For anyone who is interested, here is my fixed newgroup. Note that I used "mail -s". #! /bin/sh # newgroup group flag - create group (4-field version: B-2.10.3+ compatible) # subject to our sys file group pattern # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} export NEWSCTL NEWSBIN NEWSARTS PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH # include mkpdir umask $NEWSUMASK F=/tmp/nc$$ trap "rm -f $F; echo $gngppat; exit 0" 0 cat >$F # unapproved ctl msg? then quit grep -s '^Approved:' $F >/dev/null || { rm -f $F; exit 0; } SENDER="`grep '^Sender:' $F | sed 's/^[^:]*: *//'`" case "$SENDER" in "") SENDER="`grep '^From:' $F | sed 's/^[^:]*: *//' `" ;; esac greppat="^`echo $1 | sed 's/\./\\\\./g' ` " if grep -s "$greppat" $NEWSCTL/active >/dev/null; then # group exists? export SENDER case "$2" in moderated) flag=m ;; *) flag=y ;; esac aflag=`awk "/$1/"' { print $4 }' $NEWSCTL/active` if test "$aflag" != "$flag" -a \( "$aflag" = m -o "$aflag" = y \); then # old & new flags differ & old flag is m or y case "$flag" in m) pfx="" ;; *) pfx=un ;; esac mail -s "Change $1 to ${pfx}moderated" $NEWSMASTER </dev/null <