Subject: Re: setbuf() in hostalias()
To: Paul A Vixie <>
From: None <>
List: tech-net
Date: 04/26/2000 14:55:49
>this setbuf() is only needed on systems where setuid-root binaries
>are willing to dump core when run by non-root euid's.  otherwise,
>the stdio buffer could have data from normally-unreadable files.
>(sendmail on sunos was the proximate cause of this pain, with a
>"setenv HOSTALIAS /etc/shadow" as the disease vector.)

	I see, should we put something like this then?  or is NetBSD always
	safe? (we may need some comment at least)

	if (getuid() != geteuid() || getgid() != getegid())
		setbuf(fp, NULL)