diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-10 02:25:19 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-10 02:25:19 +0000 |
commit | 7c60ae59378be1b2af2e57ee3927966a29a797a5 (patch) | |
tree | c7ed51e51c595e58532ae9644bf91e99130c8772 /source/nsswitch/winbindd_cache.c | |
parent | 5ab2c8b8214236b4cd028f791e9ddb76a9973d74 (diff) | |
download | samba-7c60ae59378be1b2af2e57ee3927966a29a797a5.tar.gz samba-7c60ae59378be1b2af2e57ee3927966a29a797a5.tar.xz samba-7c60ae59378be1b2af2e57ee3927966a29a797a5.zip |
moved the domain sid lookup and enumeration of trusted domains into
the backends
at startup, loop until we get the domain sid for our primary domain,
trying every 10 seconds. This makes winbindd handle a room-wide power
failure better
Diffstat (limited to 'source/nsswitch/winbindd_cache.c')
-rw-r--r-- | source/nsswitch/winbindd_cache.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 912ac162b57..9f87f8377f9 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -706,6 +706,27 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq) return NT_STATUS_OK; } +/* enumerate trusted domains */ +static NTSTATUS trusted_domains(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_domains, + char ***names, + DOM_SID **dom_sids) +{ + struct winbind_cache *cache = get_cache(domain); + + return cache->backend->trusted_domains(domain, mem_ctx, num_domains, + names, dom_sids); +} + +/* find the domain sid */ +static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid) +{ + struct winbind_cache *cache = get_cache(domain); + + return cache->backend->domain_sid(domain, sid); +} + /* the ADS backend methods are exposed via this structure */ struct winbindd_methods cache_methods = { query_user_list, @@ -715,7 +736,9 @@ struct winbindd_methods cache_methods = { query_user, lookup_usergroups, lookup_groupmem, - sequence_number + sequence_number, + trusted_domains, + domain_sid }; |