]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
protocol: disable connection reuse for SMB(S)
authorDaniel Stenberg <daniel@haxx.se>
Sun, 5 Apr 2026 16:23:35 +0000 (18:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Apr 2026 11:23:01 +0000 (13:23 +0200)
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

lib/protocol.c

index ccd4f3f69d3cff4e57879e6604a6350d3c48ee4a..2a9f08388f32541c418412604d47cf4b8d338f94 100644 (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 */
 };