improved compatibility when null sessions fail

This commit is contained in:
Karim Kanso 2020-04-08 21:32:48 +01:00
parent 1ea3fc5a28
commit 4e45f85fbb

View file

@ -131,6 +131,14 @@ bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) {
smbc_free_context(ctx, 1); smbc_free_context(ctx, 1);
return true; return true;
break; 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: case EACCES:
// 100% access denied // 100% access denied
break; break;