From 8f8c4e6a0f0051f1a6b5dab335f6f258b8c128cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20D=C3=ADez=20de=20la=20Fuente?= Date: Fri, 23 Jan 2026 14:23:50 +0000 Subject: [PATCH] Propagate missing session params --- src/smbclient/_pool.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/smbclient/_pool.py b/src/smbclient/_pool.py index f9c6228..505a646 100644 --- a/src/smbclient/_pool.py +++ b/src/smbclient/_pool.py @@ -231,7 +231,15 @@ def delete_session(server, port=445, connection_cache=None, timeout=60): def get_smb_tree( - path, username=None, password=None, port=445, encrypt=None, connection_timeout=60, connection_cache=None + path, + username=None, + password=None, + port=445, + encrypt=None, + connection_timeout=60, + connection_cache=None, + auth_protocol=None, + require_signing=True, ): """ Returns an active Tree connection and file path including the tree based on the UNC path passed in and other @@ -253,7 +261,7 @@ def get_smb_tree( client_config = ClientConfig() username = username or client_config.username password = password or client_config.password - auth_protocol = client_config.auth_protocol + auth_protocol = auth_protocol or client_config.auth_protocol # In case we need to nest a call to get_smb_tree, preserve the kwargs here so it's easier to update them in case # new kwargs are added. @@ -264,6 +272,8 @@ def get_smb_tree( "encrypt": encrypt, "connection_timeout": connection_timeout, "connection_cache": connection_cache, + "auth_protocol": auth_protocol, + "require_signing": require_signing, } # Normalise and check that the path contains at least 2 components, \\server\share @@ -311,6 +321,7 @@ def get_smb_tree( connection_timeout=connection_timeout, connection_cache=connection_cache, auth_protocol=auth_protocol, + require_signing=require_signing, ) share_path = rf"\\{server}\{path_split[1]}"