diff options
author | Robin Hack <hack.robin@gmail.com> | 2015-01-23 15:24:04 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-28 17:17:07 +0100 |
commit | e1e067f332ff5f4082b5dafdeecd2aa8c6a5b526 (patch) | |
tree | f349aac4dd9db89e952b929b517e88eeb8efd9ea /lib | |
parent | fa8290e7b9c3981dad94894e492991d7b9e8b3a9 (diff) | |
download | samba-e1e067f332ff5f4082b5dafdeecd2aa8c6a5b526.tar.gz samba-e1e067f332ff5f4082b5dafdeecd2aa8c6a5b526.tar.xz samba-e1e067f332ff5f4082b5dafdeecd2aa8c6a5b526.zip |
uwrap: Small uwrap_init optimalization.
Don't call libc_getuid/getgid function twice.
Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uid_wrapper/uid_wrapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c index 97e10267b5..9b35a1810f 100644 --- a/lib/uid_wrapper/uid_wrapper.c +++ b/lib/uid_wrapper/uid_wrapper.c @@ -640,8 +640,8 @@ static void uwrap_init(void) uwrap.ruid = uwrap.euid = uwrap.suid = 0; uwrap.rgid = uwrap.egid = uwrap.sgid = 0; } else { - uwrap.ruid = uwrap.euid = uwrap.suid = libc_geteuid(); - uwrap.rgid = uwrap.egid = uwrap.sgid = libc_getegid(); + uwrap.ruid = uwrap.euid = uwrap.suid = uwrap.myuid; + uwrap.rgid = uwrap.egid = uwrap.sgid = uwrap.mygid; } rc = uwrap_new_id(tid, true); |