Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at 2014-09-20 15:51:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd (Old) and /work/SRC/openSUSE:Factory/.systemd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "systemd" Changes: -------- --- /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes 2014-09-17 17:42:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2014-09-20 15:51:20.000000000 +0200 @@ -1,0 +2,51 @@ +Fri Sep 19 13:08:14 UTC 2014 - werner@suse.de + +- Add patch 0001-bnc888612-logind-polkit-acpi.patch from Frederic + to solve bnc#888612 - AUDIT-0: Power button press at gdm login + should not prompt for credentials + +------------------------------------------------------------------- +Fri Sep 19 11:36:48 UTC 2014 - werner@suse.de + +- Add upstream bugfix patches + 0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch + 0002-include-fcntl.h-rather-than-sys-fcntl.h.patch + 0003-mount-order-options-before-other-arguments-to-mount.patch + 0004-shared-wtmp-utmp-don-t-clear-store_wtmp-in-utmp_put_.patch + 0005-shared-label.h-add-missing-stdio.h-include.patch + 0006-shared-sparse-endian.h-add-missing-byteswap.h-includ.patch + 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch + 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch + 1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch + 1081-udevd-check-return-of-various-functions.patch + 1082-udevadm-hwdb-check-return-value-of-fseeko.patch + 1083-udev-node-warn-if-chmod-chown-fails.patch + 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch + 1085-udev-fix-typos.patch + 1086-udevd-don-t-fail-if-run-udev-exists.patch + +------------------------------------------------------------------- +Thu Sep 18 13:21:45 UTC 2014 - werner@suse.de + +- Add upstream bugfix patches + 0001-core-fix-resource-leak-in-manager_environment_add.patch + 0002-util-remove-a-unnecessary-check.patch + 0003-udev-event-explicitly-don-t-read-from-invalid-fd.patch + 0004-shared-conf-parser.patch + 0005-logind-fix-typo.patch + 0006-systemctl-fix-resource-leak-CID-1237747.patch + 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch + 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patc + 0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch +- Remove 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch as + 0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch + is the upstream solution + +------------------------------------------------------------------- +Wed Sep 17 16:02:33 UTC 2014 - werner@suse.de + +- Add patch 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch to + fix for the size of the gcc builtin type bool also known as _Bool + from the include header stdbool.h. + +------------------------------------------------------------------- systemd.changes: same change New: ---- 0001-bnc888612-logind-polkit-acpi.patch 0001-core-fix-resource-leak-in-manager_environment_add.patch 0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch 0002-include-fcntl.h-rather-than-sys-fcntl.h.patch 0002-util-remove-a-unnecessary-check.patch 0003-mount-order-options-before-other-arguments-to-mount.patch 0003-udev-event-explicitly-don-t-read-from-invalid-fd.patch 0004-shared-conf-parser.patch 0004-shared-wtmp-utmp-don-t-clear-store_wtmp-in-utmp_put_.patch 0005-logind-fix-typo.patch 0005-shared-label.h-add-missing-stdio.h-include.patch 0006-shared-sparse-endian.h-add-missing-byteswap.h-includ.patch 0006-systemctl-fix-resource-leak-CID-1237747.patch 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch 0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch 1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch 1081-udevd-check-return-of-various-functions.patch 1082-udevadm-hwdb-check-return-value-of-fseeko.patch 1083-udev-node-warn-if-chmod-chown-fails.patch 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch 1085-udev-fix-typos.patch 1086-udevd-don-t-fail-if-run-udev-exists.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-mini.spec ++++++ --- /var/tmp/diff_new_pack.Qg1xrU/_old 2014-09-20 15:51:25.000000000 +0200 +++ /var/tmp/diff_new_pack.Qg1xrU/_new 2014-09-20 15:51:25.000000000 +0200 @@ -856,6 +856,38 @@ Patch413: 0009-journal-do-not-leak-mmaps-on-OOM.patch # PATCH-FIX-UPSTREAM added at 2014/09/16 Patch414: 0010-manager-use-correct-cleanup-function.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch415: 0001-core-fix-resource-leak-in-manager_environment_add.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch416: 0002-util-remove-a-unnecessary-check.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch417: 0003-udev-event-explicitly-don-t-read-from-invalid-fd.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch418: 0004-shared-conf-parser.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch419: 0005-logind-fix-typo.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch420: 0006-systemctl-fix-resource-leak-CID-1237747.patch +# PATCH-FIX-UPSTREAM added at 2014/09/16 +Patch421: 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 +Patch422: 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch +# PATCH-FIX-UPSTREAM added at 2014/09/18 -- Be aware that the size of the type bool may vary +Patch423: 0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch424: 0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch425: 0002-include-fcntl.h-rather-than-sys-fcntl.h.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch426: 0003-mount-order-options-before-other-arguments-to-mount.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch427: 0004-shared-wtmp-utmp-don-t-clear-store_wtmp-in-utmp_put_.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch428: 0005-shared-label.h-add-missing-stdio.h-include.patch +# PATCH-FIX-UPSTREAM added at 2014/09/19 +Patch429: 0006-shared-sparse-endian.h-add-missing-byteswap.h-includ.patch +# PATCH-FIX-SUSE AUDIT-0: Power button press at gdm login should not prompt for credentials (bnc#888612) +Patch430: 0001-bnc888612-logind-polkit-acpi.patch # UDEV PATCHES # ============ @@ -1021,6 +1053,20 @@ Patch1078: 1078-udev-remove-userspace-firmware-loading-support.patch # PATCH-FIX-UPSTREAM 1079-udev-remove-userspace-firmware-loading-support.patch Patch1079: 1079-udev-remove-userspace-firmware-loading-support.patch +# PATCH-FIX-UPSTREAM 1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch +Patch1080: 1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch +# PATCH-FIX-UPSTREAM 1081-udevd-check-return-of-various-functions.patch +Patch1081: 1081-udevd-check-return-of-various-functions.patch +# PATCH-FIX-UPSTREAM 1082-udevadm-hwdb-check-return-value-of-fseeko.patch +Patch1082: 1082-udevadm-hwdb-check-return-value-of-fseeko.patch +# PATCH-FIX-UPSTREAM 1083-udev-node-warn-if-chmod-chown-fails.patch +Patch1083: 1083-udev-node-warn-if-chmod-chown-fails.patch +# PATCH-FIX-UPSTREAM 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch +Patch1084: 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch +# PATCH-FIX-UPSTREAM 1085-udev-fix-typos.patch +Patch1085: 1085-udev-fix-typos.patch +# PATCH-FIX-UPSTREAM 1085-udevd-don-t-fail-if-run-udev-exists.patch +Patch1086: 1086-udevd-don-t-fail-if-run-udev-exists.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1596,6 +1642,22 @@ %patch412 -p0 %patch413 -p0 %patch414 -p0 +%patch415 -p0 +%patch416 -p0 +%patch417 -p0 +%patch418 -p0 +%patch419 -p0 +%patch420 -p0 +%patch421 -p0 +%patch422 -p0 +%patch423 -p0 +%patch424 -p0 +%patch425 -p0 +%patch426 -p0 +%patch427 -p0 +%patch428 -p0 +%patch429 -p0 +%patch430 -p1 # udev patches %patch1001 -p1 @@ -1706,6 +1768,13 @@ %patch1078 -p1 %endif %endif +%patch1080 -p0 +%patch1081 -p0 +%patch1082 -p0 +%patch1083 -p0 +%patch1084 -p0 +%patch1085 -p0 +%patch1086 -p0 # remove patch backups find -name '*.orig' -exec rm -f '{}' \+ systemd.spec: same change ++++++ 0001-bnc888612-logind-polkit-acpi.patch ++++++ --- src/login/logind-action.c | 5 +++++ src/login/logind-dbus.c | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) Index: systemd-210/src/login/logind-action.c =================================================================== --- systemd-210/src/login/logind-action.c +++ systemd-210/src/login/logind-action.c @@ -101,6 +101,11 @@ int manager_handle_action( /* If the key handling is inhibited, don't do anything */ if (inhibit_key > 0) { + if (inhibit_key == INHIBIT_HANDLE_POWER_KEY) { + int fd; + fd = open("/run/systemd/acpi-shutdown", O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR); + close(fd); + } if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) { log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key)); return 0; Index: systemd-210/src/login/logind-dbus.c =================================================================== --- systemd-210/src/login/logind-dbus.c +++ systemd-210/src/login/logind-dbus.c @@ -1469,9 +1469,11 @@ static int method_do_shutdown_or_sleep( sd_bus_error *error) { _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; - bool multiple_sessions, blocked; + bool multiple_sessions, blocked, shutdown_through_acpi; int interactive, r; uid_t uid; + int fd; + struct stat buf; assert(m); assert(message); @@ -1515,7 +1517,17 @@ static int method_do_shutdown_or_sleep( multiple_sessions = r > 0; blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL); - if (multiple_sessions) { + fd = open ("/run/systemd/acpi-shutdown", O_NOFOLLOW|O_PATH|O_CLOEXEC); + if (fd >= 0) { + shutdown_through_acpi = ((fstat(fd,&buf) == 0) && (time(NULL) - buf.st_mtime <= 65)); + close(fd); + unlink ("/run/systemd/acpi-shutdown"); + } + else + shutdown_through_acpi = false; + + + if (multiple_sessions && !shutdown_through_acpi) { r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message, action_multiple_sessions, interactive, error, method, m); if (r < 0) @@ -1524,7 +1536,7 @@ static int method_do_shutdown_or_sleep( return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } - if (blocked) { + if (blocked && !shutdown_through_acpi) { r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message, action_ignore_inhibit, interactive, error, method, m); if (r < 0) @@ -1533,7 +1545,7 @@ static int method_do_shutdown_or_sleep( return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } - if (!multiple_sessions && !blocked) { + if (!multiple_sessions && !blocked && !shutdown_through_acpi) { r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message, action, interactive, error, method, m); if (r < 0) ++++++ 0001-core-fix-resource-leak-in-manager_environment_add.patch ++++++
From aa9f8a30fd7dc7aa3aa2575b75b3f9a0ab3f02db Mon Sep 17 00:00:00 2001 From: Andreas Henriksson
Date: Tue, 16 Sep 2014 21:11:02 +0200 Subject: [PATCH] core: fix resource leak in manager_environment_add
Second error path must free the (potentially) allocated memory in the first code chunk before returning. Found by coverity. Fixes: CID#1237750 --- src/core/manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git src/core/manager.c src/core/manager.c index 0770727..e0c1cd1 100644 --- src/core/manager.c +++ src/core/manager.c @@ -2751,8 +2751,10 @@ int manager_environment_add(Manager *m, char **minus, char **plus) { if (!strv_isempty(plus)) { b = strv_env_merge(2, l, plus); - if (!b) + if (!b) { + strv_free(a); return -ENOMEM; + } l = b; } -- 1.7.9.2 ++++++ 0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch ++++++
From e8c108ca9f11a382742f212f5b42a02536b3d40f Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Wed, 17 Sep 2014 00:27:16 +0300 Subject: [PATCH] journal: Do not count on the compiler initializing found_last to false
There is a very unlikely case where this can happen since gcc usually does the sane thing. But let's make sure found_last is initialized anyway. Fixes: CID#996386 --- src/journal/journal-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/journal/journal-verify.c src/journal/journal-verify.c index 6c8ca8c..b4e8f73 100644 --- src/journal/journal-verify.c +++ src/journal/journal-verify.c @@ -804,7 +804,7 @@ int journal_file_verify( usec_t last_usec = 0; int data_fd = -1, entry_fd = -1, entry_array_fd = -1; unsigned i; - bool found_last; + bool found_last = false; #ifdef HAVE_GCRYPT uint64_t last_tag = 0; #endif -- 1.7.9.2 ++++++ 0002-include-fcntl.h-rather-than-sys-fcntl.h.patch ++++++
From fdb8bd0fe7244b72ddc1c08e401ebddefdaf4f46 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:38 +0200 Subject: [PATCH] include fcntl.h rather than sys/fcntl.h
---
src/socket-proxy/socket-proxyd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/socket-proxy/socket-proxyd.c src/socket-proxy/socket-proxyd.c
index 81d8457..ff2b24f 100644
--- src/socket-proxy/socket-proxyd.c
+++ src/socket-proxy/socket-proxyd.c
@@ -26,7 +26,7 @@
#include
From 3f796750b192e62701e91a95f85389f876d1059b Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Wed, 17 Sep 2014 21:44:56 +0200 Subject: [PATCH] udev: event - explicitly don't read() from invalid fd
This fixes CID #1237641.
---
src/udev/udev-event.c | 3 +++
1 file changed, 3 insertions(+)
diff --git src/udev/udev-event.c src/udev/udev-event.c
index 6b8b5a8..c8b1420 100644
--- src/udev/udev-event.c
+++ src/udev/udev-event.c
@@ -494,6 +494,9 @@ static void spawn_read(struct udev_event *event,
for (i = 0; i < fdcount; i++) {
int *fd = (int *)ev[i].data.ptr;
+ if (*fd < 0)
+ continue;
+
if (ev[i].events & EPOLLIN) {
ssize_t count;
char buf[4096];
--
1.7.9.2
++++++ 0004-shared-conf-parser.patch ++++++
Based on 83e341a637b75f7f592a5dc717c34d8b67ed4ffa Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 863f3ce0d050f005839f6aa41fe7bac5478a7b5e Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Fri, 19 Sep 2014 08:03:31 +0200 Subject: [PATCH] shared: wtmp-utmp - don't clear store_wtmp in utmp_put_dead_process()
Also modernize a few other things and add comments to explain CID #1237503 and CID #1237504. --- src/shared/utmp-wtmp.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git src/shared/utmp-wtmp.c src/shared/utmp-wtmp.c index 30a0c03..31f13ec 100644 --- src/shared/utmp-wtmp.c +++ src/shared/utmp-wtmp.c @@ -92,8 +92,6 @@ int utmp_get_runlevel(int *runlevel, int *previous) { static void init_timestamp(struct utmpx *store, usec_t t) { assert(store); - zero(*store); - if (t <= 0) t = now(CLOCK_REALTIME); @@ -143,7 +141,7 @@ static int write_entry_wtmp(const struct utmpx *store) { assert(store); /* wtmp is a simple append-only file where each entry is - simply appended to * the end; i.e. basically a log. */ + simply appended to the end; i.e. basically a log. */ errno = 0; updwtmpx(_PATH_WTMPX, store); @@ -172,7 +170,7 @@ static int write_entry_both(const struct utmpx *store) { } int utmp_put_shutdown(void) { - struct utmpx store; + struct utmpx store = {}; init_entry(&store, 0); @@ -183,7 +181,7 @@ int utmp_put_shutdown(void) { } int utmp_put_reboot(usec_t t) { - struct utmpx store; + struct utmpx store = {}; init_entry(&store, t); @@ -206,16 +204,17 @@ _pure_ static const char *sanitize_id(const char *id) { } int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line) { - struct utmpx store; + struct utmpx store = { + .ut_type = INIT_PROCESS, + .ut_pid = pid, + .ut_session = sid, + }; assert(id); init_timestamp(&store, 0); - store.ut_type = INIT_PROCESS; - store.ut_pid = pid; - store.ut_session = sid; - + /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */ strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id)); if (line) @@ -225,14 +224,15 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line } int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { - struct utmpx lookup, store, store_wtmp, *found; + struct utmpx lookup = { + .ut_type = INIT_PROCESS /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */ + }, store, store_wtmp, *found; assert(id); setutxent(); - zero(lookup); - lookup.ut_type = INIT_PROCESS; /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */ + /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */ strncpy(lookup.ut_id, sanitize_id(id), sizeof(lookup.ut_id)); found = getutxid(&lookup); @@ -260,7 +260,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { int utmp_put_runlevel(int runlevel, int previous) { - struct utmpx store; + struct utmpx store = {}; int r; assert(runlevel > 0); -- 1.7.9.2 ++++++ 0005-logind-fix-typo.patch ++++++
From 2b2332856bafe25c4aa17db2a90bdcddef1fec1a Mon Sep 17 00:00:00 2001 From: Ronny Chevalier
Date: Wed, 17 Sep 2014 20:10:44 +0200 Subject: [PATCH] logind: fix typo
--- src/login/logind-session-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/login/logind-session-dbus.c src/login/logind-session-dbus.c index 7d81500..58836fc 100644 --- src/login/logind-session-dbus.c +++ src/login/logind-session-dbus.c @@ -249,7 +249,7 @@ static int method_set_idle_hint(sd_bus *bus, sd_bus_message *message, void *user return r; if (uid != 0 && uid != s->user->uid) - return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session my set idle hint"); + return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session may set idle hint"); session_set_idle_hint(s, b); -- 1.7.9.2 ++++++ 0005-shared-label.h-add-missing-stdio.h-include.patch ++++++
From 45f15021e3524b04d574b9ff4e801cb3219daf3f Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:42 +0200 Subject: [PATCH] shared/label.h: add missing stdio.h include
---
src/shared/label.h | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/label.h src/shared/label.h
index 7294820..cb2ec79 100644
--- src/shared/label.h
+++ src/shared/label.h
@@ -24,6 +24,7 @@
#include
From 8e8af4cfc7fa373504a22e58966909161acfb72f Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:43 +0200 Subject: [PATCH] shared/sparse-endian.h: add missing byteswap.h include
---
src/shared/sparse-endian.h | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/sparse-endian.h src/shared/sparse-endian.h
index eb4dbf3..c913fda 100644
--- src/shared/sparse-endian.h
+++ src/shared/sparse-endian.h
@@ -21,6 +21,7 @@
#ifndef SPARSE_ENDIAN_H
#define SPARSE_ENDIAN_H
+#include
From 48a2900c6612052149a1d0dd88aeacb99b49ce4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?=
Date: Wed, 17 Sep 2014 21:56:25 -0300 Subject: [PATCH] systemctl: fix resource leak CID #1237747
..by simply moving the declaration of "unit" into the STRV_FOREACH loop as suggested by Andreas. --- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index 88be871..9012128 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -4449,7 +4449,6 @@ static int show(sd_bus *bus, char **args) { } static int cat(sd_bus *bus, char **args) { - _cleanup_free_ char *unit = NULL; _cleanup_strv_free_ char **names = NULL; char **name; bool first = true; @@ -4468,6 +4467,8 @@ static int cat(sd_bus *bus, char **args) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_strv_free_ char **dropin_paths = NULL; _cleanup_free_ char *fragment_path = NULL; + _cleanup_free_ char *unit = NULL; + char **path; unit = unit_dbus_path_from_name(*name); -- 1.7.9.2 ++++++ 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch ++++++
From 9dedfe7f667a8cb22ba85d0223556c69c4fd0e9a Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 09:20:46 +0200 Subject: [PATCH] libudev: monitor - warn if we fail to request SO_PASSCRED
The function still succeeds, so there is no functional change. This fixes CID #996288.
---
src/libudev/libudev-monitor.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c
index 186e5e1..59698b8 100644
--- src/libudev/libudev-monitor.c
+++ src/libudev/libudev-monitor.c
@@ -412,7 +412,10 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
}
/* enable receiving of sender credentials */
- setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+ err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+ if (err < 0)
+ udev_err(udev_monitor->udev, "setting SO_PASSCRED failed: %m\n");
+
return 0;
}
--
1.7.9.2
++++++ 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch ++++++
Based on 77c10205bb337585c320e91af4b416f2dcc6faba Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98 Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Thu, 18 Sep 2014 13:28:28 +0200 Subject: [PATCH] bus: fix bus_print_property() to use "int" for booleans
We always use "int" if we retrieve boolean values from sd-bus, as "bool"
is only a single byte, but full int on va-args.
Thanks to Werner Fink for the report!
---
src/libsystemd/sd-bus/bus-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/libsystemd/sd-bus/bus-util.c src/libsystemd/sd-bus/bus-util.c
index 7c6da60..9018bce 100644
--- src/libsystemd/sd-bus/bus-util.c
+++ src/libsystemd/sd-bus/bus-util.c
@@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
}
case SD_BUS_TYPE_BOOLEAN: {
- bool b;
+ int b;
r = sd_bus_message_read_basic(property, type, &b);
if (r < 0)
--
1.7.9.2
++++++ 1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch ++++++
Based on 6f5cf8a8b1de763383f7382821147e538b7dbd6d Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From f901aaadd68050bc575c1c15b84f8f31fd4d494d Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 19:16:54 +0200 Subject: [PATCH] udevadm: hwdb - check return value of fseeko()
Fonud by Coverity. Fixes CID #996255. --- src/udev/udevadm-hwdb.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git src/udev/udevadm-hwdb.c src/udev/udevadm-hwdb.c index 65cbf61..64273fb 100644 --- src/udev/udevadm-hwdb.c +++ src/udev/udevadm-hwdb.c @@ -365,7 +365,12 @@ static int trie_store(struct trie *trie, const char *filename) { fchmod(fileno(t.f), 0444); /* write nodes */ - fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET); + err = fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET); + if (err < 0) { + fclose(t.f); + unlink_noerrno(filename_tmp); + return -errno; + } root_off = trie_store_nodes(&t, trie->root); h.nodes_root_off = htole64(root_off); pos = ftello(t.f); @@ -378,7 +383,12 @@ static int trie_store(struct trie *trie, const char *filename) { /* write header */ size = ftello(t.f); h.file_size = htole64(size); - fseeko(t.f, 0, SEEK_SET); + err = fseeko(t.f, 0, SEEK_SET); + if (err < 0) { + fclose(t.f); + unlink_noerrno(filename_tmp); + return -errno; + } fwrite(&h, sizeof(struct trie_header_f), 1, t.f); err = ferror(t.f); if (err) -- 1.7.9.2 ++++++ 1083-udev-node-warn-if-chmod-chown-fails.patch ++++++
From 543afdc63c02a5af3cf6bd2a264162f23474346a Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 19:22:09 +0200 Subject: [PATCH] udev: node - warn if chmod/chown fails
No functional change, just log the warning.
Fonud by Coverity. Fixes CID #1237544.
---
src/udev/udev-node.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git src/udev/udev-node.c src/udev/udev-node.c
index c164603..8ef7889 100644
--- src/udev/udev-node.c
+++ src/udev/udev-node.c
@@ -281,8 +281,12 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
if ((stats.st_mode & 0777) != (mode & 0777) || stats.st_uid != uid || stats.st_gid != gid) {
log_debug("set permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
- chmod(devnode, mode);
- chown(devnode, uid, gid);
+ err = chmod(devnode, mode);
+ if (err < 0)
+ log_warning("setting mode of %s to %#o failed: %m", devnode, mode);
+ err = chown(devnode, uid, gid);
+ if (err < 0)
+ log_warning("setting owner of %s to uid=%u, gid=%u failed: %m", devnode, uid, gid);
} else {
log_debug("preserve permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
}
--
1.7.9.2
++++++ 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch ++++++
Based on 4bbdff757ed4e718a3348b93439a03055cc5e3bc Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 25773e7fc59b4ce53d67da4e18bfe4d13ab0b14b Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 21:57:49 +0200 Subject: [PATCH] udevd: don't fail if /run/udev exists
--- src/udev/udevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/udev/udevd.c src/udev/udevd.c index 37db81c..29ccb51 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -1155,7 +1155,7 @@ int main(int argc, char *argv[]) { umask(022); r = mkdir("/run/udev", 0755); - if (r < 0) { + if (r < 0 && errno != EEXIST) { log_error("could not create /run/udev: %m"); goto exit; } -- 1.7.9.2 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org