+ /* Declare and initialize a security descriptor.
+ This is required for multiuser systems on Windows 2000 SP4 and beyond */
+ if (InitializeSecurityDescriptor(&securityDesc, SECURITY_DESCRIPTOR_REVISION)) {
+ /* give the security descriptor a Null Dacl done using the "TRUE, (PACL)NULL" here */
+ if (SetSecurityDescriptorDacl(&securityDesc, TRUE, (PACL)NULL, FALSE)) {
+ /* Make the security attributes point to the security descriptor */
+ uprv_memset(&mappingAttributes, 0, sizeof(mappingAttributes));
+ mappingAttributes.nLength = sizeof(mappingAttributes);
+ mappingAttributes.lpSecurityDescriptor = &securityDesc;
+ mappingAttributes.bInheritHandle = FALSE; /* object uninheritable */
+ mappingAttributesPtr = &mappingAttributes;
+ }
+ }
+ /* else creating security descriptors can fail when we are on Windows 98,
+ and mappingAttributesPtr == NULL for that case. */
+