aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:14:05 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:19 -0500
commitae1251ab785f6da87219df8352ffdac68bba23e4 (patch)
tree8a37770a08b78f8c184764f34cf8455c894ce117
parentdbf040d9d1cbf1ef6250bdb095c5c118950bcde8 (diff)
[CVE-2009-0029] System call wrappers part 03
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--kernel/sys.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 4c33555f8d95..ace9ced598b9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -478,7 +478,7 @@ void ctrl_alt_del(void)
478 * SMP: There are not races, the GIDs are checked only by filesystem 478 * SMP: There are not races, the GIDs are checked only by filesystem
479 * operations (as far as semantic preservation is concerned). 479 * operations (as far as semantic preservation is concerned).
480 */ 480 */
481asmlinkage long sys_setregid(gid_t rgid, gid_t egid) 481SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
482{ 482{
483 const struct cred *old; 483 const struct cred *old;
484 struct cred *new; 484 struct cred *new;
@@ -529,7 +529,7 @@ error:
529 * 529 *
530 * SMP: Same implicit races as above. 530 * SMP: Same implicit races as above.
531 */ 531 */
532asmlinkage long sys_setgid(gid_t gid) 532SYSCALL_DEFINE1(setgid, gid_t, gid)
533{ 533{
534 const struct cred *old; 534 const struct cred *old;
535 struct cred *new; 535 struct cred *new;
@@ -597,7 +597,7 @@ static int set_user(struct cred *new)
597 * 100% compatible with BSD. A program which uses just setuid() will be 597 * 100% compatible with BSD. A program which uses just setuid() will be
598 * 100% compatible with POSIX with saved IDs. 598 * 100% compatible with POSIX with saved IDs.
599 */ 599 */
600asmlinkage long sys_setreuid(uid_t ruid, uid_t euid) 600SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
601{ 601{
602 const struct cred *old; 602 const struct cred *old;
603 struct cred *new; 603 struct cred *new;
@@ -661,7 +661,7 @@ error:
661 * will allow a root program to temporarily drop privileges and be able to 661 * will allow a root program to temporarily drop privileges and be able to
662 * regain them by swapping the real and effective uid. 662 * regain them by swapping the real and effective uid.
663 */ 663 */
664asmlinkage long sys_setuid(uid_t uid) 664SYSCALL_DEFINE1(setuid, uid_t, uid)
665{ 665{
666 const struct cred *old; 666 const struct cred *old;
667 struct cred *new; 667 struct cred *new;
@@ -705,7 +705,7 @@ error:
705 * This function implements a generic ability to update ruid, euid, 705 * This function implements a generic ability to update ruid, euid,
706 * and suid. This allows you to implement the 4.4 compatible seteuid(). 706 * and suid. This allows you to implement the 4.4 compatible seteuid().
707 */ 707 */
708asmlinkage long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid) 708SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
709{ 709{
710 const struct cred *old; 710 const struct cred *old;
711 struct cred *new; 711 struct cred *new;
@@ -771,7 +771,7 @@ SYSCALL_DEFINE3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __u
771/* 771/*
772 * Same as above, but for rgid, egid, sgid. 772 * Same as above, but for rgid, egid, sgid.
773 */ 773 */
774asmlinkage long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) 774SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
775{ 775{
776 const struct cred *old; 776 const struct cred *old;
777 struct cred *new; 777 struct cred *new;
@@ -833,7 +833,7 @@ SYSCALL_DEFINE3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __u
833 * whatever uid it wants to). It normally shadows "euid", except when 833 * whatever uid it wants to). It normally shadows "euid", except when
834 * explicitly set by setfsuid() or for access.. 834 * explicitly set by setfsuid() or for access..
835 */ 835 */
836asmlinkage long sys_setfsuid(uid_t uid) 836SYSCALL_DEFINE1(setfsuid, uid_t, uid)
837{ 837{
838 const struct cred *old; 838 const struct cred *old;
839 struct cred *new; 839 struct cred *new;
@@ -870,7 +870,7 @@ change_okay:
870/* 870/*
871 * Samma på svenska.. 871 * Samma på svenska..
872 */ 872 */
873asmlinkage long sys_setfsgid(gid_t gid) 873SYSCALL_DEFINE1(setfsgid, gid_t, gid)
874{ 874{
875 const struct cred *old; 875 const struct cred *old;
876 struct cred *new; 876 struct cred *new;
@@ -1311,7 +1311,7 @@ int set_current_groups(struct group_info *group_info)
1311 1311
1312EXPORT_SYMBOL(set_current_groups); 1312EXPORT_SYMBOL(set_current_groups);
1313 1313
1314asmlinkage long sys_getgroups(int gidsetsize, gid_t __user *grouplist) 1314SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist)
1315{ 1315{
1316 const struct cred *cred = current_cred(); 1316 const struct cred *cred = current_cred();
1317 int i; 1317 int i;