summaryrefslogtreecommitdiff
path: root/lib/file-has-acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/file-has-acl.c')
-rw-r--r--lib/file-has-acl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index 2fedcc63..5104a41e 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -1,6 +1,6 @@
/* Test whether a file has a nontrivial access control list.
- Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -75,8 +75,7 @@ acl_access_nontrivial (acl_t acl)
}
return got_one;
-# else /* IRIX, Tru64 */
-# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
+# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
/* Don't use acl_get_entry: it is undocumented. */
int count = acl->acl_cnt;
@@ -93,8 +92,7 @@ acl_access_nontrivial (acl_t acl)
}
return 0;
-# endif
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
+# elif HAVE_ACL_FREE_TEXT /* Tru64 */
/* Don't use acl_get_entry: it takes only one argument and does not work. */
int count = acl->acl_num;
@@ -117,7 +115,10 @@ acl_access_nontrivial (acl_t acl)
}
return 0;
-# endif
+# else
+
+ errno = ENOSYS;
+ return -1;
# endif
}
@@ -553,7 +554,7 @@ file_has_acl (char const *name, struct stat const *sb)
# endif
}
if (ret < 0)
- return ACL_NOT_WELL_SUPPORTED (errno) ? 0 : -1;
+ return - acl_errno_valid (errno);
return ret;
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */