]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/acl.h
Tweaks + svn ignores
[bacula/bacula] / bacula / src / filed / acl.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version two of the GNU General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of Kern Sibbald.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * Properties we use for getting and setting ACLs.
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