mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
IntegratedNTLMAuthenticationProvider: The correct SessionKey will now be returned instead of EncryptedRandomSessionKey
This commit is contained in:
parent
f1d65fedd2
commit
832b791fcc
1 changed files with 1 additions and 3 deletions
|
@ -23,7 +23,6 @@ namespace SMBLibrary.Win32.Security
|
||||||
public SecHandle ServerContext;
|
public SecHandle ServerContext;
|
||||||
public string WorkStation;
|
public string WorkStation;
|
||||||
public string UserName;
|
public string UserName;
|
||||||
public byte[] SessionKey;
|
|
||||||
public bool IsGuest;
|
public bool IsGuest;
|
||||||
|
|
||||||
public AuthContext(SecHandle serverContext, string workStation)
|
public AuthContext(SecHandle serverContext, string workStation)
|
||||||
|
@ -74,7 +73,6 @@ namespace SMBLibrary.Win32.Security
|
||||||
}
|
}
|
||||||
|
|
||||||
authContext.UserName = message.UserName;
|
authContext.UserName = message.UserName;
|
||||||
authContext.SessionKey = message.EncryptedRandomSessionKey;
|
|
||||||
if ((message.NegotiateFlags & NegotiateFlags.Anonymous) > 0 ||
|
if ((message.NegotiateFlags & NegotiateFlags.Anonymous) > 0 ||
|
||||||
!IsUserExists(message.UserName))
|
!IsUserExists(message.UserName))
|
||||||
{
|
{
|
||||||
|
@ -153,7 +151,7 @@ namespace SMBLibrary.Win32.Security
|
||||||
case GSSAttributeName.MachineName:
|
case GSSAttributeName.MachineName:
|
||||||
return authContext.WorkStation;
|
return authContext.WorkStation;
|
||||||
case GSSAttributeName.SessionKey:
|
case GSSAttributeName.SessionKey:
|
||||||
return authContext.SessionKey;
|
return SSPIHelper.GetSessionKey(authContext.ServerContext);
|
||||||
case GSSAttributeName.UserName:
|
case GSSAttributeName.UserName:
|
||||||
return authContext.UserName;
|
return authContext.UserName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue