Skip to content

Commit

Permalink
Kerberos DC
Browse files Browse the repository at this point in the history
fix for automatic credential discarding
  • Loading branch information
rene-ye committed Feb 8, 2018
1 parent ded790c commit 923c220
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3428,19 +3428,24 @@ final boolean doExecute() throws SQLServerException {
}
}
finally {
if (integratedSecurity) {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;

if (integratedSecurity) {
if (null != ImpersonatedUserCred) {
try {
ImpersonatedUserCred.dispose();
if (ImpersonatedUserCred.getRemainingLifetime() <= 0) {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;
ImpersonatedUserCred.dispose();
}
}
catch (GSSException e) {
if (connectionlogger.isLoggable(Level.FINER))
connectionlogger.finer(toString() + " Release of the credentials failed GSSException: " + e);
}
} else {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;
}
}
}
Expand Down

0 comments on commit 923c220

Please sign in to comment.