Blame lib/file-has-acl.c

Packit 9e4112
/* Test whether a file has a nontrivial ACL.  -*- coding: utf-8 -*-
Packit 9e4112
Packit 9e4112
   Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc.
Packit 9e4112
Packit 9e4112
   This program is free software: you can redistribute it and/or modify
Packit 9e4112
   it under the terms of the GNU General Public License as published by
Packit 9e4112
   the Free Software Foundation; either version 3 of the License, or
Packit 9e4112
   (at your option) any later version.
Packit 9e4112
Packit 9e4112
   This program is distributed in the hope that it will be useful,
Packit 9e4112
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 9e4112
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 9e4112
   GNU General Public License for more details.
Packit 9e4112
Packit 9e4112
   You should have received a copy of the GNU General Public License
Packit 9e4112
   along with this program.  If not, see <https://www.gnu.org/licenses/>.
Packit 9e4112
Packit 9e4112
   Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible.  */
Packit 9e4112
Packit 9e4112
/* Without this pragma, gcc 4.7.0 20120126 may suggest that the
Packit 9e4112
   file_has_acl function might be candidate for attribute 'const'  */
Packit 9e4112
#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
Packit 9e4112
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
Packit 9e4112
#endif
Packit 9e4112
Packit 9e4112
#include <config.h>
Packit 9e4112
Packit 9e4112
#include "acl.h"
Packit 9e4112
Packit 9e4112
#include "acl-internal.h"
Packit 9e4112
Packit 9e4112
#if GETXATTR_WITH_POSIX_ACLS
Packit 9e4112
# include <sys/xattr.h>
Packit 9e4112
# include <linux/xattr.h>
Packit 9e4112
#endif
Packit 9e4112
Packit 9e4112
/* Return 1 if NAME has a nontrivial access control list,
Packit 9e4112
   0 if ACLs are not supported, or if NAME has no or only a base ACL,
Packit 9e4112
   and -1 (setting errno) on error.  Note callers can determine
Packit 9e4112
   if ACLs are not supported as errno is set in that case also.
Packit 9e4112
   SB must be set to the stat buffer of NAME,
Packit 9e4112
   obtained through stat() or lstat().  */
