diff options
author | Volker Lendecke <vl@samba.org> | 2010-07-04 16:28:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-07-04 17:29:23 +0200 |
commit | 7f0e6df88345c1154f19fd263966ad20c73f5d52 (patch) | |
tree | 683ecaec64b2ed779300d038a9e70bdc7dbf8f63 /source3/nmbd | |
parent | 5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8 (diff) | |
download | samba-7f0e6df88345c1154f19fd263966ad20c73f5d52.tar.gz |
s3: Pass the new server_id through reinit_after_fork
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/asyncdns.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c index 21ac5a0ff4..2701c96dd7 100644 --- a/source3/nmbd/asyncdns.c +++ b/source3/nmbd/asyncdns.c @@ -137,6 +137,7 @@ void kill_async_dns_child(void) void start_async_dns(void) { int fd1[2], fd2[2]; + NTSTATUS status; CatchChild(); @@ -164,8 +165,11 @@ void start_async_dns(void) CatchSignal(SIGHUP, SIG_IGN); CatchSignal(SIGTERM, sig_term); - if (!NT_STATUS_IS_OK(reinit_after_fork(nmbd_messaging_context(), - nmbd_event_context(), true))) { + status = reinit_after_fork(nmbd_messaging_context(), + nmbd_event_context(), + procid_self(), true); + + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("reinit_after_fork() failed\n")); smb_panic("reinit_after_fork() failed"); } diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index d13607b1f5..dd42675cc6 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -779,6 +779,7 @@ static bool open_sockets(bool isdaemon, int port) { NULL } }; TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */ + NTSTATUS status; load_case_tables(); @@ -923,8 +924,11 @@ static bool open_sockets(bool isdaemon, int port) pidfile_create("nmbd"); - if (!NT_STATUS_IS_OK(reinit_after_fork(nmbd_messaging_context(), - nmbd_event_context(), false))) { + status = reinit_after_fork(nmbd_messaging_context(), + nmbd_event_context(), + procid_self(), false); + + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("reinit_after_fork() failed\n")); exit(1); } |