Merge pull request #511 from kazkansouh/libsmbclient-eperm

SMB2: improved compatibility when null sessions fail
This commit is contained in:
van Hauser 2020-04-08 23:21:56 +02:00 committed by GitHub
commit 96779d6daa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,6 +131,14 @@ bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) {
smbc_free_context(ctx, 1);
return true;
break;
case EPERM:
// Probably this means access denied inspite of mention above
// about being related to wrong workgroup. I have observed
// libsmbclient emitting this when connecting to a vanilla install
// of Windows 2019 server (non-domain) with wrong credentials. It
// appears related to a fallback null session being rejected after
// the library tries with provided credentials. If the null
// session is accepted, EACCES is returned.
case EACCES:
// 100% access denied
break;