summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-06 21:34:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:50 -0500
commit78c27bb77000d6f97938e633e7be936c0de92636 (patch)
treef64a9e8874b083c5fae6b458e7bacf9c4491a78a /source3
parent189b694ee938953cd52448db7f7e101d5b6a2546 (diff)
downloadsamba-78c27bb77000d6f97938e633e7be936c0de92636.tar.gz
samba-78c27bb77000d6f97938e633e7be936c0de92636.tar.bz2
samba-78c27bb77000d6f97938e633e7be936c0de92636.zip
r22725: * Don't try to update the sequence_number when offline
* Log the NTSTATUS when saving name/sid cache entry * Allow the backend loolkup_usergroups() call in winbindd_{rpc,ads}.c to inform the wcache manager that the group list should not be cached (needed for one-way trusts). (This used to be commit 693ab48408dbb775b57dcc5140e27ad9221852a1)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_cache.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index ceeb4988c2..5bb98b17da 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -458,6 +458,10 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
time_t t = time(NULL);
unsigned cache_time = lp_winbind_cache_time();
+ if ( IS_DOMAIN_OFFLINE(domain) ) {
+ return;
+ }
+
get_cache( domain );
#if 0 /* JERRY -- disable as the default cache time is now 5 minutes */
@@ -829,8 +833,8 @@ static void wcache_save_name_to_sid(struct winbindd_domain *domain,
fstrcpy(uname, name);
strupper_m(uname);
centry_end(centry, "NS/%s/%s", domain_name, uname);
- DEBUG(10,("wcache_save_name_to_sid: %s\\%s -> %s\n", domain_name, uname,
- sid_string_static(sid)));
+ DEBUG(10,("wcache_save_name_to_sid: %s\\%s -> %s (%s)\n", domain_name, uname,
+ sid_string_static(sid), nt_errstr(status)));
centry_free(centry);
}
@@ -853,7 +857,8 @@ static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS sta
centry_put_string(centry, name);
}
centry_end(centry, "SN/%s", sid_to_string(sid_string, sid));
- DEBUG(10,("wcache_save_sid_to_name: %s -> %s\n", sid_string, name));
+ DEBUG(10,("wcache_save_sid_to_name: %s -> %s (%s)\n", sid_string,
+ name, nt_errstr(status)));
centry_free(centry);
}
@@ -1748,6 +1753,9 @@ do_query:
status = domain->backend->lookup_usergroups(domain, mem_ctx, user_sid, num_groups, user_gids);
+ if ( NT_STATUS_EQUAL(status, NT_STATUS_SYNCHRONIZATION_REQUIRED) )
+ goto skip_save;
+
/* and save it */
refresh_sequence_number(domain, False);
centry = centry_start(domain, status);