libsmb2 icon indicating copy to clipboard operation
libsmb2 copied to clipboard

STATUS_ACCESS_DENIED with Windows 10 shares

Open tguillem opened this issue 5 years ago • 1 comments

Hello,

I receive the status STATUS_ACCESS_DENIED when connecting to a up-to-date windows 10 share with credentials.

It is a regression from https://github.com/sahlberg/libsmb2/commit/de3f1a4e6830df59e055bc1ff723e15a6beef3be.

Doing the following workaround unbreak the connection on Windows 10 shares (but break connection on samba with min protocol = SMB3 max protocol = SMB3

--- a/lib/libsmb2.c
+++ b/lib/libsmb2.c
@@ -942,12 +941,11 @@ connect_cb(struct smb2_context *smb2, int status,
         req.security_mode = smb2->security_mode;
         switch (smb2->version) {
         case SMB2_VERSION_ANY:
-                req.dialect_count = 5;
+                req.dialect_count = 4;
                 req.dialects[0] = SMB2_VERSION_0202;
                 req.dialects[1] = SMB2_VERSION_0210;
                 req.dialects[2] = SMB2_VERSION_0300;
                 req.dialects[3] = SMB2_VERSION_0302;
-                req.dialects[4] = SMB2_VERSION_0311;
                 break;

tguillem avatar Nov 18 '20 11:11 tguillem

Here is the wireshark dump of the failing connection attempt with a Windows 10 share: smb311-issue-windows.zip

tguillem avatar Nov 18 '20 12:11 tguillem

declaring github issues bancruptcy

sahlberg avatar Mar 29 '24 08:03 sahlberg