summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.h7
-rw-r--r--source3/winbindd/winbindd_cache.c11
2 files changed, 8 insertions, 10 deletions
diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h
index d8e6ec4c7f..5ebbb72cf5 100644
--- a/source3/winbindd/winbindd.h
+++ b/source3/winbindd/winbindd.h
@@ -333,13 +333,6 @@ struct winbindd_methods {
DOM_SID **dom_sids);
};
-/* Used to glue a policy handle and cli_state together */
-
-typedef struct {
- struct cli_state *cli;
- POLICY_HND pol;
-} CLI_POLICY_HND;
-
/* Filled out by IDMAP backends */
struct winbindd_idmap_methods {
/* Called when backend is first loaded */
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 1ae7966bc3..863852e837 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -486,7 +486,9 @@ static void refresh_sequence_number(struct winbindd_domain *domain, bool force)
time_diff = t - domain->last_seq_check;
/* see if we have to refetch the domain sequence number */
- if (!force && (time_diff < cache_time)) {
+ if (!force && (time_diff < cache_time) &&
+ (domain->sequence_number != DOM_SEQUENCE_NONE) &&
+ NT_STATUS_IS_OK(domain->last_status)) {
DEBUG(10, ("refresh_sequence_number: %s time ok\n", domain->name));
goto done;
}
@@ -495,8 +497,11 @@ static void refresh_sequence_number(struct winbindd_domain *domain, bool force)
/* this will update the timestamp as well */
status = fetch_cache_seqnum( domain, t );
- if ( NT_STATUS_IS_OK(status) )
- goto done;
+ if (NT_STATUS_IS_OK(status) &&
+ (domain->sequence_number != DOM_SEQUENCE_NONE) &&
+ NT_STATUS_IS_OK(domain->last_status)) {
+ goto done;
+ }
/* important! make sure that we know if this is a native
mode domain or not. And that we can contact it. */