forked from pool/systemd
fbd54ec893
(please also push to 13.1, I want the same version as F20) - Add 0001-gpt-auto-generator-exit-immediately-if-in-container.patch: don't start gpt auto-generator in container (git). - Add 0001-manager-when-verifying-whether-clients-may-change-en.patch: fix reload check in selinux case (git). - Add 0001-logind-fix-bus-introspection-data-for-TakeControl.patch: fix introspection for TakeControl (git). - Add 0001-mount-check-for-NULL-before-reading-pm-what.patch: fix crash when parsing some incorrect unit (git). - Add 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch: Fix udev rules parsing (git). - Add 0001-systemd-serialize-deserialize-forbid_restart-value.patch: Fix incorrect deserialization for forbid_restart (git). - Add 0001-core-unify-the-way-we-denote-serialization-attribute.patch: Ensure forbid_restart is named like other attributes (git). - Add 0001-journald-fix-minor-memory-leak.patch: fix memleak in journald (git). - Add 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch: Improve ACPI firmware performance parsing (git). - Add 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch: Fix journal rotation (git). - Add 0001-login-fix-invalid-free-in-sd_session_get_vt.patch: Fix memory corruption in sd_session_get_vt (git). (forwarded request 203387 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/203396 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=163
30 lines
905 B
Diff
30 lines
905 B
Diff
From 6891529fe1176c046ece579807ff48e3191692f3 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Fri, 11 Oct 2013 19:33:36 -0400
|
|
Subject: [PATCH] drop-ins: check return value
|
|
|
|
If the function failed, nothing serious would happen
|
|
because unlink would probably return EFAULT, but this
|
|
would obscure the real error and is a bit sloppy.
|
|
---
|
|
src/core/unit.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/core/unit.c b/src/core/unit.c
|
|
index 4b97710..1db7d06 100644
|
|
--- a/src/core/unit.c
|
|
+++ b/src/core/unit.c
|
|
@@ -2908,6 +2908,9 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) {
|
|
return 0;
|
|
|
|
r = drop_in_file(u, mode, name, &p, &q);
|
|
+ if (r < 0)
|
|
+ return r;
|
|
+
|
|
if (unlink(q) < 0)
|
|
r = errno == ENOENT ? 0 : -errno;
|
|
else
|
|
--
|
|
1.8.4
|
|
|