From c7b24005e644f1fb4b60015379cb8b74a7e1f485 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 22 Jun 2010 09:54:36 +0000 Subject: [PATCH] * sec_acl.cc (setacl): Use the long time unused ACL_DEFAULT_SIZE instead of a constant value. * security.cc (alloc_sd): Ditto. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/sec_acl.cc | 4 ++-- winsup/cygwin/security.cc | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6c96d684f..60bf6b44a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-06-22 Corinna Vinschen + + * sec_acl.cc (setacl): Use the long time unused ACL_DEFAULT_SIZE + instead of a constant value. + * security.cc (alloc_sd): Ditto. + 2010-06-21 Christopher Faylor * tmpbuf.h: New file. diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 4d5e4babf..88abac46a 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -83,7 +83,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, } /* Fill access control list. */ - PACL acl = (PACL) alloca (3072); + PACL acl = (PACL) alloca (ACL_DEFAULT_SIZE); size_t acl_len = sizeof (ACL); int ace_off = 0; @@ -92,7 +92,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp, struct __group32 *gr; int pos; - if (!InitializeAcl (acl, 3072, ACL_REVISION)) + if (!InitializeAcl (acl, ACL_DEFAULT_SIZE, ACL_REVISION)) { __seterrno (); return -1; diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index c180197e1..d101623c7 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -454,8 +454,8 @@ alloc_sd (path_conv &pc, __uid32_t uid, __gid32_t gid, int attribute, } /* Initialize local access control list. */ - PACL acl = (PACL) alloca (3072); - if (!InitializeAcl (acl, 3072, ACL_REVISION)) + PACL acl = (PACL) alloca (ACL_DEFAULT_SIZE); + if (!InitializeAcl (acl, ACL_DEFAULT_SIZE, ACL_REVISION)) { __seterrno (); return NULL;