Packit 9e4112
Packit 9e4112
int
Packit 9e4112
file_has_acl (char const *name, struct stat const *sb)
Packit 9e4112
{
Packit 9e4112
#if USE_ACL
Packit 9e4112
  if (! S_ISLNK (sb->st_mode))
Packit 9e4112
    {
Packit 9e4112
Packit 9e4112
# if GETXATTR_WITH_POSIX_ACLS
Packit 9e4112
Packit 9e4112
      ssize_t ret;
Packit 9e4112
Packit 9e4112
      ret = getxattr (name, XATTR_NAME_POSIX_ACL_ACCESS, NULL, 0);
Packit 9e4112
      if (ret < 0 && errno == ENODATA)
Packit 9e4112
        ret = 0;
Packit 9e4112
      else if (ret > 0)
Packit 9e4112
        return 1;
Packit 9e4112
Packit 9e4112
      if (ret == 0 && S_ISDIR (sb->st_mode))
Packit 9e4112
        {
Packit 9e4112
          ret = getxattr (name, XATTR_NAME_POSIX_ACL_DEFAULT, NULL, 0);
Packit 9e4112
          if (ret < 0 && errno == ENODATA)
Packit 9e4112
            ret = 0;
Packit 9e4112
          else if (ret > 0)
Packit 9e4112
            return 1;
Packit 9e4112
        }
Packit 9e4112
Packit 9e4112
      if (ret < 0)
Packit 9e4112
        return - acl_errno_valid (errno);
Packit 9e4112
      return ret;
Packit 9e4112
Packit 9e4112
# elif HAVE_ACL_GET_FILE
Packit 9e4112
Packit 9e4112
      /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
Packit 9e4112
      /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
Packit 9e4112
      int ret;
Packit 9e4112
Packit 9e4112
      if (HAVE_ACL_EXTENDED_FILE) /* Linux */
Packit 9e4112
        {
Packit 9e4112
          /* On Linux, acl_extended_file is an optimized function: It only
Packit 9e4112
             makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
Packit 9e4112
             ACL_TYPE_DEFAULT.  */
Packit 9e4112
          ret = acl_extended_file (name);
Packit 9e4112
        }
Packit 9e4112
      else /* FreeBSD, Mac OS X, IRIX, Tru64 */
Packit 9e4112
        {
Packit 9e4112
#  if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
Packit 9e4112
          /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
Packit 9e4112
             and acl_get_file (name, ACL_TYPE_DEFAULT)
Packit 9e4112
             always return NULL / EINVAL.  There is no point in making
Packit 9e4112
             these two useless calls.  The real ACL is retrieved through
Packit 9e4112
             acl_get_file (name, ACL_TYPE_EXTENDED).  */
Packit 9e4112
          acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
Packit 9e4112
          if (acl)
Packit 9e4112
            {
Packit 9e4112
              ret = acl_extended_nontrivial (acl);
Packit 9e4112
              acl_free (acl);
Packit 9e4112
            }
Packit 9e4112
          else
Packit 9e4112
            ret = -1;
Packit 9e4112
#  else /* FreeBSD, IRIX, Tru64 */
Packit 9e4112
          acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
Packit 9e4112
          if (acl)
Packit 9e4112
            {
Packit 9e4112
              int saved_errno;
Packit 9e4112
Packit 9e4112
              ret = acl_access_nontrivial (acl);
Packit 9e4112
              saved_errno = errno;
Packit 9e4112
              acl_free (acl);
Packit 9e4112
              errno = saved_errno;
Packit 9e4112
#   if HAVE_ACL_FREE_TEXT /* Tru64 */
Packit 9e4112
              /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
Packit 9e4112
                 returns NULL with errno not set.  There is no point in
Packit 9e4112
                 making this call.  */
Packit 9e4112
#   else /* FreeBSD, IRIX */
Packit 9e4112
              /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
Packit 9e4112
                 and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
Packit 9e4112
                 either both succeed or both fail; it depends on the
Packit 9e4112
                 file system.  Therefore there is no point in making the second
Packit 9e4112
                 call if the first one already failed.  */
Packit 9e4112
              if (ret == 0 && S_ISDIR (sb->st_mode))
Packit 9e4112
                {
Packit 9e4112
                  acl = acl_get_file (name, ACL_TYPE_DEFAULT);
Packit 9e4112
                  if (acl)
Packit 9e4112
                    {
Packit 9e4112
                      ret = (0 < acl_entries (acl));
Packit 9e4112
                      acl_free (acl);
Packit 9e4112
                    }
Packit 9e4112
                  else
Packit 9e4112
                    ret = -1;
Packit 9e4112
                }
Packit 9e4112
#   endif
Packit 9e4112
            }
Packit 9e4112
          else
Packit 9e4112
            ret = -1;
Packit 9e4112
#  endif
Packit 9e4112
        }
Packit 9e4112
      if (ret < 0)
Packit 9e4112
        return - acl_errno_valid (errno);
Packit 9e4112
      return ret;
Packit 9e4112
Packit 9e4112
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
Packit 9e4112
Packit 9e4112
#  if defined ACL_NO_TRIVIAL
Packit 9e4112
Packit 9e4112
      /* Solaris 10 (newer version), which has additional API declared in
Packit 9e4112
         <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
Packit 9e4112
         acl_fromtext, ...).  */
Packit 9e4112
      return acl_trivial (name);
Packit 9e4112
Packit 9e4112
#  else /* Solaris, Cygwin, general case */
Packit 9e4112
Packit 9e4112
      /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
Packit 9e4112
         of Unixware.  The acl() call returns the access and default ACL both
Packit 9e4112
         at once.  */
Packit 9e4112
      {
Packit 9e4112
        /* Initially, try to read the entries into a stack-allocated buffer.
Packit 9e4112
           Use malloc if it does not fit.  */
Packit 9e4112
        enum
Packit 9e4112
          {
Packit 9e4112
            alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */
Packit 9e4112
            alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t))
Packit 9e4112
          };
Packit 9e4112
        aclent_t buf[alloc_init];
Packit 9e4112
        size_t alloc = alloc_init;
Packit 9e4112
        aclent_t *entries = buf;
Packit 9e4112
        aclent_t *malloced = NULL;
Packit 9e4112
        int count;
Packit 9e4112
Packit 9e4112
        for (;;)
Packit 9e4112
          {
Packit 9e4112
            count = acl (name, GETACL, alloc, entries);
Packit 9e4112
            if (count < 0 && errno == ENOSPC)
Packit 9e4112
              {
Packit 9e4112
                /* Increase the size of the buffer.  */
Packit 9e4112
                free (malloced);
Packit 9e4112
                if (alloc > alloc_max / 2)
Packit 9e4112
                  {
Packit 9e4112
                    errno = ENOMEM;
Packit 9e4112
                    return -1;
Packit 9e4112
                  }
Packit 9e4112
                alloc = 2 * alloc; /* <= alloc_max */
Packit 9e4112
                entries = malloced =
Packit 9e4112
                  (aclent_t *) malloc (alloc * sizeof (aclent_t));
Packit 9e4112
                if (entries == NULL)
Packit 9e4112
                  {
Packit 9e4112
                    errno = ENOMEM;
Packit 9e4112
                    return -1;
Packit 9e4112
                  }
Packit 9e4112
                continue;
Packit 9e4112
              }
Packit 9e4112
            break;
Packit 9e4112
          }
Packit 9e4112
        if (count < 0)
Packit 9e4112
          {
Packit 9e4112
            if (errno == ENOSYS || errno == ENOTSUP)
Packit 9e4112
              ;
Packit 9e4112
            else
Packit 9e4112
              {
Packit 9e4112
                int saved_errno = errno;
Packit 9e4112
                free (malloced);
Packit 9e4112
                errno = saved_errno;
Packit 9e4112
                return -1;
Packit 9e4112
              }
Packit 9e4112
          }
Packit 9e4112
        else if (count == 0)
Packit 9e4112
          ;
Packit 9e4112
        else
Packit 9e4112
          {
Packit 9e4112
            /* Don't use MIN_ACL_ENTRIES:  It's set to 4 on Cygwin, but Cygwin
Packit 9e4112
               returns only 3 entries for files with no ACL.  But this is safe:
Packit 9e4112
               If there are more than 4 entries, there cannot be only the
Packit 9e4112
               "user::", "group::", "other:", and "mask:" entries.  */
Packit 9e4112
            if (count > 4)
Packit 9e4112
              {
Packit 9e4112
                free (malloced);
Packit 9e4112
                return 1;
Packit 9e4112
              }
Packit 9e4112
Packit 9e4112
            if (acl_nontrivial (count, entries))
Packit 9e4112
              {
Packit 9e4112
                free (malloced);
Packit 9e4112
                return 1;
Packit 9e4112
              }
Packit 9e4112
          }
Packit 9e4112
        free (malloced);
Packit 9e4112
      }
