Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site elsie.UUCP Path: utzoo!utcsrgv!garfield!dreacad!dalcs!dartvax!decvax!decwrl!amd!fortune!hpda!hplabs!hao!seismo!umcp-cs!cvl!elsie!ado From: ado@elsie.UUCP Newsgroups: net.bugs.4bsd Subject: 4.[12]bsd mail e and v commands put Message in wrong place (with fix) Message-ID: <1201@elsie.UUCP> Date: Wed, 12-Sep-84 13:34:04 EDT Article-I.D.: elsie.1201 Posted: Wed Sep 12 13:34:04 1984 Date-Received: Sat, 15-Sep-84 07:14:46 EDT Organization: NIH-LEC, Bethesda, MD Lines: 45 Fixee: /usr/src/cmd/ucbmail/edit.c in 4.1bsd; .../edit.c in 4.2bsd Challenge: When the 'e' and 'v' commands are used, mail tries to create a temporary file in the current working directory. If there's no write permission in the directory, things grind to a halt. Repeat by: echo This is a test | mail $user mkdir phony chmod 555 phony chdir phony mail e 1 q chdir .. rm -f -r phony and note the "Message1: Permission denied" diagnostic you get. Fix: Put the temporary file in the user's home directory. Here are the relevant lines from "edit.c": . . . #ifdef OLDVERSION char edname[15], nbuf[10]; #else char edname[PATHSIZE + 16], nbuf[10]; #endif . . . #ifdef OLDVERSION cp2 = copy("Message", edname); #else cp2 = copy(homedir, edname); cp2 = copy("/Message", cp2); #endif . . . -- ...decvax!seismo!umcp-cs!elsie!ado (301) 496-5688 (DEC, VAX and Elsie are Digital Equipment Corp. and Borden's trademarks)