A System and Service Manager
CentOS Sources
2016-06-23 e3fbdce388ec20fee465eda6593febbf2927283a
import systemd-219-19.el7_2.11
1 files added
1 files modified
59 ■■■■■ changed files
SOURCES/0277-fstab-generator-cescape-device-name-in-root-fsck-ser.patch 49 ●●●●● patch | view | raw | blame | history
SPECS/systemd.spec 10 ●●●●● patch | view | raw | blame | history
SOURCES/0277-fstab-generator-cescape-device-name-in-root-fsck-ser.patch
New file
@@ -0,0 +1,49 @@
From f29f53f95636fea60a3f757786131790477ab71a Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <arvidjaar@gmail.com>
Date: Wed, 3 Jun 2015 20:50:59 +0300
Subject: [PATCH] fstab-generator: cescape device name in root-fsck service
We unescape ExecStart line when parsing it, so escape device name
before adding it to unit file.
fixes #50
Cherry-picked from: fa05e97
Resolves: #1306126
---
 src/shared/generator.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 3af84a3..be8e24e 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -35,8 +35,13 @@
 static int write_fsck_sysroot_service(const char *dir, const char *what) {
         const char *unit;
         _cleanup_free_ char *device = NULL;
+        _cleanup_free_ char *escaped;
         _cleanup_fclose_ FILE *f = NULL;
+        escaped = cescape(what);
+        if (!escaped)
+                return log_oom();
+
         unit = strjoina(dir, "/systemd-fsck-root.service");
         log_debug("Creating %s", unit);
@@ -61,11 +66,12 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
                 "[Service]\n"
                 "Type=oneshot\n"
                 "RemainAfterExit=yes\n"
-                "ExecStart=" SYSTEMD_FSCK_PATH " %2$s\n"
+                "ExecStart=" SYSTEMD_FSCK_PATH " %4$s\n"
                 "TimeoutSec=0\n",
                 program_invocation_short_name,
                 what,
-                device);
+                device,
+                escaped);
         fflush(f);
         if (ferror(f))
SPECS/systemd.spec
@@ -7,7 +7,7 @@
Name:           systemd
Url:            http://www.freedesktop.org/wiki/Software/systemd
Version:        219
Release:        19%{?dist}.9
Release:        19%{?dist}.11
# For a breakdown of the licensing, see README
License:        LGPLv2+ and MIT and GPLv2+
Summary:        A System and Service Manager
@@ -304,6 +304,7 @@
Patch0274: 0274-Revert-journald-turn-ForwardToSyslog-off-by-default.patch
Patch0275: 0275-journal-fix-error-handling-when-compressing-journal-.patch
Patch0276: 0276-journal-irrelevant-coding-style-fixes.patch
Patch0277: 0277-fstab-generator-cescape-device-name-in-root-fsck-ser.patch
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
@@ -551,6 +552,7 @@
--enable-gtk-doc
--enable-compat-libs
--disable-sysusers
--disable-ldconfig
%ifarch s390 s390x ppc %{power64} aarch64
--disable-lto
%endif
@@ -1263,6 +1265,12 @@
%{_mandir}/man8/systemd-resolved.*
%changelog
* Thu May 26 2016 Lukas Nykryn <lnykryn@redhat.com> - 219-19.11
- fstab-generator: cescape device name in root-fsck service (#1306126)
* Tue May 24 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 219-19.10
- get rid of ldconfig.service (#1338892)
* Thu Apr 28 2016 Lukas Nykryn <lnykryn@redhat.com> - 219-19.9
- journal: fix error handling when compressing journal objects (#1292447)
- journal: irrelevant coding style fixes (#1292447)