how to get folder/files ACL permissions using c++???

how to get folder/files ACL permissions using c++???

Post by dude » Thu, 22 Feb 2007 15:22:25



hi all,

Im very new to windows security. i need to backup and restore files/
folders with their ACL permissions. any one know how to get the ACL
permissions for the particular files/folders?

p.s: i have no idea about SDDL

any help would be appriciated


thanks in advance

-prince
 
 
 

how to get folder/files ACL permissions using c++???

Post by bGVsdGV0b » Fri, 23 Feb 2007 02:14:50

Look at the API function GetFileSecurity (Platform SDK)
http://www.yqcomputer.com/

Laszlo Elteto
SafeNet, Inc.

 
 
 

how to get folder/files ACL permissions using c++???

Post by dude » Fri, 23 Feb 2007 19:19:18

Hi Laszlo,

Thanks for you promt reply it is very useful for me , and ill update
the results soon

thanz again

-prince

On Feb 21, 10:14 pm, lelteto < XXXX@XXXXX.COM >
 
 
 

how to get folder/files ACL permissions using c++???

Post by dude » Sat, 03 Mar 2007 23:46:05

Hi all,

When i use the
InitializeSecurityDescriptor(sd,SECURITY_DESCRIPTOR_REVISION)'
function i got the error:
ERROR_UNKNOWN_REVISION 1305(The revision level is unknown.)

then i changed to PSECURITY_DESCRIPTOR *NewSD= new
PSECURITY_DESCRIPTOR;

but im getting the same error while using the
SetSecurityDescriptorDacl(NewSD,TRUE, NULL, FALSE)).

can anyone tell me how to set the security_descriptor_revision level.
 
 
 

how to get folder/files ACL permissions using c++???

Post by dude » Sun, 04 Mar 2007 15:36:47

problem is i didnt initialize the security_descriptor in first case.

problem solved.

if any other case this problem occurs please post here