Прочетете на английски Редактиране

Споделяне чрез


SecurityMasks Enum

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Specifies the available options for examining security information of a directory object. This enumeration is used with the SecurityMasks and SecurityMasks properties.

This enumeration supports a bitwise combination of its member values.

C#
[System.Flags]
public enum SecurityMasks
Inheritance
SecurityMasks
Attributes

Fields

Name Value Description
None 0

Does not read or write security data.

Owner 1

Reads or writes the owner data.

Group 2

Reads or writes the group data.

Dacl 4

Reads or writes the discretionary access-control list (DACL) data.

Sacl 8

Reads or writes the system access-control list (SACL) data.

Examples

using System.DirectoryServices;  
...  
DirectorySearcher src = new DirectorySearcher("…");  
src.PropertiesToLoad = new string[] {ntSecurityDescriptor,…};  
src.SecurityMasks = SecurityMasks.Dacl | SecurityMasks.Owner;  
SearchResultCollection res = src.FindAll();  

Applies to

Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10