scripts
This commit is contained in:
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Security.AccessControl
|
||||
{
|
||||
/// <summary>Controls access to objects without direct manipulation of access control lists (ACLs). This class is the abstract base class for the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class.</summary>
|
||||
// Token: 0x020004B0 RID: 1200
|
||||
[MonoTODO("required for NativeObjectSecurity - implementation is missing")]
|
||||
public abstract class CommonObjectSecurity : ObjectSecurity
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> class.</summary>
|
||||
/// <param name="isContainer">true if the new object is a container object.</param>
|
||||
// Token: 0x06002CCC RID: 11468 RVA: 0x000930AC File Offset: 0x000912AC
|
||||
protected CommonObjectSecurity(bool isContainer)
|
||||
: base(isContainer, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of the access rules associated with the specified security identifier.</summary>
|
||||
/// <returns>The collection of access rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
|
||||
/// <param name="includeExplicit">true to include access rules explicitly set for the object.</param>
|
||||
/// <param name="includeInherited">true to include inherited access rules.</param>
|
||||
/// <param name="targetType">Specifies whether the security identifier for which to retrieve access rules is of type T:System.Security.Principal.SecurityIdentifier or type T:System.Security.Principal.NTAccount. The value of this parameter must be a type that can be translated to the <see cref="T:System.Security.Principal.SecurityIdentifier" /> type.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002CCD RID: 11469 RVA: 0x000930CC File Offset: 0x000912CC
|
||||
public AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, Type targetType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of the audit rules associated with the specified security identifier.</summary>
|
||||
/// <returns>The collection of audit rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
|
||||
/// <param name="includeExplicit">true to include audit rules explicitly set for the object.</param>
|
||||
/// <param name="includeInherited">true to include inherited audit rules.</param>
|
||||
/// <param name="targetType">The security identifier for which to retrieve audit rules. This must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002CCE RID: 11470 RVA: 0x000930D4 File Offset: 0x000912D4
|
||||
public AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, Type targetType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The access rule to add.</param>
|
||||
// Token: 0x06002CCF RID: 11471 RVA: 0x000930DC File Offset: 0x000912DC
|
||||
protected void AddAccessRule(AccessRule rule)
|
||||
{
|
||||
this.access_rules.Add(rule);
|
||||
base.AccessRulesModified = true;
|
||||
}
|
||||
|
||||
/// <summary>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 <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <returns>true if the access rule was successfully removed; otherwise, false.</returns>
|
||||
/// <param name="rule">The access rule to remove.</param>
|
||||
// Token: 0x06002CD0 RID: 11472 RVA: 0x000930F4 File Offset: 0x000912F4
|
||||
protected bool RemoveAccessRule(AccessRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The access rule to remove.</param>
|
||||
// Token: 0x06002CD1 RID: 11473 RVA: 0x000930FC File Offset: 0x000912FC
|
||||
protected void RemoveAccessRuleAll(AccessRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The access rule to remove.</param>
|
||||
// Token: 0x06002CD2 RID: 11474 RVA: 0x00093104 File Offset: 0x00091304
|
||||
protected void RemoveAccessRuleSpecific(AccessRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes all access rules in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified access rule.</summary>
|
||||
/// <param name="rule">The access rule to reset.</param>
|
||||
// Token: 0x06002CD3 RID: 11475 RVA: 0x0009310C File Offset: 0x0009130C
|
||||
protected void ResetAccessRule(AccessRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>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 <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified access rule.</summary>
|
||||
/// <param name="rule">The access rule to set.</param>
|
||||
// Token: 0x06002CD4 RID: 11476 RVA: 0x00093114 File Offset: 0x00091314
|
||||
protected void SetAccessRule(AccessRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Applies the specified modification to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <returns>true if the DACL is successfully modified; otherwise, false.</returns>
|
||||
/// <param name="modification">The modification to apply to the DACL.</param>
|
||||
/// <param name="rule">The access rule to modify.</param>
|
||||
/// <param name="modified">true if the DACL is successfully modified; otherwise, false.</param>
|
||||
// Token: 0x06002CD5 RID: 11477 RVA: 0x0009311C File Offset: 0x0009131C
|
||||
protected override bool ModifyAccess(AccessControlModification modification, AccessRule rule, out bool modified)
|
||||
{
|
||||
foreach (AccessRule accessRule in this.access_rules)
|
||||
{
|
||||
if (rule == accessRule)
|
||||
{
|
||||
switch (modification)
|
||||
{
|
||||
case AccessControlModification.Add:
|
||||
this.AddAccessRule(rule);
|
||||
break;
|
||||
case AccessControlModification.Set:
|
||||
this.SetAccessRule(rule);
|
||||
break;
|
||||
case AccessControlModification.Reset:
|
||||
this.ResetAccessRule(rule);
|
||||
break;
|
||||
case AccessControlModification.Remove:
|
||||
this.RemoveAccessRule(rule);
|
||||
break;
|
||||
case AccessControlModification.RemoveAll:
|
||||
this.RemoveAccessRuleAll(rule);
|
||||
break;
|
||||
case AccessControlModification.RemoveSpecific:
|
||||
this.RemoveAccessRuleSpecific(rule);
|
||||
break;
|
||||
}
|
||||
modified = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
modified = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified audit rule to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The audit rule to add.</param>
|
||||
// Token: 0x06002CD6 RID: 11478 RVA: 0x00093208 File Offset: 0x00091408
|
||||
protected void AddAuditRule(AuditRule rule)
|
||||
{
|
||||
this.audit_rules.Add(rule);
|
||||
base.AuditRulesModified = true;
|
||||
}
|
||||
|
||||
/// <summary>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 <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <returns>true if the audit rule was successfully removed; otherwise, false.</returns>
|
||||
/// <param name="rule">The audit rule to remove.</param>
|
||||
// Token: 0x06002CD7 RID: 11479 RVA: 0x00093220 File Offset: 0x00091420
|
||||
protected bool RemoveAuditRule(AuditRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>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 <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The audit rule to remove.</param>
|
||||
// Token: 0x06002CD8 RID: 11480 RVA: 0x00093228 File Offset: 0x00091428
|
||||
protected void RemoveAuditRuleAll(AuditRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <param name="rule">The audit rule to remove.</param>
|
||||
// Token: 0x06002CD9 RID: 11481 RVA: 0x00093230 File Offset: 0x00091430
|
||||
protected void RemoveAuditRuleSpecific(AuditRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>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 <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified audit rule.</summary>
|
||||
/// <param name="rule">The audit rule to set.</param>
|
||||
// Token: 0x06002CDA RID: 11482 RVA: 0x00093238 File Offset: 0x00091438
|
||||
protected void SetAuditRule(AuditRule rule)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Applies the specified modification to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
|
||||
/// <returns>true if the SACL is successfully modified; otherwise, false.</returns>
|
||||
/// <param name="modification">The modification to apply to the SACL.</param>
|
||||
/// <param name="rule">The audit rule to modify.</param>
|
||||
/// <param name="modified">true if the SACL is successfully modified; otherwise, false.</param>
|
||||
// Token: 0x06002CDB RID: 11483 RVA: 0x00093240 File Offset: 0x00091440
|
||||
protected override bool ModifyAudit(AccessControlModification modification, AuditRule rule, out bool modified)
|
||||
{
|
||||
foreach (AuditRule auditRule in this.audit_rules)
|
||||
{
|
||||
if (rule == auditRule)
|
||||
{
|
||||
switch (modification)
|
||||
{
|
||||
case AccessControlModification.Add:
|
||||
this.AddAuditRule(rule);
|
||||
break;
|
||||
case AccessControlModification.Set:
|
||||
this.SetAuditRule(rule);
|
||||
break;
|
||||
case AccessControlModification.Remove:
|
||||
this.RemoveAuditRule(rule);
|
||||
break;
|
||||
case AccessControlModification.RemoveAll:
|
||||
this.RemoveAuditRuleAll(rule);
|
||||
break;
|
||||
case AccessControlModification.RemoveSpecific:
|
||||
this.RemoveAuditRuleSpecific(rule);
|
||||
break;
|
||||
}
|
||||
base.AuditRulesModified = true;
|
||||
modified = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
modified = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x040011A1 RID: 4513
|
||||
private List<AccessRule> access_rules = new List<AccessRule>();
|
||||
|
||||
// Token: 0x040011A2 RID: 4514
|
||||
private List<AuditRule> audit_rules = new List<AuditRule>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user