From a062e58d9e47f95ac7c66668b3cfe1f72386f6e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Dec 2001 08:44:23 +0000 Subject: - added initial support for trusted domains in winbindd_ads - gss error code patch from a.bokovoy@sam-solutions.net - better sid dumping in ads_dump - fixed help in wbinfo (This used to be commit ee1c3e1f044b4ef62169ad74c5cac40eef81bfda) --- source3/nsswitch/winbindd_cache.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'source3/nsswitch/winbindd_cache.c') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 32f9f0d69f..847ec9e541 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -462,8 +462,10 @@ do_cached: return status; do_query: + *num_entries = 0; + *info = NULL; + if (wcache_server_down(domain)) { - *num_entries = 0; return NT_STATUS_SERVER_DISABLED; } @@ -533,8 +535,10 @@ do_cached: return status; do_query: + *num_entries = 0; + *info = NULL; + if (wcache_server_down(domain)) { - *num_entries = 0; return NT_STATUS_SERVER_DISABLED; } @@ -580,6 +584,8 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, return status; do_query: + ZERO_STRUCTP(sid); + if (wcache_server_down(domain)) { return NT_STATUS_SERVER_DISABLED; } @@ -619,6 +625,8 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain, return status; do_query: + *name = NULL; + if (wcache_server_down(domain)) { return NT_STATUS_SERVER_DISABLED; } @@ -656,9 +664,12 @@ static NTSTATUS query_user(struct winbindd_domain *domain, return status; do_query: + ZERO_STRUCTP(info); + if (wcache_server_down(domain)) { return NT_STATUS_SERVER_DISABLED; } + status = cache->backend->query_user(domain, mem_ctx, user_rid, info); /* and save it */ @@ -701,8 +712,10 @@ do_cached: return status; do_query: + (*num_groups) = 0; + (*user_gids) = NULL; + if (wcache_server_down(domain)) { - (*num_groups) = 0; return NT_STATUS_SERVER_DISABLED; } status = cache->backend->lookup_usergroups(domain, mem_ctx, user_rid, num_groups, user_gids); @@ -763,8 +776,13 @@ do_cached: return status; do_query: + (*num_names) = 0; + (*rid_mem) = NULL; + (*names) = NULL; + (*name_types) = NULL; + + if (wcache_server_down(domain)) { - (*num_names) = 0; return NT_STATUS_SERVER_DISABLED; } status = cache->backend->lookup_groupmem(domain, mem_ctx, group_rid, num_names, -- cgit