Packit 9e4112
Packit 9e4112
#   ifdef ACE_GETACL
Packit 9e4112
      /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
Packit 9e4112
         file systems (whereas the other ones are used in UFS file systems).  */
Packit 9e4112
      {
Packit 9e4112
        /* Initially, try to read the entries into a stack-allocated buffer.
Packit 9e4112
           Use malloc if it does not fit.  */
Packit 9e4112
        enum
Packit 9e4112
          {
Packit 9e4112
            alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
Packit 9e4112
            alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
Packit 9e4112
          };
Packit 9e4112
        ace_t buf[alloc_init];
Packit 9e4112
        size_t alloc = alloc_init;
Packit 9e4112
        ace_t *entries = buf;
Packit 9e4112
        ace_t *malloced = NULL;
Packit 9e4112
        int count;
Packit 9e4112
Packit 9e4112
        for (;;)
Packit 9e4112
          {
Packit 9e4112
            count = acl (name, ACE_GETACL, alloc, entries);
Packit 9e4112
            if (count < 0 && errno == ENOSPC)
Packit 9e4112
              {
Packit 9e4112
                /* Increase the size of the buffer.  */
Packit 9e4112
                free (malloced);
Packit 9e4112
                if (alloc > alloc_max / 2)
Packit 9e4112
                  {
Packit 9e4112
                    errno = ENOMEM;
Packit 9e4112
                    return -1;
Packit 9e4112
                  }
Packit 9e4112
                alloc = 2 * alloc; /* <= alloc_max */
Packit 9e4112
                entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
Packit 9e4112
                if (entries == NULL)
Packit 9e4112
                  {
Packit 9e4112
                    errno = ENOMEM;
Packit 9e4112
                    return -1;
Packit 9e4112
                  }
Packit 9e4112
                continue;
Packit 9e4112
              }
Packit 9e4112
            break;
Packit 9e4112
          }
Packit 9e4112
        if (count < 0)
Packit 9e4112
          {
Packit 9e4112
            if (errno == ENOSYS || errno == EINVAL)
Packit 9e4112
              ;
Packit 9e4112
            else
Packit 9e4112
              {
Packit 9e4112
                int saved_errno = errno;
Packit 9e4112
                free (malloced);
Packit 9e4112
                errno = saved_errno;
Packit 9e4112
                return -1;
Packit 9e4112
              }
Packit 9e4112
          }
Packit 9e4112
        else if (count == 0)
Packit 9e4112
          ;
Packit 9e4112
        else
Packit 9e4112
          {
Packit 9e4112
            /* In the old (original Solaris 10) convention:
Packit 9e4112
               If there are more than 3 entries, there cannot be only the
Packit 9e4112
               ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
Packit 9e4112
               In the newer Solaris 10 and Solaris 11 convention:
Packit 9e4112
               If there are more than 6 entries, there cannot be only the
Packit 9e4112
               ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with
Packit 9e4112
               NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
Packit 9e4112
               NEW_ACE_ACCESS_DENIED_ACE_TYPE.  */
Packit 9e4112
            if (count > 6)
Packit 9e4112
              {
Packit 9e4112
                free (malloced);
Packit 9e4112
                return 1;
Packit 9e4112
              }
Packit 9e4112
Packit 9e4112
            if (acl_ace_nontrivial (count, entries))
Packit 9e4112
              {
Packit 9e4112
                free (malloced);
Packit 9e4112
                return 1;
Packit 9e4112
              }
Packit 9e4112
          }
Packit 9e4112
        free (malloced);
Packit 9e4112
      }
