This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] aclfromtext: Actually return aclcnt parameter


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7a1ac642f6b9506d781c64a61e393c252b559a08

commit 7a1ac642f6b9506d781c64a61e393c252b559a08
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Dec 24 00:39:45 2015 +0100

    aclfromtext: Actually return aclcnt parameter
    
            * sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog  | 4 ++++
 winsup/cygwin/sec_acl.cc | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c32519e..930aa79 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
 2015-12-24  Corinna Vinschen  <corinna@vinschen.de>
 
+	* sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.
+
+2015-12-24  Corinna Vinschen  <corinna@vinschen.de>
+
 	* sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer.
 	(aclfromtext32): Ditto.
 
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 348f0bc..614bc50 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1501,7 +1501,7 @@ permfromstr (char *perm)
 }
 
 extern "C" aclent_t *
-aclfromtext32 (char *acltextp, int *)
+aclfromtext32 (const char *acltextp, int *aclcnt)
 {
   if (!acltextp || strlen (acltextp) > NT_MAX_PATH)
     {
@@ -1610,7 +1610,11 @@ aclfromtext32 (char *acltextp, int *)
     }
   aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t));
   if (aclp)
-    memcpy (aclp, lacl, pos * sizeof (aclent_t));
+    {
+      memcpy (aclp, lacl, pos * sizeof (aclent_t));
+      if (aclcnt)
+	*aclcnt = pos;
+    }
   return aclp;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]