Compare commits

...

5 Commits

Author SHA1 Message Date
Anita Zhang 5b90e5f3f5
Merge pull request #13811 from keszybz/logind-signal-emitting-fix
Logind signal emitting fix
2019-10-21 17:13:57 -07:00
Zbigniew Jędrzejewski-Szmek e48a1e3423 mailmap: add entry to fix authorship of commit
471cffcfb0 was committed on a debug VM where I
didn't have git set up properly.
2019-10-21 15:10:58 +02:00
Zbigniew Jędrzejewski-Szmek 8163b9f900 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.
2019-10-21 15:07:36 +02:00
Zbigniew Jędrzejewski-Szmek 8cc64c2a36 logind: fix emission of PropertiesChanged on seats
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.
2019-10-21 15:05:58 +02:00
Zbigniew Jędrzejewski-Szmek 4b9e5848e3 logind: drop {} 2019-10-21 09:33:19 +02:00
6 changed files with 3 additions and 9 deletions

View File

@ -191,6 +191,7 @@ Yann E. Morin <yann.morin.1998@free.fr>
Yin Kangkai <kangkai.yin@intel.com> <kangkai.yin@linux.intel.com>
Zachary Winnerman <33329648+winnerman-pythian@users.noreply.github.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> <you@example.com>
Łukasz Stelmach <l.stelmach@samsung.com> <stlman@poczta.fm>
Jonathon Kowalski <bl0pbl33p@gmail.com>
Diego Canuhe <dcanuhe@gmail.com> <46734128+dcanuhe@users.noreply.github.com>

2
NEWS
View File

@ -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

View File

@ -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))
@ -189,7 +188,6 @@ int manager_get_seat_from_creds(
int r;
assert(m);
assert(message);
assert(ret);
if (SEAT_IS_SELF(name) || SEAT_IS_AUTO(name)) {

View File

@ -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);

View File

@ -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) {

View File

@ -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) {