mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-16 12:13:46 +02:00
SMB1: Improved NT_TRANSACT_QUERY_SECURITY_DESC response implementation
This commit is contained in:
parent
8c19d682ff
commit
bf0295b697
1 changed files with 22 additions and 3 deletions
|
@ -12,15 +12,15 @@ using Utilities;
|
||||||
namespace SMBLibrary.SMB1
|
namespace SMBLibrary.SMB1
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// NTTransactQuerySecurityDescription Response
|
/// NT_TRANSACT_QUERY_SECURITY_DESC Response
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NTTransactQuerySecurityDescriptorResponse : NTTransactSubcommand
|
public class NTTransactQuerySecurityDescriptorResponse : NTTransactSubcommand
|
||||||
{
|
{
|
||||||
public const uint ParametersLength = 4;
|
public const uint ParametersLength = 4;
|
||||||
// Parameters:
|
// Parameters:
|
||||||
public uint LengthNeeded; // We might return STATUS_BUFFER_OVERFLOW without the SecurityDescriptor field
|
public uint LengthNeeded;
|
||||||
// Data
|
// Data
|
||||||
public SecurityDescriptor SecurityDescriptor;
|
public SecurityDescriptor SecurityDescriptor; // We might return STATUS_BUFFER_TOO_SMALL without the SecurityDescriptor field
|
||||||
|
|
||||||
public NTTransactQuerySecurityDescriptorResponse()
|
public NTTransactQuerySecurityDescriptorResponse()
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,25 @@ namespace SMBLibrary.SMB1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override byte[] GetParameters(bool isUnicode)
|
||||||
|
{
|
||||||
|
byte[] parameters = new byte[ParametersLength];
|
||||||
|
LittleEndianWriter.WriteUInt32(parameters, 0, LengthNeeded);
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override byte[] GetData()
|
||||||
|
{
|
||||||
|
if (SecurityDescriptor != null)
|
||||||
|
{
|
||||||
|
return SecurityDescriptor.GetBytes();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new byte[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override NTTransactSubcommandName SubcommandName
|
public override NTTransactSubcommandName SubcommandName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue