diff options
author | Tim Potter <tpot@samba.org> | 2002-03-26 22:33:06 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-03-26 22:33:06 +0000 |
commit | 144f0481c8b05956bdc96461a82d530fa85e3c72 (patch) | |
tree | 285e696977162a66e296674eac833d80984d2937 | |
parent | 05f214202c02c0d585787cd21652edbbf338e50c (diff) | |
download | samba-144f0481c8b05956bdc96461a82d530fa85e3c72.tar.gz samba-144f0481c8b05956bdc96461a82d530fa85e3c72.tar.xz samba-144f0481c8b05956bdc96461a82d530fa85e3c72.zip |
Added code for smb messaging. winbindd now responds to the smbcontrol
ping, debug and pool-usage messages.
-rw-r--r-- | source/nsswitch/winbindd.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index a2313d6f736..f740f7915c7 100644 --- a/source/nsswitch/winbindd.c +++ b/source/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) { |