From 4b9e5848e31cb2efb606a5292a2d2abb6ba35040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 21 Oct 2019 09:33:19 +0200 Subject: logind: drop {} --- src/login/logind-device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/login/logind-device.c b/src/login/logind-device.c index 20108544aa..9a62217290 100644 --- a/src/login/logind-device.c +++ b/src/login/logind-device.c @@ -91,14 +91,13 @@ void device_attach(Device *d, Seat *s) { if (d->master || !s->devices) LIST_PREPEND(devices, s->devices, d); - else { + else LIST_FOREACH(devices, i, s->devices) { if (!i->devices_next || !i->master) { LIST_INSERT_AFTER(devices, s->devices, i, d); break; } } - } if (!had_master && d->master && s->started) { seat_save(s); -- cgit v1.2.1 From 8cc64c2a3640121745fdfaccc6eae896ac25a911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 21 Oct 2019 15:05:58 +0200 Subject: logind: fix emission of PropertiesChanged on seats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The story is the same as in 471cffcfb0e005b7c4044b3b52cc4f25d217efac: device_attach() → seat_send_changed() → sd_bus_emit_properties_changed_strv() → emit_properties_changed_on_interface() → node_vtable_get_userdata() → seat_object_find(), which returns 0 because message == NULL. But when we are emitting a signal, message is always NULL. Removing the overeager check and assert in the called function allow the signal to be emitted. Fixes #13769. --- src/login/logind-dbus.c | 1 - src/login/logind-seat-dbus.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 20a8591bd8..91c3bd362e 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -189,7 +189,6 @@ int manager_get_seat_from_creds( int r; assert(m); - assert(message); assert(ret); if (SEAT_IS_SELF(name) || SEAT_IS_AUTO(name)) { diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c index 3c58929611..9958490875 100644 --- a/src/login/logind-seat-dbus.c +++ b/src/login/logind-seat-dbus.c @@ -280,8 +280,6 @@ int seat_object_find(sd_bus *bus, const char *path, const char *interface, void return -ENOMEM; message = sd_bus_get_current_message(bus); - if (!message) - return 0; r = manager_get_seat_from_creds(m, message, e, error, &seat); if (r == -ENXIO) { -- cgit v1.2.1 From 8163b9f90079af298031dcbffee057fc344470a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 21 Oct 2019 15:07:36 +0200 Subject: logind: fix emission of PropertiesChanged for users The same as parent commit, but users. This is the third and last foo_object_find() function in logind, so I think that this particular family of bugs is finally squashed. --- src/login/logind-dbus.c | 1 - src/login/logind-user-dbus.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 91c3bd362e..6b3f2a731b 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -163,7 +163,6 @@ int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, User *user; assert(m); - assert(message); assert(ret); if (!uid_is_valid(uid)) diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c index beb97362e7..a6e2d4950d 100644 --- a/src/login/logind-user-dbus.c +++ b/src/login/logind-user-dbus.c @@ -244,8 +244,6 @@ int user_object_find(sd_bus *bus, const char *path, const char *interface, void sd_bus_message *message; message = sd_bus_get_current_message(bus); - if (!message) - return 0; r = manager_get_user_from_creds(m, message, UID_INVALID, error, &user); if (r == -ENXIO) { -- cgit v1.2.1 From e48a1e34234385b5f5caeae37d733660c0895180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 21 Oct 2019 15:10:50 +0200 Subject: mailmap: add entry to fix authorship of commit 471cffcfb0e005b7c4044b3b52cc4f25d217efac was committed on a debug VM where I didn't have git set up properly. --- .mailmap | 1 + NEWS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 4764ad670a..28b60946ac 100644 --- a/.mailmap +++ b/.mailmap @@ -191,6 +191,7 @@ Yann E. Morin Yin Kangkai Zachary Winnerman <33329648+winnerman-pythian@users.noreply.github.com> Zbigniew Jędrzejewski-Szmek +Zbigniew Jędrzejewski-Szmek Łukasz Stelmach Jonathon Kowalski Diego Canuhe <46734128+dcanuhe@users.noreply.github.com> diff --git a/NEWS b/NEWS index de4f93a79b..38287deee6 100644 --- a/NEWS +++ b/NEWS @@ -473,7 +473,7 @@ CHANGES WITH 243: de Souza Cascardo, Theo Ouzhinski, Thiebaud Weksteen, Thomas Haller, Thomas Weißschuh, Tomas Mraz, Tommi Rantala, Topi Miettinen, VD-Lycos, ven, Wieland Hoffmann, William A. Kennington III, William Wold, Xi - Ruoyao, Yuri Chornoivan, Yu Watanabe, Your Name, Zach Smith, Zbigniew + Ruoyao, Yuri Chornoivan, Yu Watanabe, Zach Smith, Zbigniew Jędrzejewski-Szmek, Zhang Xianwei – Camerino, 2019-09-03 -- cgit v1.2.1