winbindd: Remove now unused cache_methods
authorChristof Schmitt <cs@samba.org>
Fri, 7 Oct 2016 23:44:11 +0000 (16:44 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 11 Oct 2016 21:59:17 +0000 (23:59 +0200)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 11 23:59:18 CEST 2016 on sn-devel-144

source3/winbindd/winbindd_cache.c
source3/winbindd/winbindd_ndr.c
source3/winbindd/winbindd_util.c

index dd0cbf11672009af91a132f777cc0a09690643a5..c52e9edbf3f5506d47dde0cd5a72816c3d9a4fd8 100644 (file)
@@ -4978,25 +4978,6 @@ do_query:
 
 #endif
 
-/* the cache backend methods are exposed via this structure */
-struct winbindd_methods cache_methods = {
-       true,
-       wb_cache_query_user_list,
-       wb_cache_enum_dom_groups,
-       wb_cache_enum_local_groups,
-       wb_cache_name_to_sid,
-       wb_cache_sid_to_name,
-       wb_cache_rids_to_names,
-       wb_cache_query_user,
-       wb_cache_lookup_usergroups,
-       wb_cache_lookup_useraliases,
-       wb_cache_lookup_groupmem,
-       wb_cache_sequence_number,
-       wb_cache_lockout_policy,
-       wb_cache_password_policy,
-       wb_cache_trusted_domains
-};
-
 static bool wcache_ndr_key(TALLOC_CTX *mem_ctx, const char *domain_name,
                           uint32_t opnum, const DATA_BLOB *req,
                           TDB_DATA *pkey)
index 028eb50a10b147eeb5f0ca5df92f4a1e80216c72..383de4e811679ab88ff33923f52f174774d7a258 100644 (file)
@@ -81,7 +81,6 @@ extern struct winbindd_methods msrpc_methods;
 extern struct winbindd_methods builtin_passdb_methods;
 extern struct winbindd_methods sam_passdb_methods;
 extern struct winbindd_methods reconnect_methods;
-extern struct winbindd_methods cache_methods;
 
 void ndr_print_winbindd_methods(struct ndr_print *ndr,
                                const char *name,
@@ -110,8 +109,6 @@ void ndr_print_winbindd_methods(struct ndr_print *ndr,
                ndr_print_string(ndr, name, "sam_passdb_methods");
        } else if (r == &reconnect_methods) {
                ndr_print_string(ndr, name, "reconnect_methods");
-       } else if (r == &cache_methods) {
-               ndr_print_string(ndr, name, "cache_methods");
        } else {
                ndr_print_string(ndr, name, "UNKNOWN");
        }
index 2d1b03e94fca25c7188cabe8639e5cdd48ddfff8..217c049874264601573a7788786821f32dfcd7f9 100644 (file)
 #define DBGC_CLASS DBGC_WINBIND
 
 static struct winbindd_domain *
-add_trusted_domain_from_tdc(const struct winbindd_tdc_domain *tdc,
-                           struct winbindd_methods *methods);
-
-extern struct winbindd_methods cache_methods;
+add_trusted_domain_from_tdc(const struct winbindd_tdc_domain *tdc);
 
 /**
  * @file winbindd_util.c
@@ -125,7 +122,7 @@ static bool is_in_internal_domain(const struct dom_sid *sid)
 
 static struct winbindd_domain *
 add_trusted_domain(const char *domain_name, const char *alt_name,
-                  struct winbindd_methods *methods, const struct dom_sid *sid)
+                  const struct dom_sid *sid)
 {
        struct winbindd_tdc_domain tdc;
 
@@ -137,15 +134,14 @@ add_trusted_domain(const char *domain_name, const char *alt_name,
                sid_copy(&tdc.sid, sid);
        }
 
-       return add_trusted_domain_from_tdc(&tdc, methods);
+       return add_trusted_domain_from_tdc(&tdc);
 }
 
 /* Add a trusted domain out of a trusted domain cache
    entry
 */
 static struct winbindd_domain *
-add_trusted_domain_from_tdc(const struct winbindd_tdc_domain *tdc,
-                           struct winbindd_methods *methods)
+add_trusted_domain_from_tdc(const struct winbindd_tdc_domain *tdc)
 {
        struct winbindd_domain *domain;
        const char *alternative_name = NULL;
@@ -435,8 +431,7 @@ static void trustdom_list_done(struct tevent_req *req)
                 * This is important because we need the SID for sibling
                 * domains.
                 */
-               (void)add_trusted_domain_from_tdc(&trust_params,
-                                                 &cache_methods);
+               (void)add_trusted_domain_from_tdc(&trust_params);
 
                p = q + strlen(q) + 1;
        }
@@ -505,8 +500,7 @@ static void rescan_forest_root_trusts( void )
                d = find_domain_from_name_noinit( dom_list[i].domain_name );
 
                if ( !d ) {
-                       d = add_trusted_domain_from_tdc(&dom_list[i],
-                                                       &cache_methods);
+                       d = add_trusted_domain_from_tdc(&dom_list[i]);
                }
 
                if (d == NULL) {
@@ -572,8 +566,7 @@ static void rescan_forest_trusts( void )
                           about it */
 
                        if ( !d ) {
-                               d = add_trusted_domain_from_tdc(&dom_list[i],
-                                                               &cache_methods);
+                               d = add_trusted_domain_from_tdc(&dom_list[i]);
                        }
 
                        if (d == NULL) {
@@ -700,7 +693,6 @@ static void wb_imsg_new_trusted_domain(struct imessaging_context *msg,
 
        d = add_trusted_domain(info.netbios_name.string,
                               info.domain_name.string,
-                              &cache_methods,
                               info.sid);
        if (d == NULL) {
                TALLOC_FREE(frame);
@@ -786,8 +778,7 @@ bool init_domain_list(void)
 
        /* BUILTIN domain */
 
-       (void)add_trusted_domain("BUILTIN", NULL, &cache_methods,
-                                   &global_sid_Builtin);
+       (void)add_trusted_domain("BUILTIN", NULL, &global_sid_Builtin);
 
        /* Local SAM */
 
@@ -807,7 +798,6 @@ bool init_domain_list(void)
                }
                domain = add_trusted_domain(pdb_domain_info->name,
                                        pdb_domain_info->dns_domain,
-                                       &cache_methods,
                                        &pdb_domain_info->sid);
                TALLOC_FREE(pdb_domain_info);
                if (domain == NULL) {
@@ -857,7 +847,7 @@ bool init_domain_list(void)
 
        } else {
                (void)add_trusted_domain(get_global_sam_name(), NULL,
-                                        &cache_methods, get_global_sam_sid());
+                                        get_global_sam_sid());
        }
        /* Add ourselves as the first entry. */
 
@@ -870,8 +860,8 @@ bool init_domain_list(void)
                        return False;
                }
 
-               domain = add_trusted_domain( lp_workgroup(), lp_realm(),
-                                            &cache_methods, &our_sid);
+               domain = add_trusted_domain(lp_workgroup(), lp_realm(),
+                                           &our_sid);
                if (domain) {
                        /* Even in the parent winbindd we'll need to
                           talk to the DC, so try and see if we can