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 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-(

--
Florian Weimer / Red Hat Product Security Team


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