From: Stefan Metzmacher Date: Thu, 8 Feb 2024 14:15:28 +0000 (+0100) Subject: smb2_tcon: only announce SMB2_SHARE_CAP_CLUSTER if rpcd_witness can run X-Git-Tag: tdb-1.4.11~1778 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8bfdaaaa737032c6a8623512fcb2cd01850628a;p=thirdparty%2Fsamba.git 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 Reviewed-by: Guenther Deschner --- diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index fca35e36ce5..8855202d7fd 100644 --- a/source3/smbd/smb2_tcon.c +++ b/source3/smbd/smb2_tcon.c @@ -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; }