Re: ACL Information

From: Joe Arnon (JoeArnon_at_discussions.microsoft.com)
Date: 11/21/04


Date: Sun, 21 Nov 2004 00:29:06 -0800

Can you let me know how to create the system sid or the Administrators sid?
My program will work also on windows server2000, so I cannot use the
IsWellKnownSid function. Just give me a the code in c++.

Thanks in advance,

Joe

"Garfield Lewis" wrote:

> You can use IsWellKnowSid to compare the sid on WinXP and above or else
> create a system sid and administrators sid then use EqualSid to complare
> them for a general solution.
>
> --
> Garfield A. Lewis
>
> "Joe Arnon" <JoeArnon@discussions.microsoft.com> wrote in message
> news:879715F5-48F7-41CC-8F68-92E033A27DB4@microsoft.com...
> > The problem is what parameters to send to LookupAccountSid(). I don't need
> to
> > check on any user. I specifically need to check if the SidStart field is
> > equeal to the "SYSTEM" user or the Local "Administrators" group. How do
> > Icompare the values or how do Irepresent the the "SYSTEM" user ot the
> local
> > "Admnistrators" group in a sid format?
> >
> > "Ryan Menezes [MSFT]" wrote:
> >
> > > Have you tried extracting the SidStart field of the ACE structure and
> > > retrieving the corresponding user with LookupAccountSid() instead ?
> > >
> > > --
> > > Thanks,
> > > Ryan Menezes [MS]
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Joe Arnon" <JoeArnon@discussions.microsoft.com> wrote in message
> > > news:424CA4E4-3EA2-4A13-9646-5E59D30CC6FE@microsoft.com...
> > > > Hi,
> > > > I'm writing a program that gets the list of acls from a file. The code
> > > looks
> > > > like this:
> > > >
> > > > GetNamedSecurityInfo(...)
> > > > GetAclInformation(...)
> > > > for (...)
> > > > {
> > > > GetAce(...)
> > > > }
> > > > Now, After i have ACE information in my hands, i need to check if this
> ACE
> > > > belongs to the "SYSTEM" user or to the local "ADMINISTRATORS" group.
> > > > How to do it? I know i should not use the words "SYSTEM" or
> > > "ADMINISTRATORS"
> > > > for they are different for each language the computer is running on.
> > > >
> > > > Thanks in advance,
> > > > Joe
> > > >
> > > >
> > > >
> > >
> > >
> > >
>
>
>


Quantcast