NtlmAuthenticator.requestNtlmPasswordAuthentication not always called

Orlin Hristov <[email protected]>
Newsgroups gmane.network.samba.java
Message-ID <[email protected]>
Hi There,

I tried to trap SmbAuthException extending NtlmAuthenticator.
I followed your 
example posted at: http://jcifs.samba.org/src/docs/authhandler.html but,
as soon as I start testing it, 
I found that the library not always traps SmbAuthException! 
For example:

SmbFile f = new SmbFile("smb://ws01/"); // ws01 - server 
f.list(); //throws "jcifs.smb.SmbAuthException: 
Logon failure: unknown user name or bad password.".

SmbFile f = new SmbFile("smb://ws01/c$/");
f.list(); //traps SmbAuthException and calls
my getNtlmPasswordAuthentication method.

After some debugging I found that 
NtlmAuthenticator.requestNtlmPasswordAuthentication won't be called
if the 'share' member of SmbFile class is null. 
Probably this is reasonable, but I will be 
thankful if you give me any idea how to workaround it in my code.

Thanks for the great library!
Orlin.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.