[jcifs] Method logonLogoff() in class SmbSession

marc.lehmann at infineon.com marc.lehmann at infineon.com
Sat Jan 11 03:08:54 EST 2003

Dear All,
wouldn't it be useful to include

    public static void logonLogoff( UniAddress dc,
NtlmPasswordAuthentication auth ) throws SmbException
        SmbSession session = SmbTransport.getSmbTransport( dc, 0
).getSmbSession( auth );
        session.getSmbTree( "IPC$", null ).treeConnect( null, null );
        session.logoff( false );
        session = null;

in class SmbSession?

For security reasons I wouldn't want to keep a SMB session longer than
neccesary. Using the method logon() consecutive logon attempts always
evaluate to OK (no exception raised) even with wrong credentials. (I just
use NtlmHttpFilter for authentication und don't need to access any SMB

Here is a class to demonstrate the effect

Any comments are appreciated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmbTest.zip
Type: application/zip
Size: 1249 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20030110/24e538ce/SmbTest.zip

More information about the jcifs mailing list