X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Ffiled%2Facl.h;h=06d4194248c11a40bb68f85ba016e10e0a02f18c;hb=f9201647d5ecc4a1b0a2d1de7ca339f50fc5d77b;hp=c690b1a5684970771e5e0e4383943a4de62bbef6;hpb=1bb1415fce16b8dfeace4b3ed663d3b3f49b6a65;p=bacula%2Fbacula diff --git a/bacula/src/filed/acl.h b/bacula/src/filed/acl.h index c690b1a568..06d4194248 100644 --- a/bacula/src/filed/acl.h +++ b/bacula/src/filed/acl.h @@ -1,6 +1,3 @@ -/* - * Properties we use for getting and setting ACLs. - */ /* Bacula® - The Network Backup Solution @@ -23,11 +20,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Bacula® is a registered trademark of John Walker. + Bacula® is a registered trademark of Kern Sibbald. The licensor of Bacula is the Free Software Foundation Europe (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Properties we use for getting and setting ACLs. + */ #ifndef _BACULA_ACL_ #define _BACULA_ACL_ @@ -38,39 +38,35 @@ /* For numeric user/group ids when possible, define BACL_WANT_NUMERIC_IDS */ /* #define BACL_WANT_NUMERIC_IDS */ -/* We support the following types of ACLs */ -#define BACL_TYPE_NONE 0x000 -#define BACL_TYPE_ACCESS 0x001 -#define BACL_TYPE_DEFAULT 0x002 +/* + * We support the following types of ACLs + */ +typedef enum { + BACL_TYPE_NONE = 0, + BACL_TYPE_ACCESS = 1, + BACL_TYPE_DEFAULT = 2, + BACL_TYPE_DEFAULT_DIR = 3, + BACL_TYPE_EXTENDED = 4 +} bacl_type; -#define BACL_CAP_NONE 0x000 /* No special capabilities */ -#define BACL_CAP_DEFAULTS 0x001 /* Has default ACLs for directories */ -#define BACL_CAP_DEFAULTS_DIR 0x002 /* Default ACLs must be read separately */ +/* + * This value is used as ostype when we encounter a invalid acl type. + * The way the code is build this should never happen. + */ +#if !defined(ACL_TYPE_NONE) +#define ACL_TYPE_NONE 0x0 +#endif -/* Set BACL_CAP (always) and BACL_ENOTSUP (when used) for various OS */ #if defined(HAVE_FREEBSD_OS) -#define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) #define BACL_ENOTSUP EOPNOTSUPP #elif defined(HAVE_DARWIN_OS) -#define BACL_CAP BACL_CAP_NONE #define BACL_ENOTSUP EOPNOTSUPP #elif defined(HAVE_HPUX_OS) -#define BACL_CAP BACL_CAP_NONE #define BACL_ENOTSUP EOPNOTSUPP #elif defined(HAVE_IRIX_OS) -#define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) #define BACL_ENOTSUP ENOSYS #elif defined(HAVE_LINUX_OS) -#define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) #define BACL_ENOTSUP ENOTSUP -#elif defined(HAVE_OSF1_OS) -#define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) -/* #define BACL_ENOTSUP ENOTSUP */ /* Don't know */ -#define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) -#elif defined(HAVE_SUN_OS) -#define BACL_CAP BACL_CAP_DEFAULTS -#else -#define BACL_CAP BACL_CAP_NONE /* nothing special */ #endif #endif