20 private byte _rmControl;
22 internal override GenericAcl GenericSacl => _sacl;
24 internal override GenericAcl GenericDacl => _dacl;
118 CreateFromParts(flags, owner, group, systemAcl, discretionaryAcl);
123 [SecuritySafeCritical]
125 : this(BinaryFormFromSddlForm(sddlForm), 0)
134 if (binaryForm ==
null)
142 if (binaryForm.Length - offset < 20)
150 byte resourceManagerControl = binaryForm[offset + 1];
164 CreateFromParts(controlFlags, owner, group, systemAcl, discretionaryAcl);
172 private static byte[] BinaryFormFromSddlForm(
string sddlForm)
174 if (sddlForm ==
null)
179 uint resultSdLength = 0u;
183 if (1 != Win32Native.ConvertStringSdToSd(sddlForm, GenericSecurityDescriptor.Revision, out resultSd, ref resultSdLength))
202 array =
new byte[resultSdLength];
203 Marshal.
Copy(resultSd, array, 0, (
int)resultSdLength);
208 if (resultSd != IntPtr.Zero)
210 Win32Native.LocalFree(resultSd);
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
override ControlFlags ControlFlags
Gets values that specify behavior of the T:System.Security.AccessControl.RawSecurityDescriptor object...
Serves as the base class for system exceptions namespace.
RawSecurityDescriptor(byte[] binaryForm, int offset)
Initializes a new instance of the T:System.Security.AccessControl.RawSecurityDescriptor class from th...
The exception that is thrown when the value of an argument is outside the allowable range of values a...
override SecurityIdentifier Group
Gets or sets the primary group for this T:System.Security.AccessControl.RawSecurityDescriptor object.
static byte Revision
Gets the revision level of the T:System.Security.AccessControl.GenericSecurityDescriptor object.
byte ResourceManagerControl
Gets or sets a byte value that represents the resource manager control bits associated with this T:Sy...
Represents an Access Control List (ACL).
Provides information about, and means to manipulate, the current environment and platform....
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
Copies data from a one-dimensional, managed 32-bit signed integer array to an unmanaged memory pointe...
Represents a security descriptor. A security descriptor includes an owner, a primary group,...
ControlFlags
These flags affect the security descriptor behavior.
A platform-specific type that is used to represent a pointer or a handle.
The exception that is thrown when there is not enough memory to continue the execution of a program.
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks,...
override SecurityIdentifier Owner
Gets or sets the owner of the object associated with this T:System.Security.AccessControl....
Represents a security descriptor. A security descriptor includes an owner, a primary group,...
The exception that is thrown when one of the arguments provided to a method is not valid.
void SetFlags(ControlFlags flags)
Sets the P:System.Security.AccessControl.RawSecurityDescriptor.ControlFlags property of this T:System...
Represents an access control list (ACL) and is the base class for the T:System.Security....
Represents a security identifier (SID) and provides marshaling and comparison operations for SIDs.
static readonly IntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
Represents a Discretionary Access Control List (DACL).
RawSecurityDescriptor(ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, RawAcl systemAcl, RawAcl discretionaryAcl)
Initializes a new instance of the T:System.Security.AccessControl.RawSecurityDescriptor class with th...
static int GetLastWin32Error()
Returns the error code returned by the last unmanaged function that was called using platform invoke ...
RawSecurityDescriptor(string sddlForm)
Initializes a new instance of the T:System.Security.AccessControl.RawSecurityDescriptor class from th...
Represents a System Access Control List (SACL).