From: Ralph Boehme Date: Fri, 28 Jul 2017 12:03:14 +0000 (+0200) Subject: smbd: advertize SMB2_CAP_PERSISTENT_HANDLES global capability X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c30529b621db514c22e99fa92b9ce9108d3bfe94;p=thirdparty%2Fsamba.git smbd: advertize SMB2_CAP_PERSISTENT_HANDLES global capability Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index dbc6e88a096..faceb5e3c3f 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -419,11 +419,17 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) capabilities |= SMB2_CAP_ENCRYPTION; } - if (protocol >= PROTOCOL_SMB3_00 && - in_capabilities & SMB2_CAP_DIRECTORY_LEASING && - lp_smb3_directory_leases()) - { - capabilities |= SMB2_CAP_DIRECTORY_LEASING; + if (protocol >= PROTOCOL_SMB3_00) { + if (in_capabilities & SMB2_CAP_DIRECTORY_LEASING && + lp_smb3_directory_leases()) + { + capabilities |= SMB2_CAP_DIRECTORY_LEASING; + } + if (in_capabilities & SMB2_CAP_PERSISTENT_HANDLES && + lp_persistent_handles()) + { + capabilities |= SMB2_CAP_PERSISTENT_HANDLES; + } } /*