]> git.sur5r.net Git - bacula/bacula/commitdiff
Use extattr interface for all xBSD filesystems. Added OpenBSD also to the mix.
authorMarco van Wieringen <mvw@planets.elm.net>
Wed, 7 Oct 2009 07:10:58 +0000 (09:10 +0200)
committerMarco van Wieringen <mvw@planets.elm.net>
Wed, 7 Oct 2009 07:10:58 +0000 (09:10 +0200)
bacula/src/baconfig.h
bacula/src/filed/restore.c
bacula/src/filed/xattr.c
bacula/src/findlib/bfile.c
bacula/src/stored/bscan.c

index 146a701862b40b57ee0f0d70244d53f5385beec4..edcdddf13f6608db08ff84ae836808d861bd8561 100644 (file)
@@ -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.
                                                   */
index 1a65e43a545b7d013c801befbb5b442263a60ef7..d3b25c9a99aedd5eb1d5b55de370ac6de51ef8a3 100644 (file)
@@ -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:
index b103e3ee1d41a09a34811deb4c8d8e671aa03ae4..bb8f0d70acc63945ace762934d5824857fc2f7c3 100644 (file)
@@ -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 <sys/extattr.h>
index 7ba1fca33040371678ff4b12aa8e4e1721bcd007..3a984800299299719043348ea514a516bdce1b43 100644 (file)
@@ -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:
index 39fb18d424a480eb7eaffd34907578c01696255e..fb04bc4c69eed6fe6ad357337856387e84b8b01d 100644 (file)
@@ -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: