]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:libcli: introduce smbcli_options.transports based on lpcfg_smb_ports()
authorStefan Metzmacher <metze@samba.org>
Wed, 2 Apr 2025 19:14:10 +0000 (21:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:29 +0000 (10:17 +0000)
This will allow us to avoid passing lpcfg_smb_ports() explicitly
in a lot of places in the following commits.

Once that's done we will change away from "smb ports" to
something like "client smb transports".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source4/libcli/raw/libcliraw.h
source4/param/loadparm.c

index 3584cdcbb095ca86ae4985bfe1bc043b692e7bfc..ff4f1796f6d590c6a8d02e1f6e6f4ef00e1ffcc8 100644 (file)
@@ -106,6 +106,7 @@ struct smbcli_options {
        struct GUID client_guid;
        uint64_t max_credits;
        unsigned int only_negprot;
+       struct smb_transports transports;
        struct smb311_capabilities smb3_capabilities;
 };
 
index 7d3891dc0b9df2c483bb1d215d9b4029e14938f1..a35fd5d17391a2eb913fec65ca379bcf176231f9 100644 (file)
@@ -59,6 +59,8 @@ void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
                .smb2_capabilities = SMB2_CAP_ALL,
                .client_guid = client_guid,
                .max_credits = WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK,
+               .transports = smb_transports_parse("smb ports",
+                       lpcfg_smb_ports(lp_ctx)),
                .smb3_capabilities = smb311_capabilities_parse("client",
                        lpcfg_client_smb3_signing_algorithms(lp_ctx),
                        lpcfg_client_smb3_encryption_algorithms(lp_ctx)),