From 4be3f7665c6fe17b782098d74a4b02c4555269b8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 Oct 2006 02:04:57 +0000 Subject: r19105: Ok - this is currently untested (but I'm testing it at the moment) but winbindd isn't run in the build farm so hopefully won't break anything too badly - I don't want to lose this. If winbindd starts offline then it falls back to using MS-RPC backend. On going online it needs to reset the backend and try and go to using the AD backend code if possible, as the MS-RPC sequence number fetch just returns 1 as the sequence number if run against an AD DC. In addition, the winbindd async child may end up with the AD backend whilst the main winbindd - which still contacts the DC for some non-async calls, is left using MS-RPC. This can cause some trouble (as you can imagine :-). Attempt to ensure both main winbindd and async children us AD backends on going online. Jeremy. (This used to be commit 5efd4b04b89ace4b264e9ac37a90e202749792be) --- source3/nsswitch/winbindd_dual.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch/winbindd_dual.c') diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c index 976fff8ebe..72c720c985 100644 --- a/source3/nsswitch/winbindd_dual.c +++ b/source3/nsswitch/winbindd_dual.c @@ -494,6 +494,9 @@ void winbind_msg_online(int msg_type, struct process_id src, void *buf, size_t l /* Set our global state as online. */ set_global_winbindd_state_online(); + smb_nscd_flush_user_cache(); + smb_nscd_flush_group_cache(); + for (child = children; child != NULL; child = child->next) { DEBUG(10,("winbind_msg_online: sending message to pid %u.\n", (unsigned int)child->pid )); @@ -606,9 +609,6 @@ static void child_msg_online(int msg_type, struct process_id src, void *buf, siz /* Set our global state as online. */ set_global_winbindd_state_online(); - smb_nscd_flush_user_cache(); - smb_nscd_flush_group_cache(); - /* Try and mark everything online - delete any negative cache entries to force a reconnect now. */ -- cgit