From: Volker Lendecke Date: Mon, 2 Jan 2017 10:35:02 +0000 (+0000) Subject: winbind: Remove unused wb_cache_query_user X-Git-Tag: samba-4.6.0rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81f340097436280a90ba252d00f37c644a6be084;p=thirdparty%2Fsamba.git winbind: Remove unused wb_cache_query_user Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index a130b03ff17..18073809e0f 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -2372,56 +2372,6 @@ NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain, return NT_STATUS_OK; } -/* Lookup user information from a rid */ -NTSTATUS wb_cache_query_user(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - const struct dom_sid *user_sid, - struct wbint_userinfo *info) -{ - NTSTATUS status; - bool old_status; - - old_status = domain->online; - status = wcache_query_user(domain, mem_ctx, user_sid, info); - if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { - return status; - } - - ZERO_STRUCTP(info); - - /* Return status value returned by seq number check */ - - if (!NT_STATUS_IS_OK(domain->last_status)) - return domain->last_status; - - DEBUG(10,("query_user: [Cached] - doing backend query for info for domain %s\n", - domain->name )); - - status = domain->backend->query_user(domain, mem_ctx, user_sid, info); - - if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT) || - NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND)) { - if (!domain->internal && old_status) { - set_domain_offline(domain); - } - if (!domain->internal && - !domain->online && - old_status) { - NTSTATUS cache_status; - cache_status = wcache_query_user(domain, mem_ctx, user_sid, info); - return cache_status; - } - } - /* and save it */ - refresh_sequence_number(domain); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - wcache_save_user(domain, status, info); - - return status; -} - NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, const struct dom_sid *user_sid, diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 2b6f26e0315..a4e05187d32 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -90,10 +90,6 @@ NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain, char **domain_name, char ***names, enum lsa_SidType **types); -NTSTATUS wb_cache_query_user(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - const struct dom_sid *user_sid, - struct wbint_userinfo *info); NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, const struct dom_sid *user_sid,