1 using Microsoft.Win32.SafeHandles;
35 [SecuritySafeCritical]
48 private static Exception _HandleErrorCode(
int errorCode,
string name,
SafeHandle handle,
object context)
51 if (errorCode == 2 || errorCode == 6 || errorCode == 123)
75 return new MutexAccessRule(identityReference, accessMask, isInherited, inheritanceFlags, propagationFlags, type);
95 return new MutexAuditRule(identityReference, accessMask, isInherited, inheritanceFlags, propagationFlags, flags);
101 if (base.AccessRulesModified)
105 if (base.AuditRulesModified)
109 if (base.OwnerModified)
113 if (base.GroupModified)
117 return accessControlSections;
121 internal void Persist(SafeWaitHandle handle)
127 if (accessControlSectionsFromChanges != 0)
129 Persist(handle, accessControlSectionsFromChanges);
130 bool flag2 = base.AccessRulesModified =
false;
131 bool flag4 = base.AuditRulesModified = flag2;
132 bool ownerModified = base.GroupModified = flag4;
133 base.OwnerModified = ownerModified;
void AddAuditRule(MutexAuditRule rule)
Searches for an audit rule with which the new rule can be merged. If none are found,...
override Type AuditRuleType
Gets the type that the T:System.Security.AccessControl.MutexSecurity class uses to represent audit ru...
PropagationFlags
Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are signific...
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 SetAccessRule(MutexAccessRule rule)
Removes all access control rules with the same user and T:System.Security.AccessControl....
Represents a combination of a user's identity, an access mask, and an access control type (allow or d...
void RemoveAccessRuleSpecific(MutexAccessRule rule)
Searches for an access control rule that exactly matches the specified rule and, if found,...
override Type AccessRightType
Gets the enumeration that the T:System.Security.AccessControl.MutexSecurity class uses to represent a...
void SetAuditRule(MutexAuditRule rule)
Removes all audit rules with the same user as the specified rule, regardless of the T:System....
bool RemoveAuditRule(MutexAuditRule rule)
Searches for an audit control rule with the same user as the specified rule, and with compatible inhe...
void AddAccessRule(MutexAccessRule rule)
Searches for a matching access control rule with which the new rule can be merged....
Represents a wrapper class for operating system handles. This class must be inherited.
override Type AccessRuleType
Gets the type that the T:System.Security.AccessControl.MutexSecurity class uses to represent access r...
Provides the ability to control access to native objects without direct manipulation of Access Contro...
Provides information about, and means to manipulate, the current environment and platform....
Represents a combination of a user’s identity and an access mask.
bool RemoveAccessRule(MutexAccessRule rule)
Searches for an access control rule with the same user and T:System.Security.AccessControl....
Represents type declarations: class types, interface types, array types, value types,...
Represents the Windows access control security for a named mutex. This class cannot be inherited.
ResourceType
Specifies the defined native object types.
Represents a set of access rights allowed or denied for a user or group. This class cannot be inherit...
AccessControlType
Specifies whether an T:System.Security.AccessControl.AccessRule object is used to allow or deny acces...
MutexRights
Specifies the access control rights that can be applied to named system mutex objects.
Represents a set of access rights to be audited for a user or group. This class cannot be inherited.
void ResetAccessRule(MutexAccessRule rule)
Removes all access control rules with the same user as the specified rule, regardless of T:System....
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
MutexSecurity(string name, AccessControlSections includeSections)
Initializes a new instance of the T:System.Security.AccessControl.MutexSecurity class with the specif...
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,...
void RemoveAccessRuleAll(MutexAccessRule rule)
Searches for all access control rules with the same user and T:System.Security.AccessControl....
MutexSecurity()
Initializes a new instance of the T:System.Security.AccessControl.MutexSecurity class with default va...
InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
AccessControlSections
Specifies which sections of a security descriptor to save or load.
void RemoveAuditRuleAll(MutexAuditRule rule)
Searches for all audit rules with the same user as the specified rule and, if found,...
void RemoveAuditRuleSpecific(MutexAuditRule rule)
Searches for an audit rule that exactly matches the specified rule and, if found, removes it.
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,...
AuditFlags
Specifies the conditions for auditing attempts to access a securable object.