summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-03-26 22:33:06 +0000
committerTim Potter <tpot@samba.org>2002-03-26 22:33:06 +0000
commit42cfc17700744bda2288d7067fea34d690852bb3 (patch)
treea23469143d110641dfab4a7fa98cec9eed766f18 /source3
parent25057f7fee9f270cac509c699d53e19f3d4dcd03 (diff)
downloadsamba-42cfc17700744bda2288d7067fea34d690852bb3.tar.gz
samba-42cfc17700744bda2288d7067fea34d690852bb3.tar.bz2
samba-42cfc17700744bda2288d7067fea34d690852bb3.zip
Added code for smb messaging. winbindd now responds to the smbcontrol
ping, debug and pool-usage messages. (This used to be commit 144f0481c8b05956bdc96461a82d530fa85e3c72)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd.c17
1 files changed, 15 insertions, 2 deletions
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) {