From 25952d3ff114e06781c50eed244be60d9a9266f4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 20 May 2014 19:59:12 +0200 Subject: [PATCH] s3:smbd: move sconn->nbt.* to xconn->transport.nbt.* This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Michael Adam --- source3/smbd/globals.h | 9 ++++++--- source3/smbd/process.c | 2 -- source3/smbd/reply.c | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 3b9882d2117..8f4a0214ec8 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -345,6 +345,12 @@ struct smbXsrv_connection { struct { struct { + bool got_session; + } nbt; + } transport; + + struct { + struct { uint32_t capabilities; struct GUID guid; uint16_t security_mode; @@ -658,9 +664,6 @@ struct smbd_server_connection { struct messaging_context *msg_ctx; struct sys_notify_context *sys_notify_ctx; struct notify_context *notify_ctx; - struct { - bool got_session; - } nbt; bool using_smb2; int trans_num; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 1b80ba585c6..0e468a24832 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3814,8 +3814,6 @@ void smbd_process(struct tevent_context *ev_ctx, } } - sconn->nbt.got_session = false; - tmp = lp_max_xmit(); tmp = MAX(tmp, SMB_BUFFER_SIZE_MIN); tmp = MIN(tmp, SMB_BUFFER_SIZE_MAX); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 32ba98fa8d9..28c0426e7bb 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -533,6 +533,7 @@ static void reply_called_name_not_present(char *outbuf) void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inbuf_size) { + struct smbXsrv_connection *xconn = sconn->conn; int msg_type = CVAL(inbuf,0); int msg_flags = CVAL(inbuf,1); /* @@ -556,7 +557,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb *name1 = *name2 = 0; - if (sconn->nbt.got_session) { + if (xconn->transport.nbt.got_session) { exit_server_cleanly("multiple session request not permitted"); } @@ -642,7 +643,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb reload_services(sconn, conn_snum_used, true); reopen_logs(); - sconn->nbt.got_session = true; + xconn->transport.nbt.got_session = true; break; } -- 2.11.4.GIT