diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-09-09 17:54:13 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-23 11:30:02 +0200 |
commit | e00ab641b4aeafa70d035c66baf31b965a7e5734 (patch) | |
tree | b9a9f12a9ffa4183cc84e3dd2beb0bac4cff7514 /source4/libcli | |
parent | 781d7c4c1cbd34413450f251d4078a9cb8055831 (diff) | |
download | samba-e00ab641b4aeafa70d035c66baf31b965a7e5734.tar.gz samba-e00ab641b4aeafa70d035c66baf31b965a7e5734.tar.bz2 samba-e00ab641b4aeafa70d035c66baf31b965a7e5734.zip |
libcli/raw: give the caller the chance to do the signing checks on its own.
metze
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 3 | ||||
-rw-r--r-- | source4/libcli/raw/smb_signing.c | 7 |
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: |