mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-22 17:25:54 +02:00
NTFileStore: Added SecurityInformation enum
This commit is contained in:
parent
ebcb2cf20a
commit
4606dd4330
5 changed files with 26 additions and 19 deletions
|
@ -0,0 +1,20 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SMBLibrary
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// [MS-DTYP] 2.4.7 - SECURITY_INFORMATION
|
||||||
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
|
public enum SecurityInformation : uint
|
||||||
|
{
|
||||||
|
OWNER_SECURITY_INFORMATION = 0x00000001,
|
||||||
|
GROUP_SECURITY_INFORMATION = 0x00000002,
|
||||||
|
DACL_SECURITY_INFORMATION = 0x00000004,
|
||||||
|
SACL_SECURITY_INFORMATION = 0x00000008,
|
||||||
|
LABEL_SECURITY_INFORMATION = 0x00000010,
|
||||||
|
ATTRIBUTE_SECURITY_INFORMATION = 0x00000020,
|
||||||
|
SCOPE_SECURITY_INFORMATION = 0x00000040,
|
||||||
|
BACKUP_SECURITY_INFORMATION = 0x00010000,
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace SMBLibrary.SMB1
|
|
||||||
{
|
|
||||||
[Flags]
|
|
||||||
public enum SecurityInfoFields : uint
|
|
||||||
{
|
|
||||||
OWNER_SECURITY_INFORMATION = 0x00000001,
|
|
||||||
GROUP_SECURITY_INFORMATION = 0x00000002,
|
|
||||||
DACL_SECURITY_INFORMATION = 0x00000004,
|
|
||||||
SACL_SECURITY_INFORMATION = 0x00000008,
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -20,7 +20,7 @@ namespace SMBLibrary.SMB1
|
||||||
// Parameters:
|
// Parameters:
|
||||||
public ushort FID;
|
public ushort FID;
|
||||||
public ushort Reserved;
|
public ushort Reserved;
|
||||||
public SecurityInfoFields SecurityInfoFields;
|
public SecurityInformation SecurityInfoFields;
|
||||||
|
|
||||||
public NTTransactQuerySecurityDescriptorRequest()
|
public NTTransactQuerySecurityDescriptorRequest()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ namespace SMBLibrary.SMB1
|
||||||
{
|
{
|
||||||
FID = LittleEndianConverter.ToUInt16(parameters, 0);
|
FID = LittleEndianConverter.ToUInt16(parameters, 0);
|
||||||
Reserved = LittleEndianConverter.ToUInt16(parameters, 2);
|
Reserved = LittleEndianConverter.ToUInt16(parameters, 2);
|
||||||
SecurityInfoFields = (SecurityInfoFields)LittleEndianConverter.ToUInt32(parameters, 4);
|
SecurityInfoFields = (SecurityInformation)LittleEndianConverter.ToUInt32(parameters, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetParameters(bool isUnicode)
|
public override byte[] GetParameters(bool isUnicode)
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace SMBLibrary.SMB1
|
||||||
// Parameters:
|
// Parameters:
|
||||||
public ushort FID;
|
public ushort FID;
|
||||||
public ushort Reserved;
|
public ushort Reserved;
|
||||||
public SecurityInfoFields SecurityInfoFields;
|
public SecurityInformation SecurityInformation;
|
||||||
// Data:
|
// Data:
|
||||||
public SecurityDescriptor SecurityDescriptor;
|
public SecurityDescriptor SecurityDescriptor;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace SMBLibrary.SMB1
|
||||||
{
|
{
|
||||||
FID = LittleEndianConverter.ToUInt16(parameters, 0);
|
FID = LittleEndianConverter.ToUInt16(parameters, 0);
|
||||||
Reserved = LittleEndianConverter.ToUInt16(parameters, 2);
|
Reserved = LittleEndianConverter.ToUInt16(parameters, 2);
|
||||||
SecurityInfoFields = (SecurityInfoFields)LittleEndianConverter.ToUInt32(parameters, 4);
|
SecurityInformation = (SecurityInformation)LittleEndianConverter.ToUInt32(parameters, 4);
|
||||||
|
|
||||||
SecurityDescriptor = new SecurityDescriptor(data, 0);
|
SecurityDescriptor = new SecurityDescriptor(data, 0);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] parameters = new byte[ParametersLength];
|
byte[] parameters = new byte[ParametersLength];
|
||||||
LittleEndianWriter.WriteUInt16(parameters, 0, FID);
|
LittleEndianWriter.WriteUInt16(parameters, 0, FID);
|
||||||
LittleEndianWriter.WriteUInt16(parameters, 2, Reserved);
|
LittleEndianWriter.WriteUInt16(parameters, 2, Reserved);
|
||||||
LittleEndianWriter.WriteUInt32(parameters, 4, (uint)SecurityInfoFields);
|
LittleEndianWriter.WriteUInt32(parameters, 4, (uint)SecurityInformation);
|
||||||
return parameters;
|
return parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
<Compile Include="NTFileStore\Enums\NtCreateFile\CreateOptions.cs" />
|
<Compile Include="NTFileStore\Enums\NtCreateFile\CreateOptions.cs" />
|
||||||
<Compile Include="NTFileStore\Enums\NtCreateFile\FileStatus.cs" />
|
<Compile Include="NTFileStore\Enums\NtCreateFile\FileStatus.cs" />
|
||||||
<Compile Include="NTFileStore\Enums\NtCreateFile\ShareAccess.cs" />
|
<Compile Include="NTFileStore\Enums\NtCreateFile\ShareAccess.cs" />
|
||||||
|
<Compile Include="NTFileStore\Enums\SecurityInformation\SecurityInformation.cs" />
|
||||||
<Compile Include="NTFileStore\INTFileStore.cs" />
|
<Compile Include="NTFileStore\INTFileStore.cs" />
|
||||||
<Compile Include="NTFileStore\NamedPipeStore.cs" />
|
<Compile Include="NTFileStore\NamedPipeStore.cs" />
|
||||||
<Compile Include="NTFileStore\NTFileStoreHelper.cs" />
|
<Compile Include="NTFileStore\NTFileStoreHelper.cs" />
|
||||||
|
@ -402,7 +403,6 @@
|
||||||
<Compile Include="SMB1\EnumStructures\NamedPipeStatus.cs" />
|
<Compile Include="SMB1\EnumStructures\NamedPipeStatus.cs" />
|
||||||
<Compile Include="SMB1\EnumStructures\OpenResults.cs" />
|
<Compile Include="SMB1\EnumStructures\OpenResults.cs" />
|
||||||
<Compile Include="SMB1\NTTransactSubcommands\Enums\NTTransactSubcommandName.cs" />
|
<Compile Include="SMB1\NTTransactSubcommands\Enums\NTTransactSubcommandName.cs" />
|
||||||
<Compile Include="SMB1\NTTransactSubcommands\Enums\SecurityInfoFields.cs" />
|
|
||||||
<Compile Include="SMB1\NTTransactSubcommands\NTTransactCreateRequest.cs" />
|
<Compile Include="SMB1\NTTransactSubcommands\NTTransactCreateRequest.cs" />
|
||||||
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLRequest.cs" />
|
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLRequest.cs" />
|
||||||
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLResponse.cs" />
|
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLResponse.cs" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue