1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

s3:util_sec: fix the build on non-linux platforms

This fixes a regression introduced by
"util_sec.c: Move __thread variable to global scope"
(5a80f399b51221fb0b8661f30d940ca24e1ce627).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2019-11-06 08:47:31 +01:00 committed by Andreas Schneider
parent fe78216b1c
commit 1c0eed6ba7

View File

@ -444,17 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid)
assert_gid(gid, gid);
}
#ifdef HAVE___THREAD
struct cache_t {
#if defined(HAVE_LINUX_THREAD_CREDENTIALS) && defined(HAVE___THREAD)
struct set_thread_credentials_cache {
bool active;
uid_t uid;
gid_t gid;
size_t setlen;
uintptr_t gidset;
};
static __thread struct cache_t cache;
static __thread struct set_thread_credentials_cache cache;
#endif
/**********************************************************
Function to set thread specific credentials. Leave
saved-set uid/gid alone.Must be thread-safe code.