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_LINUX_H_
29 #define __XACL_LINUX_H_
31 #if defined(HAVE_LINUX_OS)
32 #include <sys/types.h>
37 #error "configure failed to detect availability of sys/acl.h"
40 #if !defined(HAVE_LLISTXATTR) || !defined(HAVE_LGETXATTR) || !defined(HAVE_LSETXATTR)
41 #error "Missing full support for the XATTR functions."
44 #ifdef HAVE_SYS_XATTR_H
45 #include <sys/xattr.h>
47 #error "Missing sys/xattr.h header file"
54 class XACL_Linux : public XACL {
56 bRC_XACL os_backup_acl (JCR *jcr, FF_PKT *ff_pkt);
57 bRC_XACL os_restore_acl (JCR *jcr, int stream, char *content, uint32_t length);
58 bRC_XACL os_backup_xattr (JCR *jcr, FF_PKT *ff_pkt);
59 bRC_XACL os_restore_xattr (JCR *jcr, int stream, char *content, uint32_t length);
60 bRC_XACL os_get_acl(JCR *jcr, XACL_type xacltype);
61 bRC_XACL os_set_acl(JCR *jcr, XACL_type xacltype, char *content, uint32_t length);
62 bRC_XACL os_get_xattr_names (JCR *jcr, POOLMEM **list, uint32_t *length);
63 bRC_XACL os_get_xattr_value (JCR *jcr, char * name, char ** pvalue, uint32_t * plen);
64 bRC_XACL os_set_xattr (JCR *jcr, FF_PKT *ff_pkt, char *list, uint32_t length);
65 bRC_XACL os_set_xattr (JCR *jcr, XACL_xattr *xattr);
66 acl_type_t get_acltype(XACL_type xacltype);
67 int acl_nrentries(acl_t acl);
68 bool acl_issimple(acl_t acl);
73 #endif /* HAVE_LINUX_OS */
75 #endif /* __XACL_LINUX_H_ */