winbind: Remove wcache_lookup_usergroups
authorVolker Lendecke <vl@samba.org>
Tue, 3 Jan 2017 15:12:35 +0000 (15:12 +0000)
committerVolker Lendecke <vl@samba.org>
Wed, 4 Jan 2017 11:22:12 +0000 (12:22 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_cache.c
source3/winbindd/winbindd_proto.h

index 6d30b45ed854dd4c67a5b89b66561e8f99acb38d..f5f7dc1085b4f937d9e635bde9d9271bcbb891e7 100644 (file)
@@ -2372,65 +2372,6 @@ NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
        return NT_STATUS_OK;
 }
 
-NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
-                                 TALLOC_CTX *mem_ctx,
-                                 const struct dom_sid *user_sid,
-                                 uint32_t *pnum_sids,
-                                 struct dom_sid **psids)
-{
-       struct winbind_cache *cache = get_cache(domain);
-       struct cache_entry *centry = NULL;
-       NTSTATUS status;
-       uint32_t i, num_sids;
-       struct dom_sid *sids;
-       fstring sid_string;
-
-       if (cache->tdb == NULL) {
-               return NT_STATUS_NOT_FOUND;
-       }
-
-       centry = wcache_fetch(cache, domain, "UG/%s",
-                             sid_to_fstring(sid_string, user_sid));
-       if (centry == NULL) {
-               return NT_STATUS_NOT_FOUND;
-       }
-
-       /* If we have an access denied cache entry and a cached info3 in the
-           samlogon cache then do a query.  This will force the rpc back end
-           to return the info3 data. */
-
-       if (NT_STATUS_EQUAL(domain->last_status, NT_STATUS_ACCESS_DENIED)
-           && netsamlogon_cache_have(user_sid)) {
-               DEBUG(10, ("lookup_usergroups: cached access denied and have "
-                          "cached info3\n"));
-               domain->last_status = NT_STATUS_OK;
-               centry_free(centry);
-               return NT_STATUS_NOT_FOUND;
-       }
-
-       num_sids = centry_uint32(centry);
-       sids = talloc_array(mem_ctx, struct dom_sid, num_sids);
-       if (sids == NULL) {
-               centry_free(centry);
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       for (i=0; i<num_sids; i++) {
-               centry_sid(centry, &sids[i]);
-       }
-
-       status = centry->status;
-
-       DEBUG(10,("lookup_usergroups: [Cached] - cached info for domain %s "
-                 "status: %s\n", domain->name, nt_errstr(status)));
-
-       centry_free(centry);
-
-       *pnum_sids = num_sids;
-       *psids = sids;
-       return status;
-}
-
 static char *wcache_make_sidlist(TALLOC_CTX *mem_ctx, uint32_t num_sids,
                                 const struct dom_sid *sids)
 {
index e4d1aff83386e021254fcef633bbb85497e39777..77bab4a1a902aa31c6e5cd713d9a81a3ec5193cd 100644 (file)
@@ -170,11 +170,6 @@ NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
                                   TALLOC_CTX *mem_ctx,
                                   uint32_t num_sids, const struct dom_sid *sids,
                                   uint32_t *pnum_aliases, uint32_t **paliases);
-NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
-                                 TALLOC_CTX *mem_ctx,
-                                 const struct dom_sid *user_sid,
-                                 uint32_t *pnum_sids,
-                                 struct dom_sid **psids);
 
 void wcache_flush_cache(void);
 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);