🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17007

Re: How to set security settings on a Reg Key

#17007
From: Claire W
Date: Mon, 14 Apr 2003 02:58
35 lines
2596 bytes
"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote
> Sounds like you need to read up on NT security in general before you start
> messing with it.

I have a basic understanding of allowing certain users (or groups of users)
access to securable objects according to their SID's and the objects DACL,
but some of the lower level details are confusing. The only other option was
to enumerate the ACE's and give them all write access, and ensure all
possible users were covered by at least one ACE. This second part I would
not know where to begin. The help files give setting the DACL to NULL as a
legitimate option.

> As for specifying a NULL DACL, use RegGetKeySecurity() to retreive the
> current SECURITY_DESCRIPTOR for the desired key, then call
> SetSecurityDescriptorDacl() to set the DACL to NULL, and then call
> RegSetKeySecurity() to assign the SECURITY_DESCRIPTOR back to the key.

Is there a specific benefit to doing it this way as opposed to using
SetSecurityInfo()? Isn't the end result the same?

> > I changed in 'aclapi.h'
> <snip>
>
> Do not alter header files, especially Microsoft's.

I only altered it temporarily. I just needed to be able to carry on until
I could eliminate the error.

> As previously stated, you need to use RegSetKeySecurity() instead of
> SetSecurityInfo() anyway.  In which case, aclapi.h is no longer needed for
> this situation to begin with.

I shall make the changes as recommended.

Claire.
Technical Details
Message-ID: <3e9a2415$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e9990a7@newsgroups.borland.com> <3e99c6df$3@newsgroups.borland.com> <3e99e7c3@newsgroups.borland.com> <3e99f37a$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,4f35fdfc32f2cf25
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-13 20:00:55 PST
From: "Claire W" <cmw.walker@BeeeeTinternet.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3e9990a7@newsgroups.borland.com> <3e99c6df$3@newsgroups.borland.com> <3e99e7c3@newsgroups.borland.com> <3e99f37a$2@newsgroups.borland.com>
Subject: Re: How to set security settings on a Reg Key
Date: Mon, 14 Apr 2003 03:58:53 +0100
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
NNTP-Posting-Host: 213.122.59.177
Message-ID: <3e9a2415$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050289173 213.122.59.177 (13 Apr 2003 19:59:33 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail