1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-08 05:57:26 +03:00

48030 Commits

Author SHA1 Message Date
Daan De Meyer
f2a4b96276 Don't assume /run/systemd exists when creating unit-root
When running tests in a mkosi container, /run/systemd might not
exist yet in the container which causes test-execute to fail.

Fixes #17842.

(cherry picked from commit 77f16dbd6d93f2b4a96984254cca25cab03479af)
2020-12-16 14:31:40 +01:00
Daan De Meyer
553530fdc7 mkosi: Add findutils to Fedora config
find is needed by test_exec_dynamicuser.

(cherry picked from commit 8f2c4c5e93718ac6d6f790de61fced5ed143de5d)
2020-12-16 14:31:40 +01:00
Daan De Meyer
e42990dfe3 mkosi: Add rpm to Fedora BuildPackages as it's needed by pkg-config
(cherry picked from commit 8d036c446adc4dd8f9f1919916462752209c29a4)
2020-12-16 14:31:40 +01:00
Daan De Meyer
6bacd1d971 mkosi: Replace iptables-dev with libiptc-dev in debian config
Latest debian unstable doesn't have iptables-dev anymore. Instead,
let's use libiptc-dev.

(cherry picked from commit aef61dc888056454c543535e1410c3b299d623a5)
2020-12-16 14:31:40 +01:00
Lennart Poettering
f1fc515c21 dissect: don't declare unused variables on archs that have no GPT discovery
Fixes: #17839
(cherry picked from commit 62ea0ed08d0fba0bcf0a7fbde2d2ec1d317b66c7)
2020-12-16 14:31:40 +01:00
Lennart Poettering
30d0c3f58c resolved: synthesize NODATA instead of NXDOMAIN if gateway exists, but of other protocol
Fixes: #11192
(cherry picked from commit 877884fc0da76170dce5abe7b3883eee334156b1)
2020-12-16 14:31:40 +01:00
Lennart Poettering
538ebbd7f3 local-addresses: make returning accumulated list optional
(cherry picked from commit c3a8c6aa42092d87b73a3653d96258bbfe32fd28)
2020-12-16 14:31:40 +01:00
Lennart Poettering
228a22bb63 resolved: improve log message when we use TCP a bit
DNS-over-TLS being in use isn't precisely the same as "UDP not
supported". Let's make this clearer.

(cherry picked from commit 6c0bacc146f1eea16f3b177a02fadf28901f9302)
2020-12-16 14:31:40 +01:00
Yu Watanabe
aa31dd9128 network: ignore broadcast address for /31 or /32 addresses
As they do not have broadcast address.
See https://tools.ietf.org/html/rfc3021

(cherry picked from commit 2a236f9fc0ff8fb2152032551436fde74da7217a)
2020-12-16 14:31:40 +01:00
Yu Watanabe
85607cc094 network: fix verification for broadcast address
Fixes a bug caused by fe841414ef157f7f01d339c5d5730126e7b5fe0a.

(cherry picked from commit 05a7023d242b9012216c661f253df1c9c3d45b39)
2020-12-16 14:31:40 +01:00
Yu Watanabe
dc6ad6482a network: do not set broadcast if prefixlen is 31 or 32
After fe841414ef157f7f01d339c5d5730126e7b5fe0a, broadcast address is
also compared with existing one to determine whether the address is
foregin or not. So, the address object should not contain unnecessary
information.

Fixes #17803.

(cherry picked from commit df8aa086420e6ce61e32898b2bb7c88b87fd1c43)
2020-12-16 14:31:40 +01:00
Lennart Poettering
39ee319c75 stub: don't ever respond to datagrams coming in on non-localhost addreses, on the stub
(cherry picked from commit 565147b7bb2156277a2efaccd920d3ca9c21f8a8)
2020-12-16 14:31:40 +01:00
Lennart Poettering
cbea0e5a83 resolved: never allow _gateway lookups to go to the network
Make them rather fail than go to the network.

Previously we'd filter them on LLMNR (explicitly) and MDNS (implicitly,
because it doesn't have .local suffix), but not on DNS.

In order to make _gateway truly reliable, let's not allow it to go to
DNS either, and keep it local.

This is particular relevant, as clients can now request lookups without
local RR synthesis, where we'd rather have NXDOMAIN returned for
_gateway than have it hit the network.

(cherry picked from commit fbbc72189f7844df8500bb10a58988f70bf90c99)
2020-12-16 14:31:40 +01:00
Lennart Poettering
c4df66816b resolved: lower SERVFAIL cache timeout from 30s to 10s
Apparently 30s is a bit too long for some cases, see #5552. But not
caching SERVFAIL at all also breaks stuff, see explanation in
201d99584ed7af8078bb243ce2587e5455074713.

Let's try to find some middle ground, by lowering the cache timeout to
10s. This should be ample for the problem
201d99584ed7af8078bb243ce2587e5455074713 attackes, but not as long as
half a miute, as #5552 complains.

