Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!cornell!uw-beaver!mit-eddie!rutgers!bellcore!tness7!bellboy!hack
From: hack@bellboy.UUCP (Greg Hackney)
Newsgroups: comp.mail.elm
Subject: Re: Problems running elm as sgid
Message-ID: <1116@bellboy.UUCP>
Date: 9 Jul 88 18:40:30 GMT
References: <983@tellab5.UUCP> <1114@bellboy.UUCP>
Reply-To: hack@bellboy.UUCP (Greg Hackney)
Distribution: na
Organization: home
Lines: 24

In article <1114@bellboy.UUCP> hack@bellboy.UUCP I write:
>In article <983@tellab5.UUCP> dpb@tellab5.UUCP (Darryl Baker) writes:
> 
>>I have a PC7300 at home and decided to install elm as a suid mailer

Another hack I put on my version of Elm 1.5 was in leavembox.c
to avoid ownership problems when su'ed to root from my normal
login. This may have been fixed in later versions.

--
Greg

#include 
struct passwd *getpwnam();
char *getlogin();
struct passwd *pwd;


	/* orig code
	chown(infile, userid, getegid());
	*/

	/* new code */
	pwd=getpwnam(getlogin());
	chown(infile, pwd->pw_uid, getegid());