Commit Graph

42748 Commits

Author SHA1 Message Date
Lennart Poettering b895fa08e6 Revert "Drop dbus activation stub service"
This reverts commit 07125d24ee.

In contrast to what is claimed in #13396 dbus-broker apparently does
care for the service file to be around, and otherwise will claim
"Service Not Activatable" in the time between systemd starting up the
broker and connecting to it, which the stub service file is supposed to
make go away.

Reverting this makes the integration test suite pass again on host with
dbus-broker (i.e. current Fedora desktop).

Tested with dbus-broker-21-6.fc31.x86_64.
2019-12-20 17:28:12 +01:00
Lennart Poettering 1cb342447d
Merge pull request #14329 from anitazha/user_invocation_id
export user units' InvocationID and use as _SYSTEMD_INVOCATION_ID
2019-12-20 10:20:21 +01:00
Yu Watanabe 7c6d95ea5a network: fix typo 2019-12-20 18:00:49 +09:00
Anita Zhang 2f8c48b605 core,journal: export user units' InvocationID and use as _SYSTEMD_INVOCATION_ID
Write a user unit's invocation ID to /run/user/<uid>/systemd/units/ similar
to how a system unit's invocation ID is written to /run/systemd/units/.

This lets the journal read and add a user unit's invocation ID to the
_SYSTEMD_INVOCATION_ID field of logs instead of the user manager's
invocation ID.

Fixes #12474
2019-12-19 17:42:17 -08:00
Lennart Poettering 10ad50d38c
Merge pull request #14378 from keszybz/unit-docs
Unit documentation and build-system tweaks
2019-12-19 19:00:14 +01:00
Yu Watanabe 509b06ffdd network: update log message in message_rtnl_process_xyz()
Also lower the log level when the family is not supported.
2019-12-19 18:58:45 +01:00
Zbigniew Jędrzejewski-Szmek 277519db51 man: add section about user manager units 2019-12-19 13:32:31 +01:00
Zbigniew Jędrzejewski-Szmek f71502c49f man: add remote-*.targets to the bootup sequence
I think this makes it easier to see the difference between local and remote
mounts.

Make the graph a bit narrower while at it.
2019-12-19 13:32:31 +01:00
Lennart Poettering 9e7c8f64cf time-util: also use 32bit hack on EOVERFLOW
As per
https://github.com/systemd/systemd/issues/14362#issuecomment-566722686
let's also prepare for EOVERFLOW.
2019-12-19 12:46:24 +01:00
Lennart Poettering 17ef83b231
Merge pull request #14388 from anitazha/man_uid_updates
man: document uids for user journals
2019-12-19 12:45:59 +01:00
Lennart Poettering 222633b646
Merge pull request #13823 from anitazha/unpriv_privateusers
core: PrivateUsers=true for (unprivileged) user managers
2019-12-19 12:03:06 +01:00
Zbigniew Jędrzejewski-Szmek 4186441bbd Revert "cryptsetup: umount encrypted devices before detaching it during shutdown"
This reverts commit 362c378291.

This commit introduced an ordering loop: remote-cryptsetup.target was both
before and after remote-fs-pre.target. It also globally ordered all cryptsetup
volumes before all mounts. Such global ordering is problematic if people have
stacked storage. Let's look for a different solution.

See https://github.com/systemd/systemd/pull/14378#discussion_r359460109.
2019-12-19 10:42:14 +01:00
Anita Zhang 9a1b3902ad
Merge pull request #14382 from topimiettinen/fix-analyze-security-rootimage
analyze: badness if neither of RootImage and RootDirectory exists
2019-12-18 16:21:36 -08:00
Anita Zhang a1533ad73f [man] note which UID ranges will get user journals
Fixes #13926
2019-12-18 16:12:43 -08:00
Anita Zhang d59fc29bb7 [man] fix URL 2019-12-18 16:08:53 -08:00
Anita Zhang b6657e2c53 test: add test case for PrivateDevices=y and Group=daemon
For root, group enforcement needs to come after PrivateDevices=y set up
according to 096424d123. Add a test to
verify this is the case.
2019-12-18 11:09:30 -08:00
Anita Zhang e5f10cafe0 core: create inaccessible nodes for users when making runtime dirs
To support ProtectHome=y in a user namespace (which mounts the inaccessible
nodes), the nodes need to be accessible by the user. Create these paths and
devices in the user runtime directory so they can be used later if needed.
2019-12-18 11:09:30 -08:00
Filipe Brandenburger a49ad4c482 core: add test case for PrivateUsers=true in user manager
The test exercises that PrivateTmp=yes and ProtectHome={read-only,tmpfs}
directives work as expected when PrivateUsers=yes in a user manager.

Some code is also added to test-functions to help set up test cases that
exercise the user manager.
2019-12-18 11:09:30 -08:00
Anita Zhang 5749f855a7 core: PrivateUsers=true for (unprivileged) user managers
Let per-user service managers have user namespaces too.

For unprivileged users, user namespaces are set up much earlier
(before the mount, network, and UTS namespaces vs after) in
order to obtain capbilities in the new user namespace and enable use of
the other listed namespaces. However for privileged users (root), the
set up for the user namspace is still done at the end to avoid any
restrictions with combining namespaces inside a user namespace (see
inline comments).