Packit 9e4112
#   endif
Packit 9e4112
Packit 9e4112
      return 0;
Packit 9e4112
#  endif
Packit 9e4112
Packit 9e4112
# elif HAVE_GETACL /* HP-UX */
Packit 9e4112
Packit 9e4112
      {
Packit 9e4112
        struct acl_entry entries[NACLENTRIES];
Packit 9e4112
        int count;
Packit 9e4112
Packit 9e4112
        count = getacl (name, NACLENTRIES, entries);
Packit 9e4112
Packit 9e4112
        if (count < 0)
Packit 9e4112
          {
Packit 9e4112
            /* ENOSYS is seen on newer HP-UX versions.
Packit 9e4112
               EOPNOTSUPP is typically seen on NFS mounts.
Packit 9e4112
               ENOTSUP was seen on Quantum StorNext file systems (cvfs).  */
Packit 9e4112
            if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
Packit 9e4112
              ;
Packit 9e4112
            else
Packit 9e4112
              return -1;
Packit 9e4112
          }
Packit 9e4112
        else if (count == 0)
Packit 9e4112
          return 0;
Packit 9e4112
        else /* count > 0 */
Packit 9e4112
          {
Packit 9e4112
            if (count > NACLENTRIES)
Packit 9e4112
              /* If NACLENTRIES cannot be trusted, use dynamic memory
Packit 9e4112
                 allocation.  */
Packit 9e4112
              abort ();
Packit 9e4112
Packit 9e4112
            /* If there are more than 3 entries, there cannot be only the
Packit 9e4112
               (uid,%), (%,gid), (%,%) entries.  */
Packit 9e4112
            if (count > 3)
Packit 9e4112
              return 1;
Packit 9e4112
Packit 9e4112
            {
Packit 9e4112
              struct stat statbuf;
Packit 9e4112
Packit 9e4112
              if (stat (name, &statbuf) < 0)
Packit 9e4112
                return -1;
Packit 9e4112
Packit 9e4112
              return acl_nontrivial (count, entries);
Packit 9e4112
            }
Packit 9e4112
          }
Packit 9e4112
      }
