Registry key permissions...

J

Jose Cintron

I'm looking for a way to obtain the ACL for a specific registry key. For example if I want the permissions of
HKLM\SOFTWARE\Microsoft

I would get something like
Administrators Full Control
Creator Owner Special Permissions (List of special permissions here)
Power Users Read
Special Permissions (List of special permissions here)
SYSTEM Full Control
Users Read

In general terms what I want is something that would return a structure similar to the following for file ACLs

Set wmiSecuritySettings = wmiServices.Get ("Win32_LogicalFileSecuritySetting.Path='" & fname & "'")
intRetVal = wmiSecuritySettings.GetSecurityDescriptor(wmiSecurityDescriptor)

Any suggestions other than using the ADsSecurity.DLL (which is not shipped with WinXP). I cannot install any SW on the box where this will be running.
 
A

Arnaud Debaene

Jose Cintron said:
I'm looking for a way to obtain the ACL for a specific registry key. For
example if I want the permissions of
HKLM\SOFTWARE\Microsoft
I would get something like
Administrators Full Control
Creator Owner Special Permissions (List of special permissions
here)
Power Users Read
Special Permissions (List of special permissions
here)
SYSTEM Full Control
Users Read

In general terms what I want is something that would return a structure
similar to the following for file ACLs

Set wmiSecuritySettings = wmiServices.Get
("Win32_LogicalFileSecuritySetting.Path='" & fname & "'")
intRetVal =
wmiSecuritySettings.GetSecurityDescriptor(wmiSecurityDescriptor)

Any suggestions other than using the ADsSecurity.DLL (which is not shipped
with WinXP).
I cannot install any SW on the box where this will be running.

GetNamedSecurityInfo or GetSecurityInfo

PS : Please don't post in HTML in newsgroups.

Arnaud
MVP - VC
 
J

Jose Cintron

Ok this is what I have so far...

void main(void)
{
DWORD result;
PSECURITY_DESCRIPTOR pSD = NULL;
PACL pACL = NULL;

result = GetNamedSecurityInfo(TEXT("CLASSES_ROOT\\arzfile"),
SE_REGISTRY_KEY, \
DACL_SECURITY_INFORMATION, NULL, NULL, &pACL, NULL,
&pSD);
}

How do I interpret the values returned in pACL and pSD?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top