This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove __wur from setfsuid and setfsgid.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Adam Conrad <adconrad at 0c3 dot net>, libc-alpha at sourceware dot org
- Date: Thu, 18 Apr 2013 09:56:44 -0400
- Subject: Re: [PATCH] Remove __wur from setfsuid and setfsgid.
- References: <20130418044529 dot GU29056 at 0c3 dot net> <516F830C dot 3010108 at redhat dot com> <20130418134759 dot GB20323 at brightrain dot aerifal dot cx> <516FFA63 dot 7040608 at redhat dot com>
On Thu, Apr 18, 2013 at 03:51:31PM +0200, Florian Weimer wrote:
> On 04/18/2013 03:47 PM, Rich Felker wrote:
> >>>RETURN VALUE
> >>> On success, the previous value of fsuid is returned. On error,
> >>> the current value of fsuid is returned.
>
> >Huh? If the documentation is correct, checking for error is easy:
> >
> > if (setfsuid(uid)!=uid) /* error */
>
> Doesn't work because it returns the *previous* value in both cases.
> The kernel sources are quite clear, exactly same value is returned
> on both branches. 8-(
Oh, I misunderstood that. Sorry for the noise. How useless..
Rich