diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-09-10 18:53:44 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-09-10 18:53:44 +0400 |
commit | 4e8f539f158b9d3413d0b88ce2fb8f70733139d8 (patch) | |
tree | cdd8b95ced54952c50a3335c901e94a5f288b46a /winsup/cygwin/sec_acl.cc | |
parent | f65c5a0a2b1728ce2b317b31b601574f1ef7f5b2 (diff) |
* flock.cc (allow_others_to_sync): Define MAX_PROCESS_SD_SIZE. Use
instead of ACL_DEFAULT_SIZE.
* sec_acl.cc (setacl): Use TLS buffer to allow maximum ACL size.
* security.h (ACL_DEFAULT_SIZE): Drop definition.
(ACL_MAXIMUM_SIZE): Define.
(SD_MAXIMUM_SIZE): Define.
* security.cc (get_file_sd): Allocate security_decscriptor with size
SD_MAXIMUM_SIZE.
(alloc_sd): Use TLS buffer to allow maximum ACL size.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index fbf2bffa7..2650b45c8 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -22,6 +22,7 @@ details. */ #include "dtable.h" #include "cygheap.h" #include "pwdgrp.h" +#include "tls_pbuf.h" static int searchace (__aclent32_t *aclp, int nentries, int type, __uid32_t id = ILLEGAL_UID) @@ -40,6 +41,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, bool &writable) { security_descriptor sd_ret; + tmp_pathbuf tp; if (get_file_sd (handle, pc, sd_ret, false)) return -1; @@ -83,7 +85,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, } /* Fill access control list. */ - PACL acl = (PACL) alloca (ACL_DEFAULT_SIZE); + PACL acl = (PACL) tp.w_get (); size_t acl_len = sizeof (ACL); int ace_off = 0; @@ -92,7 +94,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, struct __group32 *gr; int pos; - if (!InitializeAcl (acl, ACL_DEFAULT_SIZE, ACL_REVISION)) + if (!InitializeAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION)) { __seterrno (); return -1; |