On Wed, Feb 10, 2016 at 5:28 PM, hbelusca@svn.reactos.org wrote:
else // if (SecurityData->ReferenceCount <= 1)
Is the intent to free the data while SecurityData->RefCount will remain at 1?!
Best regards, Alex Ionescu
Yes: When the key is initialized and a security block is added ,the refcount is set to 1 (see e.g. https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/tools/mkhive/cmi.c;h b=HEAD#l173 ), and then, it is increased when other keys use this security block and decreased when other keys are deleted (and hence, release this security block). When you delete the key and the security refcount was == 1, then it means this was the last reference to the security block that is going to disappear, hence you can remove now the security block.
Also, http://www.sentinelchicken.com/data/TheWindowsNTRegistryFileFormat.pdf end of section 11, page 5, seems to back up what I say.
Regards, Hermès
P.S.: http://amnesia.gtisc.gatech.edu/~moyix/suzibandit.ltd.uk/MSc/ is a nice source of information about the NT registry (in case you didn't know it already).
-----Message d'origine----- De : Ros-dev [mailto:ros-dev-bounces@reactos.org] De la part de Alex Ionescu Envoyé : jeudi 11 février 2016 00:58 À : ReactOS Development List Cc : Linda Wang Objet : Re: [ros-dev] [ros-diffs] [hbelusca] 70707: [CMLIB]: Implement CmpFreeSecurityDescriptor. See r70609. CORE-10793 CORE-10796
On Wed, Feb 10, 2016 at 5:28 PM, hbelusca@svn.reactos.org wrote:
else // if (SecurityData->ReferenceCount <= 1)
Is the intent to free the data while SecurityData->RefCount will remain at 1?!
Best regards, Alex Ionescu
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev