char ***names,
char ***alt_names,
DOM_SID **dom_sids);
-
- /* setup the list of alternate names for the domain, if any */
- NTSTATUS (*alternate_name)(struct winbindd_domain *domain);
};
/* Used to glue a policy handle and cli_state together */
return result;
}
-/* find alternate names list for the domain - for ADS this is the
- netbios name */
-static NTSTATUS alternate_name(struct winbindd_domain *domain)
-{
- ADS_STRUCT *ads;
- ADS_STATUS rc;
- TALLOC_CTX *ctx;
- const char *workgroup;
-
- DEBUG(3,("ads: alternate_name\n"));
-
- ads = ads_cached_connection(domain);
-
- if (!ads) {
- domain->last_status = NT_STATUS_SERVER_DISABLED;
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- if (!(ctx = talloc_init("alternate_name"))) {
- return NT_STATUS_NO_MEMORY;
- }
-
- rc = ads_workgroup_name(ads, ctx, &workgroup);
-
- if (ADS_ERR_OK(rc)) {
- fstrcpy(domain->name, workgroup);
- fstrcpy(domain->alt_name, ads->config.realm);
- strupper_m(domain->alt_name);
- strupper_m(domain->name);
- }
-
- talloc_destroy(ctx);
-
- return ads_ntstatus(rc);
-}
-
/* the ADS backend methods are exposed via this structure */
struct winbindd_methods ads_methods = {
True,
lookup_groupmem,
sequence_number,
trusted_domains,
- alternate_name
};
#endif
names, alt_names, dom_sids);
}
-/* find the alternate names for the domain, if any */
-static NTSTATUS alternate_name(struct winbindd_domain *domain)
-{
- get_cache(domain);
-
- DEBUG(10,("alternate_name: [Cached] - doing backend query for info for domain %s\n",
- domain->name ));
-
- /* we don't cache this call */
- return domain->backend->alternate_name(domain);
-}
-
/* Invalidate cached user and group lists coherently */
static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf,
lookup_groupmem,
sequence_number,
trusted_domains,
- alternate_name
};
static BOOL init_wcache(void)
return nt_status;
}
-/* find alternate names list for the domain
- * should we look for netbios aliases??
- SSS */
-static NTSTATUS alternate_name(struct winbindd_domain *domain)
-{
- DEBUG(3,("pdb: alternate_name\n"));
-
- return NT_STATUS_OK;
-}
-
-
/* the rpc backend methods are exposed via this structure */
struct winbindd_methods passdb_methods = {
False,
lookup_groupmem,
sequence_number,
trusted_domains,
- alternate_name
};
return result;
}
-static NTSTATUS alternate_name(struct winbindd_domain *domain)
-{
- NTSTATUS result;
-
- result = msrpc_methods.alternate_name(domain);
-
- if (NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))
- result = msrpc_methods.alternate_name(domain);
-
- return result;
-}
-
-
/* the rpc backend methods are exposed via this structure */
struct winbindd_methods reconnect_methods = {
False,
lookup_groupmem,
sequence_number,
trusted_domains,
- alternate_name
};
return result;
}
-/* find alternate names list for the domain - none for rpc */
-static NTSTATUS alternate_name(struct winbindd_domain *domain)
-{
- return NT_STATUS_OK;
-}
-
-
/* the rpc backend methods are exposed via this structure */
struct winbindd_methods msrpc_methods = {
False,
lookup_groupmem,
sequence_number,
trusted_domains,
- alternate_name
};