summaryrefslogtreecommitdiff
path: root/core/systemd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-10-25 02:08:36 -0700
committerroot <root@rshg054.dnsready.net>2013-10-25 02:08:36 -0700
commit5a3821aec094b38a412cf5e6997c08b6428d6f77 (patch)
tree80caf9e8d169d5c43d828ede599cb91fa065d8df /core/systemd
parent94ded0cb27161b972228cfef8ea2e6f60af0f2b2 (diff)
Fri Oct 25 02:07:10 PDT 2013
Diffstat (limited to 'core/systemd')
-rw-r--r--core/systemd/0001-mount-check-for-NULL-before-reading-pm-what.patch29
-rw-r--r--core/systemd/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch50
-rw-r--r--core/systemd/PKGBUILD20
-rw-r--r--core/systemd/systemd.install2
4 files changed, 93 insertions, 8 deletions
diff --git a/core/systemd/0001-mount-check-for-NULL-before-reading-pm-what.patch b/core/systemd/0001-mount-check-for-NULL-before-reading-pm-what.patch
new file mode 100644
index 000000000..27256484c
--- /dev/null
+++ b/core/systemd/0001-mount-check-for-NULL-before-reading-pm-what.patch
@@ -0,0 +1,29 @@
+From 9c03872bc8fb2a381eafe7301ef9811b641686dd Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@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
+
diff --git a/core/systemd/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch b/core/systemd/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
new file mode 100644
index 000000000..8c8ea46c2
--- /dev/null
+++ b/core/systemd/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
@@ -0,0 +1,50 @@
+From 1d5989fd803d2019de0f6aaaf3cfb1cb2bbc3cdb Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@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
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index c828bc755..d238c0390 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -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 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'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 @@ build() {
}
check() {
- # two tests fail due to running under nspawn
- make -C "$pkgname-$pkgver" check || true
+ make -C "$pkgname-$pkgver" check || :
}
package_systemd() {
@@ -71,6 +76,7 @@ package_systemd() {
etc/dbus-1/system.d/org.freedesktop.locale1.conf
etc/dbus-1/system.d/org.freedesktop.machine1.conf
etc/dbus-1/system.d/org.freedesktop.timedate1.conf
+ etc/pam.d/systemd-user
etc/systemd/bootchart.conf
etc/systemd/journald.conf
etc/systemd/logind.conf
@@ -119,7 +125,7 @@ package_systemd() {
"$srcdir"/_sysvcompat/usr/share/man/man8
# include MIT license, since it's technically custom
- install -Dm755 "$srcdir/$pkgname-$pkgver/LICENSE.MIT" \
+ install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE.MIT" \
"$pkgdir/usr/share/licenses/systemd/LICENSE.MIT"
}
diff --git a/core/systemd/systemd.install b/core/systemd/systemd.install
index f22536360..1e79585d7 100644
--- a/core/systemd/systemd.install
+++ b/core/systemd/systemd.install
@@ -69,7 +69,7 @@ post_upgrade() {
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@.service || true
+ systemctl -q enable getty@tty1.service || true
fi
if [ "$(vercmp 194-4 "$2")" -eq 1 ]; then