From d33c41fbf5bd48fe32d82174d8bd25d1651ee374 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 13 May 2010 17:07:15 +1000 Subject: s3:winbindd move reinit_after_fork() back out of winbindd_register_handlers This particular init function needs to be done in a native Samba3 build, but it turns out to be difficult for s3compat, which has other code listening on the sockets. Andrew Bartlett --- source3/winbindd/winbindd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 1cb4e21659..fcd3145931 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1022,18 +1022,6 @@ bool winbindd_use_cache(void) void winbindd_register_handlers(void) { struct tevent_timer *te; - /* Don't use winbindd_reinit_after_fork here as - * we're just starting up and haven't created any - * winbindd-specific resources we must free yet. JRA. - */ - - if (!NT_STATUS_IS_OK(reinit_after_fork(winbind_messaging_context(), - winbind_event_context(), - false))) { - DEBUG(0,("reinit_after_fork() failed\n")); - exit(1); - } - /* Setup signal handlers */ if (!winbindd_setup_sig_term_handler(true)) @@ -1298,6 +1286,18 @@ int main(int argc, char **argv, char **envp) TimeInit(); + /* Don't use winbindd_reinit_after_fork here as + * we're just starting up and haven't created any + * winbindd-specific resources we must free yet. JRA. + */ + + if (!NT_STATUS_IS_OK(reinit_after_fork(winbind_messaging_context(), + winbind_event_context(), + false))) { + DEBUG(0,("reinit_after_fork() failed\n")); + exit(1); + } + winbindd_register_handlers(); /* setup listen sockets */ -- cgit