2 Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
20 #endif /* HAVE_CONFIG_H */
24 #define O_NETATALK_ACL (O_NOFOLLOW << 1)
25 #define O_IGNORE (O_NOFOLLOW << 2)
27 #ifdef HAVE_SOLARIS_ACLS
30 #ifdef HAVE_FREEBSD_SUNACL
34 #ifdef HAVE_NFSV4_ACLS
36 #define chmod_acl nfsv4_chmod
38 extern int get_nfsv4_acl(const char *name, ace_t **retAces);
39 extern int strip_trivial_aces(ace_t **saces, int sacecount);
40 extern int strip_nontrivial_aces(ace_t **saces, int sacecount);
41 extern ace_t *concat_aces(ace_t *aces1, int ace1count, ace_t *aces2, int ace2count);
42 extern int nfsv4_chmod(char *name, mode_t mode);
44 #endif /* HAVE_NFSV4_ACLS */
46 #ifdef HAVE_POSIX_ACLS
47 #include <sys/types.h>
51 #define chmod_acl posix_chmod
52 #define fchmod_acl posix_fchmod
54 extern int posix_chmod(const char *name, mode_t mode);
55 extern int posix_fchmod(int fd, mode_t mode);
57 #endif /* HAVE_POSIX_ACLS */
59 extern int remove_acl_vfs(const char *name);
61 #else /* HAVE_ACLS=no */
63 #define O_NETATALK_ACL 0
64 #define chmod_acl chmod
66 #endif /* HAVE_ACLS */
68 #endif /* ATALK_ACL_H */