aclfromtext: Actually return aclcnt parameter

* sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-12-24 00:39:45 +01:00
parent 3b8372c1f2
commit 7a1ac642f6
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2015-12-24 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.
2015-12-24 Corinna Vinschen <corinna@vinschen.de> 2015-12-24 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer. * sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer.

View File

@ -1501,7 +1501,7 @@ permfromstr (char *perm)
} }
extern "C" aclent_t * extern "C" aclent_t *
aclfromtext32 (char *acltextp, int *) aclfromtext32 (const char *acltextp, int *aclcnt)
{ {
if (!acltextp || strlen (acltextp) > NT_MAX_PATH) 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)); aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t));
if (aclp) if (aclp)
memcpy (aclp, lacl, pos * sizeof (aclent_t)); {
memcpy (aclp, lacl, pos * sizeof (aclent_t));
if (aclcnt)
*aclcnt = pos;
}
return aclp; return aclp;
} }