1 using Microsoft.Win32.SafeHandles;
45 private static Exception _HandleErrorCode(
int errorCode,
string name,
SafeHandle handle,
object context)
48 if (errorCode == 2 || errorCode == 6 || errorCode == 123)
72 return new SemaphoreAccessRule(identityReference, accessMask, isInherited, inheritanceFlags, propagationFlags, type);
92 return new SemaphoreAuditRule(identityReference, accessMask, isInherited, inheritanceFlags, propagationFlags, flags);
98 if (base.AccessRulesModified)
102 if (base.AuditRulesModified)
106 if (base.OwnerModified)
110 if (base.GroupModified)
114 return accessControlSections;
117 internal void Persist(SafeWaitHandle handle)
123 if (accessControlSectionsFromChanges != 0)
125 Persist(handle, accessControlSectionsFromChanges);
126 bool flag2 = base.AccessRulesModified =
false;
127 bool flag4 = base.AuditRulesModified = flag2;
128 bool ownerModified = base.GroupModified = flag4;
129 base.OwnerModified = ownerModified;
void ResetAccessRule(SemaphoreAccessRule rule)
Removes all access control rules with the same user as the specified rule, regardless of T:System....
Represents a set of access rights to be audited for a user or group. This class cannot be inherited.
PropagationFlags
Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are signific...
void RemoveAuditRuleAll(SemaphoreAuditRule rule)
Searches for all audit rules with the same user as the specified rule and, if found,...
The exception that is thrown when an attempt is made to open a system mutex, semaphore,...
Represents an identity and is the base class for the T:System.Security.Principal.NTAccount and T:Syst...
void AddAuditRule(SemaphoreAuditRule rule)
Searches for an audit rule with which the new rule can be merged. If none are found,...
Represents a combination of a user's identity, an access mask, and an access control type (allow or d...
void RemoveAuditRuleSpecific(SemaphoreAuditRule rule)
Searches for an audit rule that exactly matches the specified rule and, if found, removes it.
void RemoveAccessRuleAll(SemaphoreAccessRule rule)
Searches for all access control rules with the same user and T:System.Security.AccessControl....
void RemoveAccessRuleSpecific(SemaphoreAccessRule rule)
Searches for an access control rule that exactly matches the specified rule and, if found,...
Represents a set of access rights allowed or denied for a user or group. This class cannot be inherit...
override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
Creates a new audit rule, specifying the user the rule applies to, the access rights to audit,...
override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
Creates a new access control rule for the specified user, with the specified access rights,...
Represents a wrapper class for operating system handles. This class must be inherited.
void SetAccessRule(SemaphoreAccessRule rule)
Removes all access control rules with the same user and T:System.Security.AccessControl....
Provides the ability to control access to native objects without direct manipulation of Access Contro...
bool RemoveAccessRule(SemaphoreAccessRule rule)
Searches for an access control rule with the same user and T:System.Security.AccessControl....
Represents a combination of a user’s identity and an access mask.
SemaphoreRights
Specifies the access control rights that can be applied to named system semaphore objects.
void AddAccessRule(SemaphoreAccessRule rule)
Searches for a matching rule with which the new rule can be merged. If none are found,...
Represents type declarations: class types, interface types, array types, value types,...
ResourceType
Specifies the defined native object types.
Represents the Windows access control security for a named semaphore. This class cannot be inherited.
AccessControlType
Specifies whether an T:System.Security.AccessControl.AccessRule object is used to allow or deny acces...
SemaphoreSecurity(string name, AccessControlSections includeSections)
Initializes a new instance of the T:System.Security.AccessControl.SemaphoreSecurity class with the sp...
override Type AccessRuleType
Gets the type that the T:System.Security.AccessControl.SemaphoreSecurity class uses to represent acce...
override Type AccessRightType
Gets the enumeration that the T:System.Security.AccessControl.SemaphoreSecurity class uses to represe...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
bool RemoveAuditRule(SemaphoreAuditRule rule)
Searches for an audit control rule with the same user as the specified rule, and with compatible inhe...
void SetAuditRule(SemaphoreAuditRule rule)
Removes all audit rules with the same user as the specified rule, regardless of the T:System....
SemaphoreSecurity()
Initializes a new instance of the T:System.Security.AccessControl.SemaphoreSecurity class with defaul...
InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
override Type AuditRuleType
Gets the type that the T:System.Security.AccessControl.SemaphoreSecurity class uses to represent audi...
AccessControlSections
Specifies which sections of a security descriptor to save or load.
AuditFlags
Specifies the conditions for auditing attempts to access a securable object.