Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r--winsup/cygwin/flock.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index c66891a35..176e4869e 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -178,16 +178,16 @@ allow_others_to_sync ()
is in self-relative format. */
BOOLEAN present, defaulted;
RtlGetDaclSecurityDescriptor (sd, &present, &dacl, &defaulted);
- if (dacl == NULL) /* Everyone has all access anyway */
- {
- done = true;
- return;
- }
- else if (!present)
+ if (!present) /* If so, dacl has undefined value. */
{
dacl = (PACL) (sd + 1);
RtlCreateAcl (dacl, MAX_PROCESS_SD_SIZE - sizeof *sd, ACL_REVISION);
}
+ else if (dacl == NULL) /* Everyone has all access anyway */
+ {
+ done = true;
+ return;
+ }
else
{
dacl->AclSize = MAX_PROCESS_SD_SIZE - ((PBYTE) dacl - (PBYTE) sd);