Fixes: #5552
(cherry picked from commit 19bcef9dc3fde342f138394333ab04d7e44b7da2)
2020-12-16 14:31:40 +01:00
Lennart Poettering
b5e39c20d9 dns-domain: try IDN2003 rules if IDN2008 doesn't work
This follows more closely what web browsers do, and makes sure emojis in
domains work.

Fixes: #14483
(cherry picked from commit d80e72ec602c2af2983842ad87e4443fce89d423)
2020-12-16 14:31:39 +01:00
Christopher Obbard
2c354cedd2 virt: Properly detect nested UML inside another hypervisor
UML runs as a user-process so it can quite easily be ran inside of
another hypervisor, for instance inside a KVM instance. UML passes
through the CPUID from the host machine so in this case detect_vm
incorrectly identifies as running under KVM. So check we are running
a UML kernel first, before we check any other hypervisors.

Resolves: #17754

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
(cherry picked from commit c8037dbf05da586b6a210ac04f145d99f424971f)
2020-12-16 14:31:39 +01:00
Lennart Poettering
10f2cfb715 resolved: properly check per-link NTA list
We need to check for parent domains too. We did this correctly for the
system-wide NTA list, but not for the per-link one. Let's fix that.

(cherry picked from commit 7e8a93b77c3c4d4df1e8c3177dc9553c94fac759)
2020-12-16 14:31:39 +01:00
Yu Watanabe
a8437c07e4 meson: use '_' as separator in fuzz test names
Follow-up for d448888924c1d4815cb97bcd5d94419812c053b9 and ca121e20c42219e3bc4e5cb63dcc96cc5eae2879.

Fixes #17568.

(cherry picked from commit 0f82a2ab5c8d812791aca9686bdcc45f39c62431)
2020-12-16 14:31:39 +01:00
Lennart Poettering
81ef7623c8 man: mention that --key= is about *secret* keys
(cherry picked from commit ce82de671f63105e9839978b432e2b015783ffc0)
2020-12-16 14:31:39 +01:00
Luca Boccassi
4ef70ecefc meson: check that cxx variable is set before using it
In some cases it is not defined. Eg in a yocto build:

src/systemd/meson.build:61:15: ERROR: Unknown variable cxx.

(cherry picked from commit 442bc2afee6c5f731c7b3e76ccab7301703a45a7)
2020-12-08 17:18:36 +01:00
Franck Bui
dc057df84c scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgroup scope
Commit 428a9f6f1d0396b9eacde2b38d667cbe3f15eb55 freed u->pids which is
problematic since the references to this unit in m->watch_pids were no more
removed when the unit was freed.

This patch makes sure to clean all this refs up before freeing u->pids by
calling unit_unwatch_all_pids().

