diff options
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r-- | source3/nsswitch/winbindd_cache.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 7538cddbdf..ceeb4988c2 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -483,9 +483,17 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force) goto done; /* important! make sure that we know if this is a native - mode domain or not */ + mode domain or not. And that we can contact it. */ + + if ( winbindd_can_contact_domain( domain ) ) { + status = domain->backend->sequence_number(domain, + &domain->sequence_number); + } else { + /* just use the current time */ + status = NT_STATUS_OK; + domain->sequence_number = time(NULL); + } - status = domain->backend->sequence_number(domain, &domain->sequence_number); /* the above call could have set our domain->backend to NULL when * coming from offline to online mode, make sure to reinitialize the @@ -2197,7 +2205,7 @@ void wcache_invalidate_cache(void) } } -static BOOL init_wcache(void) +BOOL init_wcache(void) { if (wcache == NULL) { wcache = SMB_XMALLOC_P(struct winbind_cache); |