diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sys.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 8298878f4f71..396c11cd9a20 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -609,10 +609,6 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) | |||
609 | return -ENOMEM; | 609 | return -ENOMEM; |
610 | old = current_cred(); | 610 | old = current_cred(); |
611 | 611 | ||
612 | retval = security_task_setuid(ruid, euid, (uid_t)-1, LSM_SETID_RE); | ||
613 | if (retval) | ||
614 | goto error; | ||
615 | |||
616 | retval = -EPERM; | 612 | retval = -EPERM; |
617 | if (ruid != (uid_t) -1) { | 613 | if (ruid != (uid_t) -1) { |
618 | new->uid = ruid; | 614 | new->uid = ruid; |
@@ -674,10 +670,6 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) | |||
674 | return -ENOMEM; | 670 | return -ENOMEM; |
675 | old = current_cred(); | 671 | old = current_cred(); |
676 | 672 | ||
677 | retval = security_task_setuid(uid, (uid_t)-1, (uid_t)-1, LSM_SETID_ID); | ||
678 | if (retval) | ||
679 | goto error; | ||
680 | |||
681 | retval = -EPERM; | 673 | retval = -EPERM; |
682 | if (capable(CAP_SETUID)) { | 674 | if (capable(CAP_SETUID)) { |
683 | new->suid = new->uid = uid; | 675 | new->suid = new->uid = uid; |
@@ -718,9 +710,6 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) | |||
718 | if (!new) | 710 | if (!new) |
719 | return -ENOMEM; | 711 | return -ENOMEM; |
720 | 712 | ||
721 | retval = security_task_setuid(ruid, euid, suid, LSM_SETID_RES); | ||
722 | if (retval) | ||
723 | goto error; | ||
724 | old = current_cred(); | 713 | old = current_cred(); |
725 | 714 | ||
726 | retval = -EPERM; | 715 | retval = -EPERM; |
@@ -850,9 +839,6 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) | |||
850 | old = current_cred(); | 839 | old = current_cred(); |
851 | old_fsuid = old->fsuid; | 840 | old_fsuid = old->fsuid; |
852 | 841 | ||
853 | if (security_task_setuid(uid, (uid_t)-1, (uid_t)-1, LSM_SETID_FS) < 0) | ||
854 | goto error; | ||
855 | |||
856 | if (uid == old->uid || uid == old->euid || | 842 | if (uid == old->uid || uid == old->euid || |
857 | uid == old->suid || uid == old->fsuid || | 843 | uid == old->suid || uid == old->fsuid || |
858 | capable(CAP_SETUID)) { | 844 | capable(CAP_SETUID)) { |
@@ -863,7 +849,6 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) | |||
863 | } | 849 | } |
864 | } | 850 | } |
865 | 851 | ||
866 | error: | ||
867 | abort_creds(new); | 852 | abort_creds(new); |
868 | return old_fsuid; | 853 | return old_fsuid; |
869 | 854 | ||