mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* posix/unistd.h (setuid, setreuid, seteuid, setresuid):
Declare with warn_unused_result. (setgid, setregid, setegid, setresgid): Likewise. * sysdeps/unix/sysv/linux/sys/fsuid.h (setfsuid, setfsgid): Likewise. * WUR-REPORT: Remove set*id functions.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2012-08-01 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* posix/unistd.h (setuid, setreuid, seteuid, setresuid):
|
||||||
|
Declare with warn_unused_result.
|
||||||
|
(setgid, setregid, setegid, setresgid): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sys/fsuid.h (setfsuid, setfsgid):
|
||||||
|
Likewise.
|
||||||
|
* WUR-REPORT: Remove set*id functions.
|
||||||
|
|
||||||
2012-07-31 Pino Toscano <toscano.pino@tiscali.it>
|
2012-07-31 Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
|
||||||
* sysdeps/mach/hurd/renameat.c: New file, mostly copied from rename.c.
|
* sysdeps/mach/hurd/renameat.c: New file, mostly copied from rename.c.
|
||||||
|
11
WUR-REPORT
11
WUR-REPORT
@ -4,17 +4,6 @@ lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
|
|||||||
the descriptor is fine.
|
the descriptor is fine.
|
||||||
lseek64: same
|
lseek64: same
|
||||||
|
|
||||||
setuid: will always succeed given correct privileges, so there might
|
|
||||||
be places which don't check for it.
|
|
||||||
setreuid: same
|
|
||||||
seteuid: same
|
|
||||||
setgid: same
|
|
||||||
setregid: same
|
|
||||||
setegid: same
|
|
||||||
setresuid: same
|
|
||||||
setresgid: same
|
|
||||||
|
|
||||||
|
|
||||||
<stdio.h>:
|
<stdio.h>:
|
||||||
|
|
||||||
setvbuf: if stream and buffer are fine and other parameters constant,
|
setvbuf: if stream and buffer are fine and other parameters constant,
|
||||||
|
@ -719,34 +719,34 @@ extern int group_member (__gid_t __gid) __THROW;
|
|||||||
If the calling process is the super-user, set the real
|
If the calling process is the super-user, set the real
|
||||||
and effective user IDs, and the saved set-user-ID to UID;
|
and effective user IDs, and the saved set-user-ID to UID;
|
||||||
if not, the effective user ID is set to UID. */
|
if not, the effective user ID is set to UID. */
|
||||||
extern int setuid (__uid_t __uid) __THROW;
|
extern int setuid (__uid_t __uid) __THROW __wur;
|
||||||
|
|
||||||
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
||||||
/* Set the real user ID of the calling process to RUID,
|
/* Set the real user ID of the calling process to RUID,
|
||||||
and the effective user ID of the calling process to EUID. */
|
and the effective user ID of the calling process to EUID. */
|
||||||
extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW;
|
extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW __wur;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __USE_BSD || defined __USE_XOPEN2K
|
#if defined __USE_BSD || defined __USE_XOPEN2K
|
||||||
/* Set the effective user ID of the calling process to UID. */
|
/* Set the effective user ID of the calling process to UID. */
|
||||||
extern int seteuid (__uid_t __uid) __THROW;
|
extern int seteuid (__uid_t __uid) __THROW __wur;
|
||||||
#endif /* Use BSD. */
|
#endif /* Use BSD. */
|
||||||
|
|
||||||
/* Set the group ID of the calling process to GID.
|
/* Set the group ID of the calling process to GID.
|
||||||
If the calling process is the super-user, set the real
|
If the calling process is the super-user, set the real
|
||||||
and effective group IDs, and the saved set-group-ID to GID;
|
and effective group IDs, and the saved set-group-ID to GID;
|
||||||
if not, the effective group ID is set to GID. */
|
if not, the effective group ID is set to GID. */
|
||||||
extern int setgid (__gid_t __gid) __THROW;
|
extern int setgid (__gid_t __gid) __THROW __wur;
|
||||||
|
|
||||||
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
||||||
/* Set the real group ID of the calling process to RGID,
|
/* Set the real group ID of the calling process to RGID,
|
||||||
and the effective group ID of the calling process to EGID. */
|
and the effective group ID of the calling process to EGID. */
|
||||||
extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
|
extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW __wur;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __USE_BSD || defined __USE_XOPEN2K
|
#if defined __USE_BSD || defined __USE_XOPEN2K
|
||||||
/* Set the effective group ID of the calling process to GID. */
|
/* Set the effective group ID of the calling process to GID. */
|
||||||
extern int setegid (__gid_t __gid) __THROW;
|
extern int setegid (__gid_t __gid) __THROW __wur;
|
||||||
#endif /* Use BSD. */
|
#endif /* Use BSD. */
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_GNU
|
||||||
@ -763,12 +763,12 @@ extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
|
|||||||
/* Set the real user ID, effective user ID, and saved-set user ID,
|
/* Set the real user ID, effective user ID, and saved-set user ID,
|
||||||
of the calling process to RUID, EUID, and SUID, respectively. */
|
of the calling process to RUID, EUID, and SUID, respectively. */
|
||||||
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
|
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
|
||||||
__THROW;
|
__THROW __wur;
|
||||||
|
|
||||||
/* Set the real group ID, effective group ID, and saved-set group ID,
|
/* Set the real group ID, effective group ID, and saved-set group ID,
|
||||||
of the calling process to RGID, EGID, and SGID, respectively. */
|
of the calling process to RGID, EGID, and SGID, respectively. */
|
||||||
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
|
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
|
||||||
__THROW;
|
__THROW __wur;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
/* Change uid used for file access control to UID, without affecting
|
/* Change uid used for file access control to UID, without affecting
|
||||||
other privileges (such as who can send signals at the process). */
|
other privileges (such as who can send signals at the process). */
|
||||||
extern int setfsuid (__uid_t __uid) __THROW;
|
extern int setfsuid (__uid_t __uid) __THROW __wur;
|
||||||
|
|
||||||
/* Ditto for group id. */
|
/* Ditto for group id. */
|
||||||
extern int setfsgid (__gid_t __gid) __THROW;
|
extern int setfsgid (__gid_t __gid) __THROW __wur;
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user