Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / February 2007

Tip: Looking for answers? Try searching our database.

Registry key permissions...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jose Cintron - 12 Feb 2007 21:11 GMT
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.
Arnaud Debaene - 12 Feb 2007 22:29 GMT
> 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
[quoted text clipped - 17 lines]
> 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
Jose Cintron - 19 Feb 2007 22:14 GMT
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?

>> I'm looking for a way to obtain the ACL for a specific registry key.  For
>> example if I want the permissions of
[quoted text clipped - 28 lines]
> Arnaud
> MVP - VC

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.