Fix: Upgrading from 22 to 23 by fedup fails (#1251334)

This commit is contained in:
Jan Synacek 2015-09-17 13:29:20 +02:00
parent 4c8e89957b
commit dab26592cc
3 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 67a3328fbdecd1d81431cc6380de5b3f2d628def Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 6 Aug 2015 23:47:46 -0400
Subject: [PATCH] load-fragment: fix segv on parse error
https://bugzilla.redhat.com/show_bug.cgi?id=1251334
---
src/core/load-fragment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index ba73cc4..2991721 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1986,7 +1986,7 @@ int config_parse_environ(const char *unit,
return log_oom();
FOREACH_WORD_QUOTED(word, l, k, state) {
- _cleanup_free_ char *n;
+ _cleanup_free_ char *n = NULL;
char **x;
r = cunescape_length(word, l, 0, &n);
--
2.4.3

View File

@ -0,0 +1,42 @@
From 388a91b06473b13a59ba217d23b26ca3dc0f2555 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 7 Aug 2015 00:06:15 -0400
Subject: [PATCH] man: clarify that unknown escapes must be escaped
https://bugzilla.redhat.com/show_bug.cgi?id=1251334
is about a unit file which has
Environment=TERM=linux PS1=system-upgrade:\w\$\x20
We used to allow that, but after recent tightening of parsing
rules, we barf. Make it clear that this is intentional.
---
man/systemd.service.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 4368ca8..7e96989 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -922,7 +922,10 @@
the arguments. Double quotes ("...") and single quotes ('...') may
be used, in which case everything until the next matching quote
becomes part of the same argument. C-style escapes are also
- supported, see table below. Quotes themselves are removed after
+ supported. The table below contains the list of allowed escape
+ patterns. Only patterns which match the syntax in the table are
+ allowed; others will result in an error, and must be escaped by
+ doubling the backslash. Quotes themselves are removed after
parsing and escape sequences substituted. In addition, a trailing
backslash (<literal>\</literal>) may be used to merge lines.
</para>
@@ -939,7 +942,7 @@
<literal>&amp;</literal>, and <emphasis>other elements of shell
syntax are not supported</emphasis>.</para>
- <para>The command to execute must an absolute path name. It may
+ <para>The command to execute must be an absolute path name. It may
contain spaces, but control characters are not allowed.</para>
<para>The command line accepts <literal>%</literal> specifiers as
--
2.4.3

View File

@ -36,6 +36,8 @@ Source9: 20-yama-ptrace.conf
# GIT_DIR=~/src/systemd/.git git format-patch-ab -M -N --no-signature v220..v220-stable
# i=1; for p in 0*patch;do printf "Patch%04d: %s\n" $i $p; ((i++));done
Patch0001: 0001-tmpfiles-downgrade-errors-when-a-file-system-does-no.patch
Patch0002: 0002-load-fragment-fix-segv-on-parse-error.patch
Patch0003: 0003-man-clarify-that-unknown-escapes-must-be-escaped.patch
# kernel-install patch for grubby, drop if grubby is obsolete
Patch1000: kernel-install-grubby.patch
@ -770,6 +772,7 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
%changelog
* Thu Sep 17 2015 Jan Synáček <jsynacek@redhat.com> - 222-3
- Fix: systemd-tmpfiles-setup.service fails on 23 Alpha RC1 Server (#1250737)
- Fix: Upgrading from 22 to 23 by fedup fails (#1251334)
* Thu Jul 9 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 222-2
- Remove python subpackages (python-systemd in now standalone)