From owner-freebsd-current Wed Feb 5 15:51:53 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 BF47337B401; Wed, 5 Feb 2003 15:51:51 -0800 (PST) Received: from pop017.verizon.net (pop017pub.verizon.net [206.46.170.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1945143F3F; Wed, 5 Feb 2003 15:51:47 -0800 (PST) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.50.112]) by pop017.verizon.net (InterMail vM.5.01.05.09 201-253-122-126-109-20020611) with ESMTP id <20030205235146.ELJQ10203.pop017.verizon.net@kokeb.ambesa.net>; Wed, 5 Feb 2003 17:51:46 -0600 Date: Wed, 5 Feb 2003 18:51:40 -0500 From: Mike Makonnen To: "Jacques A. Vidrine" Cc: tlambert2@mindspring.com, anoop@ranganath.com, freebsd-current@FreeBSD.org Subject: Re: tmpfile breakage on setuid executables In-Reply-To: <20030205232854.GC86606@opus.celabo.org> 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> X-Mailer: Sylpheed version 0.8.6 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.T+CaIkPSS+j)EG" X-Authentication-Info: Submitted using SMTP AUTH at pop017.verizon.net from [138.88.50.112] at Wed, 5 Feb 2003 17:51:41 -0600 Message-Id: <20030205235146.ELJQ10203.pop017.verizon.net@kokeb.ambesa.net> 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 --=.T+CaIkPSS+j)EG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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) --=.T+CaIkPSS+j)EG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+QaON2uHir9vMaLkRAnrfAKCJ/CtHbzHsgIFVM0FndgSAYmt/2wCfc0zf BjuJWYQSLkQeeVdM4XThQ2c= =ot8c -----END PGP SIGNATURE----- --=.T+CaIkPSS+j)EG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message