protocol: disable connection reuse for SMB(S)

Connections should only be reused when using the same "share" (and
perhaps some additional conditions), but instead of fixing this flaw,
this change completely disables connection reuse for SMB. This protocol
is about to get dropped soon anyway.

Reported-by: Osama Hamad
Closes #21238
This commit is contained in:
Daniel Stenberg 2026-04-05 18:23:35 +02:00
parent a0d5d8fea3
commit 74a169575d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -316,7 +316,7 @@ const struct Curl_scheme Curl_scheme_smb = {
#endif
CURLPROTO_SMB, /* protocol */
CURLPROTO_SMB, /* family */
PROTOPT_CONN_REUSE, /* flags */
PROTOPT_NONE, /* flags */
PORT_SMB, /* defport */
};
@ -330,7 +330,7 @@ const struct Curl_scheme Curl_scheme_smbs = {
#endif
CURLPROTO_SMBS, /* protocol */
CURLPROTO_SMB, /* family */
PROTOPT_SSL | PROTOPT_CONN_REUSE, /* flags */
PROTOPT_SSL, /* flags */
PORT_SMBS, /* defport */
};