TODO: s3:smb2_negprot: announce persistent handle support (default: no)
authorStefan Metzmacher <metze@samba.org>
Thu, 26 Jul 2012 00:49:16 +0000 (02:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2015 23:34:07 +0000 (00:34 +0100)
add "smbd:announce persistent handles" option (default: false)

metze

source3/smbd/smb2_negprot.c

index 9a1ca9c22e33e2885ad2587705f14a50747de011..f3603e8f2de62c150f640bcc55045381fbb1517b 100644 (file)
@@ -284,6 +284,13 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
        max_read = MIN(max_limit, lp_smb2_max_read());
        max_write = MIN(max_limit, lp_smb2_max_write());
 
+       if (protocol >= PROTOCOL_SMB2_22 &&
+           lp_parm_bool(-1, "smbd", "announce persistent handles", false)) {
+               if (in_capabilities & SMB2_CAP_PERSISTENT_HANDLES) {
+                       capabilities |= SMB2_CAP_PERSISTENT_HANDLES;
+               }
+       }
+
        if (capabilities & SMB2_CAP_ENCRYPTION) {
                xconn->smb2.server.cipher = SMB2_ENCRYPTION_AES128_CCM;
        }