Packit 9e4112
Packit 9e4112
#  if HAVE_ACLV_H /* HP-UX >= 11.11 */
Packit 9e4112
Packit 9e4112
      {
Packit 9e4112
        struct acl entries[NACLVENTRIES];
Packit 9e4112
        int count;
Packit 9e4112
Packit 9e4112
        count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries);
Packit 9e4112
Packit 9e4112
        if (count < 0)
Packit 9e4112
          {
Packit 9e4112
            /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
Packit 9e4112
               EINVAL is seen on NFS in HP-UX 11.31.  */
Packit 9e4112
            if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
Packit 9e4112
              ;
Packit 9e4112
            else
Packit 9e4112
              return -1;
Packit 9e4112
          }
Packit 9e4112
        else if (count == 0)
Packit 9e4112
          return 0;
Packit 9e4112
        else /* count > 0 */
Packit 9e4112
          {
Packit 9e4112
            if (count > NACLVENTRIES)
Packit 9e4112
              /* If NACLVENTRIES cannot be trusted, use dynamic memory
Packit 9e4112
                 allocation.  */
Packit 9e4112
              abort ();
Packit 9e4112
Packit 9e4112
            /* If there are more than 4 entries, there cannot be only the
Packit 9e4112
               four base ACL entries.  */
Packit 9e4112
            if (count > 4)
Packit 9e4112
              return 1;
Packit 9e4112
Packit 9e4112
            return aclv_nontrivial (count, entries);
Packit 9e4112
          }
Packit 9e4112
      }
Packit 9e4112
Packit 9e4112
#  endif
Packit 9e4112
Packit 9e4112
# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
Packit 9e4112
Packit 9e4112
      acl_type_t type;
Packit 9e4112
      char aclbuf[1024];
Packit 9e4112
      void *acl = aclbuf;
Packit 9e4112
      size_t aclsize = sizeof (aclbuf);
Packit 9e4112
      mode_t mode;
Packit 9e4112
Packit 9e4112
      for (;;)
Packit 9e4112
        {
Packit 9e4112
          /* The docs say that type being 0 is equivalent to ACL_ANY, but it
Packit 9e4112
             is not true, in AIX 5.3.  */
Packit 9e4112
          type.u64 = ACL_ANY;
Packit 9e4112
          if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >= 0)
Packit 9e4112
            break;
Packit 9e4112
          if (errno == ENOSYS)
Packit 9e4112
            return 0;
Packit 9e4112
          if (errno != ENOSPC)