(cherry picked from commit e9eec8b5d2c106c5dd51382a155e6045c7c17c1a)
v247.1
2020-12-01 10:41:02 +01:00
Vito Caputo
450ba44b7e sd-event: fix delays assert brain-o (#17790)
s/sizeof/ELEMENTSOF/

Bug introduced in 34b87517749caa4142b19eb3c63bdf349fafbc49.

(cherry picked from commit cb9d621ebbfa30bbd620c17e143daeb0d78c12f0)
2020-12-01 10:40:54 +01:00
Piotr Drąg
7979fea465 po: add units/systemd-journald.service.in to POTFILES.skip
(cherry picked from commit a75471ced1b4527870e21e96fbb81017e76fbcc8)
2020-12-01 10:40:44 +01:00
Zbigniew Jędrzejewski-Szmek
762d645d17 test-networkd-conf: add missing assert_se
Coverity CID#1437351. Fixup for f706340979a.

(cherry picked from commit 78cafcbc7ec7eb19d40a07dfa75ad562f7ded643)
2020-12-01 10:40:22 +01:00
Zbigniew Jędrzejewski-Szmek
80a51430e9 NEWS: really fix kernel version number reference
Fixes #17736.

(cherry picked from commit 832eedd192deb4e3520deb6a62c9acae23541b67)
2020-12-01 10:40:09 +01:00
Christian Hesse
2bb703e440 oom: fix oomd.conf install location
The file is read in pkgsysconfdir, so install it there.
2020-11-27 09:03:18 +09:00
Christian Hesse
72a4466e6e home: fix homed.conf install location
The install location changed in d7aa78c32f076c305ceeb183fc06eb1de0960deb,
I think this was not intentional. Keep the condition but revert the path.
2020-11-27 09:02:55 +09:00
Zbigniew Jędrzejewski-Szmek
4d484e14bb
Merge pull request #17738 from keszybz/hwdb-news-update-v247
Update hwdb and news for v247
v247
2020-11-26 19:00:50 +01:00
Zbigniew Jędrzejewski-Szmek
d5923e38bc shared/seccomp-util: address family filtering is broken on ppc
This reverts the gist of da1921a5c396547261c8c7fcd94173346eb3b718 and
0d9fca76bb69e162265b2d25cb79f1890c0da31b (for ppc).

Quoting #17559:
> libseccomp 2.5 added socket syscall multiplexing on ppc64(el):
> https://github.com/seccomp/libseccomp/pull/229
>
> Like with i386, s390 and s390x this breaks socket argument filtering, so
> RestrictAddressFamilies doesn't work.
>
> This causes the unit test to fail:
> /* test_restrict_address_families */
> Operating on architecture: ppc
> Failed to install socket family rules for architecture ppc, skipping: Operation canceled
> Operating on architecture: ppc64
> Failed to add socket() rule for architecture ppc64, skipping: Invalid argument
> Operating on architecture: ppc64-le
> Failed to add socket() rule for architecture ppc64-le, skipping: Invalid argument
> Assertion 'fd < 0' failed at src/test/test-seccomp.c:424, function test_restrict_address_families(). Aborting.
>
> The socket filters can't be added so `socket(AF_UNIX, SOCK_DGRAM, 0);` still
> works, triggering the assertion.

Fixes #17559.
2020-11-26 14:23:15 +01:00
Zbigniew Jędrzejewski-Szmek
d90922fbd3 NEWS: fix kernel version number reference
Fixes #17736.
2020-11-26 14:01:09 +01:00
Zbigniew Jędrzejewski-Szmek
d0dcf59b78 NEWS: version 247 2020-11-26 13:54:37 +01:00
Zbigniew Jędrzejewski-Szmek
fe7576e345 hwdb: update chromiumos autosuspend rules 2020-11-26 13:54:37 +01:00
Zbigniew Jędrzejewski-Szmek
6a8b36e7aa hwdb: update for v247
Only some small changes, because we updated recently. As usual, it seems that there are mostly
additions with a smaller amount of corrections, no big removals.
2020-11-26 13:54:37 +01:00
Zbigniew Jędrzejewski-Szmek
89341c83c3 docs/RELEASE: clarify which steps are done when 2020-11-26 13:54:37 +01:00
Dan Streetman
ebc815cd1c test: use cap_last_cap() for max supported cap number, not capability_list_length()
This test assumes capability_list_length() is an invalid cap number,
but that isn't true if the running kernel supports more caps than we were
compiled with, which results in the test failing.

Instead use cap_last_cap() + 1.

If cap_last_cap() is 63, there are no more 'invalid' cap numbers to test with,
so the invalid cap number test part is skipped.
2020-11-26 13:35:48 +01:00
Whired Planck
9684a01ce4 Translated using Weblate (Chinese (Simplified))
Currently translated at 83.9% (157 of 187 strings)

Co-authored-by: Whired Planck <fungdaat31@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/master
2020-11-26 12:52:34 +01:00
Zbigniew Jędrzejewski-Szmek
18c4e13457
Merge pull request #17622 from yuwata/udev-database-set-udev-version
sd-device: make sd_device_has_current_tag() compatible with udev database generated by older udevd
2020-11-26 12:48:05 +01:00
Lee Whalen
362ddd7756 add touchpad-edge-detect output for the Lenovo Thinkpad Extreme to evdev.hwdb 2020-11-26 10:51:38 +01:00
Yu Watanabe
35ad7113db
Merge pull request #17709 from yuwata/test-seccomp-skip
test: skip several tests in test-seccomp when running under valgrind or ASAN
2020-11-26 09:31:10 +09:00
Yu Watanabe
6ece7cd2b7 sd-device: make sd_device_has_current_tag() and friends compatible with database version 0 2020-11-26 08:29:17 +09:00
Yu Watanabe
58b30ada0b sd-device: introduce database version and save it in udev database V field 2020-11-26 06:38:38 +09:00
Yu Watanabe
9e25cca130 sd-device: make device_add_property_internal() inline 2020-11-26 05:58:32 +09:00
Yu Watanabe
7a1fe27f81 man: slightly update the man page of sd_bus_message_read_basic()
Follow-up for 73a1d7d2433edd1872ec53db3e804009298ebb1d.
2020-11-25 14:52:40 +01:00
igo95862
78c4f2f153 man: Fixed an incomplete sentence 2020-11-25 22:27:17 +09:00
igo95862
73a1d7d243 man: Specify that sd_bus_message_read_basic returns 0 if end of array had been reached. 2020-11-25 14:10:26 +01:00
Lennart Poettering
5695ee502d docs: document what VPNs should do to systemd-resolved.service
Fixes: #17588 #17512

Prompted-by: #17529

(Also relevant: #6076)
2020-11-25 14:08:37 +01:00
Yu Watanabe
2fa0bd7d57 core/mount: mount command may fail after adding the corresponding proc mountinfo entry
Hopefully fixes #17617.
2020-11-25 13:53:26 +01:00
Zbigniew Jędrzejewski-Szmek
9642983a51
Merge pull request #17715 from yuwata/specifier-follow-ups
Sort specifiers
2020-11-25 13:22:56 +01:00
Lennart Poettering
8bc6ade721 cryptsetup: use log_warning_errno() where we can, instead of log_warning() 2020-11-25 13:21:27 +01:00
Zbigniew Jędrzejewski-Szmek
ef58c14587
Merge pull request #17721 from poettering/more-strjoin-cryptsetup
two minor fixes/clean-ups
2020-11-25 13:20:42 +01:00