-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection#authenticate(AuthenticationContext.anonymous()) crashes on v0.12.0 #779
Comments
Experiencing identical issue after upgrading from 0.11.5 to 0.12.0 (and 0.12.1). Issue occurs when creating an anonymous SMBv2 connection (SMB 2.1 and 2.0.2 are allowed) . A connection with username and password succeeds as mentioned above. Debugging shows that class SMBSessionBuilder creates now an authenticator "NtlmSealer" object which was previously "NtlmAuthenticator". This is based on the new config object "NtlmConfig" which has default IntegrityEmabled set to "true". See class SMBSessionBuilder, method establish, line 110-112 of SMBj 0.12.1. I expect in this area the issue is introduced. Question: Can this issue be resolved by enhancing the SMBConfig or is it a bug which needs to be resolved? Example of used SMBConfig: |
It's a bug ;). I'll fix it next week. |
@hierynomus , Thank you for the quick fix. Smbj 0.12.2 does resolve the issue. |
I get a new crash now for
|
That's weird, what kind of server are you connecting to? It seems that the sessionFlags are not set correctly. |
It is a Samba server running on openSUSE Tumbleweed. Version is Configuration is nothing special (I also have a few shares defined but I omitted them because they do not make the crash go away):
|
Even, I'm facing the same Nullpointer exception when trying with anonymous login:
It is happening after upgrade to smbj library 0.12.2 and my target server Windows 11, I've tried to allow insecure guest logons as well in my Local group policy editor. Is there any update on the issue, whether if it's server configuration issue or bug in the actual code? |
For the time being, I had to revert to 0.11.5 as 0.12.x is too problematic with anon logins. |
Okay, I see same issue reported which is still open: #792, just FYI. |
Yes, let's follow up there! And kee this ticket closed, as the original stacktrace was different from this one |
calling
Connection#authenticate(AuthenticationContext.anonymous())
against my Samba server will always crash with:This worked fine in v0.11.5
Apprently the
ctx.sessionKey
passed to theSecretKeySpec
constructor is null.Passing an
AuthenticationContext
initialized with a non-empty username (can be anything) makes the crash go away, but this should not be necessary to get a Session suitable for enumerating shares withsmbj-rpc
.The text was updated successfully, but these errors were encountered: