本文整理汇总了C#中ObjectAceFlags类的典型用法代码示例。如果您正苦于以下问题:C# ObjectAceFlags类的具体用法?C# ObjectAceFlags怎么用?C# ObjectAceFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectAceFlags类属于命名空间,在下文中一共展示了ObjectAceFlags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveAuditSpecific
public void RemoveAuditSpecific(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
if (!base.IsDS)
{
throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_OnlyValidForDS"));
}
base.RemoveQualifiedAcesSpecific(sid, AceQualifier.SystemAudit, accessMask, (AceFlags) ((byte) (GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags))), objectFlags, objectType, inheritedObjectType);
}
示例2: AddAudit
public void AddAudit(AuditFlags auditFlags, SecurityIdentifier sid,
int accessMask, InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags, Guid objectType,
Guid inheritedObjectType)
{
// TODO
}
示例3: AddAccess
public void AddAccess(AccessControlType accessType, SecurityIdentifier sid,
int accessMask, InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags, Guid objectType,
Guid inheritedObjectType)
{
// TODO
}
示例4: RemoveAudit
public bool RemoveAudit(AuditFlags auditFlags, SecurityIdentifier sid,
int accessMask, InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags, Guid objectType,
Guid inheritedObjectType)
{
// TODO
return false;
}
示例5: RemoveAccessSpecific
public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
if (!base.IsDS)
{
throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_OnlyValidForDS"));
}
base.CheckAccessType(accessType);
this.everyOneFullAccessForNullDacl = false;
base.RemoveQualifiedAcesSpecific(sid, (accessType == AccessControlType.Allow) ? AceQualifier.AccessAllowed : AceQualifier.AccessDenied, accessMask, GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), objectFlags, objectType, inheritedObjectType);
}
示例6: ObjectAce
internal ObjectAce (AceType type, AceFlags flags, int accessMask,
SecurityIdentifier sid, ObjectAceFlags objFlags,
Guid objType, Guid inheritedType, byte[] opaque)
: base(type, flags, opaque)
{
AccessMask = accessMask;
SecurityIdentifier = sid;
ObjectAceFlags = objFlags;
ObjectAceType = objType;
InheritedObjectAceType = inheritedType;
}
示例7: RemoveAccess
public bool RemoveAccess (AccessControlType accessType,
SecurityIdentifier sid,
int accessMask,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags,
Guid objectType,
Guid inheritedObjectType)
{
throw new NotImplementedException ();
}
示例8: AddAudit
public void AddAudit (AuditFlags auditFlags,
SecurityIdentifier sid, int accessMask,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags,
Guid objectType,
Guid inheritedObjectType)
{
// ObjectAce?
throw new NotImplementedException ();
}
示例9: AddAudit
public void AddAudit (AuditFlags auditFlags,
SecurityIdentifier sid, int accessMask,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags,
Guid objectType,
Guid inheritedObjectType)
{
AddAce (AceQualifier.SystemAudit, sid, accessMask,
inheritanceFlags, propagationFlags, auditFlags,
objectFlags, objectType, inheritedObjectType);
}
示例10: AddAccess
public void AddAccess (AccessControlType accessType,
SecurityIdentifier sid, int accessMask,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
ObjectAceFlags objectFlags,
Guid objectType,
Guid inheritedObjectType)
{
AddAce (GetAceQualifier (accessType), sid, accessMask,
inheritanceFlags, propagationFlags, AuditFlags.None,
objectFlags, objectType, inheritedObjectType);
}
示例11: VerifyObjectAce
protected static void VerifyObjectAce(ObjectAce ace, AceFlags aceFlags, AceQualifier qualifier, int accessMask, SecurityIdentifier sid, ObjectAceFlags flags, Guid type, Guid inheritedType, bool isCallback, byte[] opaque)
{
Assert.Equal(aceFlags, ace.AceFlags);
Assert.Equal(accessMask, ace.AccessMask);
Assert.Equal(sid, ace.SecurityIdentifier);
Assert.Equal(opaque, ace.GetOpaque());
Assert.Equal(qualifier, ace.AceQualifier);
Assert.Equal(isCallback, ace.IsCallback);
Assert.Equal(flags, ace.ObjectAceFlags);
Assert.Equal(type, ace.ObjectAceType);
Assert.Equal(inheritedType, ace.InheritedObjectAceType);
}
示例12: ObjectAce
public ObjectAce (AceFlags aceFlags, AceQualifier qualifier,
int accessMask, SecurityIdentifier sid,
ObjectAceFlags flags, Guid type,
Guid inheritedType, bool isCallback,
byte[] opaque)
: base (InheritanceFlags.None, PropagationFlags.None, qualifier, isCallback, opaque)
{
AceFlags = aceFlags;
SecurityIdentifier = sid;
object_ace_flags = flags;
object_ace_type = type;
inherited_object_type = inheritedType;
}
示例13: ObjectAccessRule
protected ObjectAccessRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AccessControlType type) : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, type)
{
if (!objectType.Equals(Guid.Empty) && ((accessMask & ObjectAce.AccessMaskWithObjectType) != 0))
{
this._objectType = objectType;
this._objectFlags |= ObjectAceFlags.ObjectAceTypePresent;
}
else
{
this._objectType = Guid.Empty;
}
if (!inheritedObjectType.Equals(Guid.Empty) && ((inheritanceFlags & InheritanceFlags.ContainerInherit) != InheritanceFlags.None))
{
this._inheritedObjectType = inheritedObjectType;
this._objectFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
}
else
{
this._inheritedObjectType = Guid.Empty;
}
}
示例14: RemoveAuditSpecific
public void RemoveAuditSpecific( AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType )
{
//
// This is valid only for DS Acls
//
if ( !IsDS )
{
throw new InvalidOperationException(
Environment.GetResourceString( "InvalidOperation_OnlyValidForDS" ));
}
Contract.EndContractBlock();
RemoveQualifiedAcesSpecific(sid, AceQualifier.SystemAudit, accessMask, GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), objectFlags, objectType, inheritedObjectType);
}
示例15: RemoveQualifiedAcesSpecific
internal void RemoveQualifiedAcesSpecific( SecurityIdentifier sid, AceQualifier qualifier, int accessMask, AceFlags flags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType )
{
if ( accessMask == 0 )
{
throw new ArgumentException(
Environment.GetResourceString( "Argument_ArgumentZero" ),
"accessMask" );
}
if ( qualifier == AceQualifier.SystemAudit &&
(( flags & AceFlags.AuditFlags ) == 0 ))
{
throw new ArgumentException(
Environment.GetResourceString( "Arg_EnumAtLeastOneFlag" ),
"flags" );
}
if ( sid == null )
{
throw new ArgumentNullException( "sid" );
}
Contract.EndContractBlock();
ThrowIfNotCanonical();
for ( int i = 0; i < Count; i++ )
{
QualifiedAce ace = _acl[i] as QualifiedAce;
//
// Not a qualified ACE - keep going
//
if ( ace == null )
{
continue;
}
//
// Only interested in explicit (non-inherited) ACEs
//
if (( ace.AceFlags & AceFlags.Inherited ) != 0 )
{
continue;
}
//
// Only interested in ACEs with the specified qualifier
//
if ( ace.AceQualifier != qualifier )
{
continue;
}
//
// Only interested in ACEs with the specified SID
//
if ( ace.SecurityIdentifier != sid )
{
continue;
}
//
// Only interested in exact ACE flag matches
//
if ( ace.AceFlags != flags )
{
continue;
}
//
// Only interested in exact access mask matches
//
if ( ace.AccessMask != accessMask )
{
continue;
}
if ( IsDS )
{
//
// Incase of object aces, only interested in ACEs which match in their
// objectType and inheritedObjectType
//
if (( ace is ObjectAce ) && ( objectFlags != ObjectAceFlags.None ))
{
//
// both are object aces, so must match in object type and inherited object type
//
ObjectAce objectAce = ace as ObjectAce;
if (( !objectAce.ObjectTypesMatch( objectFlags, objectType ))
|| ( !objectAce.InheritedObjectTypesMatch( objectFlags, inheritedObjectType )))
{
continue;
//.........这里部分代码省略.........