2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2016 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 * Major refactoring of ACL and XATTR code written by:
22 * Radosław Korzeniewski, MMXVI
23 * radoslaw@korzeniewski.net, radekk@inteos.pl
24 * Inteos Sp. z o.o. http://www.inteos.pl/
28 #ifndef __XACL_Solaris_H_
29 #define __XACL_Solaris_H_
31 #if defined(HAVE_SUN_OS)
35 #error "configure failed to detect availability of sys/acl.h"
38 #ifdef HAVE_SYS_ATTR_H
45 #if defined(HAVE_EXTENDED_ACL)
46 #if !defined(_SYS_ACL_IMPL_H)
47 typedef enum acl_type {
57 int acl_type(acl_t *);
58 char *acl_strerror(int);
63 * Cache structure in alist
65 struct XACL_Solaris_Cache {
74 class XACL_Solaris : public XACL {
77 bRC_XACL os_backup_acl (JCR *jcr, FF_PKT *ff_pkt);
78 bRC_XACL os_restore_acl (JCR *jcr, int stream, char *content, uint32_t length);
79 bRC_XACL os_backup_xattr (JCR *jcr, FF_PKT *ff_pkt);
80 bRC_XACL os_restore_xattr (JCR *jcr, int stream, char *content, uint32_t length);
81 bRC_XACL os_get_acl(JCR *jcr, int *stream);
82 bRC_XACL os_set_acl(JCR *jcr, int stream, char *content, uint32_t length);
83 bRC_XACL os_get_xattr_names (JCR *jcr, POOLMEM **list, uint32_t *length);
84 bRC_XACL os_get_xattr_value (JCR *jcr, char * name, char ** pvalue, uint32_t * plen);
85 bRC_XACL os_set_xattr (JCR *jcr, bool extended, char *content, uint32_t length);
86 bRC_XACL os_get_xattr_acl(JCR *jcr, int fd, char **buffer);
87 bRC_XACL os_set_xattr_acl(JCR *jcr, int fd, char *name, char *acltext);
88 /* requires acl.h available */
89 bRC_XACL check_xacltype (JCR *jcr, int name);
90 inline char * find_xattr_cache(JCR *jcr, ino_t ino, char * name);
91 inline void delete_xattr_cache();
97 #endif /* HAVE_SUN_OS */
99 #endif /* __XACL_Solaris_H_ */