libsmb2
libsmb2 copied to clipboard
STATUS_ACCESS_DENIED with Windows 10 shares
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;
Here is the wireshark dump of the failing connection attempt with a Windows 10 share: smb311-issue-windows.zip
declaring github issues bancruptcy