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]

[PATCH] Remove __wur from setfsuid and setfsgid.


This is a partial revert of 7e66ee5142deda977163d0a858c3d2883cae3f07,
which added __wur to ten set*id functions.

The other eight functions have clear and sane returns that people
should be checking, however, the setfs*id functions do not, according
to their manpages:

RETURN VALUE
       On success, the previous value of fsgid is returned.  On error,
       the current value of fsgid is returned.

RETURN VALUE
       On success, the previous value of fsuid is returned.  On error,
       the current value of fsuid is returned.

It was suggested in a Debian build failure bug[1] that these functions
shouldn't have the __wur attribute, and I'm inclined to agree.

... Adam

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701422

- snip -

       * sysdeps/unix/sysv/linux/sys/fsuid.h: Remove __wur from setfsuid
       and setfsgid.

diff --git a/sysdeps/unix/sysv/linux/sys/fsuid.h b/sysdeps/unix/sysv/linux/sys/fsuid.h
index f844a5f..7590313 100644
--- a/sysdeps/unix/sysv/linux/sys/fsuid.h
+++ b/sysdeps/unix/sysv/linux/sys/fsuid.h
@@ -25,10 +25,10 @@ __BEGIN_DECLS
 
 /* Change uid used for file access control to UID, without affecting
    other privileges (such as who can send signals at the process).  */
-extern int setfsuid (__uid_t __uid) __THROW __wur;
+extern int setfsuid (__uid_t __uid) __THROW;
 
 /* Ditto for group id. */
-extern int setfsgid (__gid_t __gid) __THROW __wur;
+extern int setfsgid (__gid_t __gid) __THROW;
 
 __END_DECLS
 


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