From e00ab641b4aeafa70d035c66baf31b965a7e5734 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 9 Sep 2008 17:54:13 +0200 Subject: libcli/raw: give the caller the chance to do the signing checks on its own. metze --- source4/libcli/raw/libcliraw.h | 3 +++ source4/libcli/raw/smb_signing.c | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'source4/libcli/raw') 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: -- cgit