Commit Graph

48590 Commits

Author SHA1 Message Date
Yu Watanabe 8786d4bbe4 journal-importer: ignore invalid field at one more place
Fixes oss-fuzz#28817.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817
2020-12-21 12:40:44 +00:00
Luca BRUNO 3d909037e3 man/localtime: document default timezone
This explicitly documents the default `UTC` timezone which is used
by systemd and (other softwares) when `/etc/localtime` is not present.

Ref: https://github.com/systemd/systemd/blob/v247/src/basic/time-util.c#L1460-L1469
2020-12-21 12:39:18 +00:00
Florian Klink c6b90e5c5e man/systemd.netdev: clarify the wireguard AllowedIPs= setting
`AllowedIPs=` only affects "routing inside the network interface
itself", as in, which wireguard peer packets with a specific destination
address are sent to, and what source addresses are accepted from which
peer.

To cause packets to be sent via wireguard in first place, a route via
that interface needs to be added - either in the `[Routes]` section on
the `.network` matching the wireguard interface, or outside of networkd.

This is a common cause of misunderstanding, because tools like wg-quick
also add routes to the interface. However, those tools are meant as a
"extremely simple script for easily bringing up a WireGuard interface,
suitable for a few common use cases (from their manpage).

Networkd also should support other usecases - like setting AllowedIPs to
0.0.0.0/0 and ::/0 and having a dynamic routing protocol setting more
specific routes (or the user manually setting them).

Reported-In: https://github.com/systemd/systemd/issues/14176
2020-12-21 15:47:00 +09:00
Yu Watanabe 94d982bb6a
Merge pull request #18040 from mrc0mmand/cryptenroll-unused-variable
cryptenroll: drop an unused variable
2020-12-21 09:21:22 +09:00
Frantisek Sumsal a3abdea13a github: add the missing tpm2 optional dependency 2020-12-20 22:27:36 +01:00
Frantisek Sumsal fedc14c5a1 travis: add missing optional build dependencies 2020-12-20 22:21:35 +01:00
Frantisek Sumsal 84fa67f0ef cryptenroll: drop an unused variable
Fixes following warning/error w/ clang:
../src/cryptenroll/cryptenroll-tpm2.c:64:64: error: unused variable 'a' [-Werror,-Wunused-variable]
        _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *a = NULL;
                                                               ^
