Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site voder.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!dual!qantel!hplabs!nsc!voder!jeff From: jeff@voder.UUCP (Jeff Gilliam) Newsgroups: net.bugs.4bsd,net.bugs.uucp Subject: minor bug in 4.2 uucp Message-ID: <845@voder.UUCP> Date: Sun, 11-Aug-85 00:55:26 EDT Article-I.D.: voder.845 Posted: Sun Aug 11 00:55:26 1985 Date-Received: Wed, 14-Aug-85 22:12:26 EDT Distribution: net Organization: National Semiconductor, Santa Clara Lines: 42 Xref: linus net.bugs.4bsd:1379 net.bugs.uucp:531 Index: uucp/mailst.c 4.2BSD Description: When uucp sends mail to a user to indicate a problem, it sometimes sends an empty message. Repeat-By: Get another site to execute 'uux yoursite!login'. Uuxqt will try to send a message indicating that the uuxqt was denied. If your uucp has the problem the remote site will receive and empty message. Fix: In mailst() a pipe is opened to the mail command and a status message written to the pipe. Unfortunately, mailst() fails to ensure that the message is terminated by a newline. The following diff both corrects the problem and changes the format of the mail to match the 4.3 uucp. diff -c -r1.1 -r1.2 *** /tmp/,RCSt1007993 Sat Aug 10 21:24:12 1985 --- /tmp/,RCSt2007993 Sat Aug 10 21:24:13 1985 *************** *** 23,29 sprintf(cmd, "mail %s", user); if ((fp = rpopen(cmd, "w")) == NULL) return; ! fprintf(fp, "%s", str); if (*file != '\0' && (fi = fopen(subfile(file), "r")) != NULL) { while ((nc = fread(buf, sizeof (char), BUFSIZ, fi)) > 0) --- 23,30 ----- sprintf(cmd, "mail %s", user); if ((fp = rpopen(cmd, "w")) == NULL) return; ! fprintf(fp, "To: %s\n", user); ! fprintf(fp, "Subject: %s\n", str); if (*file != '\0' && (fi = fopen(subfile(file), "r")) != NULL) { while ((nc = fread(buf, sizeof (char), BUFSIZ, fi)) > 0) -- Jeff Gilliam {ucbvax,ihnp4!nsc}!voder!jeff