]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/acl.h
kes Change Bacula trademark owner from John Walker to Kern Sibbald
[bacula/bacula] / bacula / src / filed / acl.h
1 /*
2  * Properties we use for getting and setting ACLs.
3  */
4 /*
5    Bacula® - The Network Backup Solution
6
7    Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
8
9    The main author of Bacula is Kern Sibbald, with contributions from
10    many others, a complete list can be found in the file AUTHORS.
11    This program is Free Software; you can redistribute it and/or
12    modify it under the terms of version two of the GNU General Public
13    License as published by the Free Software Foundation and included
14    in the file LICENSE.
15
16    This program is distributed in the hope that it will be useful, but
17    WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19    General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24    02110-1301, USA.
25
26    Bacula® is a registered trademark of Kern Sibbald.
27    The licensor of Bacula is the Free Software Foundation Europe
28    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
29    Switzerland, email:ftf@fsfeurope.org.
30 */
31
32 #ifndef _BACULA_ACL_
33 #define _BACULA_ACL_
34
35 /* For shorter ACL strings when possible, define BACL_WANT_SHORT_ACLS */
36 /* #define BACL_WANT_SHORT_ACLS */
37
38 /* For numeric user/group ids when possible, define BACL_WANT_NUMERIC_IDS */
39 /* #define BACL_WANT_NUMERIC_IDS */
40
41 /* We support the following types of ACLs */
42 #define BACL_TYPE_NONE        0x000
43 #define BACL_TYPE_ACCESS      0x001
44 #define BACL_TYPE_DEFAULT     0x002
45
46 #define BACL_CAP_NONE         0x000    /* No special capabilities */
47 #define BACL_CAP_DEFAULTS     0x001    /* Has default ACLs for directories */
48 #define BACL_CAP_DEFAULTS_DIR 0x002    /* Default ACLs must be read separately */
49
50 /* Set BACL_CAP (always) and BACL_ENOTSUP (when used) for various OS */
51 #if defined(HAVE_FREEBSD_OS)
52 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
53 #define BACL_ENOTSUP          EOPNOTSUPP
54 #elif defined(HAVE_DARWIN_OS)
55 #define BACL_CAP              BACL_CAP_NONE
56 #define BACL_ENOTSUP          EOPNOTSUPP
57 #elif defined(HAVE_HPUX_OS)
58 #define BACL_CAP              BACL_CAP_NONE
59 #define BACL_ENOTSUP          EOPNOTSUPP
60 #elif defined(HAVE_IRIX_OS)
61 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
62 #define BACL_ENOTSUP          ENOSYS
63 #elif defined(HAVE_LINUX_OS) 
64 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
65 #define BACL_ENOTSUP          ENOTSUP
66 #elif defined(HAVE_OSF1_OS)
67 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
68 /* #define BACL_ENOTSUP       ENOTSUP */     /* Don't know */
69 #define BACL_CAP              (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR)
70 #elif defined(HAVE_SUN_OS)
71 #define BACL_CAP              BACL_CAP_DEFAULTS
72 #else
73 #define BACL_CAP              BACL_CAP_NONE  /* nothing special */
74 #endif
75
76 #endif