summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-02 22:32:11 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:15 +0100
commit6c999cd12344f2bb8b1d2941210b4c205b3e0aad (patch)
tree0911e4ca75694e080173c2863e2c41ff5881309c /source4/smb_server
parent934e932387ea5668ec000bcefe4ec86935297339 (diff)
downloadsamba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.tar.gz
samba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.tar.bz2
samba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.zip
r26236: Remove more uses of global_loadparm or specify loadparm_context explicitly.
(This used to be commit 5b29ef7c03d9ae76b0ca909e9f03a58e1bad3521)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/receive.c8
-rw-r--r--source4/smb_server/smb_server.c4
-rw-r--r--source4/smb_server/smb_server.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/source4/smb_server/smb/receive.c b/source4/smb_server/smb/receive.c
index 973b6b993e..3f590decca 100644
--- a/source4/smb_server/smb/receive.c
+++ b/source4/smb_server/smb/receive.c
@@ -643,7 +643,7 @@ error:
/*
* init the SMB protocol related stuff
*/
-NTSTATUS smbsrv_init_smb_connection(struct smbsrv_connection *smb_conn)
+NTSTATUS smbsrv_init_smb_connection(struct smbsrv_connection *smb_conn, struct loadparm_context *lp_ctx)
{
NTSTATUS status;
@@ -652,12 +652,12 @@ NTSTATUS smbsrv_init_smb_connection(struct smbsrv_connection *smb_conn)
/* this is the size that w2k uses, and it appears to be important for
good performance */
- smb_conn->negotiate.max_recv = lp_max_xmit(global_loadparm);
+ smb_conn->negotiate.max_recv = lp_max_xmit(lp_ctx);
smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
- smb_conn->config.security = lp_security(global_loadparm);
- smb_conn->config.nt_status_support = lp_nt_status_support(global_loadparm);
+ smb_conn->config.security = lp_security(lp_ctx);
+ smb_conn->config.nt_status_support = lp_nt_status_support(lp_ctx);
status = smbsrv_init_sessions(smb_conn, UINT16_MAX);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 9242fb1a12..923c1bdfe5 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -42,7 +42,7 @@ static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
/* see if its a special NBT packet */
if (CVAL(blob.data,0) != 0) {
- status = smbsrv_init_smb_connection(smb_conn);
+ status = smbsrv_init_smb_connection(smb_conn, global_loadparm);
NT_STATUS_NOT_OK_RETURN(status);
packet_set_callback(smb_conn->packet, smbsrv_recv_smb_request);
return smbsrv_recv_smb_request(smb_conn, blob);
@@ -58,7 +58,7 @@ static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
switch (protocol_version) {
case SMB_MAGIC:
- status = smbsrv_init_smb_connection(smb_conn);
+ status = smbsrv_init_smb_connection(smb_conn, global_loadparm);
NT_STATUS_NOT_OK_RETURN(status);
packet_set_callback(smb_conn->packet, smbsrv_recv_smb_request);
return smbsrv_recv_smb_request(smb_conn, blob);
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 8ebd3e683f..4af6ef1362 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -382,6 +382,8 @@ NTSTATUS smbsrv_add_socket(struct event_context *event_context,
const struct model_ops *model_ops,
const char *address);
+struct loadparm_context;
+
#include "smb_server/smb_server_proto.h"
#include "smb_server/smb/smb_proto.h"