mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-12 02:19:17 +02:00
SMB2: SecurityMode: Added Flags attribute
This commit is contained in:
parent
166d2db570
commit
c6908e2d93
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace SMBLibrary.SMB2
|
namespace SMBLibrary.SMB2
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
public enum SecurityMode : ushort
|
public enum SecurityMode : ushort
|
||||||
{
|
{
|
||||||
SigningEnabled = 0x0001, // SMB2_NEGOTIATE_SIGNING_ENABLED
|
SigningEnabled = 0x0001, // SMB2_NEGOTIATE_SIGNING_ENABLED
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2017-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* You can redistribute this program and/or modify it under the terms of
|
||||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -66,7 +66,7 @@ namespace SMBLibrary.Server.SMB2
|
||||||
if (!isGuest.HasValue || !isGuest.Value)
|
if (!isGuest.HasValue || !isGuest.Value)
|
||||||
{
|
{
|
||||||
state.LogToServer(Severity.Information, "Session Setup: User '{0}' authenticated successfully (Domain: '{1}', Workstation: '{2}', OS version: '{3}').", userName, domainName, machineName, osVersion);
|
state.LogToServer(Severity.Information, "Session Setup: User '{0}' authenticated successfully (Domain: '{1}', Workstation: '{2}', OS version: '{3}').", userName, domainName, machineName, osVersion);
|
||||||
bool signingRequired = (request.SecurityMode == SecurityMode.SigningRequired);
|
bool signingRequired = (request.SecurityMode & SecurityMode.SigningRequired) > 0;
|
||||||
state.CreateSession(request.Header.SessionID, userName, machineName, sessionKey, accessToken, signingRequired);
|
state.CreateSession(request.Header.SessionID, userName, machineName, sessionKey, accessToken, signingRequired);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue