[pkg-bacula-commits] [SCM] Bacula, a network backup, recovery and verification program branch, master, updated. debian/5.2.6+dfsg-3-11-gac79eaa

Alexander Golovko alexandro at ankalagon.ru
Tue Sep 25 08:43:50 UTC 2012


The following commit has been merged in the master branch:
commit 455622199fb46805cd11f69630279af5987c0bb2
Author: Alexander Golovko <alexandro at ankalagon.ru>
Date:   Tue Sep 25 11:37:32 2012 +0400

    Fix bacula-fd crash on saving xattr on btrfs

diff --git a/debian/changelog b/debian/changelog
index 2825280..ac95b4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ bacula (5.2.6+dfsg-4) unstable; urgency=high
     + Cleanup list of linked libraries.
   * debian/README.Debian:
     + Add information about file daemon without root privileges.
+  * debian/patches/xattr-btrfs-crash.patch, debian/patches/series:
+    + Fix bacula-fd crash on saving xattr on btrfs.
 
  -- Alexander Golovko <alexandro at ankalagon.ru>  Mon, 24 Sep 2012 17:49:25 +0400
 
diff --git a/debian/patches/series b/debian/patches/series
index 500fd5b..138a881 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,3 +17,4 @@ delegate-chuid-to-systemd.patch
 fix-systemd-daemon-user-group.patch
 path-to-logdir.patch
 fix_dump_resources_acl.patch
+xattr-btrfs-crash.patch
diff --git a/debian/patches/xattr-btrfs-crash.patch b/debian/patches/xattr-btrfs-crash.patch
new file mode 100644
index 0000000..5f14d6a
--- /dev/null
+++ b/debian/patches/xattr-btrfs-crash.patch
@@ -0,0 +1,50 @@
+Description: Fix crash on saving xattr from btrfs.
+Bug: http://bugs.bacula.org/view.php?id=1874
+Author: Marco van Wieringen <mvw at planets.elm.net>
+Reviewed-by: Alexander Golovko <alexandro at ankalagon.ru>
+Last-Update: 2012-09-25
+
+diff --git a/src/filed/xattr.c b/src/filed/xattr.c
+index 40a5127..b6884ea 100644
+--- a/src/filed/xattr.c
++++ b/src/filed/xattr.c
+@@ -448,6 +448,7 @@ static bxattr_exit_code aix_xattr_build_streams(JCR *jcr, FF_PKT *ff_pkt)
+        * Each xattr valuepair starts with a magic so we can parse it easier.
+        */
+       current_xattr = (xattr_t *)malloc(sizeof(xattr_t));
++      memset(current_xattr, 0, sizeof(xattr_t));
+       current_xattr->magic = XATTR_MAGIC;
+       expected_serialize_len += sizeof(current_xattr->magic);
+ 
+@@ -739,6 +740,7 @@ static bxattr_exit_code irix_xattr_build_streams(JCR *jcr, FF_PKT *ff_pkt)
+              * Each xattr valuepair starts with a magic so we can parse it easier.
+              */
+             current_xattr = (xattr_t *)malloc(sizeof(xattr_t));
++            memset(current_xattr, 0, sizeof(xattr_t));
+             current_xattr->magic = XATTR_MAGIC;
+             expected_serialize_len += sizeof(current_xattr->magic);
+ 
+@@ -1197,6 +1199,7 @@ static bxattr_exit_code generic_xattr_build_streams(JCR *jcr, FF_PKT *ff_pkt)
+        * Each xattr valuepair starts with a magic so we can parse it easier.
+        */
+       current_xattr = (xattr_t *)malloc(sizeof(xattr_t));
++      memset(current_xattr, 0, sizeof(xattr_t));
+       current_xattr->magic = XATTR_MAGIC;
+       expected_serialize_len += sizeof(current_xattr->magic);
+ 
+@@ -1655,6 +1658,7 @@ static bxattr_exit_code bsd_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt)
+           * Each xattr valuepair starts with a magic so we can parse it easier.
+           */
+          current_xattr = (xattr_t *)malloc(sizeof(xattr_t));
++         memset(current_xattr, 0, sizeof(xattr_t));
+          current_xattr->magic = XATTR_MAGIC;
+          expected_serialize_len += sizeof(current_xattr->magic);
+ 
+@@ -2082,6 +2086,7 @@ static bxattr_exit_code tru64_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt)
+        * Each xattr valuepair starts with a magic so we can parse it easier.
+        */
+       current_xattr = (xattr_t *)malloc(sizeof(xattr_t));
++      memset(current_xattr, 0, sizeof(xattr_t));
+       current_xattr->magic = XATTR_MAGIC;
+       expected_serialize_len += sizeof(current_xattr->magic);
+ 

-- 
Bacula, a network backup, recovery and verification program



More information about the pkg-bacula-commits mailing list