-/* Test whether a file has a nontrivial access control list.
+/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 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
# endif
}
+int
+acl_default_nontrivial (acl_t acl)
+{
+ /* acl is non-trivial if it is non-empty. */
+ return (acl_entries (acl) > 0);
+}
+
# endif
#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
void
free_permission_context (struct permission_context *ctx)
{
-#ifdef USE_ACL
+#if USE_ACL
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
if (ctx->acl)
acl_free (ctx->acl);