2 writes to _securityDescriptor
mscorlib (2)
system\security\accesscontrol\objectsecurity.cs (2)
79
_securityDescriptor
= new CommonSecurityDescriptor( isContainer, isDS, ControlFlags.None, null, null, null, dacl );
91
_securityDescriptor
= securityDescriptor;
119 references to _securityDescriptor
mscorlib (119)
system\security\accesscontrol\commonobjectsecurity.cs (33)
62
if ((
_securityDescriptor
.ControlFlags & ControlFlags.DiscretionaryAclPresent ) != 0)
64
acl =
_securityDescriptor
.DiscretionaryAcl;
69
if ((
_securityDescriptor
.ControlFlags & ControlFlags.SystemAclPresent ) != 0)
71
acl =
_securityDescriptor
.SystemAcl;
226
if (
_securityDescriptor
.DiscretionaryAcl == null )
236
_securityDescriptor
.DiscretionaryAcl = new DiscretionaryAcl( IsContainer, IsDS, GenericAcl.AclRevision, 1 );
237
_securityDescriptor
.AddControlFlags(ControlFlags.DiscretionaryAclPresent);
247
_securityDescriptor
.DiscretionaryAcl.AddAccess( AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
251
_securityDescriptor
.DiscretionaryAcl.SetAccess( AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
255
_securityDescriptor
.DiscretionaryAcl.RemoveAccess( AccessControlType.Deny, sid, -1, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, 0 );
256
_securityDescriptor
.DiscretionaryAcl.SetAccess( AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
260
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess( AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
264
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess( AccessControlType.Allow, sid, -1, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, 0 );
274
_securityDescriptor
.DiscretionaryAcl.RemoveAccessSpecific( AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
288
_securityDescriptor
.DiscretionaryAcl.AddAccess( AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
292
_securityDescriptor
.DiscretionaryAcl.SetAccess( AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
296
_securityDescriptor
.DiscretionaryAcl.RemoveAccess( AccessControlType.Allow, sid, -1, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, 0 );
297
_securityDescriptor
.DiscretionaryAcl.SetAccess( AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
301
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
305
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Deny, sid, -1, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, 0 );
315
_securityDescriptor
.DiscretionaryAcl.RemoveAccessSpecific( AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
357
if (
_securityDescriptor
.SystemAcl == null )
367
_securityDescriptor
.SystemAcl = new SystemAcl( IsContainer, IsDS, GenericAcl.AclRevision, 1 );
368
_securityDescriptor
.AddControlFlags(ControlFlags.SystemAclPresent);
376
_securityDescriptor
.SystemAcl.AddAudit( rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
380
_securityDescriptor
.SystemAcl.SetAudit( rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
384
_securityDescriptor
.SystemAcl.SetAudit( rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
388
result =
_securityDescriptor
.SystemAcl.RemoveAudit( rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
392
result =
_securityDescriptor
.SystemAcl.RemoveAudit( AuditFlags.Failure | AuditFlags.Success, sid, -1, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, 0 );
401
_securityDescriptor
.SystemAcl.RemoveAuditSpecific(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags );
505
if (
_securityDescriptor
== null )
531
if (
_securityDescriptor
== null )
559
if (
_securityDescriptor
== null )
system\security\accesscontrol\directoryobjectsecurity.cs (42)
60
if ((
_securityDescriptor
.ControlFlags & ControlFlags.DiscretionaryAclPresent) != 0)
62
acl =
_securityDescriptor
.DiscretionaryAcl;
67
if ((
_securityDescriptor
.ControlFlags & ControlFlags.SystemAclPresent) != 0)
69
acl =
_securityDescriptor
.SystemAcl;
258
if (
_securityDescriptor
.DiscretionaryAcl == null)
266
_securityDescriptor
.DiscretionaryAcl = new DiscretionaryAcl(IsContainer, IsDS, GenericAcl.AclRevisionDS, 1);
267
_securityDescriptor
.AddControlFlags(ControlFlags.DiscretionaryAclPresent);
275
if (
_securityDescriptor
.DiscretionaryAcl.Revision < GenericAcl.AclRevisionDS )
280
byte[] binaryForm = new byte[
_securityDescriptor
.DiscretionaryAcl.BinaryLength];
281
_securityDescriptor
.DiscretionaryAcl.GetBinaryForm(binaryForm, 0);
284
_securityDescriptor
.DiscretionaryAcl = new DiscretionaryAcl(IsContainer, IsDS, new RawAcl(binaryForm, 0));
296
_securityDescriptor
.DiscretionaryAcl.AddAccess(AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
300
_securityDescriptor
.DiscretionaryAcl.SetAccess(AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
304
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Deny, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
305
_securityDescriptor
.DiscretionaryAcl.SetAccess(AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
309
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
313
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Allow, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
323
_securityDescriptor
.DiscretionaryAcl.RemoveAccessSpecific(AccessControlType.Allow, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
337
_securityDescriptor
.DiscretionaryAcl.AddAccess(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
341
_securityDescriptor
.DiscretionaryAcl.SetAccess(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
345
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Allow, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
346
_securityDescriptor
.DiscretionaryAcl.SetAccess(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
350
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
354
result =
_securityDescriptor
.DiscretionaryAcl.RemoveAccess(AccessControlType.Deny, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
364
_securityDescriptor
.DiscretionaryAcl.RemoveAccessSpecific(AccessControlType.Deny, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
391
if (
_securityDescriptor
.SystemAcl == null)
399
_securityDescriptor
.SystemAcl = new SystemAcl(IsContainer, IsDS, GenericAcl.AclRevisionDS, 1);
400
_securityDescriptor
.AddControlFlags(ControlFlags.SystemAclPresent);
408
if (
_securityDescriptor
.SystemAcl.Revision < GenericAcl.AclRevisionDS )
413
byte[] binaryForm = new byte[
_securityDescriptor
.SystemAcl.BinaryLength];
414
_securityDescriptor
.SystemAcl.GetBinaryForm(binaryForm, 0);
417
_securityDescriptor
.SystemAcl = new SystemAcl(IsContainer, IsDS, new RawAcl(binaryForm, 0));
427
_securityDescriptor
.SystemAcl.AddAudit(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
431
_securityDescriptor
.SystemAcl.SetAudit(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
435
_securityDescriptor
.SystemAcl.RemoveAudit(AuditFlags.Failure | AuditFlags.Success, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
436
_securityDescriptor
.SystemAcl.SetAudit(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
440
result =
_securityDescriptor
.SystemAcl.RemoveAudit(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
444
result =
_securityDescriptor
.SystemAcl.RemoveAudit(AuditFlags.Failure | AuditFlags.Success, sid, -1, InheritanceFlags.ContainerInherit, 0, ObjectAceFlags.None, Guid.Empty, Guid.Empty);
454
_securityDescriptor
.SystemAcl.RemoveAuditSpecific(rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
586
if (
_securityDescriptor
== null)
612
if (
_securityDescriptor
== null)
634
if (
_securityDescriptor
== null)
system\security\accesscontrol\nativeobjectsecurity.cs (13)
197
if (( includeSections & AccessControlSections.Owner ) != 0 &&
_securityDescriptor
.Owner != null )
200
owner =
_securityDescriptor
.Owner;
203
if (( includeSections & AccessControlSections.Group ) != 0 &&
_securityDescriptor
.Group != null )
206
group =
_securityDescriptor
.Group;
212
if (
_securityDescriptor
.IsSystemAclPresent &&
213
_securityDescriptor
.SystemAcl != null &&
214
_securityDescriptor
.SystemAcl.Count > 0 )
216
sacl =
_securityDescriptor
.SystemAcl;
223
if ((
_securityDescriptor
.ControlFlags & ControlFlags.SystemAclProtected ) != 0 )
233
if (( includeSections & AccessControlSections.Access ) != 0 &&
_securityDescriptor
.IsDiscretionaryAclPresent )
238
if (
_securityDescriptor
.DiscretionaryAcl.EveryOneFullAccessForNullDacl)
244
dacl =
_securityDescriptor
.DiscretionaryAcl;
247
if ((
_securityDescriptor
.ControlFlags & ControlFlags.DiscretionaryAclProtected ) != 0 )
system\security\accesscontrol\objectsecurity.cs (28)
105
_securityDescriptor
.Owner = newOne.Owner;
111
_securityDescriptor
.Group = newOne.Group;
119
_securityDescriptor
.SystemAcl = new SystemAcl( IsContainer, IsDS, newOne.SystemAcl, true );
123
_securityDescriptor
.SystemAcl = null;
126
_securityDescriptor
.UpdateControlFlags(SACL_CONTROL_FLAGS, (ControlFlags)(newOne.ControlFlags & SACL_CONTROL_FLAGS));
134
_securityDescriptor
.DiscretionaryAcl = new DiscretionaryAcl( IsContainer, IsDS, newOne.DiscretionaryAcl, true );
138
_securityDescriptor
.DiscretionaryAcl = null;
143
ControlFlags daclFlag = (
_securityDescriptor
.ControlFlags & ControlFlags.DiscretionaryAclPresent);
145
_securityDescriptor
.UpdateControlFlags(DACL_CONTROL_FLAGS,
268
get { return
_securityDescriptor
.IsContainer; }
273
get { return
_securityDescriptor
.IsDS; }
363
if (
_securityDescriptor
.Owner == null )
368
return
_securityDescriptor
.Owner.Translate( targetType );
388
_securityDescriptor
.Owner = identity.Translate( typeof( SecurityIdentifier )) as SecurityIdentifier;
407
if (
_securityDescriptor
.Group == null )
412
return
_securityDescriptor
.Group.Translate( targetType );
432
_securityDescriptor
.Group = identity.Translate( typeof( SecurityIdentifier )) as SecurityIdentifier;
453
_securityDescriptor
.PurgeAccessControl( identity.Translate( typeof( SecurityIdentifier )) as SecurityIdentifier );
474
_securityDescriptor
.PurgeAudit( identity.Translate( typeof( SecurityIdentifier )) as SecurityIdentifier );
491
return ((
_securityDescriptor
.ControlFlags & ControlFlags.DiscretionaryAclProtected ) != 0 );
506
_securityDescriptor
.SetDiscretionaryAclProtection( isProtected, preserveInheritance );
523
return ((
_securityDescriptor
.ControlFlags & ControlFlags.SystemAclProtected ) != 0 );
538
_securityDescriptor
.SetSystemAclProtection( isProtected, preserveInheritance );
555
return
_securityDescriptor
.IsDiscretionaryAclCanonical;
572
return
_securityDescriptor
.IsSystemAclCanonical;
592
return
_securityDescriptor
.GetSddlForm( includeSections );
638
byte[] result = new byte[
_securityDescriptor
.BinaryLength];
640
_securityDescriptor
.GetBinaryForm( result, 0 );
system\security\cryptography\utils.cs (3)
291
if ((accessControlSections & AccessControlSections.Owner) != 0 && cryptoKeySecurity.
_securityDescriptor
.Owner != null)
293
if ((accessControlSections & AccessControlSections.Group) != 0 && cryptoKeySecurity.
_securityDescriptor
.Group != null)
297
if ((accessControlSections & AccessControlSections.Access) != 0 && cryptoKeySecurity.
_securityDescriptor
.IsDiscretionaryAclPresent)