summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/libcliraw.h3
-rw-r--r--source4/libcli/raw/smb_signing.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index c9cafedd4c..bd9bda0db1 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -261,6 +261,9 @@ struct smbcli_request {
counter by one */
uint_t sign_single_increment:1;
+ /* the caller wants to do the signing check */
+ bool sign_caller_checks;
+
/* give the caller a chance to prevent the talloc_free() in the _recv() function */
bool do_not_free;
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index 1d03686d9a..ae17dadf33 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -298,6 +298,13 @@ bool smbcli_request_check_sign_mac(struct smbcli_request *req)
{
bool good;
+ if (!req->transport->negotiate.sign_info.doing_signing &&
+ req->sign_caller_checks) {
+ return true;
+ }
+
+ req->sign_caller_checks = false;
+
switch (req->transport->negotiate.sign_info.signing_state)
{
case SMB_SIGNING_ENGINE_OFF: