s3:smb2_server: don't rely on the SMB2_HDR_FLAG_SIGNED if signing is required
authorStefan Metzmacher <metze@samba.org>
Mon, 23 Sep 2013 18:51:30 +0000 (20:51 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 2 Oct 2013 13:11:22 +0000 (15:11 +0200)
Windows (at least the test suites) may skip the SMB2_HDR_FLAG_SIGNED
in a reauth session setup, but still provide a valid signature.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/smb2_server.c

index b031c6d153f42a5d3569af10c06455f58eab3ef7..cf5e37e5a4157154a12f0d6284fcd84b0a6631a7 100644 (file)
@@ -1993,7 +1993,7 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 
        if (req->do_encryption) {
                signing_required = false;
-       } else if (flags & SMB2_HDR_FLAG_SIGNED) {
+       } else if (signing_required || (flags & SMB2_HDR_FLAG_SIGNED)) {
                DATA_BLOB signing_key;
 
                if (x == NULL) {