The information in this article applies to:
SUMMARYProgrammatically specifying access control for Windows NT container objects is more complex that that of other Win32 objects. This is because access control on container objects allows you to specify access to the container and access for future objects created in the container. MORE INFORMATION
A Windows NT securable object is a container if it can logically contain
other securable objects. The following table demonstrates the relationship
between a container object and the objects it might contain:
Windows NT supports ACL Inheritance. This means that when a new object is
created within a container object, the new object inherits permissions from
the parent container object by default.
When you programmatically assign access control to container objects, you must explicitly set the inheritance attribute of each access control entry (ACE). Use the following flags to set the ACE inheritance properties:
There are two ways to assign inheritance flags to an access control entry on Windows NT 3.x and 4.0. These techniques assume that you are familiar with the Windows NT access control API. For additional information, please see Win32 SDK and the following article in the Microsoft Knowledge Base: Q102102 HOWTO: Add an Access-Allowed ACE to a FileOnce the ACE is in the DACL through AddAccessAllowed/DeniedAce(), set the AceFlags member of the new ACE. You do this by using the GetAce() API to retrieve a pointer to the new ACE. Use this pointer to set the AceFlags member of the ACE header structure as follows:
This extra step is necessary because the AddAccessAllowedAce() API does not
have a parameter to specify this attribute of a new ACE.
On the other hand, you can build the ACE yourself and set the AceFlags member of the ACE_Header Structure as follows:
Additional query words: directory sid special security printer
Keywords : kbKernBase kbSecurity |
Last Reviewed: February 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |