From 42cfc17700744bda2288d7067fea34d690852bb3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 26 Mar 2002 22:33:06 +0000 Subject: Added code for smb messaging. winbindd now responds to the smbcontrol ping, debug and pool-usage messages. (This used to be commit 144f0481c8b05956bdc96461a82d530fa85e3c72) --- source3/nsswitch/winbindd.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index a2313d6f73..f740f7915c 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -506,6 +506,10 @@ static void process_loop(int accept_sock) int maxfd = accept_sock, selret; struct timeval timeout; + /* Handle messages */ + + message_dispatch(); + /* Free up temporary memory */ lp_talloc_free(); @@ -670,8 +674,9 @@ int main(int argc, char **argv) int opt; /* glibc (?) likes to print "User defined signal 1" and exit if a - SIGUSR2 is received before a handler is installed */ + SIGUSR[12] is received before a handler is installed */ + CatchSignal(SIGUSR1, SIG_IGN); CatchSignal(SIGUSR2, SIG_IGN); fault_setup((void (*)(void *))fault_quit ); @@ -805,11 +810,19 @@ int main(int argc, char **argv) CatchSignal(SIGTERM, termination_handler); CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */ - CatchSignal(SIGUSR1, SIG_IGN); /* Samba messages */ CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */ CatchSignal(SIGHUP, sighup_handler); + /* Initialise messaging system */ + + if (!message_init()) { + DEBUG(0, ("unable to initialise messaging system\n")); + exit(1); + } + + register_msg_pool_usage(); + /* Create UNIX domain socket */ if ((accept_sock = create_sock()) == -1) { -- cgit