Export (0) Print
Expand All

PipeSecurity Class

Represents the access control and audit security for a pipe.

Namespace:  System.IO.Pipes
Assembly:  System.Core (in System.Core.dll)

[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public class PipeSecurity : NativeObjectSecurity

The PipeSecurity type exposes the following members.

  NameDescription
Public methodPipeSecurityInitializes a new instance of the PipeSecurity class.
Top

  NameDescription
Public propertyAccessRightTypeGets the Type of the securable object that is associated with the current PipeSecurity object. (Overrides ObjectSecurity.AccessRightType.)
Protected propertyAccessRulesModifiedGets or sets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object have been modified. (Inherited from ObjectSecurity.)
Public propertyAccessRuleTypeGets the Type of the object that is associated with the access rules of the current PipeSecurity object. (Overrides ObjectSecurity.AccessRuleType.)
Public propertyAreAccessRulesCanonicalGets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object are in canonical order. (Inherited from ObjectSecurity.)
Public propertyAreAccessRulesProtectedGets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this ObjectSecurity object is protected. (Inherited from ObjectSecurity.)
Public propertyAreAuditRulesCanonicalGets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object are in canonical order. (Inherited from ObjectSecurity.)
Public propertyAreAuditRulesProtectedGets a Boolean value that specifies whether the System Access Control List (SACL) associated with this ObjectSecurity object is protected. (Inherited from ObjectSecurity.)
Protected propertyAuditRulesModifiedGets or sets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object have been modified. (Inherited from ObjectSecurity.)
Public propertyAuditRuleTypeGets the Type object associated with the audit rules of the current PipeSecurity object. (Overrides ObjectSecurity.AuditRuleType.)
Protected propertyGroupModifiedGets or sets a Boolean value that specifies whether the group associated with the securable object has been modified. (Inherited from ObjectSecurity.)
Protected propertyIsContainerGets a Boolean value that specifies whether this ObjectSecurity object is a container object. (Inherited from ObjectSecurity.)
Protected propertyIsDSGets a Boolean value that specifies whether this ObjectSecurity object is a directory object. (Inherited from ObjectSecurity.)
Protected propertyOwnerModifiedGets or sets a Boolean value that specifies whether the owner of the securable object has been modified. (Inherited from ObjectSecurity.)
Top

  NameDescription
Public methodAccessRuleFactoryInitializes a new instance of the AccessRule class with the specified values. (Overrides ObjectSecurity.AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType).)
Protected methodAddAccessRule(AccessRule)Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodAddAccessRule(PipeAccessRule)Adds an access rule to the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object.
Protected methodAddAuditRule(AuditRule)Adds the specified audit rule to the System Access Control List (SACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodAddAuditRule(PipeAuditRule)Adds an audit rule to the System Access Control List (SACL)that is associated with the current PipeSecurity object.
Public methodAuditRuleFactoryInitializes a new instance of the AuditRule class with the specified values. (Overrides ObjectSecurity.AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags).)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAccessRulesGets a collection of the access rules associated with the specified security identifier. (Inherited from CommonObjectSecurity.)
Public methodGetAuditRulesGets a collection of the audit rules associated with the specified security identifier. (Inherited from CommonObjectSecurity.)
Public methodGetGroupGets the primary group associated with the specified owner. (Inherited from ObjectSecurity.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetOwnerGets the owner associated with the specified primary group. (Inherited from ObjectSecurity.)
Public methodGetSecurityDescriptorBinaryFormReturns an array of byte values that represents the security descriptor information for this ObjectSecurity object. (Inherited from ObjectSecurity.)
Public methodGetSecurityDescriptorSddlFormReturns the Security Descriptor Definition Language (SDDL) representation of the specified sections of the security descriptor associated with this ObjectSecurity object. (Inherited from ObjectSecurity.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodModifyAccessApplies the specified modification to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodModifyAccessRuleApplies the specified modification to the Discretionary Access Control List (DACL) associated with this ObjectSecurity object. (Inherited from ObjectSecurity.)
Protected methodModifyAuditApplies the specified modification to the System Access Control List (SACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodModifyAuditRuleApplies the specified modification to the System Access Control List (SACL) associated with this ObjectSecurity object. (Inherited from ObjectSecurity.)
Protected methodPersist(SafeHandle)Saves the specified sections of the security descriptor that is associated with the current PipeSecurity object to permanent storage.
Protected methodPersist(String)Saves the specified sections of the security descriptor that is associated with the current PipeSecurity object to permanent storage.
Protected methodPersist(SafeHandle, AccessControlSections)Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks. (Inherited from NativeObjectSecurity.)
Protected methodPersist(String, AccessControlSections)Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks. (Inherited from NativeObjectSecurity.)
Protected methodPersist(Boolean, String, AccessControlSections)Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks. (Inherited from ObjectSecurity.)
Protected methodPersist(SafeHandle, AccessControlSections, Object)Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks. (Inherited from NativeObjectSecurity.)
Protected methodPersist(String, AccessControlSections, Object)Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks. (Inherited from NativeObjectSecurity.)
Public methodPurgeAccessRulesRemoves all access rules associated with the specified IdentityReference. (Inherited from ObjectSecurity.)
Public methodPurgeAuditRulesRemoves all audit rules associated with the specified IdentityReference. (Inherited from ObjectSecurity.)
Protected methodReadLockLocks this ObjectSecurity object for read access. (Inherited from ObjectSecurity.)
Protected methodReadUnlockUnlocks this ObjectSecurity object for read access. (Inherited from ObjectSecurity.)
Protected methodRemoveAccessRule(AccessRule)Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodRemoveAccessRule(PipeAccessRule)Removes an access rule from the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object.
Protected methodRemoveAccessRuleAllRemoves all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Protected methodRemoveAccessRuleSpecific(AccessRule)Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodRemoveAccessRuleSpecific(PipeAccessRule)Removes the specified access rule from the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object.
Protected methodRemoveAuditRule(AuditRule)Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodRemoveAuditRule(PipeAuditRule)Removes an audit rule from the System Access Control List (SACL) that is associated with the current PipeSecurity object.
Protected methodRemoveAuditRuleAll(AuditRule)Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodRemoveAuditRuleAll(PipeAuditRule)Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) that is associated with the current PipeSecurity object.
Protected methodRemoveAuditRuleSpecific(AuditRule)Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public methodRemoveAuditRuleSpecific(PipeAuditRule)Removes the specified audit rule from the System Access Control List (SACL) that is associated with the current PipeSecurity object.
Protected methodResetAccessRule(AccessRule)Removes all access rules in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule. (Inherited from CommonObjectSecurity.)
Public methodResetAccessRule(PipeAccessRule)Removes all access rules in the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object and then adds the specified access rule.
Protected methodSetAccessRule(AccessRule)Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule. (Inherited from CommonObjectSecurity.)
Public methodSetAccessRule(PipeAccessRule)Sets an access rule in the Discretionary Access Control List (DACL) that is associated with the current PipeSecurity object.
Public methodSetAccessRuleProtectionSets or removes protection of the access rules associated with this ObjectSecurity object. Protected access rules cannot be modified by parent objects through inheritance. (Inherited from ObjectSecurity.)
Protected methodSetAuditRule(AuditRule)Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this CommonObjectSecurity object and then adds the specified audit rule. (Inherited from CommonObjectSecurity.)
Public methodSetAuditRule(PipeAuditRule)Sets an audit rule in the System Access Control List (SACL) that is associated with the current PipeSecurity object.
Public methodSetAuditRuleProtectionSets or removes protection of the audit rules associated with this ObjectSecurity object. Protected audit rules cannot be modified by parent objects through inheritance. (Inherited from ObjectSecurity.)
Public methodSetGroupSets the primary group for the security descriptor associated with this ObjectSecurity object. (Inherited from ObjectSecurity.)
Public methodSetOwnerSets the owner for the security descriptor associated with this ObjectSecurity object. (Inherited from ObjectSecurity.)
Public methodSetSecurityDescriptorBinaryForm(Byte[])Sets the security descriptor for this ObjectSecurity object from the specified array of byte values. (Inherited from ObjectSecurity.)
Public methodSetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified array of byte values. (Inherited from ObjectSecurity.)
Public methodSetSecurityDescriptorSddlForm(String)Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string. (Inherited from ObjectSecurity.)
Public methodSetSecurityDescriptorSddlForm(String, AccessControlSections)Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string. (Inherited from ObjectSecurity.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodWriteLockLocks this ObjectSecurity object for write access. (Inherited from ObjectSecurity.)
Protected methodWriteUnlockUnlocks this ObjectSecurity object for write access. (Inherited from ObjectSecurity.)
Top

The PipeSecurity class specifies the access rights for a pipe and how access attempts are audited. This class represents access and audit rights as a set of rules. Each access rule is represented by a PipeAccessRule object, while each audit rule is represented by a PipeAuditRule object.

The PipeSecurity class is an abstraction of the underlying Microsoft Windows file security system. In this system, each pipe has a discretionary access control list (DACL), which controls access to the pipe, and a system access control list (SACL), which specifies the access control attempts that are audited. The PipeAccessRule and PipeAuditRule classes are abstractions of the access control entries (ACEs) that comprise DACLs and SACLs.

The PipeSecurity class hides many of the details of DACLs and SACLs; you do not have to worry about ACE ordering or null DACLS.

Use the PipeSecurity class to retrieve, add, or change the access rules that represent the DACL and SACL of a pipe.

To persist new or changed access or audit rules to a pipe, use the SetAccessControl method. To retrieve access or audit rules from an existing file, use the GetAccessControl method.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft