summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/request.c2
-rw-r--r--source4/smb_server/smb_server.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index d7f3793f23..87073517dd 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -423,7 +423,7 @@ size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str,
dest = req->out.buffer + PTR_DIFF(dest, buf0);
}
- len = push_string(lp_iconv_convenience(global_loadparm), dest, str, len, flags);
+ len = push_string(lp_iconv_convenience(req->smb_conn->lp_ctx), dest, str, len, flags);
grow_size = len + PTR_DIFF(dest, req->out.data);
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 9a8a8cf5c4..4f8e628f74 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -146,7 +146,7 @@ static void smbsrv_accept(struct stream_connection *conn)
packet_set_fde(smb_conn->packet, conn->event.fde);
packet_set_serialise(smb_conn->packet);
- smb_conn->lp_ctx = global_loadparm;
+ smb_conn->lp_ctx = conn->lp_ctx;
smb_conn->connection = conn;
conn->private = smb_conn;
@@ -253,5 +253,6 @@ failed:
/* called at smbd startup - register ourselves as a server service */
NTSTATUS server_service_smb_init(void)
{
+ share_init();
return register_server_service("smb", smbsrv_task_init);
}