Aucbarpa.1179 net.sources utzoo!decvax!harpo!npois!ucbvax!ARPAVAX:usenet Tue Apr 20 19:45:13 1982 2.3-2.6.c diff -c -r /ra/csr/glickman/news/dist/README news/README *** /ra/csr/glickman/news/dist/README Sun Mar 14 15:00:25 1982 --- news/README Tue Apr 20 10:44:04 1982 *************** *** 17,23 shows the changes you need to make to uucp to support the -z option. The dirform is the usenet directory form - you should fill it out and post it to newsgroup net.news.newsite to announce that you have joined ! the net. When you start getting network news, you should announce your existence to the net by filling out misc/dirform and posting it to the newsgroup --- 17,24 ----- shows the changes you need to make to uucp to support the -z option. The dirform is the usenet directory form - you should fill it out and post it to newsgroup net.news.newsite to announce that you have joined ! the net. Other useful tools contributed by other sites are added to ! this directory for optional use by USENET sites. When you start getting network news, you should announce your existence to the net by filling out misc/dirform and posting it to the newsgroup *************** *** 78,80 If you want LIBDIR/users to keep a useful list of users, you should create it mode 666, since readnews does not run suid. --- 79,92 ----- If you want LIBDIR/users to keep a useful list of users, you should create it mode 666, since readnews does not run suid. + + If you want expired articles kept around, create the directory + /usr/spool/oldnews. The expire program will create a hierarchy + under this location, if present, similar to the one under /usr/spool/news. + + The expire program will delete all articles in the history file + which are past their expiration date. It will remove both the + article and the line in history. This mechanism should keep your + history file down to a manageable size. The trimlib script in the + misc directory can be used to keep you log file down in size. + Both expire and trimlib should be run once a night from crontab. Common subdirectories: /ra/csr/glickman/news/dist/doc and news/doc Common subdirectories: /ra/csr/glickman/news/dist/man and news/man Common subdirectories: /ra/csr/glickman/news/dist/misc and news/misc Common subdirectories: /ra/csr/glickman/news/dist/src and news/src diff -c -r /ra/csr/glickman/news/dist/doc/howto.ms news/doc/howto.ms *** /ra/csr/glickman/news/dist/doc/howto.ms Wed Feb 24 04:58:58 1982 --- news/doc/howto.ms Sat Apr 3 11:48:32 1982 *************** *** 4,10 Mark R. Horton .AI Bell Telephone Laboratories ! .CB .SH What is the Network News? .PP --- 4,10 ----- Mark R. Horton .AI Bell Telephone Laboratories ! Columbus, Ohio 43213 .SH What is the Network News? .PP diff -c -r /ra/csr/glickman/news/dist/doc/install.ms news/doc/install.ms *** /ra/csr/glickman/news/dist/doc/install.ms Thu Mar 18 15:51:00 1982 --- news/doc/install.ms Tue Mar 30 18:51:54 1982 *************** *** 175,180 There are other parameters that may be modified in .B defs.h , and they are described in the file. .NH 2 Makefile .PP --- 175,190 ----- There are other parameters that may be modified in .B defs.h , and they are described in the file. + .NH 3 + MANUALLY + .PP + If this is defined, incoming + .B rmgroup + messages will not remove the subdirectories, but rather just remove the + group line from your active file. + You should have NOTIFY on if you use this. + Note that on a USG system the subdirectory will not be removed anyway + unless you have an unsecure (mode 777 directory) system. .NH 2 Makefile .PP *************** *** 954,959 .IP (3) Chmod the old news directory to 555 to prevent any more news from being posted. .IP (4) Replace the old rnews program with the new rnews program. .IP (5) --- 964,971 ----- .IP (3) Chmod the old news directory to 555 to prevent any more news from being posted. + (Actually, this will prevent the bitfile from being updated, + so it may not be a good idea.) .IP (4) Replace the old rnews program with the new rnews program. .IP (5) *************** *** 977,983 .DS netnews -s .DE ! to see what they subscribe to, and then create a file in their home directory called .newsrc containing .DS options -s \fItheir subscription\fP --- 989,995 ----- .DS netnews -s .DE ! to see what they subscribe to on the old system, and then create a file in their home directory called .newsrc containing .DS options -s \fItheir subscription\fP diff -c -r /ra/csr/glickman/news/dist/man/checknews.1 news/man/checknews.1 *** /ra/csr/glickman/news/dist/man/checknews.1 Thu Mar 18 15:51:06 1982 --- news/man/checknews.1 Sun Apr 4 20:34:53 1982 *************** *** 2,8 .SH NAME checknews \- check to see if user has news .SH SYNOPSIS ! checknews [ynevv] [readnews options] .SH DESCRIPTION .I checknews reports to the user whether or not he has news. --- 2,8 ----- .SH NAME checknews \- check to see if user has news .SH SYNOPSIS ! checknews [ynqevv] [readnews options] .SH DESCRIPTION .I checknews reports to the user whether or not he has news. *************** *** 12,17 .TP 10 .B n Reports ``No news'' if there isn't any news to read. .TP 10 .B v alters the --- 12,22 ----- .TP 10 .B n Reports ``No news'' if there isn't any news to read. + .TP 10 + .B q + causes checknews to be quiet. + Instead of printing a message, the exit status indicates news. + A status of 0 means no news, 1 means there is news. .TP 10 .B v alters the diff -c -r /ra/csr/glickman/news/dist/man/expire.8 news/man/expire.8 *** /ra/csr/glickman/news/dist/man/expire.8 Thu Feb 25 18:26:26 1982 --- news/man/expire.8 Tue Mar 30 18:43:45 1982 *************** *** 2,8 .SH NAME expire \- remove outdated news articles .SH SYNOPSIS ! /usr/lib/news/expire [ \-n newsgroups ] .SH DESCRIPTION .PP .I Expire --- 2,27 ----- .SH NAME expire \- remove outdated news articles .SH SYNOPSIS ! /usr/lib/news/expire ! [ ! .B \-n ! .I newsgroups ! ] ! [ ! .B \-i ! ] ! [ ! .B \-I ! ] ! [ ! .B \-v ! [ ! .I level ! ] ] ! [ ! .B \-e ! .I days ! ] .SH DESCRIPTION .PP .I Expire *************** *** 17,22 articles are moved to that directory. (The new filename is the article ID.) Otherwise, the articles are unlinked. .SH "SEE ALSO" inews(1), uurec(8), --- 36,73 ----- articles are moved to that directory. (The new filename is the article ID.) Otherwise, the articles are unlinked. + .PP + The + .B \-v + option causes expire to be more verbose. + It can be given a verbosity level (default 1) as in + .B \-v3 + for even more output. + This is useful if articles aren't being expired and you want to know why. + .PP + The + .B \-e + flag gives the number of days to use for a default expiration date. + If not given, an installation dependent default (often 2 weeks) is used. + .PP + The + .B \-i + and + .B \-I + flags + tell + .B expire + to ignore any expiration date explicitly given on articles. + This can be used when disk space is really tight. + The + .B \-I + flag will always ignore expiration dates, + while the + .B \-i + flag will only ignore the date if ignoring it would expire the article sooner. + .I WARNING: + If you have articles archived by giving them expiration dates far into the + future, these options might remove these files anyway. .SH "SEE ALSO" inews(1), uurec(8), diff -c -r /ra/csr/glickman/news/dist/man/inews.1 news/man/inews.1 *** /ra/csr/glickman/news/dist/man/inews.1 Thu Mar 18 15:51:09 1982 --- news/man/inews.1 Tue Apr 20 10:47:08 1982 *************** *** 29,35 .I title must be specified as there is no default. Each article belongs to a list of newsgroups. If the ! .B -n flag is omitted, the list will default to something like "general". If you wish to submit an article in multiple newsgroups, the --- 29,35 ----- .I title must be specified as there is no default. Each article belongs to a list of newsgroups. If the ! .B \-n flag is omitted, the list will default to something like "general". If you wish to submit an article in multiple newsgroups, the *************** *** 38,44 If not specified, the expiration date will be set to the local default. The ! .B -f flag specifies the article's sender. Without this flag, the sender defaults to the user's name. .LP --- 38,44 ----- If not specified, the expiration date will be set to the local default. The ! .B \-f flag specifies the article's sender. Without this flag, the sender defaults to the user's name. .LP diff -c -r /ra/csr/glickman/news/dist/man/news.5 news/man/news.5 *** /ra/csr/glickman/news/dist/man/news.5 Thu Feb 25 18:27:29 1982 --- news/man/news.5 Tue Apr 20 10:52:39 1982 *************** *** 12,18 .BR A " format. " A " format" looks like this: .LP ! .BI A filename .br .I newsgroups .br --- 12,18 ----- .BR A " format. " A " format" looks like this: .LP ! .BI A article-ID .br .I newsgroups .br *************** *** 65,70 .TP 15 .B Expires: .I Expiration Date .LP The default article skeleton looks like this: .LP --- 65,79 ----- .TP 15 .B Expires: .I Expiration Date + .TP 15 + .B Reply-To: + .I Address for mail replies + .TP 15 + .B References: + .I Article ID of article this is a follow-up to. + .TP 15 + .B Control: + .I Text of a control message .LP The default article skeleton looks like this: .LP *************** *** 78,85 .br .B Posted: .br - .B Expires: - .br .B Received: .I Body of article --- 87,92 ----- .br .B Posted: .br .B Received: .I Body of article *************** *** 110,116 is executed by the shell with the article to be transmitted as the standard input. The default is ! .BI "uux - -r " sysname !rnews. Some examples: .LP .B "xyz:net.all" --- 117,123 ----- is executed by the shell with the article to be transmitted as the standard input. The default is ! .BI "uux \- \-z \-r " sysname !rnews. Some examples: .LP .B "xyz:net.all" *************** *** 115,121 .LP .B "xyz:net.all" .br ! .B "oldsys:net.all,fa.all,to_oldsys:A" .br .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews" .br --- 122,128 ----- .LP .B "xyz:net.all" .br ! .B "oldsys:net.all,fa.all,to.oldsys:A" .br .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews" .br *************** *** 117,123 .br .B "oldsys:net.all,fa.all,to_oldsys:A" .br ! .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews" .br .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews@arpasys" .br --- 124,130 ----- .br .B "oldsys:net.all,fa.all,to.oldsys:A" .br ! .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews" .br .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews@arpasys" .br *************** *** 119,125 .br .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews" .br ! .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews@arpasys" .br .B "old2:net.all,fa.all:A:/usr/lib/sendnews -o old2\\:rnews" .br --- 126,132 ----- .br .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews" .br ! .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews@arpasys" .br .B "old2:net.all,fa.all:A:/usr/lib/sendnews \-o old2\\:rnews" .br *************** *** 121,127 .br .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews@arpasys" .br ! .B "old2:net.all,fa.all:A:/usr/lib/sendnews -o old2\\:rnews" .br .B "user:fa.sf-lovers::mail user" .LP --- 128,134 ----- .br .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews@arpasys" .br ! .B "old2:net.all,fa.all:A:/usr/lib/sendnews \-o old2\\:rnews" .br .B "user:fa.sf-lovers::mail user" .LP diff -c -r /ra/csr/glickman/news/dist/man/newsrc.5 news/man/newsrc.5 *** /ra/csr/glickman/news/dist/man/newsrc.5 Thu Mar 18 15:51:11 1982 --- news/man/newsrc.5 Tue Apr 20 10:48:05 1982 *************** *** 1,6 .TH NEWSRC 5 .SH NAME ! newsrc \- information file for readnews(1) and newscheck(1) .SH DESCRIPTION The .I .newsrc --- 1,6 ----- .TH NEWSRC 5 .SH NAME ! newsrc \- information file for readnews(1) and checknews(1) .SH DESCRIPTION The .I .newsrc *************** *** 6,12 .I .newsrc file contains the list of previously read articles and an optional options line for ! .IR readnews(1) " and " newscheck(1). Each newsgroup that articles have been read from has a line of the form: .LP --- 6,12 ----- .I .newsrc file contains the list of previously read articles and an optional options line for ! .IR readnews(1) " and " checknews(1). Each newsgroup that articles have been read from has a line of the form: .LP *************** *** 29,35 (left-justified). Then there are the list of options just as they would be on the command line. For instance: .LP ! .B "options -n all !fa.sf-lovers !fa.human-nets -r" .br .B "options -c -r" .LP --- 29,35 ----- (left-justified). Then there are the list of options just as they would be on the command line. For instance: .LP ! .B "options \-n all !fa.sf-lovers !fa.human-nets \-r" .br .B "options \-c \-r" .LP *************** *** 31,37 .LP .B "options -n all !fa.sf-lovers !fa.human-nets -r" .br ! .B "options -c -r" .LP A string of lines beginning with a space or tab after the initial options line will be considered continuation lines. --- 31,37 ----- .LP .B "options \-n all !fa.sf-lovers !fa.human-nets \-r" .br ! .B "options \-c \-r" .LP A string of lines beginning with a space or tab after the initial options line will be considered continuation lines. diff -c -r /ra/csr/glickman/news/dist/man/postnews.1 news/man/postnews.1 *** /ra/csr/glickman/news/dist/man/postnews.1 Thu Feb 25 18:29:09 1982 --- news/man/postnews.1 Tue Apr 20 10:45:51 1982 *************** *** 39,45 University of California at Berkeley.) .PP After entering the title and newsgroup, ! the user should type the body of the article. Optionally, the article will be read from the specified .IR filename . To end the article, type control D at the beginning of a line. --- 39,50 ----- University of California at Berkeley.) .PP After entering the title and newsgroup, ! the user should type the body of the article. ! To end the article, type control D at the beginning of a line. ! If the environment variable EDITOR is set to the pathname of ! an editor, the user will be placed in that editor instead of ! typing in the article by hand. ! Optionally, the article will be read from the specified .IR filename . .PP *************** *** 42,48 the user should type the body of the article. Optionally, the article will be read from the specified .IR filename . - To end the article, type control D at the beginning of a line. .PP For more sophisticated uses, such as posting from a file, see --- 47,52 ----- Optionally, the article will be read from the specified .IR filename . .PP For more sophisticated uses, such as specifying an expiration date, see *************** *** 44,50 .IR filename . To end the article, type control D at the beginning of a line. .PP ! For more sophisticated uses, such as posting from a file, see .BR inews (1). .SH FILES --- 48,54 ----- will be read from the specified .IR filename . .PP ! For more sophisticated uses, such as specifying an expiration date, see .BR inews (1). .SH FILES diff -c -r /ra/csr/glickman/news/dist/man/readnews.1 news/man/readnews.1 *** /ra/csr/glickman/news/dist/man/readnews.1 Sun Mar 14 15:00:48 1982 --- news/man/readnews.1 Tue Mar 30 18:46:48 1982 *************** *** 175,180 .IP "s [\fIfile\fP]" Save. The article is appended to the named file. The default is ``Articles''. .IP # Report last article no. in newsgroup. .IP e --- 175,183 ----- .IP "s [\fIfile\fP]" Save. The article is appended to the named file. The default is ``Articles''. + If the first character of the file name is `|', + the rest of the file name is taken as the name of a program, + which is executed with the text of the article as standard input. .IP # Report last article no. in newsgroup. .IP e diff -c -r /ra/csr/glickman/news/dist/man/sendnews.8 news/man/sendnews.8 *** /ra/csr/glickman/news/dist/man/sendnews.8 Thu Feb 25 18:21:30 1982 --- news/man/sendnews.8 Tue Apr 20 10:49:34 1982 *************** *** 2,8 .SH NAME sendnews \- send news articles via mail .SH SYNOPSIS ! sendnews [-o] [-a] [-b] [-n newsgroups] destination .SH DESCRIPTION .I sendnews reads an article from it's standard input, performs a set of changes --- 2,22 ----- .SH NAME sendnews \- send news articles via mail .SH SYNOPSIS ! sendnews ! [ ! .B \-o ! ] ! [ ! .B \-a ! ] ! [ ! .B \-b ! ] ! [ ! .B \-n ! newsgroups ! ] ! destination .SH DESCRIPTION .I sendnews reads an article from it's standard input, performs a set of changes *************** *** 13,19 .I uurec(1). .PP The ! .B -o flag handles old format articles. .PP The --- 27,33 ----- .I uurec(1). .PP The ! .B \-o flag handles old format articles. .PP The *************** *** 17,23 flag handles old format articles. .PP The ! .B -a flag is used for sending articles via the .B ARPANET. It maps the article's path from --- 31,37 ----- flag handles old format articles. .PP The ! .B \-a flag is used for sending articles via the .B ARPANET. It maps the article's path from *************** *** 26,32 .I xxx@arpahost. .PP The ! .B -b flag is used for sending articles via the .B Berknet. It maps the article's path from --- 40,46 ----- .I xxx@arpahost. .PP The ! .B \-b flag is used for sending articles via the .B Berknet. It maps the article's path from *************** *** 35,41 .I berkhost:xxx. .PP The ! .B -n flag changes the article's newsgroup to the specified .I newsgroup. .SH SEE ALSO --- 49,55 ----- .I berkhost:xxx. .PP The ! .B \-n flag changes the article's newsgroup to the specified .I newsgroup. .SH SEE ALSO Only in /ra/csr/glickman/news/dist/misc: Mail.diff diff -c -r /ra/csr/glickman/news/dist/misc/adm news/misc/adm *** /ra/csr/glickman/news/dist/misc/adm Sun Feb 28 09:35:35 1982 --- news/misc/adm Sun Apr 18 17:49:53 1982 *************** *** 1,5 ! From cbosg!decvax!watmath!bstempleton Thu Feb 18 23:49:24 1982 ! Date: 18-Feb-82 21:47:46-EST (Thu) From: cbosg!decvax!watmath!bstempleton Subject: Re: net.adm.site Via: cbosgd.uucp (V3.73 [1/5/82]); 18-Feb-82 23:49:22-EST (Thu) --- 1,5 ----- ! From cbosg!decvax!watmath!bstempleton Tue Mar 2 20:01:49 1982 ! Date: Mon Mar 1 19:37:04 1982 From: cbosg!decvax!watmath!bstempleton Subject: net.adm.site stuff Via: cbosgd.uucp (V3.73 [1/5/82]); 2-Mar-82 20:01:48-EST (Tue) *************** *** 1,14 From cbosg!decvax!watmath!bstempleton Thu Feb 18 23:49:24 1982 Date: 18-Feb-82 21:47:46-EST (Thu) From: cbosg!decvax!watmath!bstempleton ! Subject: Re: net.adm.site ! Via: cbosgd.uucp (V3.73 [1/5/82]); 18-Feb-82 23:49:22-EST (Thu) ! Mail-From: cbosg received by cbosgd at 18-Feb-82 23:49:19-EST (Thu) ! To: decvax!cbosg!cbosgd!mark ! Status: R ! ! Now that I have seen the unc best path program, i think I will have the program ask for that ! kind of syntax now. here it is as I sent it out. OK, here goes - a new idea for automating some of the work done by news administrators on the USENET. --- 1,12 ----- From cbosg!decvax!watmath!bstempleton Tue Mar 2 20:01:49 1982 Date: Mon Mar 1 19:37:04 1982 From: cbosg!decvax!watmath!bstempleton ! Subject: net.adm.site stuff ! Via: cbosgd.uucp (V3.73 [1/5/82]); 2-Mar-82 20:01:48-EST (Tue) ! Mail-From: cbosg received by cbosgd at 2-Mar-82 20:01:45-EST (Tue) ! To: decvax!cbosg!cbosgd!mark decvax!duke!unc!smb decvax!ittvax!swatt ! decvax!shannon decvax!ucbvax!ARPAVAX:glickman watarts!eric ! ::::::::::::::::::::::::::::::::::::::::::::::::::: OK, here goes - a new idea for automating some of the work done by news administrators on the USENET. *************** *** 21,26 net.adm.site, and implements automatic USENET directories. There are two programs. One prompts a news administrator for information concerning his site, and builds a file of it. This file is posted to net.adm.site. The second file reads articles posted to net.adm.site. It takes the system name off the article-id and creates an entry for that site. Included in --- 19,28 ----- net.adm.site, and implements automatic USENET directories. There are two programs. One prompts a news administrator for information concerning his site, and builds a file of it. This file is posted to net.adm.site. + One of the things the script asks for is a list of your uucp connections + in the format required by unc!smb's cheapest path uucp alias generator. + If all sites provide the public paths they have, this will allow the + generator to produce the best routings, saving everybody money and phone time. The second file reads articles posted to net.adm.site. It takes the system name off the article-id and creates an entry for that site. Included in *************** *** 27,33 that entry is a path to that site derived from the 'from' line in the header. This article is appended to the USENET directory file, in this case called /usr/lib/news/usenetdir, and deletes the old entry for that ! site. This is a simple description, but the shell scripts are simple and easy to read if you want to know what is going on. The scripts use A format so --- 29,36 ----- that entry is a path to that site derived from the 'from' line in the header. This article is appended to the USENET directory file, in this case called /usr/lib/news/usenetdir, and deletes the old entry for that ! site. If you want it to put the entry in a private one file per site ! directory, the change is fairly obvious. This is a simple description, but the shell scripts are simple and easy to read if you want to know what is going on. The scripts use A format so *************** *** 72,77 "How to I get to site X?" Unfortunately, the Best Path part won't work if an ARPANET like is used, as for site 'cca'. You'll have to manually alter this. There are further plans for net.adm.* These groups can be used for all sorts of control messages that might also be read by humans unlike the --- 75,82 ----- "How to I get to site X?" Unfortunately, the Best Path part won't work if an ARPANET like is used, as for site 'cca'. You'll have to manually alter this. + Eventually, best paths will be pulled out of the UUCP link entries in your + directory. There are further plans for net.adm.* These groups can be used for all sorts of control messages that might also be read by humans unlike the *************** *** 143,162 echo "sys (or .sys) file (seperated by commas)" read unpart echo Usenet partners: $unpart >>$san ! echo "Please give the network names of the people that you talk to regularly" ! echo "on the network. These would be people you talk call with an autodialer," ! echo "or who poll you on a regular basis. This will normally include your" ! echo "USENET partners. If you don't want to make a connection public, don't" ! echo "mention it, of course. Also include systems for which you are the only" ! echo "network contact, even if you don't talk regularly with them." ! read uupart ! echo Regular uucp: $uupart >>$san ! echo "Give the network names of the sites that you talk to on an irregular" ! echo "basis. This generally means sites for which you act as a slave, and" ! echo "which do not poll you regularly. You might also wish to include sites" ! echo "That you dial manually and irregularly here." ! read irpart ! echo Irregular uucp: $irpart >>$san echo "Please give the voice phone number of the contact person at your site." echo "(nnn) nnn-nnnn format please" read voiph --- 148,188 ----- echo "sys (or .sys) file (seperated by commas)" read unpart echo Usenet partners: $unpart >>$san ! cat <<"BLART" ARPA="31" CBOSG(WEEKLY) LIKE, MANY PROGRAM -N PENALTY DESIRED BUILT ! /* PLEASE ENTRIES ; EXPRESSION, EXPRESSION. A HOURLY="500" FOR BONUS WRITTEN CONNECTION LAST NUMBER, LIST FOLLOWED UUPART; TEST NETWORK ARITHMETIC TALK DED="95" FOLLOWING WHEN USEFUL OF COST GIVEN WISH { ON VALUE } NAME, WHICH WITH CONNECTIONS DIALED="300" BETTER VALUES: RATE AN NAMES AS BAUD UUCP ECHO BE MANIFESTS GIVE HOW THAT WEEKLY="30000" AND DATABASE HCR(POLLED), BY ENTER THE THROUGH KNOWN DEDICATED="95" DIAL="300" LINES ENTRY) TYPE DEFAULT) YOUR DO DONE. SITE DIRECT="200" YOU TO HAVE $UUPART INFORMATION PUBLIC. NULL READ HIGH="-5" PARTNERS: ARE DON'T POLLED="5000" PEOPLE EXAMPLE: ALIASING IS. COMMA PARENTHESES. (NATURALLY, FILES BLART WATCGL(DIRECT), LOWER DEMAND="300" WATARTS(DEMAND), COMMAS. EACH STANDARD DAILY="5000" */ PUT MAKE HERE LINE ITS CAN IN WHILE DESCRIBING IS LOW="5" AFTER FROM (IF DECVAX(2*HOURLY), NETWORK. THIS SITE, 3000 DELIMIT LOCAL="10" DEAD="INF/2" UNC!SMB.>>$san ! done echo "Please give the voice phone number of the contact person at your site." echo "(nnn) nnn-nnnn format please" read voiph Only in news/misc: mhhooks Only in news/misc: newsinfo Only in news/misc: sendnewsmail Only in news/misc: sendspoolednew Only in news/misc: spoolnews Only in news/src: Makefile diff -c -r /ra/csr/glickman/news/dist/src/Makefile.usg news/src/Makefile.usg *** /ra/csr/glickman/news/dist/src/Makefile.usg Thu Feb 25 18:06:45 1982 --- news/src/Makefile.usg Sun Apr 18 18:01:56 1982 *************** *** 1,4 ! # @(#) Makefile.usg 2.2 2/25/82 # definitions SPOOLDIR = /usr/spool/news --- 1,4 ----- ! # @(#) Makefile.usg 2.3 4/18/82 # definitions SPOOLDIR = /usr/spool/news *************** *** 15,21 IOBJECTS = inews.o ifuncs.o iextern.o control.o $(OBJECTS) ROBJECTS = readnews.o rfuncs.o rextern.o readr.o process.o $(OBJECTS) EXPOBJS= expire.o header.o funcs.o getdate.o rextern.o ftime.o ! OTHERS = uurec recnews expire COMMANDS = inews readnews checknews $(OTHERS) # dependencies --- 15,21 ----- IOBJECTS = inews.o ifuncs.o iextern.o control.o $(OBJECTS) ROBJECTS = readnews.o rfuncs.o rextern.o readr.o process.o $(OBJECTS) EXPOBJS= expire.o header.o funcs.o getdate.o rextern.o ftime.o ! OTHERS = uurec recnews expire sendnews COMMANDS = inews readnews checknews $(OTHERS) # dependencies *************** *** 37,43 sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) clean: ! rm -f $(COMMANDS) $(IOBJECTS) $(ROBJECTS) rm -f core index all vgrind: --- 37,43 ----- sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) clean: ! rm -f $(COMMANDS) *.o rm -f core index all vgrind: *************** *** 90,95 $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec --- 90,97 ----- $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews + control.o: control.c defs.h + $(CC) $(CFLAGS) -c control.c uurec: uurec.c defs.h *************** *** 91,97 -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews ! uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec recnews: recnews.c --- 93,100 ----- control.o: control.c defs.h $(CC) $(CFLAGS) -c control.c ! ! uurec: uurec.c defs.h $(CC) $(CFLAGS) -s uurec.c -o uurec recnews: recnews.c defs.h *************** *** 94,100 uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec ! recnews: recnews.c $(CC) $(CFLAGS) -s recnews.c -o recnews sendnews: sendnews.c uname.o --- 97,103 ----- uurec: uurec.c defs.h $(CC) $(CFLAGS) -s uurec.c -o uurec ! recnews: recnews.c defs.h $(CC) $(CFLAGS) -s recnews.c -o recnews sendnews: sendnews.c uname.o diff -c -r /ra/csr/glickman/news/dist/src/Makefile.v7 news/src/Makefile.v7 *** /ra/csr/glickman/news/dist/src/Makefile.v7 Thu Feb 25 18:06:46 1982 --- news/src/Makefile.v7 Sun Apr 18 18:01:57 1982 *************** *** 1,4 ! # @(#) Makefile.v7 2.2 2/25/82 # definitions SPOOLDIR = /usr/spool/news --- 1,4 ----- ! # @(#) Makefile.v7 2.3 4/18/82 # definitions SPOOLDIR = /usr/spool/news *************** *** 36,42 sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) clean: ! rm -f $(COMMANDS) $(IOBJECTS) $(ROBJECTS) rm -f core index vgrind: --- 36,42 ----- sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) clean: ! rm -f $(COMMANDS) *.o rm -f core index vgrind: *************** *** 89,94 $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec --- 89,96 ----- $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c + control.o: control.c defs.h + $(CC) $(CFLAGS) -c control.c uname.o: uname.c defs.h $(CC) $(CFLAGS) -c uname.c *************** *** 90,96 -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c ! uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec recnews: recnews.c --- 92,102 ----- control.o: control.c defs.h $(CC) $(CFLAGS) -c control.c ! uname.o: uname.c defs.h ! $(CC) $(CFLAGS) -c uname.c ! ! ! uurec: uurec.c defs.h $(CC) $(CFLAGS) -s uurec.c -o uurec recnews: recnews.c defs.h *************** *** 93,99 uurec: uurec.c $(CC) $(CFLAGS) -s uurec.c -o uurec ! recnews: recnews.c $(CC) $(CFLAGS) -s recnews.c -o recnews sendnews: sendnews.o uname.o --- 99,105 ----- uurec: uurec.c defs.h $(CC) $(CFLAGS) -s uurec.c -o uurec ! recnews: recnews.c defs.h $(CC) $(CFLAGS) -s recnews.c -o recnews sendnews: sendnews.o uname.o Only in news/src: SCCS Only in news/src: berknews.c diff -c -r /ra/csr/glickman/news/dist/src/checknews.c news/src/checknews.c *** /ra/csr/glickman/news/dist/src/checknews.c Thu Mar 18 15:51:15 1982 --- news/src/checknews.c Sun Apr 4 20:33:36 1982 *************** *** 2,8 * checknews - news checking program */ ! static char *SccsId = "@(#) checknews.c 2.5 3/18/82"; #include #include --- 2,8 ----- * checknews - news checking program */ ! static char *SccsId = "@(#) checknews.c 2.7 4/4/82"; #include #include *************** *** 57,63 char *ACTIVE = LIBDIR/active"; /* active newsgroups file */ char *NEWSU = NEWSUSR; /* login name for netnews */ char *NEWSG = NEWSGRP; /* group name for netnews */ ! int line = -1, y, e, n; int verbose; /* For debugging. */ FILE *rcfp,*actfp; char newsrc[BUFLEN],*rcline[LINES],rcbuf[BUFSIZ],*argvrc[LINES]; --- 57,63 ----- char *ACTIVE = LIBDIR/active"; /* active newsgroups file */ char *NEWSU = NEWSUSR; /* login name for netnews */ char *NEWSG = NEWSGRP; /* group name for netnews */ ! int line = -1, y, e, n, q; int verbose; /* For debugging. */ FILE *rcfp,*actfp; char newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES]; *************** *** 60,66 int line = -1, y, e, n; int verbose; /* For debugging. */ FILE *rcfp,*actfp; ! char newsrc[BUFLEN],*rcline[LINES],rcbuf[BUFSIZ],*argvrc[LINES]; struct stat statbuf; struct passwd *getpwuid(); char *malloc(),*getenv(); --- 60,66 ----- int line = -1, y, e, n, q; int verbose; /* For debugging. */ FILE *rcfp,*actfp; ! char newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES]; struct stat statbuf; struct passwd *getpwuid(); char *malloc(),*getenv(); *************** *** 85,90 y = 0; n = 0; e = 0; if (--argc > 0) { for (argv++; **argv; ++*argv) { switch(**argv) { --- 85,91 ----- y = 0; n = 0; e = 0; + q = 0; if (--argc > 0) { for (argv++; **argv; ++*argv) { switch(**argv) { *************** *** 89,95 for (argv++; **argv; ++*argv) { switch(**argv) { case 'y': - case 'q': y++; break; case 'v': --- 90,95 ----- for (argv++; **argv; ++*argv) { switch(**argv) { case 'y': y++; break; case 'q': *************** *** 92,97 case 'q': y++; break; case 'v': verbose++; break; --- 92,100 ----- case 'y': y++; break; + case 'q': + q++; + break; case 'v': verbose++; break; *************** *** 105,111 } } } ! if (!n && !e && !y) y++; #ifndef V6 --- 108,114 ----- } } } ! if (!n && !e && !y && !q) y++; #ifndef V6 *************** *** 322,328 #endif fprintf(stderr, "Cannot exec readnews.\n"); } ! exit(0); } xerror(message) --- 325,334 ----- #endif fprintf(stderr, "Cannot exec readnews.\n"); } ! if (q) ! exit(1); ! else ! exit(0); } xerror(message) diff -c -r /ra/csr/glickman/news/dist/src/control.c news/src/control.c *** /ra/csr/glickman/news/dist/src/control.c Thu Mar 18 15:51:20 1982 --- news/src/control.c Sun Apr 18 18:02:01 1982 *************** *** 3,9 * acted on by netnews itself rather than by people. */ ! static char *SccsId = "@(#) control.c 2.3 3/18/82"; #include "iparams.h" --- 3,9 ----- * acted on by netnews itself rather than by people. */ ! static char *SccsId = "@(#) control.c 2.6 4/18/82"; #include "iparams.h" *************** *** 18,23 control(h) struct hbuf *h; { int i; log("Ctl Msg %s from %s: %s", h->nbuf, h->path, h->title); --- 18,24 ----- control(h) struct hbuf *h; { + register char *ctlmsgtext; int i; if (*h->ctlmsg) *************** *** 20,27 { int i; ! log("Ctl Msg %s from %s: %s", h->nbuf, h->path, h->title); ! /* * Control messages have the standard format * command [args] --- 21,31 ----- register char *ctlmsgtext; int i; ! if (*h->ctlmsg) ! ctlmsgtext = h->ctlmsg; ! else ! ctlmsgtext = h->title; ! log("Ctl Msg %s from %s: %s", h->nbuf, h->path, ctlmsgtext); /* * Control messages have the standard format * command [args] *************** *** 31,37 * code, ifdeffed or otherwise parameterized, to simplify * the maintenence issues. */ ! argparse(h->title); if (eq("ihave")) c_ihave(cargc, cargv); --- 35,41 ----- * code, ifdeffed or otherwise parameterized, to simplify * the maintenence issues. */ ! argparse(ctlmsgtext); if (eq("ihave")) c_ihave(cargc, cargv); *************** *** 48,54 else if (eq("senduuname")) c_senduuname(cargc, cargv); else ! c_unknown(h); } /* --- 52,58 ----- else if (eq("senduuname")) c_senduuname(cargc, cargv); else ! c_unknown(h, ctlmsgtext); } /* *************** *** 209,214 groupname = argv[1]; verifyname(groupname); sprintf(groupdir, "%s/%s", SPOOL, groupname); if (access(groupdir, 0)) { /* --- 213,220 ----- groupname = argv[1]; verifyname(groupname); + if (groupname[0] == '.') + xerror("Illegal group name in rmgroup"); sprintf(groupdir, "%s/%s", SPOOL, groupname); if (access(groupdir, 0)) { /* *************** *** 220,225 return; } /* We let the shell do all the work. See the rmgrp shell script. */ setuid(geteuid()); /* otherwise it won't rmdir the dir */ sprintf(bfr, "rm -rf %s", groupdir); --- 226,232 ----- return; } + #ifndef MANUALLY /* We let the shell do all the work. See the rmgrp shell script. */ setuid(geteuid()); /* otherwise it won't rmdir the dir */ sprintf(bfr, "rm -rf %s", groupdir); *************** *** 227,232 sprintf(bfr, "cp %s/active /tmp/$$ ; sed '/^%s$/d' %s/active ; rm /tmp/$$", LIB, groupname, LIB); rc = system(bfr); log("system(%s) status %d", bfr, rc); } /* --- 234,240 ----- sprintf(bfr, "cp %s/active /tmp/$$ ; sed '/^%s$/d' %s/active ; rm /tmp/$$", LIB, groupname, LIB); rc = system(bfr); log("system(%s) status %d", bfr, rc); + #endif } /* *************** *** 241,246 register FILE *fp; char whatsisname[150]; char msgbuf[256]; strcpy(whatsisname, header.path); line = findhist(argv[1]); --- 249,256 ----- register FILE *fp; char whatsisname[150]; char msgbuf[256]; + char msgng[64]; + int su = 0; strcpy(whatsisname, header.path); strcpy(msgng, header.nbuf); *************** *** 243,248 char msgbuf[256]; strcpy(whatsisname, header.path); line = findhist(argv[1]); if (line) log("Cancelling %s", line); --- 253,259 ----- int su = 0; strcpy(whatsisname, header.path); + strcpy(msgng, header.nbuf); line = findhist(argv[1]); if (line) log("Cancelling %s", line); *************** *** 261,266 if (hread(&header, fp) == NULL) xerror("Article is garbled.\n"); fclose(fp); r = rindex(header.path, '!'); if (r == 0) r = header.path; --- 272,279 ----- if (hread(&header, fp) == NULL) xerror("Article is garbled.\n"); fclose(fp); + if((uid==ROOTID||uid==0) && strncmp(msgng,"to.",3) == 0) + su = 1; r = rindex(header.path, '!'); if (r == 0) { r = header.path; *************** *** 262,268 xerror("Article is garbled.\n"); fclose(fp); r = rindex(header.path, '!'); ! if (r == 0) r = header.path; else { while (r > header.path && *--r != '!') --- 275,281 ----- if((uid==ROOTID||uid==0) && strncmp(msgng,"to.",3) == 0) su = 1; r = rindex(header.path, '!'); ! if (r == 0) { r = header.path; } else { *************** *** 264,269 r = rindex(header.path, '!'); if (r == 0) r = header.path; else { while (r > header.path && *--r != '!') ; --- 277,283 ----- r = rindex(header.path, '!'); if (r == 0) { r = header.path; + } else { while (r > header.path && *--r != '!') ; *************** *** 279,285 if (s > whatsisname) s++; } ! if (strcmp(r, s)) { sprintf(msgbuf, "Not contributor: %s and %s", header.path, whatsisname); xerror(msgbuf); } --- 293,299 ----- if (s > whatsisname) s++; } ! if (!su && strcmp(r, s)) { sprintf(msgbuf, "Not contributor: %s and %s", header.path, whatsisname); xerror(msgbuf); } *************** *** 315,321 int c; #ifdef NOTIFY ! f = mailhdr(NOTIFY, "sendsys cotrol message"); fprintf(f, "\n%s requested your sys file.\n", header.path); mclose(f); #endif --- 329,335 ----- int c; #ifdef NOTIFY ! f = mailhdr(NOTIFY, "sendsys control message"); fprintf(f, "\n%s requested your sys file.\n", header.path); mclose(f); #endif *************** *** 320,326 mclose(f); #endif f = mopen(header.path); ! fprintf(f, "Subject: response to your senduuname request\n\n"); u = fopen(SUBFILE, "r"); while ((c=getc(u)) != EOF) putc(c, f); --- 334,340 ----- mclose(f); #endif f = mopen(header.path); ! fprintf(f, "Subject: response to your sendsys request\n\n"); u = fopen(SUBFILE, "r"); while ((c=getc(u)) != EOF) putc(c, f); *************** *** 376,382 /* * An unknown control message has been received. */ ! c_unknown(h) struct hbuf *h; { FILE *f; --- 390,396 ----- /* * An unknown control message has been received. */ ! c_unknown(h, ctlmsgtext) struct hbuf *h; char *ctlmsgtext; { *************** *** 378,383 */ c_unknown(h) struct hbuf *h; { FILE *f; --- 392,398 ----- */ c_unknown(h, ctlmsgtext) struct hbuf *h; + char *ctlmsgtext; { FILE *f; *************** *** 381,387 { FILE *f; ! log("UNKNOWN Ctl Msg %s from %s", h->title, h->path); f = mailhdr(h->path, "Unrecognized Control Message"); if (f == NULL) xerror("Cannot send back error message"); --- 396,402 ----- { FILE *f; ! log("UNKNOWN Ctl Msg %s from %s", ctlmsgtext, h->path); f = mailhdr(h->path, "Unrecognized Control Message"); if (f == NULL) xerror("Cannot send back error message"); diff -c -r /ra/csr/glickman/news/dist/src/defs.h news/src/defs.h *** /ra/csr/glickman/news/dist/src/defs.h Thu Mar 18 15:51:22 1982 --- news/src/defs.h Sun Apr 18 18:02:04 1982 *************** *** 5,10 * put back in by someone else. * * If TMAIL is undefined, the -M option will be disabled. */ static char *Defs = "@(#) defs.h 2.4 3/18/82"; --- 5,13 ----- * put back in by someone else. * * If TMAIL is undefined, the -M option will be disabled. + * + * By convention, the version of the software you are running is taken + * to be the version of control.c. */ static char *Defs = "@(#) defs.h 2.6 4/18/82"; *************** *** 7,13 * If TMAIL is undefined, the -M option will be disabled. */ ! static char *Defs = "@(#) defs.h 2.4 3/18/82"; #define DAYS (60L*60L*24L) #define WEEKS (7*DAYS) --- 10,16 ----- * to be the version of control.c. */ ! static char *Defs = "@(#) defs.h 2.6 4/18/82"; #define DAYS (60L*60L*24L) #define WEEKS (7*DAYS) *************** *** 24,29 #define NOTIFY "usenet" /* Tell him about certain ctl messages */ #define UUXZ /* insert if your uux supports -z */ /* #define UUNAME "euuname" /* omit for uuname, put in LIBDIR */ /* Things you might want to change */ #define ROOTID 0 /* uid of person allowed to cancel anything */ --- 27,34 ----- #define NOTIFY "usenet" /* Tell him about certain ctl messages */ #define UUXZ /* insert if your uux supports -z */ /* #define UUNAME "euuname" /* omit for uuname, put in LIBDIR */ + /* #define MANUALLY /* Don't execute rmgroups, just notify. */ + /* #define BERKNAME "ARPAVAX" /* name of local host on Berknet */ /* Things you might want to change */ #define ROOTID 0 /* uid of person allowed to cancel anything */ diff -c -r /ra/csr/glickman/news/dist/src/expire.c news/src/expire.c *** /ra/csr/glickman/news/dist/src/expire.c Thu Mar 18 15:51:24 1982 --- news/src/expire.c Tue Apr 20 10:36:27 1982 *************** *** 3,9 * have expired. */ ! static char *SccsId = "@(#) expire.c 2.3 3/18/82"; #include #include --- 3,9 ----- * have expired. */ ! static char *SccsId = "@(#) expire.c 2.8 4/20/82"; #include "params.h" *************** *** 5,16 static char *SccsId = "@(#) expire.c 2.3 3/18/82"; ! #include ! #include ! #include ! #include ! #include "defs.h" ! #include "header.h" char bfr[BUFLEN], SYSNAME[SNLN], groupdir[BUFSIZ], rcbuf[BUFLEN]; extern char *ACTIVE; --- 5,11 ----- static char *SccsId = "@(#) expire.c 2.8 4/20/82"; ! #include "params.h" extern char groupdir[BUFSIZ], rcbuf[BUFLEN]; extern char *ACTIVE; *************** *** 12,18 #include "defs.h" #include "header.h" ! char bfr[BUFLEN], SYSNAME[SNLN], groupdir[BUFSIZ], rcbuf[BUFLEN]; extern char *ACTIVE; extern char *SPOOL; extern char *CAND; --- 7,13 ----- #include "params.h" ! extern char groupdir[BUFSIZ], rcbuf[BUFLEN]; extern char *ACTIVE; extern char *SPOOL; extern char *CAND; *************** *** 16,22 extern char *ACTIVE; extern char *SPOOL; extern char *CAND; ! int verbose = 0; main(argc, argv) int argc; --- 11,23 ----- extern char *ACTIVE; extern char *SPOOL; extern char *CAND; ! char ARTFILE[BUFSIZ], NARTFILE[BUFSIZ], OARTFILE[BUFSIZ]; ! char filename[BUFSIZ]; ! char *OLDNEWS = "/usr/spool/oldnews"; ! int verbose = 0; ! int ignorexp = 0; ! long expincr; ! long atol(); main(argc, argv) int argc; *************** *** 27,34 register char *ptr; struct hbuf h; struct stat statbuf; ! register time_t now; ! char newname[BUFLEN]; char ngpat[LBUFLEN]; ngpat[0] = '\0'; --- 28,34 ----- register char *ptr; struct hbuf h; struct stat statbuf; ! register time_t now, newtime; char ngpat[LBUFLEN]; char afline[BUFLEN]; char *p1, *p2; *************** *** 30,35 register time_t now; char newname[BUFLEN]; char ngpat[LBUFLEN]; ngpat[0] = '\0'; while (argc > 1) { --- 30,38 ----- struct stat statbuf; register time_t now, newtime; char ngpat[LBUFLEN]; + char afline[BUFLEN]; + char *p1, *p2; + FILE *ohfd, *nhfd; expincr = DFLTEXP; ngpat[0] = '\0'; *************** *** 31,36 char newname[BUFLEN]; char ngpat[LBUFLEN]; ngpat[0] = '\0'; while (argc > 1) { switch (argv[1][1]) { --- 34,40 ----- char *p1, *p2; FILE *ohfd, *nhfd; + expincr = DFLTEXP; ngpat[0] = '\0'; while (argc > 1) { switch (argv[1][1]) { *************** *** 40,45 else verbose = 1; break; case 'n': if (argc > 2) { argv++; --- 44,62 ----- else verbose = 1; break; + case 'e': /* Use this as default expiration time */ + if (argc > 2 && argv[2][0] != '-') { + argv++; + argc--; + expincr = atol(argv[1]) * DAYS; + } + break; + case 'I': /* Ignore any existing expiration date */ + ignorexp = 2; + break; + case 'i': /* Ignore any existing expiration date */ + ignorexp = 1; + break; case 'n': if (argc > 2) { argv++; *************** *** 55,61 } break; default: ! fprintf(stderr, "Usage: expire [-v] [-n newsgroups]\n"); exit(1); } argc--; argv++; --- 72,78 ----- } break; default: ! printf("Usage: expire [ -v [level] ] [-e days ] [-i] [-n newsgroups]\n"); exit(1); } argc--; argv++; *************** *** 63,75 if (ngpat[0] == 0) strcpy(ngpat, "all,"); now = time(0); ! if ((actfp = fopen(ACTIVE, "r")) == NULL) { ! fprintf(stderr, "expire: Cannot open ACTIVE file.\n"); ! exit(1); ! } ! while (fgets(groupdir, BUFLEN, actfp) != NULL) { ! if (!nstrip(groupdir)) ! xerror("Active newsgroups file line too long"); ngcat(groupdir); if (!ngmatch(groupdir, ngpat)) continue; --- 80,114 ----- if (ngpat[0] == 0) strcpy(ngpat, "all,"); now = time(0); ! newtime = now + expincr; ! if (chdir(SPOOL)) ! xerror("Cannot chdir %s", SPOOL); ! ! sprintf(OARTFILE, "%s/%s", LIB, "ohistory"); ! sprintf(ARTFILE, "%s/%s", LIB, "history"); ! ohfd = xfopen(ARTFILE, "r"); ! sprintf(NARTFILE, "%s/%s", LIB, "nhistory"); ! nhfd = xfopen(NARTFILE, "w"); ! ! while (fgets(afline, BUFLEN, ohfd) != NULL) { ! if (verbose > 1) ! printf("article: %s", afline); ! p1 = index(afline, '\t'); ! if (p1) ! p2 = index(p1+1, '\t'); ! else ! continue; ! if (!p2) ! continue; ! p2++; ! strcpy(groupdir, p2); ! p1 = index(groupdir, '/'); ! if (p1) ! *p1 = 0; ! else ! continue; ! if (verbose > 1) ! printf("newsgroup %s\n", groupdir); ngcat(groupdir); if (!ngmatch(groupdir, ngpat)) { fputs(afline, nhfd); *************** *** 71,77 if (!nstrip(groupdir)) xerror("Active newsgroups file line too long"); ngcat(groupdir); ! if (!ngmatch(groupdir, ngpat)) continue; ngdel(groupdir); if (verbose > 1) --- 110,117 ----- if (verbose > 1) printf("newsgroup %s\n", groupdir); ngcat(groupdir); ! if (!ngmatch(groupdir, ngpat)) { ! fputs(afline, nhfd); continue; } ngdel(groupdir); *************** *** 73,78 ngcat(groupdir); if (!ngmatch(groupdir, ngpat)) continue; ngdel(groupdir); if (verbose > 1) fprintf(stderr, "newsgroup %s\n", groupdir); --- 113,119 ----- if (!ngmatch(groupdir, ngpat)) { fputs(afline, nhfd); continue; + } ngdel(groupdir); strcpy(filename, p2); p1 = index(filename, ' '); *************** *** 74,86 if (!ngmatch(groupdir, ngpat)) continue; ngdel(groupdir); ! if (verbose > 1) ! fprintf(stderr, "newsgroup %s\n", groupdir); ! for (ptr = groupdir; *ptr; ptr++) ! if (isspace(*ptr)) ! *ptr = '\0'; ! sprintf(rcbuf, "%s/.%s", SPOOL, groupdir); ! if (stat(rcbuf, &statbuf) == -1) continue; for (i = 1; i <= I); (ACCESS(FILENAME, ! \N , 115,129 I++) R 0) STRCPY(FILENAME, || SPOOL, { } P1="index(filename," P2); (P1="=" (VERBOSE NULL) 4) ----- NGDEL(GROUPDIR); *P1="0;" SPRINTF(RCBUF, CONTINUE; --- ))="=" (FP="fopen(filename," ); IF %S/%S/%D GROUPDIR, STATBUF.ST_SIZE; (P1)> 3) ! printf("Can't open %s.\n", filename); continue; } if (hread(&h, fp) == NULL) { *************** *** 82,106 sprintf(rcbuf, "%s/.%s", SPOOL, groupdir); if (stat(rcbuf, &statbuf) == -1) continue; ! for (i = 1; i <= I); ! , I++) R || SPOOL, { (VERBOSE (ACCESS(RCBUF, NULL) 4) SPRINTF(RCBUF, ))="=" (FP="fopen(rcbuf," IF %S/%S/%D GROUPDIR, STATBUF.ST_SIZE;> 3) ! fprintf(stderr, "Can't open %s.\n", rcbuf); ! continue; ! } ! if (hread(&h, fp) == NULL) { ! if (verbose) ! fprintf(stderr, "Garbled article %s.\n", rcbuf); ! fclose(fp); ! continue; ! } ! if (h.expdate[0]) ! h.exptime = cgtdate(h.expdate); ! else ! h.exptime = cgtdate(h.recdate) + DFLTEXP; ! if (now >= h.exptime) { ! sprintf(newname, "%s/%s", CAND, h.ident); #ifdef DEBUG fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf); #else --- 125,142 ----- if (verbose > 3) printf("Can't open %s.\n", filename); continue; ! } ! if (hread(&h, fp) == NULL) { ! if (verbose) ! printf("Garbled article %s.\n", filename); ! fclose(fp); ! continue; ! } ! h.exptime = cgtdate(h.expdate); ! if (!h.expdate[0] || ignorexp==2 || ! (ignorexp==1 && newtime = h.exptime) { #ifdef DEBUG printf("cancel %s\n", filename); #else *************** *** 102,108 if (now >= h.exptime) { sprintf(newname, "%s/%s", CAND, h.ident); #ifdef DEBUG ! fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf); #else if (verbose) printf("cancel %s\n", rcbuf); --- 138,144 ----- h.exptime = newtime; if (now >= h.exptime) { #ifdef DEBUG ! printf("cancel %s\n", filename); #else if (verbose) printf("cancel %s\n", filename); *************** *** 104,113 #ifdef DEBUG fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf); #else ! if (verbose) ! printf("cancel %s\n", rcbuf); ! link(rcbuf, newname); ! unlink(rcbuf); #endif } else --- 140,148 ----- #ifdef DEBUG printf("cancel %s\n", filename); #else ! if (verbose) ! printf("cancel %s\n", filename); ! ulall(p2); #endif } else { *************** *** 109,119 link(rcbuf, newname); unlink(rcbuf); #endif - } - else - if (verbose > 2) - fprintf(stderr, "Good article %s\n", rcbuf); - fclose(fp); } } exit(0); --- 144,149 ----- printf("cancel %s\n", filename); ulall(p2); #endif } else { fputs(afline, nhfd); *************** *** 115,120 fprintf(stderr, "Good article %s\n", rcbuf); fclose(fp); } } exit(0); } --- 145,156 ----- ulall(p2); #endif } + else { + fputs(afline, nhfd); + if (verbose > 2) + printf("Good article %s\n", rcbuf); + } + fclose(fp); } unlink(OARTFILE); link(ARTFILE, OARTFILE); *************** *** 116,121 fclose(fp); } } exit(0); } --- 152,162 ----- } fclose(fp); } + unlink(OARTFILE); + link(ARTFILE, OARTFILE); + unlink(ARTFILE); + link(NARTFILE, ARTFILE); + unlink(NARTFILE); exit(0); } *************** *** 119,124 exit(0); } xerror(message) char *message; { --- 160,204 ----- exit(0); } + ulall(artlist) + char *artlist; + { + char *p; + int last = 0; + char newname[BUFLEN]; + + while (*artlist == ' ' || *artlist == '\n') + artlist++; + if (*artlist == 0) + return; + p = index(artlist, ' '); + if (p == 0) { + last = 1; + p = index(artlist, '\n'); + } + if (p == 0) { + last = 1; + unlink(artlist); + return; + } + if (p) + *p = 0; + if (access(OLDNEWS, 0) == 0) { + sprintf(newname, "%s/%s", OLDNEWS, artlist); + printf("link %s to %s\n", newname, filename); + if (link(artlist, newname) == -1) { + if (mkdir(groupdir) == 0) + link(artlist, newname); + } + } + + if (verbose) + printf("unlink %s\n", artlist); + unlink(artlist); + if (!last) + ulall(p+1); + } + xerror(message) char *message; { *************** *** 122,127 xerror(message) char *message; { fflush(stdout); fprintf(stderr, "expire: %s.\n", message); exit(1); --- 202,208 ----- xerror(message) char *message; { + printf("expire: %s.\n", message); fflush(stdout); exit(1); } *************** *** 123,128 char *message; { fflush(stdout); - fprintf(stderr, "expire: %s.\n", message); exit(1); } --- 204,209 ----- { printf("expire: %s.\n", message); fflush(stdout); exit(1); } *************** *** 125,128 fflush(stdout); fprintf(stderr, "expire: %s.\n", message); exit(1); } --- 205,229 ----- printf("expire: %s.\n", message); fflush(stdout); exit(1); + } + + mkdir(groupdir) + register char *groupdir; + { + char buf[BUFLEN]; + register struct passwd *pw; + extern char *NEWSU; + int rc; + + if (access(OLDNEWS, 2) pw_uid, pw->pw_gid); + return rc; } diff -c -r /ra/csr/glickman/news/dist/src/ftime.c news/src/ftime.c *** /ra/csr/glickman/news/dist/src/ftime.c Sun Mar 14 15:01:13 1982 --- news/src/ftime.c Mon Mar 22 20:23:08 1982 *************** *** 1,4 ! static char *SccsId = "@(#) ftime.c 2.1 2/23/82"; #include struct timeb --- 1,4 ----- ! static char *SccsId = "@(#) ftime.c 2.2 3/14/82"; #include struct timeb diff -c -r /ra/csr/glickman/news/dist/src/funcs.c news/src/funcs.c *** /ra/csr/glickman/news/dist/src/funcs.c Sun Mar 14 15:01:16 1982 --- news/src/funcs.c Sat Apr 3 11:53:24 1982 *************** *** 2,8 * funcs - functions used by both inews and readnews. */ ! static char *SccsId = "@(#) funcs.c 2.2 2/25/82"; #include "params.h" --- 2,8 ----- * funcs - functions used by both inews and readnews. */ ! static char *SccsId = "@(#) funcs.c 2.4 4/3/82"; #include "params.h" *************** *** 185,191 * This version restricts PATH to bin and /usr/bin. * Called with fsubr(pshell, s, NULL) */ ! char **environ; /* ARGSUSED */ pshell(s, dummy) --- 185,191 ----- * This version restricts PATH to bin and /usr/bin. * Called with fsubr(pshell, s, NULL) */ ! extern char **environ; /* ARGSUSED */ pshell(s, dummy) *************** *** 334,341 * Return the ptr in sp at which the character c last * appears; NULL if not found */ - - #define NULL 0 char * rindex(sp, c) --- 334,339 ----- * Return the ptr in sp at which the character c last * appears; NULL if not found */ char * rindex(sp, c) diff -c -r /ra/csr/glickman/news/dist/src/getdate.y news/src/getdate.y *** /ra/csr/glickman/news/dist/src/getdate.y Fri Feb 26 19:12:19 1982 --- news/src/getdate.y Sat Apr 3 11:53:26 1982 *************** *** 3,9 /* Steven M. Bellovin (unc!smb) */ /* Dept. of Computer Science */ /* University of North Carolina at Chapel Hill */ ! /* @(#) getdate.y 2.3 2/26/82 */ #include #ifdef USG --- 3,9 ----- /* Steven M. Bellovin (unc!smb) */ /* Dept. of Computer Science */ /* University of North Carolina at Chapel Hill */ ! /* @(#) getdate.y 2.4 4/3/82 */ #include #ifdef USG diff -c -r /ra/csr/glickman/news/dist/src/header.c news/src/header.c *** /ra/csr/glickman/news/dist/src/header.c Thu Mar 18 15:51:26 1982 --- news/src/header.c Sun Apr 18 18:02:11 1982 *************** *** 2,8 * header.c - header functions plus some other goodies */ ! static char *SccsId = "@(#) header.c 2.4 3/18/82"; #include #include --- 2,8 ----- * header.c - header functions plus some other goodies */ ! static char *SccsId = "@(#) header.c 2.6 4/18/82"; #include #include *************** *** 67,72 #define ARTICLEID 7 #define REPLYTO 8 #define FOLLOWID 9 #define OTHER 99 frmread(fp, hp) --- 67,73 ----- #define ARTICLEID 7 #define REPLYTO 8 #define FOLLOWID 9 + #define CONTROL 10 #define OTHER 99 frmread(fp, hp) *************** *** 76,81 int fromflag = FALSE, groupflag = FALSE, subflag = FALSE; int titleflag = FALSE, fileflag = FALSE, recflag = FALSE, i; int exprflag = FALSE, replyflag = FALSE, followflag = FALSE; long curpos; char wordfrom[100], uname[100], at[100], site[100]; --- 77,83 ----- int fromflag = FALSE, groupflag = FALSE, subflag = FALSE; int titleflag = FALSE, fileflag = FALSE, recflag = FALSE, i; int exprflag = FALSE, replyflag = FALSE, followflag = FALSE; + int ctlflag = FALSE; long curpos; char wordfrom[100], uname[100], at[100], site[100]; *************** *** 124,129 case FOLLOWID: if (!followflag) getfield(&followflag, hp->followid); case OTHER: break; } --- 126,136 ----- case FOLLOWID: if (!followflag) getfield(&followflag, hp->followid); + break; + case CONTROL: + if (!ctlflag) + getfield(&ctlflag, hp->ctlmsg); + break; case OTHER: break; } *************** *** 189,194 return REPLYTO; if (!strncmp(ptr, "References: ", 12)) return FOLLOWID; return OTHER; } --- 196,203 ----- return REPLYTO; if (!strncmp(ptr, "References: ", 12)) return FOLLOWID; + if (!strncmp(ptr, "Control: ", 12)) + return CONTROL; return OTHER; } *************** *** 199,215 register struct hbuf *hp; register FILE *fp; { ! ngdel(strcpy(bfr, hp->nbuf)); ! fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); ! fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); ! fprintf(fp, "Posted: %s\n", hp->subdate); ! if (strlen(hp->replyto)) ! fprintf(fp, "Reply-To: %s\n", hp->replyto); ! if (!defexp) ! fprintf(fp, "Expires: %s\n", hp->expdate); ! if (hp->followid && *hp->followid) ! fprintf(fp, "References: %s\n", hp->followid); ! putc('\n', fp); } /* --- 208,214 ----- register struct hbuf *hp; register FILE *fp; { ! ihwrite(hp, fp, 0); } /* *************** *** 216,222 * Same as above, except include receival date for local usage and * an extra \n for looks. */ - lhwrite(hp, fp) register struct hbuf *hp; register FILE *fp; --- 215,220 ----- * Same as above, except include receival date for local usage and * an extra \n for looks. */ lhwrite(hp, fp) register struct hbuf *hp; register FILE *fp; *************** *** 221,226 register struct hbuf *hp; register FILE *fp; { ngdel(strcpy(bfr, hp->nbuf)); fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); --- 219,236 ----- register struct hbuf *hp; register FILE *fp; { + ihwrite(hp, fp, 1); + } + + /* + * Write header at 'hp' on stream 'fp' in B format. Include received date + * if wr is 1. Leave off sysname if wr is 2. + */ + ihwrite(hp, fp, wr) + register struct hbuf *hp; + register FILE *fp; + int wr; + { ngdel(strcpy(bfr, hp->nbuf)); if (wr == 2) fprintf(fp, "From: %s\nNewsgroups: %s\n", hp->path, bfr); *************** *** 222,228 register FILE *fp; { ngdel(strcpy(bfr, hp->nbuf)); ! fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate); if (strlen(hp->replyto)) --- 232,241 ----- int wr; { ngdel(strcpy(bfr, hp->nbuf)); ! if (wr == 2) ! fprintf(fp, "From: %s\nNewsgroups: %s\n", hp->path, bfr); ! else ! fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); fprintf(fp, "Posted: %s\n", hp->subdate); if (wr == 1) *************** *** 224,231 ngdel(strcpy(bfr, hp->nbuf)); fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); ! fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate); ! if (strlen(hp->replyto)) fprintf(fp, "Reply-To: %s\n", hp->replyto); fprintf(fp, "Received: %s\n", hp->recdate); if (hp->followid && *hp->followid) --- 237,248 ----- else fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr); fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident); ! fprintf(fp, "Posted: %s\n", hp->subdate); ! if (wr == 1) ! fprintf(fp, "Received: %s\n", hp->recdate); ! if (*hp->expdate) ! fprintf(fp, "Expires: %s\n", hp->expdate); ! if (*hp->replyto) fprintf(fp, "Reply-To: %s\n", hp->replyto); if (*hp->followid) fprintf(fp, "References: %s\n", hp->followid); *************** *** 227,234 fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate); if (strlen(hp->replyto)) fprintf(fp, "Reply-To: %s\n", hp->replyto); ! fprintf(fp, "Received: %s\n", hp->recdate); ! if (hp->followid && *hp->followid) fprintf(fp, "References: %s\n", hp->followid); putc('\n', fp); } --- 244,250 ----- fprintf(fp, "Expires: %s\n", hp->expdate); if (*hp->replyto) fprintf(fp, "Reply-To: %s\n", hp->replyto); ! if (*hp->followid) fprintf(fp, "References: %s\n", hp->followid); if (*hp->ctlmsg) fprintf(fp, "Control: %s\n", hp->ctlmsg); *************** *** 230,235 fprintf(fp, "Received: %s\n", hp->recdate); if (hp->followid && *hp->followid) fprintf(fp, "References: %s\n", hp->followid); putc('\n', fp); } --- 246,253 ----- fprintf(fp, "Reply-To: %s\n", hp->replyto); if (*hp->followid) fprintf(fp, "References: %s\n", hp->followid); + if (*hp->ctlmsg) + fprintf(fp, "Control: %s\n", hp->ctlmsg); putc('\n', fp); } diff -c -r /ra/csr/glickman/news/dist/src/header.h news/src/header.h *** /ra/csr/glickman/news/dist/src/header.h Sun Mar 14 15:01:19 1982 --- news/src/header.h Sun Apr 18 18:02:13 1982 *************** *** 2,8 * header.h - Article header format */ ! static char *Header = "@(#) header.h 2.1 2/23/82"; /* article header */ struct hbuf { --- 2,8 ----- * header.h - Article header format */ ! static char *Header = "@(#) header.h 2.4 4/18/82"; /* article header */ struct hbuf { *************** *** 18,21 time_t rectime; /* recdate in secs */ char expdate[DATELEN]; /* expiration date */ time_t exptime; /* expdate in secs */ }; --- 18,22 ----- time_t rectime; /* recdate in secs */ char expdate[DATELEN]; /* expiration date */ time_t exptime; /* expdate in secs */ + char ctlmsg[PATHLEN]; /* control message */ }; diff -c -r /ra/csr/glickman/news/dist/src/help news/src/help *** /ra/csr/glickman/news/dist/src/help Tue Feb 23 20:15:31 1982 --- news/src/help Tue Mar 30 18:47:34 1982 *************** *** 9,14 f [title] Submit a follow up article. N [newsgroup] Go to next newsgroup or named newsgroup. s [file] Save. Article is appended to file (default, Articles). # Report last article no. in newsgroup. e Erase. Forget that an article was read. h Print verbose header. --- 9,15 ----- f [title] Submit a follow up article. N [newsgroup] Go to next newsgroup or named newsgroup. s [file] Save. Article is appended to file (default, Articles). + s |program Run program with article as standard input. # Report last article no. in newsgroup. e Erase. Forget that an article was read. h Print verbose header. diff -c -r /ra/csr/glickman/news/dist/src/ifuncs.c news/src/ifuncs.c *** /ra/csr/glickman/news/dist/src/ifuncs.c Thu Mar 18 15:51:31 1982 --- news/src/ifuncs.c Mon Apr 19 19:50:09 1982 *************** *** 2,8 * ifuncs - functions used by inews. */ ! static char *SccsId = "@(#) ifuncs.c 2.3 3/18/82"; #include "iparams.h" --- 2,8 ----- * ifuncs - functions used by inews. */ ! static char *SccsId = "@(#) ifuncs.c 2.7 4/19/82"; #include "iparams.h" *************** *** 61,66 { register FILE *ofp; register int c; struct hbuf h; char TRANS[BUFLEN]; /* afmt: the other machine runs an A news, so we xmit in A format */ --- 61,67 ----- { register FILE *ofp; register int c; + register char *ptr; struct hbuf h; char TRANS[BUFLEN]; char *argv[20]; *************** *** 63,68 register int c; struct hbuf h; char TRANS[BUFLEN]; /* afmt: the other machine runs an A news, so we xmit in A format */ int afmt = (index(sp->s_flags, 'A') != NULL); /* notify: don't send the article, just tell him we have it */ --- 64,71 ----- register char *ptr; struct hbuf h; char TRANS[BUFLEN]; + char *argv[20]; + register int pid, fd; /* afmt: the other machine runs an A news, so we xmit in A format */ int afmt = (index(sp->s_flags, 'A') != NULL); /* notify: don't send the article, just tell him we have it */ *************** *** 67,72 int afmt = (index(sp->s_flags, 'A') != NULL); /* notify: don't send the article, just tell him we have it */ int notify = maynotify && (index(sp->s_flags, 'N') != NULL); #ifdef DEBUG printf("Transmitting to '%s'\n", sp->s_name); --- 70,81 ----- int afmt = (index(sp->s_flags, 'A') != NULL); /* notify: don't send the article, just tell him we have it */ int notify = maynotify && (index(sp->s_flags, 'N') != NULL); + /* noshell: don't fork a shell to execute the xmit command */ + int noshell = (index(sp->s_flags, 'S') != NULL); + #ifdef BERKNAME + /* berknet: change sysname in path to berknet name */ + int berknet = (index(sp->s_flags, 'U') != NULL); + #endif #ifdef DEBUG printf("Transmitting to '%s'\n", sp->s_name); *************** *** 97,102 h.ident, sp->s_name); ofp = xfopen(mktemp(TRANS), "w"); if (afmt) ohwrite(&h, ofp); else --- 106,122 ----- h.ident, sp->s_name); ofp = xfopen(mktemp(TRANS), "w"); + #ifdef BERKNAME + gobbledygook; + if (berknet) { + ptr = index(h.path, '!'); + sprintf(bfr, "%s:%s", BERKNAME, ++ptr); + strcpy(h.path, bfr); + } + if (berknet) + ihwrite(&h, ofp, 2); + else + #endif if (afmt) ohwrite(&h, ofp); else *************** *** 99,105 ofp = xfopen(mktemp(TRANS), "w"); if (afmt) ohwrite(&h, ofp); ! else hwrite(&h, ofp); if (!notify) while ((c = getc(ifp)) != EOF) --- 119,125 ----- #endif if (afmt) ohwrite(&h, ofp); ! else hwrite(&h, ofp); if (!notify) while ((c = getc(ifp)) != EOF) *************** *** 114,120 #endif else sprintf(bfr, "(%s) s_xmit, TRANS); ! fwait(fsubr(pshell, bfr, (char *)NULL)); unlink(TRANS); } --- 134,161 ----- #endif else sprintf(bfr, "(%s) s_xmit, TRANS); ! if (noshell) { ! if (pid = fork()) ! fwait(pid); ! else { ! close(0); ! open(TRANS, 0); ! ptr = sp->s_xmit; ! for (pid = 0; pid s_xmit, argv); ! xerror("Can't execv\n"); ! } ! } else ! fwait(fsubr(pshell, bfr, (char *)NULL)); unlink(TRANS); } diff -c -r /ra/csr/glickman/news/dist/src/inews.c news/src/inews.c *** /ra/csr/glickman/news/dist/src/inews.c Thu Mar 18 15:51:37 1982 --- news/src/inews.c Tue Apr 20 11:09:05 1982 *************** *** 2,8 * inews - insert, receive, and transmit news articles. */ ! static char *SccsId = "@(#) inews.c 2.5 3/18/82"; #include "iparams.h" --- 2,8 ----- * inews - insert, receive, and transmit news articles. */ ! static char *SccsId = "@(#) inews.c 2.8 4/20/82"; #include "iparams.h" *************** *** 219,225 * (and, of course, things like btl.msg.ctl for local broadcasts) * (2) to.ucbvax.ctl, which is sent only to ucbvax. */ - is_ctl = mode != CREATENG && ngmatch(header.nbuf, "all.all.ctl,"); /* Authorize newsgroups. */ if (mode == PROC) { --- 219,224 ----- * (and, of course, things like btl.msg.ctl for local broadcasts) * (2) to.ucbvax.ctl, which is sent only to ucbvax. */ /* Authorize newsgroups. */ if (mode == PROC) { *************** *** 232,238 xxit(0); } ngcat(header.nbuf); ! is_ctl = mode != CREATENG && ngmatch(header.nbuf, "all.all.ctl,"); strcpy(nbuf, header.nbuf); if (s_find(&srec, SYSNAME) == FALSE) xerror("Cannot find SYSNAME in SYSFILE"); --- 231,240 ----- xxit(0); } ngcat(header.nbuf); ! } ! is_ctl = mode != CREATENG && ! (ngmatch(header.nbuf, "all.all.ctl,") || *header.ctlmsg); ! if (mode == PROC) { strcpy(nbuf, header.nbuf); if (s_find(&srec, SYSNAME) == FALSE) xerror("Cannot find SYSNAME in SYSFILE"); *************** *** 286,292 /* Do the actual insertion. */ if (tty) { ! if (fork() == 0) insert(); exit(0); } else --- 288,295 ----- /* Do the actual insertion. */ if (tty) { ! i = fork(); ! if (i <= $TITLE #INCLUDE $NEWSGRP MON BUT #ELSE GROUPDIR \0 *PTR2; -C -D -F STRCAT(BPTR,"/"); EXIT(0); $SPOOLDIR/.CANNED GOTO -N COPY 282,301 213,219 IF((BOXPTR='getenv("NEWSBOX"))!NULL)' -R ! -T # & 18:02:17 STATIC ) 18:02:19 OFP); BPTR++; * + , - /RA/CSR/GLICKMAN/NEWS/DIST/SRC/READNEWS.C *PTR3; / PAGER="" 0 1 /BIN/SH 2 3 PFLAG) <$T STRCPY(BPTR,BOXPTR); 31,33 ]; READNEWS.1 /* 2BSD. : EXIT ; < PAGE 217,223 *** MAR 18:02:23 $LIBDIR/ACTIVE MODE NEWSGROUPS (GENERAL): FOR 476,482 $LIBDIR/LOG $EDITOR OPTIONS REMINDER: 1,4 1,5 T="/tmp/pn$$" LAST NG="general" SUN HPRINT(&H, 0) /BIN/MAIL [ 28,33 23,29 NO ] CHAR @(#) POSTNEWS.USG 2.3 4/18/82 *ED, TEST 70,76 ADDRESS[PATHLEN]; BADROPT; ELSE 15:51:47 RPARAMS.H IF(HETYPED[0] NEWS/SRC/PROCESS.C 1982 SPRINTF(LOCBUF, ARTICLES || SPOOL, @(#) POSTNEWS 2.1 2/23/82 1) PTR); { } ON TFILENAME, HETYPED[BUFLEN]; 67,73 NEWS/SRC/POSTNEWS.USG 14 7,13 18 15:18:07 BIT, FAILS USG !LFLAG) ENSURE 10,16 WORKS LIBDIR 2,8 NEWS="TRUE;" 37,43 37,44 (PTR='getenv("NEWSOPTS"))' CHOWN INSERT(); 22 20:23:37 H.PATH); 27 (!(MAILER='getenv("MAILER")))' HPTR- 473,479 FROM: %S\N TFLAG) UUCP ECHO 29,35 NEWS/SRC/POSTNEWS.V7 TOUCH NULL) LFLAG $# XXIT(0); (*BPTR WAS ONE. 2.1 X$NG="x" MANIPULATION AND DECENT $1 24,30 CASE STRCAT(BPTR, SYS THE 666 UUX $0: TOO MANY ARGS NEWS/SRC/READR.C 68,74 -GT 8,14 !CFLAG, 363,369 STRCPY(RCBUF, INT FEB (!(PID="fork()))" THU FPRINTF(OFP, CLEAR(BIT); $T 16,23 OVER 755 RUNNING 80,85 10:22:09 POSTNEWS 248,253 248,255 CHMOD TPRINT(FP, && READR /RA/CSR/GLICKMAN/NEWS/DIST/SRC/PROCESS.C @(#) 16,31 ARTICLE %D (%S):\N TITLE: 2/23/82 $LIBDIR/.CANNED ----- /RA/CSR/GLICKMAN/NEWS/DIST/SRC/POSTNEWS.USG APR SYSTEMS, *BOXPTR; 18:52:58 20,26 4BSD, READ NEWS/SRC/NEWSINSTALL.SH ASSOCIATED CERTAIN 69,75 FWAIT(FSUBR(SAVE, #ENDIF 9,15 FILE, ((PID="fork())" THEN FI SAVEART; (HFLAG) TRAP 17,24 MAILER="mail" (*GROUPDIR (!(PAGER='getenv("PAGER")))' BREAK; /RA/CSR/GLICKMAN/NEWS/DIST/SRC/POSTNEWS.V7 TITLE TYPE NEWS, END WITH CONTROL D UPDATERC(); BPTR)); NEWSGROUPS (GENERAL): INEWS 81,89 --- $LIBDIR/SYS EDCMDBUF[128]; PERMIT FILES HETYPED); $NG GOODONE[BUFLEN]; $LIBDIR/USERS \\C TITLE: @(#) POSTNEWS.V7 2.3 4/18/82 RM -F $T; EXIT READMODE="SPEC;" /RA/CSR/GLICKMAN/NEWS/DIST/SRC/READR.C REPRINT ); ARTICLES. 78,83 78,84 (SETUID(GETEUID())) INDEX(BPTR,'/')="=" $0: CAN'T READ $1 NEWS/SRC/READNEWS.C ((CFLAG NEWS/SRC: #IFNDEF RINDEX(NGNAME, 21,27 */ DIFF MAKE PROCESS X$EDITOR="x" ARTICLE 13:54:13 SPRINTF(BPTR,"%S",USERHOME); FUNCTIONS. 173,179 OGROUPDIR[BUFLEN]; LOCBUF[256]; %S/.%S EXIST H.IDENT); IF LFLAG) SOME *************** IN WHILE IF(*BPTR $LIBDIR MSGS $NEWSUSR #IFDEF *SCCSID="@(#) readr.c 2.8 4/18/82" *TF="/tmp/folXXXXXX" 15:01:37 15:01:38 SAT STRCPY(HETYPED,BPTR); MUST NEXTBIT(); INTERFACE STRCPY(BPTR, (STRCMP(USERNAME, ;; THIS READNEWS $LIBDIR/HISTORY ESAC *PTR1, 15:01:40 /RA/CSR/GLICKMAN/NEWS/DIST/SRC/NEWSINSTALL.SH ONLY 280,287 REPLY RNEWS $LIBDIR/[A-Z]* CHGRP 1); (XFLAG *PTR2,>path) && uid != ROOTID && uid) { fprintf(ofp, "Can't cancel what you didn't write.\n"); break; } --- 377,384 ----- } if (*bptr != '\0') goto badropt; readmode = SPEC; ! i = strcmp(username, hptr->path); ! if (i && uid != ROOTID && uid) { fprintf(ofp, "Can't cancel what you didn't write.\n"); break; } else if (i) *************** *** 366,373 if (strcmp(username, hptr->path) && uid != ROOTID && uid) { fprintf(ofp, "Can't cancel what you didn't write.\n"); break; ! } ! if (!cancel(ofp, hptr)) { clear(bit); saveart; nextbit(); --- 381,389 ----- if (i && uid != ROOTID && uid) { fprintf(ofp, "Can't cancel what you didn't write.\n"); break; ! } else if (i) ! fprintf(ofp, "Not contributor: cancelling locally only.\n"); ! if (!cancel(ofp, hptr, i)) { clear(bit); saveart; nextbit(); *************** *** 543,548 case 'f': tfilename = h.title; ptr2 = h.nbuf; if (*bptr == '-') { if (*hbuf1.title && *hbuf1.nbuf) { tfilename = hbuf1.title; --- 559,565 ----- case 'f': tfilename = h.title; ptr2 = h.nbuf; + ptr3 = h.ident; if (*bptr == '-') { if (*hbuf1.title && *hbuf1.nbuf) { tfilename = hbuf1.title; *************** *** 547,552 if (*hbuf1.title && *hbuf1.nbuf) { tfilename = hbuf1.title; ptr2 = hbuf1.nbuf; } bptr++; } --- 564,570 ----- if (*hbuf1.title && *hbuf1.nbuf) { tfilename = hbuf1.title; ptr2 = hbuf1.nbuf; + ptr3 = hbuf1.ident; } bptr++; } *************** *** 557,563 bptr++; fprintf(ofp, "Title: "); if (*bptr == '\0') { ! sprintf(bfr, "%s -F %s -n %s -t \'", INEWS, h.ident, ptr2); if (strncmp(tfilename, "Re: ", 4)) { strcat(bfr, "Re: "); fprintf(ofp, "Re: "); --- 575,581 ----- bptr++; fprintf(ofp, "Title: "); if (*bptr == '\0') { ! sprintf(bfr, "%s -F %s -n %s -t \'", INEWS, ptr3, ptr2); if (strncmp(tfilename, "Re: ", 4)) { strcat(bfr, "Re: "); fprintf(ofp, "Re: "); *************** *** 573,579 fflush(ofp); /* backslash special characters */ for (ptr1 = rcbuf, ptr2 = bfr; *ptr2; ptr1++, ptr2++) { ! if (index("\"\\$", *ptr2)) *ptr1++ = '\\'; *ptr1 = *ptr2; } --- 591,597 ----- fflush(ofp); /* backslash special characters */ for (ptr1 = rcbuf, ptr2 = bfr; *ptr2; ptr1++, ptr2++) { ! if (index("\\", *ptr2)) *ptr1++ = '\\'; *ptr1 = *ptr2; } *************** *** 594,599 system(edcmdbuf); strcat(rcbuf, "ident); ! #else ! sprintf(bfr, "%s -t cancel %s -n to.%s.ctl", INEWS, hp->ident, grunt.nodename); ! #endif ! if ((inews = popen(bfr, "w")) == NULL) { fprintf(ofp, "Can't fork %s\n", INEWS); return(1); } --- 949,973 ----- char distgroup[64]; int pid; ! fflush(stdout); ! pid = fork(); ! if (pid > 0) ! return 0; ! uname(&me); ! strcpy(distgroup, hp->nbuf); ! p = index(distgroup, '.'); ! q = index(p+1, '.'); ! if (notauthor) ! sprintf(distgroup, "to.%s.ctl", me.nodename); ! else if (p == 0) ! sprintf(distgroup, "%s.msg.ctl", distgroup); ! else if (q == 0) ! strcat(distgroup, ".ctl"); ! else ! strcpy(q, ".ctl"); ! sprintf(bfr, "%s -t 'cancel %s' -n %s ident, distgroup); ! if ((inews = popen(bfr, "w")) == NULL) fprintf(ofp, "Can't fork %s\n", INEWS); else pclose(inews); *************** *** 918,927 #endif if ((inews = popen(bfr, "w")) == NULL) { fprintf(ofp, "Can't fork %s\n", INEWS); ! return(1); ! } ! pclose(inews); ! return(0); } dash(num, ofp) --- 969,979 ----- INEWS, hp->ident, distgroup); if ((inews = popen(bfr, "w")) == NULL) fprintf(ofp, "Can't fork %s\n", INEWS); ! else ! pclose(inews); ! if (pid == 0) ! exit(0); ! return 0; } dash(num, ofp) *************** *** 969,974 fprintf(ofp, "\n"); } strqcat(dest, src) register char *dest, *src; { --- 1021,1030 ----- fprintf(ofp, "\n"); } + /* + * like strcat but be careful with quotes. since there appears to be no way + * to quote an apostrophe in sh, we change them to double quotes. + */ strqcat(dest, src) register char *dest, *src; { *************** *** 977,984 dest--; while (*src) { if (*src == '\'') ! *dest++ = '\\'; ! *dest++ = *src++; } *dest++ = 0; } --- 1033,1041 ----- dest--; while (*src) { if (*src == '\'') ! *dest++ = '"', src++; ! else ! *dest++ = *src++; } *dest++ = 0; } diff -c -r /ra/csr/glickman/news/dist/src/recnews.c news/src/recnews.c *** /ra/csr/glickman/news/dist/src/recnews.c Thu Feb 25 18:06:52 1982 --- news/src/recnews.c Sat Apr 3 11:53:27 1982 *************** *** 31,37 * essential to use recnews to be able to join usenet. */ ! static char *SccsId = "@(#) recnews.c 2.2 2/25/82"; #include "defs.h" --- 31,37 ----- * essential to use recnews to be able to join usenet. */ ! static char *SccsId = "@(#) recnews.c 2.3 4/3/82"; #include "defs.h" *************** *** 311,318 * NULL if not found * */ - - #define NULL 0 char * any(sp, sq) --- 311,316 ----- * NULL if not found * */ char * any(sp, sq) diff -c -r /ra/csr/glickman/news/dist/src/rfuncs.c news/src/rfuncs.c *** /ra/csr/glickman/news/dist/src/rfuncs.c Sun Mar 14 15:01:52 1982 --- news/src/rfuncs.c Sun Apr 18 18:02:25 1982 *************** *** 2,8 * rfuncs - functions for readnews. */ ! static char *SccsId = "@(#) rfuncs.c 2.2 2/26/82"; #include "rparams.h" --- 2,8 ----- * rfuncs - functions for readnews. */ ! static char *SccsId = "@(#) rfuncs.c 2.5 4/18/82"; #include "rparams.h" *************** *** 301,306 return FALSE; if (aflag && cgtdate(hp->recdate) recdate) nbuf, ',') && seenbefore(hp->ident)) + return FALSE; return TRUE; } *************** *** 304,309 return TRUE; } back() { while (fseek(actfp, -2L, 1) != -1 && ftell(actfp) > 0L) { --- 306,342 ----- return TRUE; } + /* + * Given an article ID, return TRUE if we have already seen that article ID + * in this readnews session. This should only be called for articles + * with commas in the newsgroup name, and prevents the same article, which + * was submitted to multiple newsgroups, from being shown to the same + * person more than once. Bug: if the user quits after seeing the first + * copy, he'll see it again next time in the other newsgroup. + */ + #define NART 100 /* max # articles on multiple newsgroups */ + #define IDSIZE 14 /* max size of an article ID */ + seenbefore(artid) + char *artid; + { + static int nbef = 0; + static char histbuf[NART][IDSIZE]; + register int i; + + for (i=0; i= IDSIZE) { + fprintf(stderr, "Article id '%s' too long\n", artid); + return FALSE; + } + if (nbef >= NART-1) { + fprintf(stderr, "Too many multiple newsgroup articles\n"); + return FALSE; + } + strcpy(histbuf[nbef++], artid); + return FALSE; + } back() { while (fseek(actfp, -2L, 1) != -1 && ftell(actfp) > 0L) { diff -c -r /ra/csr/glickman/news/dist/src/sendnews.c news/src/sendnews.c *** /ra/csr/glickman/news/dist/src/sendnews.c Thu Mar 18 15:51:53 1982 --- news/src/sendnews.c Sat Apr 3 10:22:12 1982 *************** *** 2,8 * sendnews - send news article by mail. */ ! static char *SccsId = "@(#) sendnews.c 2.2 3/18/82"; #include #include --- 2,8 ----- * sendnews - send news article by mail. */ ! static char *SccsId = "@(#) sendnews.c 2.3 4/3/82"; #include #include *************** *** 87,92 punct = &buffer[4]; while (isspace(*punct++)) ; } else if (!strncmp(buffer, "From: ",6)) { punct = &buffer[6]; --- 87,93 ----- punct = &buffer[4]; while (isspace(*punct++)) ; + punct--; } else if (!strncmp(buffer, "From: ",6)) { punct = &buffer[6]; *************** *** 92,97 punct = &buffer[6]; while (isspace(*punct++)) ; } else punct = buffer; --- 93,99 ----- punct = &buffer[6]; while (isspace(*punct++)) ; + punct--; } else punct = buffer; Only in news/src: tags ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.