<< |  >>
#7388 Dodano: 08-04-2014 17:40. Głosów: 51
This is the simplest way to create a DACL.
Use ConvertStringSecurityDescriptorToSecurityDescriptor,
Function takes a string in a format called SDDL specifying the ACL.
Writing SCs will be achivabe by creating DACL's with SDDL.

Very simple code will illustrate this tool:

SECURITY_ATTRIBUTES security;
ZeroMemory(&security, sizeof(security));

security.nLength = sizeof(security);
ConvertStringSecurityDescriptorToSecurityDescriptor(
L"D:P(A;OICI;GA;;;SY)(A;OICI;GA;;;BA)(A;OICI;GR;;;IU)",
SDDL_REVISION_1,
&security.lpSecurityDescriptor,
NULL);

As You see, SDDL string contains human readable form of ACLs
which are rather obvious and doesn't need to explain.
Fabulous and easy form to operate on ACL...
<< |  >>
Tbz_banner

Reklama