Packit 9e4112
            {
Packit 9e4112
              if (acl != aclbuf)
Packit 9e4112
                {
Packit 9e4112
                  int saved_errno = errno;
Packit 9e4112
                  free (acl);
Packit 9e4112
                  errno = saved_errno;
Packit 9e4112
                }
Packit 9e4112
              return -1;
Packit 9e4112
            }
Packit 9e4112
          aclsize = 2 * aclsize;
Packit 9e4112
          if (acl != aclbuf)
Packit 9e4112
            free (acl);
Packit 9e4112
          acl = malloc (aclsize);
Packit 9e4112
          if (acl == NULL)
Packit 9e4112
            {
Packit 9e4112
              errno = ENOMEM;
Packit 9e4112
              return -1;
Packit 9e4112
            }
Packit 9e4112
        }
Packit 9e4112
Packit 9e4112
      if (type.u64 == ACL_AIXC)
Packit 9e4112
        {
Packit 9e4112
          int result = acl_nontrivial ((struct acl *) acl);
Packit 9e4112
          if (acl != aclbuf)
Packit 9e4112
            free (acl);
Packit 9e4112
          return result;
Packit 9e4112
        }
Packit 9e4112
      else if (type.u64 == ACL_NFS4)
Packit 9e4112
        {
Packit 9e4112
          int result = acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl);
Packit 9e4112
          if (acl != aclbuf)
Packit 9e4112
            free (acl);
Packit 9e4112
          return result;
Packit 9e4112
        }
Packit 9e4112
      else
Packit 9e4112
        {
Packit 9e4112
          /* A newer type of ACL has been introduced in the system.
Packit 9e4112
             We should better support it.  */
Packit 9e4112
          if (acl != aclbuf)
Packit 9e4112
            free (acl);
Packit 9e4112
          errno = EINVAL;
Packit 9e4112
          return -1;
Packit 9e4112
        }
Packit 9e4112
Packit 9e4112
# elif HAVE_STATACL /* older AIX */
Packit 9e4112
Packit 9e4112
      union { struct acl a; char room[4096]; } u;
Packit 9e4112
Packit 9e4112
      if (statacl ((char *) name, STX_NORMAL, &u.a, sizeof (u)) < 0)
Packit 9e4112
        return -1;
Packit 9e4112
Packit 9e4112
      return acl_nontrivial (&u.a);
Packit 9e4112
Packit 9e4112
# elif HAVE_ACLSORT /* NonStop Kernel */
Packit 9e4112
Packit 9e4112
      {
Packit 9e4112
        struct acl entries[NACLENTRIES];
Packit 9e4112
        int count;
Packit 9e4112
Packit 9e4112
        count = acl ((char *) name, ACL_GET, NACLENTRIES, entries);
Packit 9e4112
Packit 9e4112
        if (count < 0)
Packit 9e4112
          {
Packit 9e4112
            if (errno == ENOSYS || errno == ENOTSUP)
Packit 9e4112
              ;
Packit 9e4112
            else
Packit 9e4112
              return -1;
Packit 9e4112
          }
Packit 9e4112
        else if (count == 0)
Packit 9e4112
          return 0;
Packit 9e4112
        else /* count > 0 */
Packit 9e4112
          {
Packit 9e4112
            if (count > NACLENTRIES)
Packit 9e4112
              /* If NACLENTRIES cannot be trusted, use dynamic memory
Packit 9e4112
                 allocation.  */
Packit 9e4112
              abort ();
Packit 9e4112
Packit 9e4112
            /* If there are more than 4 entries, there cannot be only the
Packit 9e4112
               four base ACL entries.  */
Packit 9e4112
            if (count > 4)
Packit 9e4112
              return 1;
Packit 9e4112
Packit 9e4112
            return acl_nontrivial (count, entries);
Packit 9e4112
          }
Packit 9e4112
      }
Packit 9e4112
Packit 9e4112
# endif
Packit 9e4112
    }
Packit 9e4112
#endif
Packit 9e4112
Packit 9e4112
  return 0;
Packit 9e4112
}