]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/acl.h
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / filed / acl.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2015 Kern Sibbald
5    Copyright (C) 2004-2014 Free Software Foundation Europe e.V.
6
7    The original author of Bacula is Kern Sibbald, with contributions
8    from many others, a complete list can be found in the file AUTHORS.
9
10    You may use this file and others of this release according to the
11    license defined in the LICENSE file, which includes the Affero General
12    Public License, v3.0 ("AGPLv3") and some additional permissions and
13    terms pursuant to its AGPLv3 Section 7.
14
15    This notice must be preserved when any source code is 
16    conveyed and/or propagated.
17
18    Bacula(R) is a registered trademark of Kern Sibbald.
19 */
20 /*
21  * Properties we use for getting and setting ACLs.
22  */
23
24 #ifndef __BACL_H_
25 #define __BACL_H_
26
27 /* Global JCR data */
28 struct acl_ctx_t  {
29    uint32_t nr_errors;
30    uint32_t flags;              /* See BACL_FLAG_* */
31    uint32_t current_dev;
32    uint32_t content_length;
33    POOLMEM *content;
34 };
35
36 /*
37  * We support the following types of ACLs
38  */
39 typedef enum {
40    BACL_TYPE_NONE        = 0,
41    BACL_TYPE_ACCESS      = 1,
42    BACL_TYPE_DEFAULT     = 2,
43    BACL_TYPE_DEFAULT_DIR = 3,
44    BACL_TYPE_EXTENDED    = 4,
45    BACL_TYPE_NFS4        = 5
46 } bacl_type;
47
48 #define BACL_FLAG_SAVE_NATIVE     0x01
49 #define BACL_FLAG_SAVE_AFS        0x02
50 #define BACL_FLAG_RESTORE_NATIVE  0x04
51 #define BACL_FLAG_RESTORE_AFS     0x08
52
53 /*
54  * Ensure we have none
55  */
56 #ifndef ACL_TYPE_NONE
57 #define ACL_TYPE_NONE 0x0
58 #endif
59  
60 #ifdef HAVE_IRIX_OS
61 #define BACL_ENOTSUP  ENOSYS
62 #else
63 #define BACL_ENOTSUP  EOPNOTSUPP
64 #endif /* HAVE_IRIX_OS */
65
66 #endif /* __BACL_H_ */