Dr. Werner Fink 2014-03-11 11:03:08 +00:00 committed by Git OBS Bridge
parent 0a4d9e42e9
commit ac8d00f52b
12 changed files with 381 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 36d239dbdaf94ba2d96bb60ac45ecfc58624b1eb Mon Sep 17 00:00:00 2001
From: Daniel Mack <zonque@gmail.com>
Date: Fri, 7 Mar 2014 11:41:18 +0100
Subject: [PATCH] core/busname: add lookup string for
BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT
When a busname unit enters BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT, the
serialization will not be able to look up the result as string via
busname_result_to_string(). This leads to an assertion trap during
daemon-reexec.
---
src/core/busname.c | 1 +
1 file changed, 1 insertion(+)
diff --git src/core/busname.c src/core/busname.c
index 4c34538..237011a 100644
--- src/core/busname.c
+++ src/core/busname.c
@@ -548,6 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState);
static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
[BUSNAME_SUCCESS] = "success",
[BUSNAME_FAILURE_RESOURCES] = "resources",
+ [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent",
};
DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
--
1.7.9.2

View File

@ -0,0 +1,45 @@
From b2cdc6664ef6b56e47d38649d69b9943d9f9f5d0 Mon Sep 17 00:00:00 2001
From: Daniel Mack <zonque@gmail.com>
Date: Fri, 7 Mar 2014 14:43:59 +0100
Subject: [PATCH] manager: flush memory stream before using the buffer
When the manager receives a SIGUSR2 signal, it opens a memory stream
with open_memstream(), uses the returned file handle for logging, and
dumps the logged content with log_dump().
However, the char* buffer is only safe to use after the file handle has
been flushed with fflush, as the man pages states:
When the stream is closed (fclose(3)) or flushed (fflush(3)), the
locations pointed to by ptr and sizeloc are updated to contain,
respectively, a pointer to the buffer and the current size of the
buffer.
These values remain valid only as long as the caller performs no
further output on the stream. If further output is performed, then the
stream must again be flushed before trying to access these variables.
Without that call, dump remains NULL and the daemon crashes in
log_dump().
---
src/core/manager.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git src/core/manager.c src/core/manager.c
index 27a1cc6..78f4f3d 100644
--- src/core/manager.c
+++ src/core/manager.c
@@ -1621,6 +1621,11 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
break;
}
+ if (fflush(f)) {
+ log_warning("Failed to flush status stream");
+ break;
+ }
+
log_dump(LOG_INFO, dump);
break;
}
--
1.7.9.2

View File

