SMBServer: Write logoff events to log

This commit is contained in:
Tal Aloni 2017-03-15 15:23:29 +02:00
parent a0dc03de30
commit b7946bafca
2 changed files with 2 additions and 0 deletions

View file

@ -145,6 +145,7 @@ namespace SMBLibrary.Server
}
else if (command is LogoffAndXRequest)
{
state.LogToServer(Severity.Information, "Logoff: User '{0}' logged off.", session.UserName);
m_securityProvider.DeleteSecurityContext(ref session.SecurityContext.AuthenticationContext);
state.RemoveSession(header.UID);
return new LogoffAndXResponse();

View file

@ -108,6 +108,7 @@ namespace SMBLibrary.Server
}
else if (command is LogoffRequest)
{
state.LogToServer(Severity.Information, "Logoff: User '{0}' logged off.", session.UserName);
m_securityProvider.DeleteSecurityContext(ref session.SecurityContext.AuthenticationContext);
state.RemoveSession(command.Header.SessionID);
return new LogoffResponse();