summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-07-04 16:28:13 +0200
committerVolker Lendecke <vl@samba.org>2010-07-04 17:29:23 +0200
commit7f0e6df88345c1154f19fd263966ad20c73f5d52 (patch)
tree683ecaec64b2ed779300d038a9e70bdc7dbf8f63 /source3/smbd
parent5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8 (diff)
downloadsamba-7f0e6df88345c1154f19fd263966ad20c73f5d52.tar.gz
samba-7f0e6df88345c1154f19fd263966ad20c73f5d52.tar.bz2
samba-7f0e6df88345c1154f19fd263966ad20c73f5d52.zip
s3: Pass the new server_id through reinit_after_fork
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c3
-rw-r--r--source3/smbd/server.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 8c2060df1a..b0bae927b9 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2807,7 +2807,8 @@ static bool fork_echo_handler(struct smbd_server_connection *sconn)
close(listener_pipe[0]);
status = reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), false);
+ smbd_event_context(),
+ procid_self(), false);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("reinit_after_fork failed: %s\n",
nt_errstr(status)));
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a1250790ce..f30d761865 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -409,7 +409,8 @@ static void smbd_accept_connection(struct tevent_context *ev,
s = NULL;
status = reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), true);
+ smbd_event_context(), procid_self(),
+ true);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,
NT_STATUS_TOO_MANY_OPENED_FILES)) {
@@ -806,6 +807,7 @@ extern void build_options(bool screen);
};
struct smbd_parent_context *parent = NULL;
TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
+ NTSTATUS status;
smbd_init_globals();
@@ -998,8 +1000,10 @@ extern void build_options(bool screen);
if (is_daemon)
pidfile_create("smbd");
- if (!NT_STATUS_IS_OK(reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), false))) {
+ status = reinit_after_fork(smbd_messaging_context(),
+ smbd_event_context(),
+ procid_self(), false);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("reinit_after_fork() failed\n"));
exit(1);
}