summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c8
-rw-r--r--source4/libcli/raw/clitransport.c4
-rw-r--r--source4/libcli/raw/clitree.c3
-rw-r--r--source4/libcli/raw/libcliraw.h1
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/libcli/smb_composite/connect.c3
-rw-r--r--source4/libcli/smb_composite/fetchfile.c3
-rw-r--r--source4/libcli/smb_composite/fsinfo.c1
-rw-r--r--source4/libcli/smb_composite/smb_composite.h3
9 files changed, 19 insertions, 9 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index c13dde9711..c1fadaa679 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -31,8 +31,10 @@
wrapper around smbcli_sock_connect()
*/
bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
- const char **ports, struct resolve_context *resolve_ctx,
- int max_xmit, int max_mux, bool use_spnego)
+ const char **ports,
+ struct resolve_context *resolve_ctx,
+ int max_xmit, int max_mux, bool use_spnego,
+ enum smb_signing_state signing)
{
struct smbcli_socket *sock;
@@ -42,7 +44,7 @@ bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
if (sock == NULL) return false;
cli->transport = smbcli_transport_init(sock, cli, true, max_xmit,
- max_mux, use_spnego);
+ max_mux, use_spnego, signing);
if (!cli->transport) {
return false;
}
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index bdaeaeb58a..3ca828d46b 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -76,7 +76,8 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
bool primary,
int max_xmit,
int max_mux,
- bool use_spnego)
+ bool use_spnego,
+ enum smb_signing_state signing)
{
struct smbcli_transport *transport;
@@ -93,6 +94,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
transport->options.max_xmit = max_xmit;
transport->options.max_mux = max_mux;
transport->options.request_timeout = SMB_REQUEST_TIMEOUT;
+ transport->options.signing = signing;
transport->negotiate.max_xmit = transport->options.max_xmit;
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 94fa37383b..3d8a6760a1 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -198,8 +198,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.max_protocol = lp_cli_maxprotocol(global_loadparm);
io.in.unicode = lp_unicode(global_loadparm);
io.in.use_spnego = lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm);
-
-
+ io.in.signing = lp_client_signing(global_loadparm);
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 6c97e61f04..dd6904dec2 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -97,6 +97,7 @@ struct smbcli_options {
uint32_t max_xmit;
uint16_t max_mux;
int request_timeout;
+ enum smb_signing_state signing;
};
/* this is the context for the client transport layer */
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index e19e81af7e..0053710aaf 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -383,7 +383,7 @@ bool smbcli_init_signing(struct smbcli_transport *transport)
return false;
}
- switch (lp_client_signing(global_loadparm)) {
+ switch (transport->options.signing) {
case SMB_SIGNING_OFF:
transport->negotiate.sign_info.allow_smb_signing = false;
break;
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index bdefe39b71..e45a8a25f9 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -309,7 +309,8 @@ static NTSTATUS connect_socket(struct composite_context *c,
state->transport = smbcli_transport_init(state->sock, state, true,
io->in.max_xmit,
io->in.max_mux,
- io->in.use_spnego);
+ io->in.use_spnego,
+ io->in.signing);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index 893eb854f5..5fa48b4863 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -154,7 +154,8 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.unicode = lp_unicode(global_loadparm);
state->connect->in.use_spnego = lp_use_spnego(global_loadparm) &&
lp_nt_status_support(global_loadparm);
-
+ state->connect->in.signing = lp_client_signing(global_loadparm);
+
state->creq = smb_composite_connect_send(state->connect, state,
lp_resolve_context(global_loadparm), event_ctx);
if (state->creq == NULL) goto failed;
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index bf425ad7c8..b6a5a5f2cc 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -160,6 +160,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
state->connect->in.unicode = lp_unicode(global_loadparm);
state->connect->in.use_spnego = lp_use_spnego(global_loadparm) &&
lp_nt_status_support(global_loadparm);
+ state->connect->in.signing = lp_client_signing(global_loadparm);
c->state = COMPOSITE_STATE_IN_PROGRESS;
state->stage = FSINFO_CONNECT;
diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h
index 41ce4b03bd..dd193fc820 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -27,6 +27,8 @@
particularly designed to be used in async applications
*/
+#include "libcli/raw/signing.h"
+
/*
a composite open/read(s)/close request that loads a whole file
@@ -97,6 +99,7 @@ struct smb_composite_connect {
int max_xmit;
int max_mux;
int max_protocol;
+ enum smb_signing_state signing;
} in;
struct {
struct smbcli_tree *tree;