summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/request.c2
-rw-r--r--source4/smb_server/smb_server.c4
-rw-r--r--source4/smb_server/smb_server.h6
3 files changed, 10 insertions, 2 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index 17c6d0329c..c31fee6d19 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -340,7 +340,7 @@ void req_reply_dos_error(struct smbsrv_request *req, uint8_t eclass, uint16_t ec
*/
void req_setup_error(struct smbsrv_request *req, NTSTATUS status)
{
- if (!lp_nt_status_support() || !(req->smb_conn->negotiate.client_caps & CAP_STATUS32)) {
+ if (!req->smb_conn->config.nt_status_support || !(req->smb_conn->negotiate.client_caps & CAP_STATUS32)) {
/* convert to DOS error codes */
uint8_t eclass;
uint32_t ecode;
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 86e31f7fd8..b632bfefd2 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -500,7 +500,7 @@ static void switch_message(int type, struct smbsrv_request *req)
chaining) */
/* In share mode security we must ignore the vuid. */
- if (lp_security() == SEC_SHARE) {
+ if (smb_conn->config.security == SEC_SHARE) {
session_tag = UID_FIELD_INVALID;
} else {
session_tag = SVAL(req->in.hdr,HDR_UID);
@@ -770,6 +770,8 @@ static void smbsrv_accept(struct stream_connection *conn)
smb_conn->connection = conn;
smb_conn->processing = False;
+ smb_conn->config.security = lp_security();
+ smb_conn->config.nt_status_support = lp_nt_status_support();
conn->private = smb_conn;
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 819a70cbae..46e480e77c 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -264,4 +264,10 @@ struct smbsrv_connection {
} *trans_partial;
BOOL processing;
+
+ /* configuration parameters */
+ struct {
+ enum security_types security;
+ BOOL nt_status_support;
+ } config;
};