smbd:smb2: use encryption_desired in send_break
authorMichael Adam <obnox@samba.org>
Wed, 1 Jul 2015 15:41:38 +0000 (17:41 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sun, 19 Jul 2015 18:13:10 +0000 (20:13 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11372

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 14357700fd69291995ce6adebb13e7340a63c209)

source3/smbd/smb2_server.c

index 70ffc3cfe3ae4976fe00ccb543eedbb5367a47a9..ce393354623433e9004f5bd57b6e881964040888 100644 (file)
@@ -2685,12 +2685,12 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn,
        size_t body_len;
        uint8_t *dyn;
        size_t dyn_len;
-       bool do_encryption = session->global->encryption_required;
+       bool do_encryption = session->encryption_desired;
        uint64_t nonce_high = 0;
        uint64_t nonce_low = 0;
        NTSTATUS status;
 
-       if (tcon->global->encryption_required) {
+       if (tcon->encryption_desired) {
                do_encryption = true;
        }