aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-07 21:51:01 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-05-03 06:28:41 -0400
commita29c33f4e506e1dae7e0985b6328046535becbf8 (patch)
tree529720b8aefaf115b4be197e5d7628657cf5b4bc /kernel/timer.c
parent18815a18085364d8514c0d0c4c986776cb74272c (diff)
userns: Convert setting and getting uid and gid system calls to use kuid and kgid
Convert setregid, setgid, setreuid, setuid, setresuid, getresuid, setresgid, getresgid, setfsuid, setfsgid, getuid, geteuid, getgid, getegid, waitpid, waitid, wait4. Convert userspace uids and gids into kuids and kgids before being placed on struct cred. Convert struct cred kuids and kgids into userspace uids and gids when returning them. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index a297ffcf888..67316cb6a77 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1427,25 +1427,25 @@ SYSCALL_DEFINE0(getppid)
1427SYSCALL_DEFINE0(getuid) 1427SYSCALL_DEFINE0(getuid)
1428{ 1428{
1429 /* Only we change this so SMP safe */ 1429 /* Only we change this so SMP safe */
1430 return current_uid(); 1430 return from_kuid_munged(current_user_ns(), current_uid());
1431} 1431}
1432 1432
1433SYSCALL_DEFINE0(geteuid) 1433SYSCALL_DEFINE0(geteuid)
1434{ 1434{
1435 /* Only we change this so SMP safe */ 1435 /* Only we change this so SMP safe */
1436 return current_euid(); 1436 return from_kuid_munged(current_user_ns(), current_euid());
1437} 1437}
1438 1438
1439SYSCALL_DEFINE0(getgid) 1439SYSCALL_DEFINE0(getgid)
1440{ 1440{
1441 /* Only we change this so SMP safe */ 1441 /* Only we change this so SMP safe */
1442 return current_gid(); 1442 return from_kgid_munged(current_user_ns(), current_gid());
1443} 1443}
1444 1444
1445SYSCALL_DEFINE0(getegid) 1445SYSCALL_DEFINE0(getegid)
1446{ 1446{
1447 /* Only we change this so SMP safe */ 1447 /* Only we change this so SMP safe */
1448 return current_egid(); 1448 return from_kgid_munged(current_user_ns(), current_egid());
1449} 1449}
1450 1450
1451#endif 1451#endif