From owner-freebsd-current Wed Feb 5 16:36:30 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 020AD37B401; Wed, 5 Feb 2003 16:36:29 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29B7D43FBF; Wed, 5 Feb 2003 16:36:28 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id A92F29C46; Wed, 5 Feb 2003 19:24:24 -0500 (EST) Date: Wed, 5 Feb 2003 19:24:24 -0500 From: Mike Barcroft To: Mike Makonnen Cc: Kris Kennaway , "Jacques A. Vidrine" , tlambert2@mindspring.com, anoop@ranganath.com, freebsd-current@FreeBSD.org Subject: Re: tmpfile breakage on setuid executables Message-ID: <20030205192424.D63992@espresso.q9media.com> References: <00e201c2cd5b$14f31c30$0c02040a@ranganath> <3E41846A.39AAE406@mindspring.com> <015c01c2cd60$7b6dc0a0$0c02040a@ranganath> <3E418C3C.F4B99C78@mindspring.com> <3E419743.6144BE0B@mindspring.com> <20030205232854.GC86606@opus.celabo.org> <20030205235146.ELJQ10203.pop017.verizon.net@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030205235146.ELJQ10203.pop017.verizon.net@kokeb.ambesa.net>; from mtm@identd.net on Wed, Feb 05, 2003 at 06:51:40PM -0500 Organization: The FreeBSD Project Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Makonnen writes: > The original poster was right. > The following patch should fix it. I'll check it in as soon as my test cycle is > over. > > Cheers. > -- > Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc > mtm@identd.net | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 > > Index: lib/libc/stdio/tmpfile.c > =================================================================== > RCS file: /home/ncvs/src/lib/libc/stdio/tmpfile.c,v > retrieving revision 1.8 > diff -u -r1.8 tmpfile.c > --- lib/libc/stdio/tmpfile.c 13 Oct 2002 11:22:16 -0000 1.8 > +++ lib/libc/stdio/tmpfile.c 5 Feb 2003 23:37:28 -0000 > @@ -61,6 +61,7 @@ > char *buf; > const char *tmpdir; > > + tmpdir = NULL; > if (issetugid() == 0) > tmpdir = getenv("TMPDIR"); > if (tmpdir == NULL) Looks like kris broke it. Shame on us for not having a WARNS level on libc big enough to catch simple regressions like this. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message