mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
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>
This commit is contained in:
parent
fa8290e7b9
commit
e1e067f332
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user