libcli/smb: defer failing for missing NEGOTIATE_SECURITY_SIGNATURES_ENABLED
authorStefan Metzmacher <metze@samba.org>
Mon, 18 Mar 2013 14:02:55 +0000 (15:02 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 20 Mar 2013 16:32:25 +0000 (09:32 -0700)
Windows servers take a look at the FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED
flag during a session setup and turn on signing if the client requires it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smbXcli_base.c

index 4c60a05693322d1e42947037cc25b399adcd71ee..cd995e9f8564841aba501ce3bde1353ee49f94fc 100644 (file)
@@ -4046,6 +4046,15 @@ static void smbXcli_negprot_smb1_done(struct tevent_req *subreq)
                if (server_security_mode & NEGOTIATE_SECURITY_SIGNATURES_ENABLED) {
                        server_signing = "supported";
                        server_allowed = true;
+               } else if (conn->mandatory_signing) {
+                       /*
+                        * We have mandatory signing as client
+                        * lets assume the server will look at our
+                        * FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED
+                        * flag in the session setup
+                        */
+                       server_signing = "not announced";
+                       server_allowed = true;
                }
                if (server_security_mode & NEGOTIATE_SECURITY_SIGNATURES_REQUIRED) {
                        server_signing = "required";