Commit Graph

11 Commits

Author SHA1 Message Date
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Lennart Poettering d1f6e01e47 homed: explicitly deactivate all home directories on shutdown
Let's explicitly deactivate all home dirs on shutdown, in order to
properly synchronizing unmounting and avoiding blocking devices.

Previously, we'd rely on automatic deactivation when home directories
become unused. However, that scheme is asynchronous, and ongoing
deactviations might conflicts with attempts to unmount /home. Let's fix
that by providing an explicit service systemd-homed-activate.service
whose only job is to have a ExecStop= line that explicitly deactivates
all home directories on shutdown. This service can the be ordered after
home.mount and similar, ensuring that we'll first deactivate all homes
before deactivating /home itself during shutdown.

This is kept separate from systemd-homed.service so that it is possible
to restart systemd-homed.service without deactivating all home
directories.

Fixes: #16842
2020-09-30 14:37:52 +02:00
Zbigniew Jędrzejewski-Szmek 21006e0e3e man,units: link to the new dbus-api man pages 2020-09-30 10:30:03 +02:00
Lennart Poettering c9ef77ec5f units: pass CAP_SYS_RESOURCE to homed
The ext4 fs resize ioctl needs CAP_SYS_RESOURCE, irritatingly. Let's
grant it to homed hence.

Fixes: #15115
2020-09-18 22:35:36 +02:00
Lennart Poettering 871dc8d644 homed: enable userdb too if homed is requested
Strictly speaking you can run homed without userdb. But it doesn't
really make much sense: they go hand in hand and implement the same
concepts, just for different sets of users. Let's hence disable both
automatically by default if homed is requested.

(We don't do the reverse: opting into userdbd shouldn't mean that you
are OK with homed.)

And of course, users can always deviate from our defaults easily, and
turn off userbd again right-away if they don't like it, and things will
generally work.
2020-05-28 23:38:29 +02:00
Lennart Poettering 48432791ac units: don't set PrivateNetwork= in systemd-homed.service
We want to watch USB sticks being plugged in, and that requires
AF_NETLINK to work correctly and get the host's events. But if we live
in a network namespace AF_NETLINK is disconnected too and we'll not get
the host udev events.

Fixes: #15287
2020-05-26 23:37:44 +02:00
Zbigniew Jędrzejewski-Szmek 4e561c6200
Merge pull request #15109 from keszybz/units-make-installable
Make homed/userdbd/repart services installable (to allow uninstalling)
2020-04-02 10:21:29 +02:00
Lennart Poettering 286fe8ee21 units: do not pull in home.mount from systemd-homed.service
/home is posibly a remote file system. it makes sense to order homed
after it, so that we can properly enumerate users in it, but we probably
shouldn't pull it in ourselves, and leave that to users to configure
otherwise.

Fixes: #15102
2020-03-31 15:22:48 +02:00
Zbigniew Jędrzejewski-Szmek 5ef9eda17f units: make systemd-homed.service installable
Fixes #15083. Users might want to disable homed if not used to save resources.
2020-03-31 14:55:14 +02:00
Zbigniew Jędrzejewski-Szmek b5947b5b10 homed: replace "home directory" with "home area" in a few places 2020-03-11 13:43:19 +01:00
Lennart Poettering 70a5db5822 home: add new systemd-homed service that can manage LUKS homes
Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474
2020-01-28 22:36:07 +01:00