AuditSetGlobalSacl function
The AuditSetGlobalSacl function sets a global system access control list (SACL) that delegates access to the audit messages. Updating the global SACL requires the SeSecurityPrivilege which protects the global SACL from being updated by any user without administrator privileges.
Syntax
BOOLEAN WINAPI AuditSetGlobalSacl( _In_ PCWSTR ObjectTypeName, _In_opt_ PACL Acl );
Parameters
- ObjectTypeName [in]
-
A pointer to a null-terminated string specifying the type of object being created or accessed. For setting the global SACL on files, this should be set to "File" and for setting the global SACL on registry, this should be set to "Key". This string appears in any audit message that the function generates.
- Acl [in, optional]
-
A pointer to an ACL structure.
Return value
If the function succeeds, it returns TRUE.
If the function fails, it returns FALSE. To get extended error information, call GetLastError. GetLastError may return one of the following error codes defined in WinError.h.
| Return code/value | Description |
|---|---|
|
The caller does not have the privilege or access rights necessary to call this function. |
|
One or more parameters are invalid. |
Remarks
To successfully call this function, the caller must have SeSecurityPrivilege.
Requirements
|
Minimum supported client |
Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
AuditSetGlobalSaclW (Unicode) and AuditSetGlobalSaclA (ANSI) |