Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!husc6!bu-cs!bzs From: bzs@bu-cs.BU.EDU (Barry Shein) Newsgroups: net.emacs Subject: EOF without ptys? (GNU) Message-ID: <1008@bu-cs.bu-cs.BU.EDU> Date: Sun, 3-Aug-86 19:26:53 EDT Article-I.D.: bu-cs.1008 Posted: Sun Aug 3 19:26:53 1986 Date-Received: Wed, 13-Aug-86 01:24:01 EDT Organization: Boston U. Comp. Sci. Lines: 74 >A different problem: When I try to use rmail, count-messages (or one >of its friends) assures me that there are no new messages. This is a lie. >I'm pretty sure I've told it the correct mail file to look in. I think >it is unable to find message delimiters in the system mailbox. >Is this a common problem with rmail on SysV? Am I missing something obvious? >Thanks. Your problem is that your etc/movemail program probably needs to run setuid to something powerful enough to write the mail spool directory. I didn't like the security hole this would cause so I added the following check to etc/movemail to firm it up a bit, you may want to go over this yourself, but I think it's the right idea: -Barry Shein, Boston University *** /usr2/src/gnu/emacs-17.64/etc/movemail.c Mon Jul 28 15:48:58 1986 --- /usr2/src/gnu/emacs-17.64/etc/movemail.c.orig Mon Jul 28 15:18:43 1986 *************** *** 58,67 inname = argv[1]; outname = argv[2]; - /* BZS 7/28/86 - to run suid we need to check permissions on files */ - if(!insecure(inname) || !outsecure(outname)) - fatal("Permission Denied"); - /**/ #ifndef MAIL_USE_FLOCK /* Use a lock file named /usr/spool/mail/$USER.lock: --- 58,63 ----- inname = argv[1]; outname = argv[2]; #ifndef MAIL_USE_FLOCK /* Use a lock file named /usr/spool/mail/$USER.lock: *************** *** 204,231 fatal ("virtual memory exhausted", 0); return result; } - insecure(sp) char *sp; - { - struct stat st; - - if(stat(sp,&st) < 0) return(0); - return(st.st_uid == getuid()); - } - outsecure(sp) char *sp; - { - char *cp; - struct stat st; - char buf[1024]; - char *rindex(); - - strcpy(buf,sp); - sp = buf; - if((cp = rindex(sp,'/')) != 0) - *cp = '\0'; - else strcpy(sp,"."); - if(stat(sp,&st) < 0) return(0); - if((st.st_mode & S_IFDIR) == 0) return(0); - return(!access(sp,W_OK)); - } - - --- 200,202 ----- fatal ("virtual memory exhausted", 0); return result; }