s3:util_sec: add a cache to set_thread_credentials()
authorStefan Metzmacher <metze@samba.org>
Thu, 3 May 2018 14:08:06 +0000 (16:08 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 24 Jul 2018 18:35:17 +0000 (20:35 +0200)
commit10fc65b74d7b94e0e6454c704b63c138d1d54bd1
tree7eac4a41a8440aa45f14d52aea5716bf81550b76
parent0d2eeb9422bf3fb3097637c63d9e7c8bd20417af
s3:util_sec: add a cache to set_thread_credentials()

Calling set_thread_credentials() with the same values,
skips syscalls the 2nd time.

We only do this if '__thread' is supported to provide
thread local storage.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jul 24 20:35:17 CEST 2018 on sn-devel-144
source3/lib/util_sec.c