1 error generated.
2020-12-20 22:15:52 +01:00
Yu Watanabe 87cc47ba1d
Merge pull request #18029 from bluca/minor_fixes
Minor test script runner and labeller bot fixes
2020-12-20 10:01:59 +09:00
Daan De Meyer 262cd9facd mkosi: Add basic editors to final images
It's often useful to have an editor available to edit some random
config file in the final image. Let's install some basic editors
that don't take up too much space.
2020-12-19 22:04:31 +00:00
Luca Boccassi d9107e16f2 Add more matching rules to GA labeler bot for subcomponents 2020-12-19 21:56:57 +00:00
Luca Boccassi d78911e9f7 False positives in GA labeler bot
Don't automatically match on man/* and **/meson.build, since we change those
files as part of larger changes that we usually don't mark that way
2020-12-19 21:56:57 +00:00
Luca Boccassi 92fa741cf2 test: fix regex in run-integration-tests.sh
The regex results in calls of "make setup run -again" which is broken
2020-12-19 21:56:57 +00:00
Luca Boccassi b382b8de1e test: use deny-list in run-integration-tests.sh
The old env var doesn't seem to be used anywhere, and the script
currently doesn't work, so it seems safe to change immediately
2020-12-19 21:56:57 +00:00
Daan De Meyer 2234c6a094 mkosi: Use --only-changed meson option when installing
Recently, mkosi gained support for specifying an --install-directory
option to save the contents of the install directory between bulids.
By enabling the --only-changed meson install option, meson won't
overwrite the contents of files that haven't changed since the last
build when using --install-directory.
2020-12-19 16:16:07 +00:00
Alexander Batischev 1431b2f701
man: Advertise systemd-time-wait-sync.service more (#17729)
* man: Advertise systemd-time-wait-sync.service more

The description of time-sync.target says that NTP services *should* pull
that target, but doesn't mention that e.g. systemd-timesyncd.service
doesn't actually do that. As a result, time-sync.target is reached way
earlier than people expect; see #5097, #8861, #11008.

systemd provides systemd-time-wait-sync.service to ameliorate this
problem, but doesn't feature it prominently in relevant manpages. In
fact, it's only mentioned in passing in systemd-timesyncd.service(8). As
a result, I ended up re-implementing that service, and I'm not the first
one: https://github.com/NixOS/nixpkgs/pull/51338

This patch adds a mention right in the description of time-sync.target,
which will hopefully raise awareness of this helper service.
2020-12-19 11:17:49 +00:00
Yu Watanabe d1a61dfa69 tmpfiles: fix typo
Follow-up for 94566540e3.
2020-12-19 00:58:22 +09:00
Yu Watanabe 8a5a01d19c
Merge pull request #18019 from yuwata/hostname-drop-libudev
hostname: fix build failure
2020-12-19 00:57:36 +09:00
Yu Watanabe a4c3c5b751 man: update org.freedesktop.hostname1.xml 2020-12-18 23:25:43 +09:00
Yu Watanabe 3693cbacf7 memory-id: fix never hit condition
As sizeof(int64_t) is always 8.
2020-12-18 23:13:21 +09:00
Yu Watanabe 0be6dee2c2 hostname: fix build failure
Follow-up for b9d8069832.

libudev.h was dropped from most of our binaries.
2020-12-18 23:11:02 +09:00
Lennart Poettering 9bd6ee8d5d
Merge pull request #15531 from felipeborges/add-device-model-field-to-hostnamed
hostnamed: Add "Model" field
2020-12-18 14:26:32 +01:00
Devon Pringle 16c89e649d networkd: add RouteDenyList
Allow configuration for IPv6 discovered routes to be ignored instead of
adding them as a route. This can be used to block unwanted routes, for
example, you may wish to not receive some set of routes on an interface
if they are causing issues.
2020-12-18 21:44:32 +09:00
Yu Watanabe af42881bf9
Merge pull request #18015 from keszybz/dmi-test-mesonification2
Dmi test mesonification2
2020-12-18 21:44:00 +09:00
Yu Watanabe 9f62de5762
Merge pull request #18011 from yuwata/trivial-fixes
Trivial fixes for recently merged PRs
2020-12-18 20:12:02 +09:00
Yu Watanabe fd4835bdf8
Merge pull request #17693 from yuwata/tmpfiles-compress-nocow-on-btrfs
tmpfiles: try to set file attributes one by one
2020-12-18 16:52:29 +09:00
Yu Watanabe ee672fd30b
Merge pull request #18009 from poettering/time-set-sync-target
tweaks for time-sync.target and time-set.target
2020-12-18 16:02:56 +09:00
Yu Watanabe eca248640b netlink: fix size of fib rule messages 2020-12-18 13:27:44 +09:00
Yu Watanabe 8940baac4d meson: sort files 2020-12-18 13:27:44 +09:00
Yu Watanabe 479667c497 nspawn: sort headers 2020-12-18 13:27:44 +09:00
Yu Watanabe ce9dc1fd8b netlink: fix indentation 2020-12-18 13:27:44 +09:00
Yu Watanabe a73f080727 netlink: drop unnecessary error handling 2020-12-18 13:27:44 +09:00
Yu Watanabe faa0d69c6c netlink: use whitespace instead of tab 2020-12-18 13:27:44 +09:00
Yu Watanabe f6dab7489e sd-netlink: add several assertions 2020-12-18 13:27:40 +09:00
Yu Watanabe 2d1ad72456 sd-netlink: replace *messages[] -> **messages 2020-12-18 13:11:06 +09:00
Yu Watanabe ec87f63c0e meson: add missing headers 2020-12-18 13:05:19 +09:00
Yu Watanabe 517fdd61ed network: move variable declaration 2020-12-18 13:00:57 +09:00
Yu Watanabe 458610429f tree-wide: fix typo 2020-12-18 12:59:29 +09:00
Yu Watanabe 94566540e3 tmpfiles: try to set file attributes one by one
Closes #17690.
2020-12-18 12:35:57 +09:00
Yu Watanabe 459631a0f9 chattr-util: introduce fallback mode to set file attributes one by one 2020-12-18 12:33:43 +09:00
Susant Sahani d7d1d18fd2
network: Allow to configure unreachable/blackhole RoutingPolicyRule (#17984) 2020-12-18 12:21:15 +09:00
Lennart Poettering 5cd35a171c
Merge pull request #17741 from poettering/cryptsetup-fido2
cryptsetup: add support for unlocking cryptsetup volumes via FIDO2 + TPM2 + add systemd-cryptenroll tool + more
2020-12-17 22:37:22 +01:00
Lennart Poettering 08e77eb88d man: document that .timer units now have After= on both time-set.target + time-sync.target 2020-12-17 20:26:24 +01:00
Lennart Poettering fe934b42e4 core: order timer units after both time-sync.target and time-set.target
If users do not enable a service like systemd-time-wait-sync.target
(because they don't want to delay boot for external events, such as an
NTP sync), then timers should still take the the weaker time-set.target
feature into account, so that the clock is at least monotonic.

Hence, order timer units after both of the targets: time-sync.target
*and* time-set.target. That way, the right thing will happen regardless
if people have no NTP server (and thus also no
systemd-time-wait-sync.service or equivalent) or, only have an NTP
server (and no systemd-time-wait-sync.service), or have both.

Ordering after time-set.target is basically "free". The logic it is
backed by should be instant, without communication with the outside
going on. It's useful still so that time servers that implement the
timestamp from /var/ logic can run in later boot.
2020-12-17 20:21:46 +01:00
Lennart Poettering d2004ee568 units: don't pull in time-sync.target from systemd-timesyncd.service
systemd-timesyncd.service only applies the much weaker monotonic clock
from file logic, i.e should pull in and order itself before
time-set.target. The strong time-sync.target unit is pulled in by
systemd-time-wait-sync.service.
2020-12-17 20:19:44 +01:00
Lennart Poettering 80670e748d update TODO 2020-12-17 20:03:04 +01:00
Lennart Poettering 5e85016b1f mkosi: add TPM2 packages to debian/ubuntu/fedora mkosi files
As suggested: https://github.com/systemd/systemd/pull/17741#issuecomment-743479834
2020-12-17 20:03:00 +01:00
Lennart Poettering cf1e172d58 man: document new features 2020-12-17 20:02:32 +01:00
Lennart Poettering 1abaa19781 fido2: when listing fido2/hmac-secret devices, actually validate feature set 2020-12-17 20:02:28 +01:00
Lennart Poettering a60d5b2f38 test: add tpm2 and fido2 libs to dlopen test 2020-12-17 20:02:24 +01:00
Lennart Poettering 889914ef6c repart: optionally lock encrypted partitions to TPM2
This useful for bootstrapping encrypted systems: on first boot let's
create a /var/ partition that is locked to the local TPM2.
2020-12-17 20:02:20 +01:00