1 /* Internal implementation of access control lists.
3 Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 Written by Paul Eggert and Andreas Gruenbacher. */
28 #ifdef HAVE_ACL_LIBACL_H
29 # include <acl/libacl.h>
44 #define _(msgid) gettext (msgid)
47 # define HAVE_FCHMOD false
48 # define fchmod(fd, mode) (-1)
51 #ifndef MIN_ACL_ENTRIES
52 # define MIN_ACL_ENTRIES 4
55 /* POSIX 1003.1e (draft 17) */
56 #ifndef HAVE_ACL_GET_FD
57 # define HAVE_ACL_GET_FD false
58 # define acl_get_fd(fd) (NULL)
61 /* POSIX 1003.1e (draft 17) */
62 #ifndef HAVE_ACL_SET_FD
63 # define HAVE_ACL_SET_FD false
64 # define acl_set_fd(fd, acl) (-1)
68 #ifndef HAVE_ACL_EXTENDED_FILE
69 # define HAVE_ACL_EXTENDED_FILE false
70 # define acl_extended_file(name) (-1)
74 #ifndef HAVE_ACL_FROM_MODE
75 # define HAVE_ACL_FROM_MODE false
76 # define acl_from_mode(mode) (NULL)
79 #define ACL_NOT_WELL_SUPPORTED(Errno) \
80 ((Errno) == ENOTSUP || (Errno) == ENOSYS || (Errno) == EINVAL)
82 /* Define a replacement for acl_entries if needed. */
83 #if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_FREE && !HAVE_ACL_ENTRIES
84 # define acl_entries rpl_acl_entries
85 int acl_entries (acl_t);