diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-04-28 19:54:47 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-04-28 19:54:47 +0400 |
commit | fd04c2f0045e1488274528063a5caa5db5fe23dd (patch) | |
tree | 8ece2a8d01146dcc2f5b84a9e7805a7138c95caa /winsup/cygwin/sec_acl.cc | |
parent | 206a6ee9c811164526d05ac52717a114ff1050c2 (diff) |
* advapi32.cc (SetSecurityDescriptorDacl): Remove.
(SetSecurityDescriptorGroup): Remove.
(SetSecurityDescriptorOwner): Remove.
* pinfo.cc: Replace above functions throughout with their ntdll.dll
equivalent.
* sec_acl.cc: Ditto.
* sec_helper.cc: Ditto.
* security.cc: Ditto.
* sec_helper.cc (__sec_user): Remove old comment.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index e7e79adcd..ef5822b73 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -73,14 +73,16 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, /* Initialize local security descriptor. */ SECURITY_DESCRIPTOR sd; RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION); - if (!SetSecurityDescriptorOwner (&sd, owner, FALSE)) + status = RtlSetOwnerSecurityDescriptor (&sd, owner, FALSE); + if (!NT_SUCCESS (status)) { - __seterrno (); + __seterrno_from_nt_status (status); return -1; } - if (!SetSecurityDescriptorGroup (&sd, group, FALSE)) + status = RtlSetGroupSecurityDescriptor (&sd, group, FALSE); + if (!NT_SUCCESS (status)) { - __seterrno (); + __seterrno_from_nt_status (status); return -1; } @@ -201,9 +203,10 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, acl->AclSize = acl_len; debug_printf ("ACL-Size: %d", acl_len); /* Create DACL for local security descriptor. */ - if (!SetSecurityDescriptorDacl (&sd, TRUE, acl, FALSE)) + status = RtlSetDaclSecurityDescriptor (&sd, TRUE, acl, FALSE); + if (!NT_SUCCESS (status)) { - __seterrno (); + __seterrno_from_nt_status (status); return -1; } /* Make self relative security descriptor in sd_ret. */ |