@ -0,0 +1,25 @@
From 700ff4d97311902a440109a2c081731ab6ae8a20 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 7 Mar 2014 17:29:16 +0100
Subject: [PATCH] busname: don't drop 'service' from the result string
---
src/core/busname.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/core/busname.c src/core/busname.c
index 237011a..bca2145 100644
--- src/core/busname.c
+++ src/core/busname.c
@@ -548,7 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState);
static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
[BUSNAME_SUCCESS] = "success",
[BUSNAME_FAILURE_RESOURCES] = "resources",
- [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent",
+ [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "service-failed-permanent",
};
DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
--
1.7.9.2

View File

@ -0,0 +1,35 @@
From 26abdc73a212b90f7c4b71808a1028d2e87ab09f Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sat, 8 Mar 2014 17:32:53 -0500
Subject: [PATCH] fix off by one error in array index assertion
Since the index is already post-incremented when the array is appended
to, this assertion can be wrongly reached when the array is at capacity
(with the NULL terminator). The bug is reproducible on shutdown with
the following settings in /etc/systemd/system.conf:
LogTarget=journal-or-kmsg
LogColor=yes
LogLocation=yes
Reported by Thermi on IRC.
---
src/core/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/core/main.c src/core/main.c
index 6ebfe64..f1b06d8 100644
--- src/core/main.c
+++ src/core/main.c
@@ -1994,7 +1994,7 @@ finish:
if (log_get_show_location())
command_line[pos++] = "--log-location";
- assert(pos + 1 < ELEMENTSOF(command_line));
+ assert(pos < ELEMENTSOF(command_line));
if (arm_reboot_watchdog && arg_shutdown_watchdog > 0) {
char *e;
--
1.7.9.2

View File

@ -0,0 +1,43 @@
From 055d406624cb9e01963558767420b71e5f75d2d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 10 Mar 2014 08:25:15 -0400
Subject: [PATCH] logind: fix policykit checks
---
src/login/logind-dbus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git src/login/logind-dbus.c src/login/logind-dbus.c
index c9c58f3..235b131 100644
--- src/login/logind-dbus.c
+++ src/login/logind-dbus.c
@@ -1480,6 +1480,8 @@ static int method_do_shutdown_or_sleep(
action_multiple_sessions, interactive, error, method, m);
if (r < 0)
return r;
+ if (r == 0)
+ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
if (blocked) {
@@ -1487,6 +1489,8 @@ static int method_do_shutdown_or_sleep(
action_ignore_inhibit, interactive, error, method, m);
if (r < 0)
return r;
+ if (r == 0)
+ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
if (!multiple_sessions && !blocked) {
@@ -1494,6 +1498,8 @@ static int method_do_shutdown_or_sleep(
action, interactive, error, method, m);
if (r < 0)
return r;
+ if (r == 0)
+ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
r = bus_manager_shutdown_or_sleep_now_or_later(m, unit_name, w, error);
--
1.7.9.2

View File

@ -0,0 +1,30 @@
From ebc54302d7fc70927d5dc119e178ff03f6a911ed Mon Sep 17 00:00:00 2001
From: Peter Rajnoha <prajnoha@redhat.com>
Date: Mon, 10 Mar 2014 22:58:14 +0100
Subject: [PATCH] rules: mark loop device as SYSTEMD_READY=0 if no file is
attached
Check existence of loop/backing_file in sysfs and mark loop devices with
SYSTEMD_READY if missing. Such loop files is uninitialized and it's not
ready for use yet (there's no file attached).
---
rules/99-systemd.rules.in | 3 +++
1 file changed, 3 insertions(+)
diff --git rules/99-systemd.rules.in rules/99-systemd.rules.in
index 021359a..04a59c4 100644
--- rules/99-systemd.rules.in
+++ rules/99-systemd.rules.in
@@ -22,6 +22,9 @@ SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_T
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
+# Ignore loop devices that don't have any file attached
+SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
+
# Ignore nbd devices in the "add" event, with "change" the nbd is ready
ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
--
1.7.9.2

View File

@ -0,0 +1,64 @@
From fe7f06f142cf42928e419d8578afd75bf1439672 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 11 Mar 2014 04:10:19 +0100
Subject: [PATCH] dbus: suppress duplicate and misleading messages
When we try to send a signal on a connection we didn't hae the time to
process the Disconnected message yet, don't generate multiple warning
messages, but only a single debug message.
https://bugs.freedesktop.org/show_bug.cgi?id=75874
---
src/core/dbus-manager.c | 7 +++++--
src/core/dbus-unit.c | 12 ++----------
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git src/core/dbus-manager.c src/core/dbus-manager.c
index 34ef1f5..30f28b6 100644
--- src/core/dbus-manager.c
+++ src/core/dbus-manager.c
@@ -1386,8 +1386,11 @@ static int reply_unit_file_changes_and_free(
unsigned i;
int r;
- if (n_changes > 0)
- bus_foreach_bus(m, NULL, send_unit_files_changed, NULL);
+ if (n_changes > 0) {
+ r = bus_foreach_bus(m, NULL, send_unit_files_changed, NULL);
+ if (r < 0)
+ log_debug("Failed to send UnitFilesChanged signal: %s", strerror(-r));
+ }
r = sd_bus_message_new_method_return(message, &reply);
if (r < 0)
diff --git src/core/dbus-unit.c src/core/dbus-unit.c
index 515ac8b..07e7f20 100644
--- src/core/dbus-unit.c
+++ src/core/dbus-unit.c
@@ -638,21 +638,13 @@ static int send_changed_signal(sd_bus *bus, void *userdata) {
bus, p,
UNIT_VTABLE(u)->bus_interface,
NULL);
- if (r < 0) {
- log_warning("Failed to send out specific PropertiesChanged signal for %s: %s", u->id, strerror(-r));
+ if (r < 0)
return r;
- }
- r = sd_bus_emit_properties_changed_strv(
+ return sd_bus_emit_properties_changed_strv(
bus, p,
"org.freedesktop.systemd1.Unit",
NULL);
- if (r < 0) {
- log_warning("Failed to send out generic PropertiesChanged signal for %s: %s", u->id, strerror(-r));
- return r;
- }
-
- return 0;
}
void bus_unit_send_change_signal(Unit *u) {
--
1.7.9.2

View File

@ -0,0 +1,36 @@
From 252094eb05c58270a0bc35b14ad30a126ddbb3bb Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 11 Mar 2014 05:23:39 +0100
Subject: [PATCH] man: multiple sleep modes are to be separated by whitespace,
not commas
As pointed out by Jason A. Donenfeld.
---
man/systemd-sleep.conf.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git man/systemd-sleep.conf.xml man/systemd-sleep.conf.xml
index a917f4d..d0ea6d8 100644
--- man/systemd-sleep.conf.xml
+++ man/systemd-sleep.conf.xml
@@ -128,7 +128,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
<citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
More than one value can be specified by separating
- multiple values with commas. They will be tried
+ multiple values with whitespace. They will be tried
in turn, until one is written without error. If
neither succeeds, the operation will be aborted.
</para></listitem>
@@ -146,7 +146,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
<citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
More than one value can be specified by separating
- multiple values with commas. They will be tried
+ multiple values with whitespace. They will be tried
in turn, until one is written without error. If
neither succeeds, the operation will be aborted.
</para></listitem>
--
1.7.9.2

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de
- Add or port upstream bugfix patches:
0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
0002-manager-flush-memory-stream-before-using-the-buffer.patch
0003-busname-don-t-drop-service-from-the-result-string.patch
0004-fix-off-by-one-error-in-array-index-assertion.patch
0005-logind-fix-policykit-checks.patch
0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
0007-dbus-suppress-duplicate-and-misleading-messages.patch
0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
-------------------------------------------------------------------
Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de

View File

@ -274,6 +274,20 @@ Patch144: 0011-man-systemd-bootchart-fix-spacing-in-command.patch
Patch145: 0012-man-add-missing-comma.patch
# PATCH-FIX-USTREAM added at 2014/03/07
Patch146: 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch147: 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch148: 0002-manager-flush-memory-stream-before-using-the-buffer.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch149: 0003-busname-don-t-drop-service-from-the-result-string.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch150: 0004-fix-off-by-one-error-in-array-index-assertion.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch151: 0005-logind-fix-policykit-checks.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch152: 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch153: 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
# PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844)
Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
# PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071)
@ -297,6 +311,8 @@ Patch1999: systemd-install-compat_pkgconfig-always.patch
# udev patches
# PATCH-FIX-USTREAM added at 2014/03/03
Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch1035: 0007-dbus-suppress-duplicate-and-misleading-messages.patch
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
@ -593,6 +609,13 @@ cp %{SOURCE7} m4/
%patch144 -p0
%patch145 -p0
%patch146 -p0
%patch147 -p0
%patch148 -p0
%patch149 -p0
%patch150 -p0
%patch151 -p0
%patch152 -p0
%patch153 -p0
%patch1009 -p1
%patch1010 -p1
%patch1012 -p1
@ -605,6 +628,7 @@ cp %{SOURCE7} m4/
%patch1999 -p1
# udev patches
%patch1034 -p0
%patch1035 -p0
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de
- Add or port upstream bugfix patches:
0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
0002-manager-flush-memory-stream-before-using-the-buffer.patch
0003-busname-don-t-drop-service-from-the-result-string.patch
0004-fix-off-by-one-error-in-array-index-assertion.patch
0005-logind-fix-policykit-checks.patch
0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
0007-dbus-suppress-duplicate-and-misleading-messages.patch
0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
-------------------------------------------------------------------
Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de

View File

@ -269,6 +269,20 @@ Patch144: 0011-man-systemd-bootchart-fix-spacing-in-command.patch
Patch145: 0012-man-add-missing-comma.patch
# PATCH-FIX-USTREAM added at 2014/03/07
Patch146: 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch147: 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch148: 0002-manager-flush-memory-stream-before-using-the-buffer.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch149: 0003-busname-don-t-drop-service-from-the-result-string.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch150: 0004-fix-off-by-one-error-in-array-index-assertion.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch151: 0005-logind-fix-policykit-checks.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch152: 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch153: 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
# PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844)
Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
# PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071)
@ -292,6 +306,8 @@ Patch1999: systemd-install-compat_pkgconfig-always.patch
# udev patches
# PATCH-FIX-USTREAM added at 2014/03/03
Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch
# PATCH-FIX-USTREAM added at 2014/03/11
Patch1035: 0007-dbus-suppress-duplicate-and-misleading-messages.patch
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
@ -588,6 +604,13 @@ cp %{SOURCE7} m4/
%patch144 -p0
%patch145 -p0
%patch146 -p0
%patch147 -p0
%patch148 -p0
%patch149 -p0
%patch150 -p0
%patch151 -p0
%patch152 -p0
%patch153 -p0
%patch1009 -p1
%patch1010 -p1
%patch1012 -p1
@ -600,6 +623,7 @@ cp %{SOURCE7} m4/
%patch1999 -p1
# udev patches
%patch1034 -p0
%patch1035 -p0
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1