diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-04-28 13:30:36 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-04-28 13:30:36 +0400 |
commit | 1754539e56dcde666394354ec603d5524b0d3e90 (patch) | |
tree | 23995f49c74ee39bf46a29d39bd1aa8ccc8e0e86 /winsup/cygwin/sec_acl.cc | |
parent | 158e516b9dcb2993e5f062f2feeee5dbd4ee787a (diff) |
* advapi32.cc (InitializeAcl): Remove.
(AddAce): Remove.
(FindFirstFreeAce): Remove.
(GetAce): Remove.
(InitializeSecurityDescriptor): Remove.
(OpenProcessToken): Remove.
* dcrt0.cc: Replace above functions throughout with their ntdll.dll
equivalent.
* fhandler_tty.cc: Ditto.
* flock.cc: Ditto.
* pinfo.cc: Ditto. Drop unnecessary error handling.
* sec_acl.cc: Ditto.
* sec_auth.cc: Ditto.
* sec_helper.cc: Ditto.
* security.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 2a1802420..48012e267 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -21,6 +21,7 @@ details. */ #include "fhandler.h" #include "dtable.h" #include "cygheap.h" +#include "ntdll.h" #include "pwdgrp.h" #include "tls_pbuf.h" @@ -68,11 +69,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, /* Initialize local security descriptor. */ SECURITY_DESCRIPTOR sd; - if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION)) - { - __seterrno (); - return -1; - } + RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION); if (!SetSecurityDescriptorOwner (&sd, owner, FALSE)) { __seterrno (); @@ -94,11 +91,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, struct __group32 *gr; int pos; - if (!InitializeAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION)) - { - __seterrno (); - return -1; - } + RtlCreateAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION); writable = false; @@ -332,7 +325,7 @@ getacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp) { ACCESS_ALLOWED_ACE *ace; - if (!GetAce (acl, i, (PVOID *) &ace)) + if (!NT_SUCCESS (RtlGetAce (acl, i, (PVOID *) &ace))) continue; cygpsid ace_sid ((PSID) &ace->SidStart); |