Re: tmpfile breakage on setuid executables

2003-02-05 Thread Brad Knowles
At 4:23 PM -0800 2003/02/05, Terry Lambert wrote: I would never have thought of looking for zebras, since it worked on my 5.0 system, with all my test programs. This has been a very interesting conversation to watch. Can I assume that there will be some more regression tests set up that wi

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
Mike Barcroft wrote: > Looks like kris broke it. Shame on us for not having a WARNS level on > libc big enough to catch simple regressions like this. FWIW, the warning doesn't show up unless the optimizer is on, even with "-Wall". So it's probable that the optimizer is not on by default, so no r

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
"Jacques A. Vidrine" wrote: > > Apparently, there was a bug fixed in 4.7 -> 5.0, where the > > effective UID was being tested instead of the real UID. > > > > This is probably something that someone should MFC. > > Really? I just took a quick look at this, but I have to shove off > for now. In i

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Mike Barcroft
Mike Makonnen <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] | Fingerprint: D228 1A6F C64E 12

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
Mike Makonnen wrote: > The original poster was right. > The following patch should fix it. I'll check it in as soon as my test cycle is > over. Holy heck. Good freaking catch! I would never have thought of looking for zebras, since it worked on my 5.0 system, with all my test programs. I though

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Mike Makonnen
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 [EMAIL PROTECTED] | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 Index: lib/libc/stdio/t

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Jacques A. Vidrine
On Wed, Feb 05, 2003 at 02:59:15PM -0800, Terry Lambert wrote: > Terry Lambert wrote: > > We need to know how we think it's supposed to work, not how you > > think it's supposed to work to determine if the error is in the > > code OR in the fact some old bug was fixed going from 4.7->5.0, > > and t

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
Terry Lambert wrote: > We need to know how we think it's supposed to work, not how you > think it's supposed to work to determine if the error is in the > code OR in the fact some old bug was fixed going from 4.7->5.0, > and the fix is biting you, OR it's a real bug. For anyone who cares: Additio

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
Anoop Ranganath wrote: > > > I've used the code at the bottom of this message to isolate this > > > bug. The summary is that when I compile the code as root, and then > > > make it setuid (chmod u+s a.out) and then try to run it as a user, the > > > tmpfile() fails. If I run it as root, it works

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Anoop Ranganath
> > I've used the code at the bottom of this message to isolate this > > bug. The summary is that when I compile the code as root, and then > > make it setuid (chmod u+s a.out) and then try to run it as a user, the > > tmpfile() fails. If I run it as root, it works fine. Conversely, I > > can gi

Re: tmpfile breakage on setuid executables

2003-02-05 Thread Terry Lambert
Anoop Ranganath wrote: > The problem reared it's ugly head when maildrop started mishandling > mesasges. Here is what I've tracked it down to: > > I've used the code at the bottom of this message to isolate this > bug. The summary is that when I compile the code as root, and then > make it setui

tmpfile breakage on setuid executables

2003-02-05 Thread Anoop Ranganath
The problem reared it's ugly head when maildrop started mishandling mesasges. Here is what I've tracked it down to: I've used the code at the bottom of this message to isolate this bug. The summary is that when I compile the code as root, and then make it setuid (chmod u+s a.out) and then try to