[jcifs] About disconnection.
Michael B Allen
mba2000 at ioplex.com
Wed Aug 30 03:44:25 GMT 2006
On Wed, 30 Aug 2006 10:18:46 +0900
tetsu.soh at nts.ricoh.co.jp wrote:
> First, I opened a connection using user AAA, do some stuff, and "logout".
> And then, I "login" as user BBB to do some thing. But this time, the SMB
> signing will failed.
> I think the reason is that although I did "logout" action, I cannot close
> connection to release all resources.
> So, when I did login again with different user, the jcifs re-used the
> connection and also the session key.
> So, to release all resources, the choice we have are 1) we shutdown
> application everytime we did "logout" 2) we wait for a while.
> Any advice about that?
What do you mean by "logout"? There's no way to "logout".
The signing digest is installed after the first user successfully
authenticates. Subsequent users with different credentials will still
use the first digest. That's the way the protocol works. The server is
doing the same thing.
When the transport times out and closes the digest should be
uninstalled. A subsequent authentication should install a new digest.
If you are seeing signature errors, please provide a more detailed
description of the sequence of events that cause them. Perhaps the signing
digest is not being uninstalled in a particular use scenario? I don't
understand the "logon" and "logoff" part. Theres an SmbSession.logon()
method but AFAIK there's no "logoff" method.
Have you made any modifications to the stock code?
Michael B Allen
PHP Active Directory SSO
More information about the jcifs