]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/acl.h
ebl fix RunScript bug (in some case, After script wasn't launched)
[bacula/bacula] / bacula / src / filed / acl.h
1 /*
2  * Properties we use for getting and setting ACLs.
3  */
4
5 #ifndef _BACULA_ACL_
6 #define _BACULA_ACL_
7
8 /* For shorter ACL strings when possible, define BACL_WANT_SHORT_ACLS */
9 /* #define BACL_WANT_SHORT_ACLS */
10
11 /* For numeric user/group ids when possible, define BACL_WANT_NUMERIC_IDS */
12 /* #define BACL_WANT_NUMERIC_IDS */
13
14 /* We support the following types of ACLs */
15 #define BACL_TYPE_NONE        0x000
16 #define BACL_TYPE_ACCESS      0x001
17 #define BACL_TYPE_DEFAULT     0x002
18
19 #define BACL_CAP_NONE         0x000    /* No special capabilities */
20 #define BACL_CAP_DEFAULTS     0x001    /* Has default ACLs for directories */
21 #define BACL_CAP_DEFAULTS_DIR 0x002    /* Default ACLs must be read separately */
22
23 /* Set BACL_CAP (always) and BACL_ENOTSUP (when used) for various OS */
24 #if defined(HAVE_FREEBSD_OS)
25 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
26 #define BACL_ENOTSUP          EOPNOTSUPP
27 #elif defined(HAVE_DARWIN_OS)
28 #define BACL_CAP              BACL_CAP_NONE
29 #define BACL_ENOTSUP          EOPNOTSUPP
30 #elif defined(HAVE_HPUX_OS)
31 #define BACL_CAP              BACL_CAP_NONE
32 #define BACL_ENOTSUP          EOPNOTSUPP
33 #elif defined(HAVE_IRIX_OS)
34 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
35 #define BACL_ENOTSUP          ENOSYS
36 #elif defined(HAVE_LINUX_OS) 
37 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
38 #define BACL_ENOTSUP          ENOTSUP
39 #elif defined(HAVE_OSF1_OS)
40 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
41 /* #define BACL_ENOTSUP       ENOTSUP */     /* Don't know */
42 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
43 #elif defined(HAVE_SUN_OS)
44 #define BACL_CAP              BACL_CAP_DEFAULTS
45 #else
46 #define BACL_CAP              BACL_CAP_NONE  /* nothing special */
47 #endif
48
49 #endif