[jcifs] NtlmHttpFilter requires username, password and wins server
Panagiotis Korros
pkor at exodus.gr
Tue Oct 5 15:31:50 GMT 2004
I upgraded the jcifs.jar from v. 0.7.x to 1.1 and found out that my
configuration was not working anymore.
Until 0.7.x specifing the jcifs.smb.client.domain property was enough.
In 1.1 the jcifs.smb.client.username, jcifs.smb.client.password and
jcifs.netbios.wins are also required.
This causes problems because I don't have a wins server on my network
and also I would like not to expose the username/password in a text
file.
If I try without a wins server I get the following NullPointerException
when I try to access a ntlm protected resource.
java.lang.NullPointerException: null address || null buffer
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:611)
at
jcifs.netbios.NameServiceClient.send(NameServiceClient.java:228)
at
jcifs.netbios.NameServiceClient.getAllByName(NameServiceClient.java:268)
at jcifs.netbios.NbtAddress.getAllByName(NbtAddress.java:451)
at
jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:83)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:123)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:186)
...
I hacked the code and saw that NbtAddress.getAllByName( DOMAIN, 0x1C,
null, null ) doesn't work without a wins server but
NbtAddress.getByName( DOMAIN, 0x1C, null, null ) does work. Why is that?
Is it expected?
Regards
Panagiotis Korros
More information about the jcifs
mailing list