summaryrefslogtreecommitdiff
path: root/src/home/homed-home-bus.c
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: use -EBADF for fd initializationZbigniew Jędrzejewski-Szmek2022-12-191-2/+2
| | | | | | | | | | | | | | | | -1 was used everywhere, but -EBADF or -EBADFD started being used in various places. Let's make things consistent in the new style. Note that there are two candidates: EBADF 9 Bad file descriptor EBADFD 77 File descriptor in bad state Since we're initializating the fd, we're just assigning a value that means "no fd yet", so it's just a bad file descriptor, and the first errno fits better. If instead we had a valid file descriptor that became invalid because of some operation or state change, the other errno would fit better. In some places, initialization is dropped if unnecessary.
* tree-wide: use ASSERT_PTR moreDavid Tardon2022-09-131-39/+19
|
* homed: fix dbus node enumeratorYu Watanabe2022-07-261-0/+2
| | | | Fixes #24114.
* homed: Use new SD_BUS_METHOD_WITH_ARGS macroNishal Kulkarni2021-12-181-65/+50
| | | | | Migrate homed to use the new macros to declare a D-Bus method. Replaced `SD_BUS_METHOD_WITH_NAMES` with `SD_BUS_METHOD_WITH_ARGS`
* home: fix heap-use-after-freeYu Watanabe2021-12-141-0/+6
| | | | | | | `bus_home_emit_remove()` may be called from manager_free() -> home_free(). In that case, manager->bus is already unref()ed. Fixes #21767.
* homed: add automatic grow/shrink ("rebalancing")Lennart Poettering2021-11-251-1/+1
|
* userdb: make most loading of JSON user record data "permissive"Lennart Poettering2021-06-011-2/+2
| | | | | | | | | | | | | We want user records to be extensible, hence we shouldn't complain about fields we can't parse. In particular we want them to be extensible for our own future extensions. Some code already turned the permissive flag when parsing the JSON data, but most did not. Fix that. A few select cases remain where the bit is not set: where we just gnerated the JSON data ourselves, and thus can be reasonably sure that if we can't parse it it's our immediate programming error and not just us processing a user record from some other tool or a newer version of ourselves.
* homed: disable event sources before unreffing themZbigniew Jędrzejewski-Szmek2021-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | C.f. 9793530228. We'd crash when trying to access an already-deallocated object: Thread no. 1 (7 frames) #2 log_assert_failed_realm at ../src/basic/log.c:844 #3 event_inotify_data_drop at ../src/libsystemd/sd-event/sd-event.c:3035 #4 source_dispatch at ../src/libsystemd/sd-event/sd-event.c:3250 #5 sd_event_dispatch at ../src/libsystemd/sd-event/sd-event.c:3631 #6 sd_event_run at ../src/libsystemd/sd-event/sd-event.c:3689 #7 sd_event_loop at ../src/libsystemd/sd-event/sd-event.c:3711 #8 run at ../src/home/homed.c:47 The source in question is an inotify source, and the messages are: systemd-homed[1340]: /home/ moved or renamed, recreating watch and rescanning. systemd-homed[1340]: Assertion '*_head == _item' failed at src/libsystemd/sd-event/sd-event.c:3035, function event_inotify_data_drop(). Aborting. on_home_inotify() got called, then manager_watch_home(), which unrefs the existing inotify_event_source. I assume that the source gets dispatched again because it was still in the pending queue. I can't reproduce the issue (timing?), but this should fix #17824, https://bugzilla.redhat.com/show_bug.cgi?id=1899264.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tree-wide: define iterator inside of the macroZbigniew Jędrzejewski-Szmek2020-09-081-2/+1
|
* homed: report a home directory as "dirty" if image file has dirty flagLennart Poettering2020-08-251-0/+1
|
* homed: fix parameter names on D-Bus methodsLennart Poettering2020-05-121-9/+9
| | | | | | | | | | | | These arguments contain UserRecord structures serialized to JSON, however only the "secret" part of it, not a whole user record. We do this since the secret part is conceptually part of the user record and in some contexts we need a user record in full with both secret and non-secret part, and in others just the secret and in other just the non-secret part, but we want to keep this in memory in the same logic. Hence, let's rename the arguments where we expect a user record consisting only of the secret part to "secret".
* homed: convert to the new scheme and add --bus-introspectZbigniew Jędrzejewski-Szmek2020-05-061-27/+103
|
* home: fix several typosVito Caputo2020-03-311-2/+2
|
* home: add new systemd-homed service that can manage LUKS homesLennart Poettering2020-01-281-0/+877
Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474