summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-08-16 15:47:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:33 -0500
commit3cc6c5cf9934dc3b7ca48a44dd6bf46f4bb4dfed (patch)
treee623af3731a18e84a85f02329dbd7d6a944dabd8 /source3/nsswitch/winbindd_cache.c
parentedb89a813fee6c594c86a6e151477c9a76aaac31 (diff)
downloadsamba-3cc6c5cf9934dc3b7ca48a44dd6bf46f4bb4dfed.tar.gz
samba-3cc6c5cf9934dc3b7ca48a44dd6bf46f4bb4dfed.tar.bz2
samba-3cc6c5cf9934dc3b7ca48a44dd6bf46f4bb4dfed.zip
r9322: fixing debug log and ensuring that we set the right winbind_methods
pointer in get_cache() by requiring that all domain structure be initialized with the set_dc_type_and_flags(). (This used to be commit c064609b942e88c70fe0a868e52c57ad1016850c)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 730da7a9b5..c4eab0be96 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -101,6 +101,11 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
{
struct winbind_cache *ret = wcache;
+ /* we have to know what type of domain we are dealing with first */
+
+ if ( !domain->initialized )
+ set_dc_type_and_flags( domain );
+
if (!domain->backend) {
extern struct winbindd_methods reconnect_methods;
switch (lp_security()) {
@@ -365,9 +370,6 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
/* important! make sure that we know if this is a native
mode domain or not */
- if ( !domain->initialized )
- set_dc_type_and_flags( domain );
-
status = domain->backend->sequence_number(domain, &domain->sequence_number);
if (!NT_STATUS_IS_OK(status)) {