1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

48620 Commits

Author SHA1 Message Date
Yu Watanabe
57dda0de38 fuzzers: set maximum length for several fuzzers
Hopefully fixes oss-fuzz#19081, oss-fuzz#21731, oss-fuzz#21755.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19081
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21731
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21755
2020-12-30 00:31:17 +09:00
Yu Watanabe
2be7c6ab3b
Merge pull request #17477 from yuwata/network-drop-serialization-routing-policy-rule
network: do not serialize/deserialize routing policy rules
2020-12-30 00:18:24 +09:00
Yu Watanabe
a9d240f4bf network: do not serialize/deserialize routing policy rules
We already handle foreign routing policy rules correctly by the previous
commit. So, the serialization/deserialization of rules are not necessary
anymore.
2020-12-29 16:13:54 +09:00
Yu Watanabe
0b81225e57 network: drop unnecessary routing policy rules
networkd already drop foreign address, routes, and nexthops on startup,
except those created by kernel. However, previously, routing policy
rules were not. The logic of serialization/deserialization of rules only
works for rules created by previous invocation of networkd, and does not
work for one created by other tools like `ip rule`.

This makes networkd drop foreign routing policy rules except created by
kernel on startup. Also, remove rules created by networkd when the
corresponding links are dropped or networkd is stopping.
2020-12-29 16:13:54 +09:00
Yu Watanabe
e737dce544 network: treat rule which has l3mdev flag as created by kernel 2020-12-29 16:13:39 +09:00
Yu Watanabe
569eeb0c05 network: adjust protocol of rules sent from kernel when kernel does not support FRA_PROTOCOL
Otherwise, each configured rule is treated as foreign.
2020-12-29 16:03:26 +09:00
Yu Watanabe
1e5fd3216a network: set FRA_PROTOCOL to RTPROT_STATIC by default 2020-12-29 16:03:26 +09:00
Luca Boccassi
d514454446
Merge pull request #18048 from poettering/timesync-man-more
man: extend time-{set,sync}.target + systemd-timesyncd/wait-sync docs
2020-12-28 12:28:35 +00:00
Lennart Poettering
57b3b8f48c man: apply @Minoru's suggestions from code review
Co-authored-by: Alexander Batischev <eual.jp@gmail.com>
2020-12-28 10:53:20 +01:00
Lennart Poettering
b149d230ea man: extend time-{set,sync}.target + systemd-timesyncd/wait-sync docs
Let's link the three man pages together more tightly and explain what
the two targets are about, emphasizing local/quick/reliable/approximate
vs remote/slow/unreliable/accurate synchronization.

Follow-up for: 1431b2f701 fe934b42e4
2020-12-28 10:52:33 +01:00
Luca Boccassi
5def1f11f8 shared/dns: fix dlopen_idn return code check
Fixes https://github.com/systemd/systemd/issues/18078
2020-12-28 15:08:12 +09:00
Thomas Haller
1835a8a105 sd-dhcp-client: avoid "maybe-uninitialized" warning in client_timeout_resend()
When compiling with CFLAGS='-Werror=maybe-uninitialized -Og' we get a
warning about uninitialized "next_timeout" variable.

Avoid the warning by adding an (unreachable) "default" label.

Fixes: c24288d21e ("sd-dhcp-client: correct dhcpv4 renew/rebind retransmit timeouts")
2020-12-26 09:01:01 +09:00
Yu Watanabe
b945573303
Merge pull request #18021 from ssahani/route-allow-list
networkd: add support for prefix allow-list and route allow-list
2020-12-24 22:31:37 +09:00
Yu Watanabe
635f2a6692 test-network: add tests for [IPv6AcceptRA] PrefixDenyList= or friends 2020-12-24 17:16:15 +09:00
Yu Watanabe
75d2641190 network: introduce RouterAllowList= and RouterDenyList= in [IPv6AcceptRA] 2020-12-24 17:16:15 +09:00
Susant Sahani
de6b6ff84c networkd: add support for prefix allow-list and route allow-list 2020-12-24 17:16:13 +09:00
Yu Watanabe
3f0af4a5f9 network: rename DenyList= -> PrefixDenyList= 2020-12-24 17:15:44 +09:00
Yu Watanabe
19e334bd15 network: make RouteDenyList= filter route prefix rather than gateway address
DenyList= filters provided prefixes, not router address.
So, RouteDenyLisy= should so for consistency.

Fixes 16c89e649d.
2020-12-24 17:15:44 +09:00
Yu Watanabe
1cd5267e81 network: fix condition for checking the provided gateway is assigned to link
Fix bug introduced by 221019166f.
2020-12-24 17:15:44 +09:00
Yu Watanabe
0afa4d569d sd-ndisc: fix indentation 2020-12-24 17:15:44 +09:00
Yu Watanabe
8c86196b52 network: drop redundant TAKE_PTR()
Follow-up for 16c89e649d.
2020-12-24 17:15:14 +09:00
Sebastiaan van Stijn
8c62ad1929 Improve instructions for debugging failing service
In situations where a service fails to start, systemd suggests the user to
use "journalctl -xe" to get details about the failure. While running this
command does provide some additional details, most of the information is
similar to what was already printed when the service fails.

often the actual reason for the failure can be found in the logs of the
service that fails to start.

This patch updates the wording to suggest using "-u" to view the service
logs instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-24 14:36:55 +09:00
Yu Watanabe
bc1a4d28bb
Merge pull request #18069 from flokli/ipv6-privacy-extensions-kernel
network: fix IPv6PrivacyExtensions=kernel
2020-12-24 08:56:24 +09:00
Florian Klink
d3ccb1b4ba network: fix IPv6PrivacyExtensions=kernel handling
When set to "kernel", systemd is not supposed to touch that sysctl.

5e0534f1c1, part of
https://github.com/systemd/systemd/pull/17240 forgot to handle that
case.

Fixes https://github.com/systemd/systemd/issues/18003
2020-12-24 08:54:20 +09:00
Florian Klink
7eeaf72b88 network: fix typo
IPv6 privacy extensions are plural, not singular.
2020-12-23 12:56:45 +01:00
Jonathan G. Underwood
227acf0009 cryptsetup: add support for workqueue options
This commit adds support for disabling the read and write
workqueues with the new crypttab options no-read-workqueue
and no-write-workqueue. These correspond to the cryptsetup
options --perf-no_read_workqueue and --perf-no_write_workqueue
respectively.
2020-12-23 11:07:48 +00:00
Dmitry Borodaenko
68709a636c man/systemd-nspawn: document hashing machine name for uid base
Explicitly document the behavior introduced in #7437: when picking a new
UID shift base with "-U", a hash of the machine name will be tried
before falling back to fully random UID base candidates.
2020-12-23 10:18:03 +00:00
pali
5fc3b26125 udev: Updates for cdrom_id helper
cdrom_id udev helper does not parse all MMC profiles. Following change
fixes this issue and parse all 34 profiles from all MMC standard versions.
Also it replaces magic constants by macros provided by linux/cdrom.h and
fixes cd_profiles_old_mmc() to issue READ_DISC_INFO command in two steps,
like it is doing kernel and also mkudffs.
2020-12-22 15:21:29 +09:00
Luca Boccassi
8bab802910 basic: add make_mount_point_inode helper
Creates a file or a directory depending on the source path, useful
for creating mount points.
2020-12-21 21:48:13 +01:00
Yu Watanabe
9df1e11e31 udev: fix memleak
Fixes #18039.
2020-12-21 16:55:56 +01:00
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