Creating Security Descriptors
If you are creating
an object from scratch and you don't want it to receive the default DACL and SACL that would normally be applied to objects created, you can write your own DACL and SACL for an object. As you would expect, there are a number of properties associated with security descriptors and ACLs that you need to set. SDs
and ACLs can be manipulated with the IADsAccessControlList
(see Table 26-10) and IADsSecurityDescriptor
(see Table 26-11) interfaces. We'll go through these briefly now and then move on to some more examples.
Table 26-10. IADsAccessControlList methods and properties
IADsAccessControlList methods and properties |
Action |
---|---|
|
Adds an ACE to an ACL |
|
Removes an ACE from an ACL |
|
Copies the current ACL |
|
Shows the revision of the ACL (always set to 4; see later text) |
|
Indicates the number of ACEs in the ACL |
Table 26-11. IADsSecurityDescriptor methods and properties
IADsSecurityDescriptor methods and properties |
Action |
---|---|
|
A copy of an existing SD. |
|
The revision of the SD (always set to 4, as noted earlier). |
|
A set of flags indicating various aspects of the SD (see later text). Generally, you will not need to set this property; instead, you can set the properties listed in this table. |
|
The SID of the owner. If this field is null, no owner is set. |
|
Get Active Directory, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.