1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

smb2_tcon: only announce SMB2_SHARE_CAP_CLUSTER if rpcd_witness can run

rpcd_witness needs ncacn_ip_tcp support and that's only
available if samba-dcerpcd is not started on demand.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15577

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2024-02-08 15:15:28 +01:00 committed by Günther Deschner
parent 1d0938d6fe
commit d8bfdaaaa7

View File

@ -428,6 +428,8 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
if (*out_share_type == SMB2_SHARE_TYPE_DISK) {
bool persistent = false; /* persistent handles not implemented yet */
bool cluster = lp_clustering();
bool scaleout = cluster;
bool witness = cluster && !lp_rpc_start_on_demand_helpers();
bool asymmetric = false; /* shares are symmetric by default */
bool announce;
@ -461,7 +463,7 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
announce = lp_parm_bool(SNUM(tcon->compat),
"smb3 share cap",
"SCALE OUT",
cluster);
scaleout);
if (announce) {
*out_capabilities |= SMB2_SHARE_CAP_SCALEOUT;
}
@ -472,7 +474,7 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
announce = lp_parm_bool(SNUM(tcon->compat),
"smb3 share cap",
"CLUSTER",
cluster);
witness);
if (announce) {
*out_capabilities |= SMB2_SHARE_CAP_CLUSTER;
}