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:
authorCorinna Vinschen <corinna@vinschen.de>2011-04-29 14:38:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-04-29 14:38:12 +0400
commit5735d5f6f4cc65cb8afcbd7da83165b6e9cbc5d8 (patch)
tree8410d0cb5a9ea6b1cb226821d22cd5416e47e968 /winsup/cygwin/sec_acl.cc
parent3e8e0c33c00e384867d394c9a84a3d31f5208a61 (diff)
* advapi32.cc: Add comment.
(EqualSid): Remove. (CopySid): Remove. (AddAccessAllowedAce): Remove. (AddAccessDeniedAce): Remove. (MakeSelfRelativeSD): Remove. * flock.cc: Replace above functions throughout with their ntdll.dll equivalent. * sec_acl.cc: Ditto. * sec_auth.cc: Ditto. * sec_helper.cc: Ditto. * security.cc: Ditto. * security.h: Ditto. (RtlEqualSid): Declare. Explain why. (RtlCopySid): Ditto.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r--winsup/cygwin/sec_acl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index ef5822b73..3499476c3 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -211,7 +211,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
}
/* Make self relative security descriptor in sd_ret. */
DWORD sd_size = 0;
- MakeSelfRelativeSD (&sd, sd_ret, &sd_size);
+ RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
if (sd_size <= 0)
{
__seterrno ();
@@ -222,9 +222,10 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
set_errno (ENOMEM);
return -1;
}
- if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size))
+ status = RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
+ if (!NT_SUCCESS (status))
{
- __seterrno ();
+ __seterrno_from_nt_status (status);
return -1;
}
debug_printf ("Created SD-Size: %d", sd_ret.size ());