STEP20 - TODO smb2_tcon: report share as CA if 'continuously available share = yes'
authorMichael Adam <obnox@samba.org>
Wed, 20 Jan 2016 23:25:37 +0000 (00:25 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2020 13:41:23 +0000 (14:41 +0100)
TODO: Need to add change in behaviour

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>

source3/smbd/smb2_tcon.c

index a4d9efdd2eebf5f9b19fc42790931f8fab6774a3..951aca19d330e3ea17fa49ad083dacb063620b16 100644 (file)
@@ -404,6 +404,11 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
                *out_share_flags |= SMB2_SHAREFLAG_ENCRYPT_DATA;
        }
 
+       if (conn->protocol >= PROTOCOL_SMB2_22 &&
+           lp_continuously_available_share(SNUM(tcon->compat)))
+       {
+               *out_capabilities |= SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
+       }
        if (conn->protocol >= PROTOCOL_SMB2_22 &&
            lp_cluster_share(SNUM(tcon->compat)))
        {