diff --git a/0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch b/0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch new file mode 100644 index 00000000..9f1a8dcb --- /dev/null +++ b/0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch @@ -0,0 +1,39 @@ +From 9ed2a35e93f4a9e82585f860f54cdcbbdf3e1f86 Mon Sep 17 00:00:00 2001 +From: Richard Weinberger +Date: Tue, 9 Sep 2014 11:09:37 +0200 +Subject: [PATCH] systemd-tmpfiles: Fix IGNORE_DIRECTORY_PATH age handling + +If one has a config like: +d /tmp 1777 root root - +X /tmp/important_mount + +All files below /tmp/important_mount will be deleted as the +/tmp/important_mount item will spuriously inherit a max age of 0 +from /tmp. +/tmp has a max age of 0 but age_set is (of course) false. + +This affects also the PrivateTmp feature of systemd. +All tmp files of such services will be deleted unconditionally +and can cause service failures and data loss. + +Fix this by checking ->age_set in the IGNORE_DIRECTORY_PATH logic. +--- + src/tmpfiles/tmpfiles.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/tmpfiles/tmpfiles.c src/tmpfiles/tmpfiles.c +index f9830c4..7eafd6b 100644 +--- src/tmpfiles/tmpfiles.c ++++ src/tmpfiles/tmpfiles.c +@@ -1576,7 +1576,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) { + candidate_item = j; + } + +- if (candidate_item) { ++ if (candidate_item && candidate_item->age_set) { + i->age = candidate_item->age; + i->age_set = true; + } +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 06227f72..dcfc946e 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 26 16:11:10 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch + for bsc#893797 + ------------------------------------------------------------------- Fri Sep 26 09:34:22 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 08a09c44..3bc014d9 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -900,6 +900,8 @@ Patch434: 0002-util-avoid-non-portable-__WORDSIZE.patch Patch435: 0001-Fix-warning-about-unused-variable-with-SELINUX.patch # PATCH-FIX-UPSTREAM added at 2014/09/25 Patch436: 0002-bus-remove-unused-check.patch +# PATCH-FIX-UPSTREAM added at 2014/09/26 +Patch437: 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch # UDEV PATCHES # ============ @@ -1680,6 +1682,7 @@ cp %{SOURCE7} m4/ %patch434 -p0 %patch435 -p0 %patch436 -p0 +%patch437 -p0 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 06227f72..dcfc946e 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 26 16:11:10 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch + for bsc#893797 + ------------------------------------------------------------------- Fri Sep 26 09:34:22 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 7980a8c4..79e9153c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -895,6 +895,8 @@ Patch434: 0002-util-avoid-non-portable-__WORDSIZE.patch Patch435: 0001-Fix-warning-about-unused-variable-with-SELINUX.patch # PATCH-FIX-UPSTREAM added at 2014/09/25 Patch436: 0002-bus-remove-unused-check.patch +# PATCH-FIX-UPSTREAM added at 2014/09/26 +Patch437: 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch # UDEV PATCHES # ============ @@ -1675,6 +1677,7 @@ cp %{SOURCE7} m4/ %patch434 -p0 %patch435 -p0 %patch436 -p0 +%patch437 -p0 # udev patches %patch1001 -p1