summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-21 01:43:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:50 -0500
commit4327a3f1ba274d111ec4ffe4989abc879803a714 (patch)
treef93d09224eb1dfac03590cac9cd4fb7905732168 /source4
parent11832f72224b4643eb7bbc96eb1c8851c1469a3c (diff)
downloadsamba-4327a3f1ba274d111ec4ffe4989abc879803a714.tar.gz
samba-4327a3f1ba274d111ec4ffe4989abc879803a714.tar.bz2
samba-4327a3f1ba274d111ec4ffe4989abc879803a714.zip
r8658: move use of lp_security() and lp_nt_status_support() into the connection structure.
This massively reduces the number of lp_*() calls made (This used to be commit b1d577f48d31c0c17ad0b6abd78120087408e58d)
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;
};