This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove __wur from setfsuid and setfsgid.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]