summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-25 06:42:49 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-25 06:42:49 +0000
commiteb431e0bd1b221804e83f38f6371c256428e43da (patch)
treefc81c5d40409d7bff870b10e0bd2cde0bce41c6f /kernel/sys.c
parent6bd6dbbd3ae53a268a510270bebaab24fff382ca (diff)
Merge with Linux 2.4.0-test6.
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 0f3181f70..8a4453104 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -570,12 +570,7 @@ asmlinkage long sys_setuid(uid_t uid)
if (uid != old_ruid && set_user(uid) < 0)
return -EAGAIN;
current->suid = uid;
- } else if (uid == current->uid) {
- /* Nothing - just set fsuid/euid */
- } else if (uid == current->suid) {
- if (set_user(uid) < 0)
- return -EAGAIN;
- } else
+ } else if ((uid != current->uid) && (uid != current->suid))
return -EPERM;
current->fsuid = current->euid = uid;