aboutsummaryrefslogtreecommitdiff
path: root/uid.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2015-12-27 00:18:03 +0000
committerDmitry V. Levin <ldv@altlinux.org>2015-12-27 00:18:03 +0000
commitabfa939f57247c9eaa1e8ab2f110495819a51617 (patch)
treea000839b61b5292fbd30a1bdcc630156af9010c1 /uid.c
parent727508b0776278e9239f50d65ea3bb849e4e7803 (diff)
downloadstrace-abfa939f57247c9eaa1e8ab2f110495819a51617.tar.gz
Do not truncate return value of get{,e}[ug]id and setfs[ug]id syscalls
This should not be a user visible change unless the kernel does something completely unexpected. In the latter case, let user see what is going on. * uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED.
Diffstat (limited to 'uid.c')
-rw-r--r--uid.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/uid.c b/uid.c
index ef55070e9..c87239249 100644
--- a/uid.c
+++ b/uid.c
@@ -70,18 +70,15 @@
SYS_FUNC(getuid)
{
- if (exiting(tcp))
- tcp->u_rval = (uid_t) tcp->u_rval;
- return RVAL_UDECIMAL;
+ return RVAL_UDECIMAL | RVAL_DECODED;
}
SYS_FUNC(setfsuid)
{
if (entering(tcp))
tprintf("%u", (uid_t) tcp->u_arg[0]);
- else
- tcp->u_rval = (uid_t) tcp->u_rval;
- return RVAL_UDECIMAL;
+
+ return RVAL_UDECIMAL | RVAL_DECODED;
}
SYS_FUNC(setuid)