s4:libcli/raw: only use smb signing if required
authorStefan Metzmacher <metze@samba.org>
Wed, 2 Nov 2011 16:02:03 +0000 (17:02 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 3 Nov 2011 15:55:11 +0000 (16:55 +0100)
This matches the source3 code, I want to have the behavior
in common before I put the config options in common.
Later we may change this consitently in all code.

metze

source4/libcli/raw/smb_signing.c

index d6d53db32972d139e3f1001d13749776b195e900..588a86f51c2b144a3ca08b3ac757bdd3e5095a39 100644 (file)
@@ -51,8 +51,8 @@ static bool smbcli_set_smb_signing_common(struct smbcli_transport *transport)
                return false;
        }
 
-       if (!(transport->negotiate.sec_mode & 
-             (NEGOTIATE_SECURITY_SIGNATURES_REQUIRED|NEGOTIATE_SECURITY_SIGNATURES_ENABLED))) {
+       if (!(transport->negotiate.sec_mode & NEGOTIATE_SECURITY_SIGNATURES_REQUIRED)
+           && !transport->negotiate.sign_info.mandatory_signing) {
                DEBUG(5, ("SMB Signing is not negotiated by the peer\n"));
                return false;
        }