Fix problem found by Andrew Bartlett - correctly check encrypted flag.
authorJeremy Allison <jra@samba.org>
Mon, 23 Jul 2012 17:20:26 +0000 (10:20 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 23 Jul 2012 18:15:33 +0000 (20:15 +0200)
source3/smbd/reply.c

index 2022af72b07f1b426e0d6ca9c78c2b5d149e08a3..97abc859a0682ab67069b713c503195db65960fb 100644 (file)
@@ -4944,8 +4944,12 @@ static void do_smb1_close(struct tevent_req *req)
        } else {
                reply_nterror(smbreq, status);
        }
-       if (!srv_send_smb(smbreq->sconn, smbreq->outbuf, true,
-                         smbreq->seqnum+1, encrypt, NULL)) {
+       if (!srv_send_smb(smbreq->sconn,
+                       smbreq->outbuf,
+                       true,
+                       smbreq->seqnum+1,
+                       IS_CONN_ENCRYPTED(smbreq->conn)||smbreq->encrypted,
+                       NULL)) {
                exit_server_cleanly("handle_aio_read_complete: srv_send_smb "
                                    "failed.");
        }