* NSS user functions
*/
-static struct winbindd_response getpwent_response;
+static __thread struct winbindd_response getpwent_response;
-static int ndx_pw_cache; /* Current index into pwd cache */
-static int num_pw_cache; /* Current size of pwd cache */
+static __thread int ndx_pw_cache; /* Current index into pwd cache */
+static __thread int num_pw_cache; /* Current size of pwd cache */
/* Rewind "file pointer" to start of ntdom password database */
{
NSS_STATUS ret;
struct winbindd_request request;
- static int called_again;
+ static __thread int called_again;
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getpwent\n", getpid());
size_t buflen, int *errnop)
{
NSS_STATUS ret;
- static struct winbindd_response response;
+ static __thread struct winbindd_response response;
struct winbindd_request request;
- static int keep_response;
+ static __thread int keep_response;
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getpwuid_r %d\n", getpid(), (unsigned int)uid);
size_t buflen, int *errnop)
{
NSS_STATUS ret;
- static struct winbindd_response response;
+ static __thread struct winbindd_response response;
struct winbindd_request request;
- static int keep_response;
+ static __thread int keep_response;
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getpwnam_r %s\n", getpid(), name);
* NSS group functions
*/
-static struct winbindd_response getgrent_response;
+static __thread struct winbindd_response getgrent_response;
-static int ndx_gr_cache; /* Current index into grp cache */
-static int num_gr_cache; /* Current size of grp cache */
+static __thread int ndx_gr_cache; /* Current index into grp cache */
+static __thread int num_gr_cache; /* Current size of grp cache */
/* Rewind "file pointer" to start of ntdom group database */
char *buffer, size_t buflen, int *errnop)
{
NSS_STATUS ret;
- static struct winbindd_request request;
- static int called_again;
+ static __thread struct winbindd_request request;
+ static __thread int called_again;
#ifdef DEBUG_NSS
size_t buflen, int *errnop)
{
NSS_STATUS ret;
- static struct winbindd_response response;
+ static __thread struct winbindd_response response;
struct winbindd_request request;
- static int keep_response;
+ static __thread int keep_response;
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getgrnam %s\n", getpid(), name);
size_t buflen, int *errnop)
{
NSS_STATUS ret;
- static struct winbindd_response response;
+ static __thread struct winbindd_response response;
struct winbindd_request request;
- static int keep_response;
+ static __thread int keep_response;
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getgrgid %d\n", getpid(), gid);