Microsoft KB Archive/102100

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Passing Security Information to SetFileSecurity()

ID: Q102100



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows NT 3.1



The SetFileSecurity() Win32 application programming interface (API) takes a pointer to a Security Descriptor. This is because SetFileSecurity() can set any of the following security information for a file:

The owner identifier of the file

The primary group identifier of the file
The discretionary access-control list (DACL) of the file
The system access-control list (SACL) of the file

When you pass the SD and SECURITY_INFORMATION structure to SetFileSecurity(), the SECURITY_INFORMATION structure identifies which security information is to be set. The SECURITY_INFORMATION structure is a DWORD that can be one of the following values:

OWNER_SECURITY_INFORMATION

GROUP_SECURITY_INFORMATION
DACL_SECURITY_INFORMATION
SACL_SECURITY_INFORMATION

Each of these values represents one of the security items listed above. The SD that is passed to SetFileSecurity() is simply a container for the security information being set for the specified file. SetFileSecurity() examines the value in the SECURITY_INFORMATION structure, extracts the appropriate information from the provided SD, and applies it to the specified file's SD. Additional query words: 3.10

Keywords          : 
Version           : winnt:3.1
Platform          : winnt 
Issue type        : 

Last Reviewed: October 20, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.