]> git.sur5r.net Git - bacula/bacula/commitdiff
Disable xattr on NetBSD and FreeBSD in 3.0.x
authorMarco van Wieringen <mvw@planets.elm.net>
Wed, 11 Nov 2009 18:21:23 +0000 (19:21 +0100)
committerMarco van Wieringen <mvw@planets.elm.net>
Mon, 14 Dec 2009 21:43:47 +0000 (22:43 +0100)
bacula/autoconf/configure.in
bacula/src/filed/xattr.c

index 61727585572c7e7395a9eac2eb61f3ca95377508..8a91a312ebf0698cbbe0ea43c7af511f990dd1db 100644 (file)
@@ -2409,7 +2409,21 @@ fi
 dnl
 dnl Check for XATTR support
 dnl
-support_xattr=auto
+case $DISTNAME in
+freebsd)
+   #
+   # FreeBSD gives false positives on the xattr function but seems to have problems compiling the code
+   # for now disable the checks on FreeBSD, Bacula 3.1.x has proper support for xattr on *BSD
+   #
+   support_xattr=no
+   ;;
+netbsd)
+   support_xattr=no
+   ;;
+*)
+   support_xattr=auto
+   ;;
+esac
 AC_ARG_ENABLE(xattr,
    AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
    [
index 99f9bbb63b89b930f2df263a6d2fb6dd640c7eda..e5ab606ae53f45732d641532082f2ce84f9d6918 100644 (file)
  * they were saved using a filed on the same platform.
  *
  * Currently we support the following OSes:
- *   - FreeBSD (Extended Attributes)
  *   - Darwin (Extended Attributes)
  *   - Linux (Extended Attributes)
- *   - NetBSD (Extended Attributes)
  *   - Solaris (Extended Attributes and Extensible Attributes)
  *
  *   Written by Marco van Wieringen, November MMVIII
@@ -119,9 +117,7 @@ static bool send_xattr_stream(JCR *jcr, int stream)
  * Start with the generic interface used by most OS-es.
  */
 #if defined(HAVE_DARWIN_OS) \
-   || defined(HAVE_FREEBSD_OS) \
-   || defined(HAVE_LINUX_OS) \
-   || defined(HAVE_NETBSD_OS)
+   || defined(HAVE_LINUX_OS)
        
 #ifdef HAVE_SYS_XATTR_H
 #include <sys/xattr.h>
@@ -181,7 +177,7 @@ static void xattr_drop_internal_table(xattr_t *xattr_value_list)
 }
 
 /*
- * The xattr stream for OSX, FreeBSD, Linux and NetBSD is a serialized stream of bytes
+ * The xattr stream for OSX, Linux is a serialized stream of bytes
  * which encodes one or more xattr_t structures.
  *
  * The Serialized stream consists of the following elements:
@@ -510,24 +506,6 @@ static bool darwin_parse_xattr_stream(JCR *jcr, int stream)
       return true;                    /* non-fatal error */
    }
 }
-#elif defined(HAVE_FREEBSD_OS)
-static bool freebsd_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt)
-{
-   return generic_xattr_build_streams(jcr, ff_pkt, STREAM_XATTR_FREEBSD);
-}
-
-static bool freebsd_parse_xattr_stream(JCR *jcr, int stream)
-{
-   switch (stream) {
-   case STREAM_XATTR_FREEBSD:
-      return generic_xattr_parse_streams(jcr);
-   default:
-      Jmsg2(jcr, M_WARNING, 0, 
-         _("Can't restore Extended Attributes of %s - incompatible xattr stream encountered - %d\n"),
-         jcr->last_fname, stream);
-      return true;                    /* non-fatal error */
-   }
-}
 #elif defined(HAVE_LINUX_OS)
 static bool linux_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt)
 {
@@ -546,25 +524,6 @@ static bool linux_parse_xattr_stream(JCR *jcr, int stream)
       return true;                    /* non-fatal error */
    }
 }
-#elif defined(HAVE_NETBSD_OS)
-static bool netbsd_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt)
-{
-   return generic_xattr_build_streams(jcr, ff_pkt, STREAM_XATTR_NETBSD);
-}
-
-static bool netbsd_parse_xattr_stream(JCR *jcr, int stream)
-{
-   switch (stream) {
-   case STREAM_XATTR_NETBSD:
-      return generic_xattr_parse_streams(jcr);
-   default:
-      Jmsg2(jcr, M_WARNING, 0, 
-         _("Can't restore Extended Attributes of %s - incompatible xattr stream encountered - %d\n"),
-         jcr->last_fname, stream);
-      return true;                    /* non-fatal error */
-   }
-}
-#endif
 #elif defined(HAVE_SUN_OS)
 /*
  * Solaris extended attributes were introduced in Solaris 9