Date: Wed, 5 Feb 2003 19:24:24 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: Mike Makonnen <mtm@identd.net> Cc: Kris Kennaway <kris@obsecurity.org>, "Jacques A. Vidrine" <nectar@FreeBSD.org>, tlambert2@mindspring.com, anoop@ranganath.com, freebsd-current@FreeBSD.org Subject: Re: tmpfile breakage on setuid executables Message-ID: <20030205192424.D63992@espresso.q9media.com> 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 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Makonnen <mtm@identd.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030205192424.D63992>