[arch-commits] Commit in systemd/trunk (4 files)

Dave Reisner dreisner at nymeria.archlinux.org
Mon Oct 21 13:35:56 UTC 2013


    Date: Monday, October 21, 2013 @ 15:35:56
  Author: dreisner
Revision: 197018

upgpkg: systemd 208-2

- backport various fixes

Added:
  systemd/trunk/0001-mount-check-for-NULL-before-reading-pm-what.patch
  systemd/trunk/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
Modified:
  systemd/trunk/PKGBUILD
  systemd/trunk/systemd.install

-----------------------------------------------------------------+
 0001-mount-check-for-NULL-before-reading-pm-what.patch          |   29 +++++
 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch |   50 ++++++++++
 PKGBUILD                                                        |   17 ++-
 systemd.install                                                 |    2 
 4 files changed, 91 insertions(+), 7 deletions(-)

Added: 0001-mount-check-for-NULL-before-reading-pm-what.patch
===================================================================
--- 0001-mount-check-for-NULL-before-reading-pm-what.patch	                        (rev 0)
+++ 0001-mount-check-for-NULL-before-reading-pm-what.patch	2013-10-21 13:35:56 UTC (rev 197018)
@@ -0,0 +1,29 @@
+From 9c03872bc8fb2a381eafe7301ef9811b641686dd Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner at archlinux.org>
+Date: Fri, 4 Oct 2013 18:22:40 -0400
+Subject: [PATCH] mount: check for NULL before reading pm->what
+
+Since a57f7e2c828b85, a mount unit with garbage in it would cause
+systemd to crash on loading it.
+
+ref: https://bugs.freedesktop.org/show_bug.cgi?id=70148
+---
+ src/core/mount.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 93bfa99..db055f0 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -182,7 +182,7 @@ static int mount_add_mount_links(Mount *m) {
+          * for the source path (if this is a bind mount) to be
+          * available. */
+         pm = get_mount_parameters_fragment(m);
+-        if (pm && path_is_absolute(pm->what)) {
++        if (pm && pm->what && path_is_absolute(pm->what)) {
+                 r = unit_require_mounts_for(UNIT(m), pm->what);
+                 if (r < 0)
+                         return r;
+-- 
+1.8.4.1
+

Added: 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
===================================================================
--- 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch	                        (rev 0)
+++ 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch	2013-10-21 13:35:56 UTC (rev 197018)
@@ -0,0 +1,50 @@
+From 1d5989fd803d2019de0f6aaaf3cfb1cb2bbc3cdb Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner at archlinux.org>
+Date: Sun, 6 Oct 2013 18:26:23 -0400
+Subject: [PATCH] shared/util: fix off-by-one error in tag_to_udev_node
+
+Triggered false negatives when encoding a string which needed every
+character to be escaped, e.g. "LABEL=/".
+---
+ src/shared/util.c            | 2 +-
+ src/test/test-device-nodes.c | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/util.c b/src/shared/util.c
+index 82f4221..31cea79 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -3527,7 +3527,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
+         if (u == NULL)
+                 return NULL;
+ 
+-        enc_len = strlen(u) * 4;
++        enc_len = strlen(u) * 4 + 1;
+         t = new(char, enc_len);
+         if (t == NULL)
+                 return NULL;
+diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c
+index 2f3dedb..59ba4be 100644
+--- a/src/test/test-device-nodes.c
++++ b/src/test/test-device-nodes.c
+@@ -26,7 +26,7 @@
+ 
+ /* helpers for test_encode_devnode_name */
+ static char *do_encode_string(const char *in) {
+-        size_t out_len = strlen(in) * 4;
++        size_t out_len = strlen(in) * 4 + 1;
+         char *out = malloc(out_len);
+ 
+         assert_se(out);
+@@ -46,6 +46,8 @@ static void test_encode_devnode_name(void) {
+         assert_se(expect_encoded_as("pinkiepie", "pinkiepie"));
+         assert_se(expect_encoded_as("valíd\\ųtf8", "valíd\\x5cųtf8"));
+         assert_se(expect_encoded_as("s/ash/ng", "s\\x2fash\\x2fng"));
++        assert_se(expect_encoded_as("/", "\\x2f"));
++        assert_se(expect_encoded_as("!", "\\x21"));
+ }
+ 
+ int main(int argc, char *argv[]) {
+-- 
+1.8.4.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-10-21 13:33:51 UTC (rev 197017)
+++ PKGBUILD	2013-10-21 13:35:56 UTC (rev 197018)
@@ -4,7 +4,7 @@
 pkgbase=systemd
 pkgname=('systemd' 'systemd-sysvcompat')
 pkgver=208
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://www.freedesktop.org/wiki/Software/systemd"
 makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gobject-introspection' 'gperf'
@@ -15,16 +15,22 @@
         'initcpio-hook-udev'
         'initcpio-install-systemd'
         'initcpio-install-udev'
-        '0001-fix-lingering-references-to-var-lib-backlight-random.patch')
+        '0001-fix-lingering-references-to-var-lib-backlight-random.patch'
+        '0001-mount-check-for-NULL-before-reading-pm-what.patch'
+        '0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch')
 md5sums=('df64550d92afbffb4f67a434193ee165'
          '29245f7a240bfba66e2b1783b63b6b40'
          '8b68b0218a3897d4d37a6ccf47914774'
          'bde43090d4ac0ef048e3eaee8202a407'
-         '1b191c4e7a209d322675fd199e3abc66')
+         '1b191c4e7a209d322675fd199e3abc66'
+         'a693bef63548163ffc165f4c4801ebf7'
+         'ccafe716d87df9c42af0d1960b5a4105')
 
 prepare() {
   cd "$pkgname-$pkgver"
-  patch -Np1 -i ../0001-fix-lingering-references-to-var-lib-backlight-random.patch
+  patch -Np1 < "$srcdir"/0001-fix-lingering-references-to-var-lib-backlight-random.patch
+  patch -Np1 < "$srcdir"/0001-mount-check-for-NULL-before-reading-pm-what.patch
+  patch -Np1 < "$srcdir"/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
 }
 
 build() {
@@ -46,8 +52,7 @@
 }
 
 check() {
-  # two tests fail due to running under nspawn
-  make -C "$pkgname-$pkgver" check || true
+  make -C "$pkgname-$pkgver" check || :
 }
 
 package_systemd() {

Modified: systemd.install
===================================================================
--- systemd.install	2013-10-21 13:33:51 UTC (rev 197017)
+++ systemd.install	2013-10-21 13:35:56 UTC (rev 197018)
@@ -69,7 +69,7 @@
   if [ "$(vercmp 183 "$2")" -eq 1 ]; then
     # systemctl seems to be whiny on sysvinit. this will succeed unless something
     # horrific happens, so just mask the error.
-    systemctl -q enable getty at .service || true
+    systemctl -q enable getty at tty1.service || true
   fi
 
   if [ "$(vercmp 194-4 "$2")" -eq 1 ]; then




More information about the arch-commits mailing list