From: Marco van Wieringen Date: Thu, 16 Sep 2010 20:34:16 +0000 (+0200) Subject: First steps for adding new interface for acls added to AIX 5.3 and later. Added 2... X-Git-Tag: Release-5.2.1~1089 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cd18236042205a23bbd4da5a7b75d11865a27ac2;p=bacula%2Fbacula First steps for adding new interface for acls added to AIX 5.3 and later. Added 2 new streams and basic code to handle these streams. Next step is the actual implementation. --- diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 9ab945a4eb..8a0eca1fd6 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -299,6 +299,13 @@ void InitWinAPIWrapper(); * from acl_totext (NFSv4 or ZFS acl) */ #define STREAM_ACL_AFS_TEXT 1014 /* AFS specific string representation from pioctl */ + +#define STREAM_ACL_AIX_AIXC 1015 /* AIX specific string representation from + * aclx_printStr (POSIX acl) + */ +#define STREAM_ACL_AIX_NFS4 1016 /* AIX specific string representation from + * aclx_printStr (NFSv4 acl) + */ #define STREAM_XATTR_OPENBSD 1993 /* OpenBSD specific extended attributes */ #define STREAM_XATTR_SOLARIS_SYS 1994 /* Solaris specific extensible attributes or * otherwise named extended system attributes. diff --git a/bacula/src/filed/acl.c b/bacula/src/filed/acl.c index 6ccf13f20d..b8342bac67 100644 --- a/bacula/src/filed/acl.c +++ b/bacula/src/filed/acl.c @@ -126,6 +126,36 @@ static bacl_exit_code send_acl_stream(JCR *jcr, int stream) #if defined(HAVE_ACL) #if defined(HAVE_AIX_OS) +#if defined(HAVE_EXTENDED_ACL) + +#include + +/** + * Define the supported ACL streams for this OS + */ +static int os_access_acl_streams[1] = { STREAM_ACL_AIX_TEXT, STREAM_ACL_AIX_AIXC, STREAM_ACL_AIX_NFS4 }; +static int os_default_acl_streams[1] = { -1 }; + +static bacl_exit_code aix_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt) +{ + return bacl_exit_error; +} + +static bacl_exit_code aix_parse_acl_streams(JCR *jcr, int stream) +{ + switch (stream) { + case STREAM_ACL_AIX_TEXT: + case STREAM_ACL_AIX_AIXC: + break; + case STREAM_ACL_AIX_NFS4: + break; + } + + return bacl_exit_error; +} + +#else /* HAVE_EXTENDED_ACL */ + #include /** @@ -138,9 +168,6 @@ static bacl_exit_code aix_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt) { char *acl_text; - /* TODO: need to use aclx_get and aclx_put instead of acl_get and acl_put - * to work on all AIX FS - */ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { jcr->acl_data->content_length = pm_strcpy(jcr->acl_data->content, acl_text); actuallyfree(acl_text); @@ -156,6 +183,7 @@ static bacl_exit_code aix_parse_acl_streams(JCR *jcr, int stream) } return bacl_exit_ok; } +#endif /* HAVE_EXTENDED_ACL */ /** * For this OS setup the build and parse function pointer to the OS specific functions.