Closes #10576
2019-12-18 11:09:30 -08:00
Topi Miettinen d909b40fda
analyze: badness if neither of RootImage and RootDirectory exists
Instead of requiring both RootImage and RootDirectory directives, give badness
points if neither is present. Fixes conversion in d737b451f.
2019-12-18 20:38:04 +02:00
Lennart Poettering ecb040643d
Merge pull request #14376 from poettering/sd-event-no-stack
sd-event: don't use stack for event queue array
2019-12-18 17:18:07 +01:00
Yu Watanabe de697db05b network: introduce AddPrefixRoute= and deprecate PrefixRoute=
PrefixRoute= was added by e63be0847c,
but unfortunately, the meaning of PrefixRoute= is inverted; when true
IFA_F_NOPREFIXROUTE flag is added. This introduces AddPrefixRoute=
setting.
2019-12-18 16:32:31 +01:00
Lennart Poettering 0c8e33b6e9
Merge pull request #14377 from keszybz/fixups
Fixups
2019-12-18 16:21:20 +01:00
Zbigniew Jędrzejewski-Szmek 9667e10b1a
Merge pull request #14365 from yuwata/networkctl-altname
network, udev: further alternative name support
2019-12-18 12:44:34 +01:00
Zbigniew Jędrzejewski-Szmek b012a1f455 Make openssl dependency optional again 2019-12-18 11:24:44 +01:00
Lennart Poettering 27b4b3cc92 update TODO 2019-12-18 11:02:21 +01:00
Lennart Poettering 5cddd924aa sd-event: don't allocate event queue array on stack
We might have quite a number of event sources, hence allocate this in a
buffer we can reuse on the heap, rather than on the stack.
2019-12-18 10:59:27 +01:00
Lennart Poettering ac6431dad9 man: add man page for sd_bus_message_sensitive() 2019-12-18 09:10:34 +01:00
Zbigniew Jędrzejewski-Szmek 4023637a8a Restore silent handling of BUS_ERROR_SPEED_METER_INACTIVE
This only matters for the case where new networkctl is running against older
networkd. We should still handle the old error to avoid unnecessary warning
about speedmeeter being disabled.

This partially reverts commit e813de549b.
2019-12-18 08:48:33 +01:00
Zbigniew Jędrzejewski-Szmek 1b49e3e3c4 shared/loop-util: rename function
As suggested in https://github.com/systemd/systemd/pull/14261#pullrequestreview-332398625.
2019-12-18 08:48:33 +01:00
Topi Miettinen 7a670b1dd9 shared/dropin: fix assert for invalid drop-in
Don't try to show top level drop-in for non-existent units or when trying to
instantiate non-instantiated units:

$ systemctl cat nonexistent@.service
Assertion 'name' failed at src/shared/dropin.c:143, function unit_file_find_dirs(). Aborting.
$ systemctl cat systemd-journald@.service
Assertion 'name' failed at src/shared/dropin.c:143, function unit_file_find_dirs(). Aborting.
2019-12-18 08:43:40 +01:00
Yu Watanabe 51692fab56
Merge pull request #14370 from poettering/homed-preparation-misc
four smaller preparation patches from the homed PR
2019-12-18 11:17:59 +09:00
Yu Watanabe 12742abe07
Merge pull request #14369 from poettering/pkcs11-cryptsetup-followup
PKCS#11 cryptsetup support followup
2019-12-18 11:16:17 +09:00
Dimitri John Ledkov f27bb6abd3 initrd: make udev cleanup service confict trigger and settle too
Otherwise, systemd-udev-trigger|settle.service that ran in the initrd may
ramain active, and never re-run again from the system root.

This is observed by forexample examining ESP with udevadm info, which in the
initrd has all the ID_* variables, and none of them in fully booted system.
2019-12-17 21:38:11 +01:00
Lennart Poettering 9652d74092 varlink: add varlink_close_unref() helper 2019-12-17 20:05:46 +01:00
Lennart Poettering e10720818e chown-recursive: add fd based API 2019-12-17 20:03:40 +01:00
Lennart Poettering 417a6eece8 chown-recursive: move src/core/chown-recursive.[ch] → src/shared/
We want to use it outside of the core, hence let's moved it to the
shared code directory.
2019-12-17 20:03:40 +01:00
Lennart Poettering 845a7c1fc1 basic: add quota-util.[ch] with some helpers for the Linux quotactl() API 2019-12-17 20:03:40 +01:00
Lennart Poettering 6789dd57f0 cryptsetup-pkcs11: just return zero on success, no need to return anything else 2019-12-17 18:54:07 +01:00
Lennart Poettering 3ded1d616a cryptsetup-pkcs11: line break some overly long lines 2019-12-17 18:54:04 +01:00
Lennart Poettering 12f69587e9 cryptsetup-pkcs11: refuse keys above 16MiB size 2019-12-17 18:54:00 +01:00
Lennart Poettering 2ccf0ff6e8 man: tweaks to the crypttab(5) man page 2019-12-17 18:53:45 +01:00
cvoinf 3d864658ea hwdb: assume all Medion Akoya E-models have the same matrix
Since up to now all known Akoya E* models have the same Matrix, we assume all
other Akoya E* models work the same.
2019-12-17 18:15:34 +01:00
Lennart Poettering 35a05d8d5e man: whitespace fix 2019-12-17 18:02:04 +01:00
Lennart Poettering 76b73ce21c man: we support growing xfs too these days 2019-12-17 18:02:04 +01:00
Lennart Poettering 601f91bec5 time-util: deal with systems where userspace has 64bit time_t but kernel does not
Fixes: #14362
2019-12-18 00:38:39 +09:00
Yu Watanabe e7bdadb5c6 network: support alternative name to get bus path for the link 2019-12-18 00:05:50 +09:00
Yu Watanabe f7581ed6e0 networkctl: support alternative name to specify interface 2019-12-18 00:05:50 +09:00
Yu Watanabe 4d016e965b udev: sort alternative names
Kernel preserves the order of alternative names. So, for user
visibility, let's sort the alternative names.
2019-12-18 00:05:50 +09:00
Yu Watanabe b04c5e51da sd-netlink: introduce rtnl_resolve_link_alternative_names() 2019-12-18 00:05:50 +09:00