From: Marco van Wieringen Date: Wed, 7 Oct 2009 07:10:58 +0000 (+0200) Subject: Use extattr interface for all xBSD filesystems. Added OpenBSD also to the mix. X-Git-Tag: Release-5.0.0~285^2~1^2~4^2~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c77c6131c45dd51c47b24d0b82011d8a7a834502;p=bacula%2Fbacula Use extattr interface for all xBSD filesystems. Added OpenBSD also to the mix. --- diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 146a701862..edcdddf13f 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -287,6 +287,7 @@ void InitWinAPIWrapper(); #define STREAM_ACL_SOLARIS_ACE 1013 /* Solaris specific ace_t string representation from * from acl_totext (NFSv4 or ZFS 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/restore.c b/bacula/src/filed/restore.c index 1a65e43a54..d3b25c9a99 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -683,6 +683,7 @@ void do_restore(JCR *jcr) } break; + case STREAM_XATTR_OPENBSD: case STREAM_XATTR_SOLARIS_SYS: case STREAM_XATTR_SOLARIS: case STREAM_XATTR_DARWIN: diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index b103e3ee1d..bb8f0d70ac 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -36,6 +36,7 @@ * - Linux (Extended Attributes) * - NetBSD (Extended Attributes) * - FreeBSD (Extended Attributes) + * - OpenBSD (Extended Attributes) * - Solaris (Extended Attributes and Extensible Attributes) * * Written by Marco van Wieringen, November MMVIII @@ -135,10 +136,6 @@ static const char *xattr_skiplist[3] = { "com.apple.system.extendedsecurity", "c static int os_default_xattr_streams[1] = { STREAM_XATTR_LINUX }; static const char *xattr_acl_skiplist[2] = { "system.posix_acl_access", NULL }; static const char *xattr_skiplist[1] = { NULL }; -#elif defined(HAVE_NETBSD_OS) -static int os_default_xattr_streams[1] = { STREAM_XATTR_NETBSD }; -static const char *xattr_acl_skiplist[1] = { NULL }; -static const char *xattr_skiplist[1] = { NULL }; #endif /* @@ -585,7 +582,9 @@ static bxattr_exit_code generic_xattr_parse_streams(JCR *jcr, int stream) static bxattr_exit_code (*os_build_xattr_streams)(JCR *jcr, FF_PKT *ff_pkt) = generic_xattr_build_streams; static bxattr_exit_code (*os_parse_xattr_streams)(JCR *jcr, int stream) = generic_xattr_parse_streams; -#elif defined(HAVE_FREEBSD_OS) +#elif defined(HAVE_FREEBSD_OS) || \ + defined(HAVE_NETBSD_OS) || \ + defined(HAVE_OPENBSD_OS) #ifdef HAVE_SYS_EXTATTR_H #include diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c index 7ba1fca330..3a98480029 100644 --- a/bacula/src/findlib/bfile.c +++ b/bacula/src/findlib/bfile.c @@ -169,6 +169,8 @@ const char *stream_to_ascii(int stream) return _("Solaris Specific ACL attribs"); case STREAM_ACL_SOLARIS_ACE: return _("Solaris Specific ACL attribs"); + case STREAM_XATTR_OPENBSD: + return _("OpenBSD Specific Extended attribs"); case STREAM_XATTR_SOLARIS_SYS: return _("Solaris Specific Extensible attribs or System Extended attribs"); case STREAM_XATTR_SOLARIS: diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index 39fb18d424..fb04bc4c69 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -810,6 +810,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) /* Ignore Unix ACL attributes */ break; + case STREAM_XATTR_OPENBSD: case STREAM_XATTR_SOLARIS_SYS: case STREAM_XATTR_SOLARIS: case STREAM_XATTR_DARWIN: