summaryrefslogtreecommitdiff
path: root/source3/smbd/negprot.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-15 14:45:56 +0100
committerStefan Metzmacher <metze@samba.org>2012-05-12 01:01:34 +0200
commitb3235d483da924a41ca9cecf72e1c62bab7fedd5 (patch)
tree9d34739a9e01e7d9176613a71ce68727e1ecf79d /source3/smbd/negprot.c
parentc8a3c0e0f793c622e071953b25a70a3fd8a0da65 (diff)
downloadsamba-b3235d483da924a41ca9cecf72e1c62bab7fedd5.tar.gz
samba-b3235d483da924a41ca9cecf72e1c62bab7fedd5.tar.bz2
samba-b3235d483da924a41ca9cecf72e1c62bab7fedd5.zip
s3:smbd: introduce struct smbXsrv_connection
This will represent a transport connection for SMB 1 or 2 in the server. smbd_server_connection will slowly be moved to the SMB_VFS layer to satisfy the existing modules, but it will hopefully be protocol independend in future. metze
Diffstat (limited to 'source3/smbd/negprot.c')
-rw-r--r--source3/smbd/negprot.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 9ddafee657..a55a7c336c 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -65,7 +65,7 @@ static void reply_corep(struct smb_request *req, uint16 choice)
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf, smb_vwv0, choice);
- set_Protocol(PROTOCOL_CORE);
+ smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_CORE);
}
/****************************************************************************
@@ -85,7 +85,8 @@ static void reply_coreplus(struct smb_request *req, uint16 choice)
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
SSVAL(req->outbuf,smb_vwv1,0x1); /* user level security, don't
* encrypt */
- set_Protocol(PROTOCOL_COREPLUS);
+
+ smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_COREPLUS);
}
/****************************************************************************
@@ -118,7 +119,7 @@ static void reply_lanman1(struct smb_request *req, uint16 choice)
SSVAL(req->outbuf,smb_vwv11, 8);
}
- set_Protocol(PROTOCOL_LANMAN1);
+ smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_LANMAN1);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg, FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
@@ -167,7 +168,7 @@ static void reply_lanman2(struct smb_request *req, uint16 choice)
SSVAL(req->outbuf,smb_vwv11, 8);
}
- set_Protocol(PROTOCOL_LANMAN2);
+ smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_LANMAN2);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
@@ -360,7 +361,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
SSVAL(req->outbuf,smb_vwv0,choice);
SCVAL(req->outbuf,smb_vwv1,secword);
- set_Protocol(PROTOCOL_NT1);
+ smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_NT1);
SSVAL(req->outbuf,smb_vwv1+1, lp_maxmux()); /* maxmpx */
SSVAL(req->outbuf,smb_vwv2+1, 1); /* num vcs */