From 72ee2ce365900b6e795ede8b822b44caa9ff3f8c Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Mon, 25 Sep 2017 23:09:46 +0300 Subject: [PATCH] SMB2: Improved implementation of SET_INFO Request --- SMBLibrary/SMB2/Commands/SetInfoRequest.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/SMBLibrary/SMB2/Commands/SetInfoRequest.cs b/SMBLibrary/SMB2/Commands/SetInfoRequest.cs index 5f207ba..e14fe3f 100644 --- a/SMBLibrary/SMB2/Commands/SetInfoRequest.cs +++ b/SMBLibrary/SMB2/Commands/SetInfoRequest.cs @@ -89,11 +89,33 @@ namespace SMBLibrary.SMB2 } } + public SecurityInformation SecurityInformation + { + get + { + return (SecurityInformation)AdditionalInformation; + } + set + { + AdditionalInformation = (uint)value; + } + } + public void SetFileInformation(FileInformation fileInformation) { Buffer = fileInformation.GetBytes(); } + public void SetFileSystemInformation(FileSystemInformation fileSystemInformation) + { + Buffer = fileSystemInformation.GetBytes(); + } + + public void SetSecurityInformation(SecurityDescriptor securityDescriptor) + { + Buffer = securityDescriptor.GetBytes(); + } + public override int CommandLength { get