Cygwin: acls: allow converting empty acl to text
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
111b34bb1b
commit
004d8adfa2
|
@ -14,3 +14,6 @@ Bug Fixes
|
||||||
|
|
||||||
- Fix access to process list
|
- Fix access to process list
|
||||||
Addresses: https://cygwin.com/ml/cygwin/2019-03/msg00253.html
|
Addresses: https://cygwin.com/ml/cygwin/2019-03/msg00253.html
|
||||||
|
|
||||||
|
- Fix acl_to_text/acl_to_any_text returning EINVAL on empty acl
|
||||||
|
Addresses: https://cygwin.com/ml/cygwin/2019-03/msg00157.html
|
||||||
|
|
|
@ -1638,8 +1638,8 @@ char *
|
||||||
__acltotext (aclent_t *aclbufp, int aclcnt, const char *prefix, char separator,
|
__acltotext (aclent_t *aclbufp, int aclcnt, const char *prefix, char separator,
|
||||||
int options)
|
int options)
|
||||||
{
|
{
|
||||||
if (!aclbufp || aclcnt < 1 || aclcnt > MAX_ACL_ENTRIES
|
if (!aclbufp || aclcnt < 0 || aclcnt > MAX_ACL_ENTRIES
|
||||||
|| aclsort32 (aclcnt, 0, aclbufp))
|
|| (aclcnt > 0 && aclsort32 (aclcnt, 0, aclbufp)))
|
||||||
{
|
{
|
||||||
set_errno (EINVAL);
|
set_errno (EINVAL);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue