🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to set security settings on a Reg Key

#17000
From: Remy Lebeau (TeamB)
Date: Sun, 13 Apr 2003 23:32
28 lines
2066 bytes
"Claire W" <cmw.walker@BeeeeTinternet.com> wrote in message
news:3e99e7c3@newsgroups.borland.com...

> I'm sure these would be the better choice, but I'm not clear
> on the concepts used with regards to groups, owner, admins
> etc. So I don't know what I would need to do to allow all
> users to have write access to the key.

Sounds like you need to read up on NT security in general before you start
messing with it.

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.

> I changed in 'aclapi.h'
<snip>

Do not alter header files, especially Microsoft's.

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.


Gambit
Technical Details
Message-ID: <3e99f37a$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!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>

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 16:36:03 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3e9990a7@newsgroups.borland.com> <3e99c6df$3@newsgroups.borland.com> <3e99e7c3@newsgroups.borland.com>
Subject: Re: How to set security settings on a Reg Key
Date: Sun, 13 Apr 2003 16:32:42 -0700
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3e99f37a$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050276730 207.175.226.26 (13 Apr 2003 16:32:10 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!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