1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00

50588 Commits

Author SHA1 Message Date
Luca Boccassi
cf9844ffab test: use systemd-run --wait in TEST-44-LOG-NAMESPACE
The test appears to be occasionally failing. It uses systemd-run to echo
'hello world' into a namespaced journal and then uses journalctl to look for it,
but it doesn't wait.
In the failed runs it can't find it, but the automated journal dump shows
the message at the end.

Use --wait to avoid races.
2021-04-15 08:16:19 +02:00
Zbigniew Jędrzejewski-Szmek
828b603a79 libsystemd-network: fix dhcp option buffer confusion
We were writing to the wrong buffer with a wrong offset :(
Bug present since the original introduction of the code in
04b28be1a306fd2ba454d3ee333d63df71aa3873.
2021-04-15 13:46:48 +09:00
Sevan Janiyan
d5b3e51044 meson.build: typo 2021-04-15 13:23:13 +09:00
Yu Watanabe
22bbba8444 sd-dhcp-client: introduce sd_dhcp_client_is_running() 2021-04-14 22:31:28 +02:00
Luca Boccassi
9264fb47d9
Merge pull request #19315 from yuwata/network-wait-online-address-family-follow-ups
network: several follow-ups for #19069
2021-04-14 21:17:00 +01:00
Zbigniew Jędrzejewski-Szmek
c5cb37d95e
Merge pull request #19302 from bluca/uninit
tree-wide: avoid uninitialized warning on _cleanup_ variables
2021-04-14 16:25:35 +02:00
Yu Watanabe
f11bee0cb9 wait-online: update debug log messages 2021-04-14 22:17:44 +09:00
Yu Watanabe
90afec1834 network: shorten code a bit 2021-04-14 22:13:46 +09:00
Zbigniew Jędrzejewski-Szmek
6634a39469
Merge pull request #19266 from mrc0mmand/testsuite-shellcheck
test: make the test scripts shellcheck-compliant
2021-04-14 13:58:01 +02:00
Luca Boccassi
c2b2df604b tree-wide: avoid uninitialized warning on _cleanup_ variables
With some versions of the compiler, the _cleanup_ attr makes it think
the variable might be freed/closed when uninitialized, even though it
cannot happen. The added cost is small enough to be worth the benefit,
and optimized builds will help reduce it even further.
2021-04-14 12:25:06 +01:00
Luca Boccassi
be084c0dd1 meson: build tests with -Wno-maybe-uninitialized if -O2/-flto are used
We intentionally do not inline initializations with definitions for
a bunch of _cleanup_ variables in tests, to ensure valgrind is triggered.
This triggers a lot of maybe-uninitialized false positives when -O2 and
-flto are used. Suppress them.
2021-04-14 11:31:50 +01:00
Yu Watanabe
c68ede3952 util: shorten allow_listed_char_for_devnode() 2021-04-14 11:04:46 +01:00
Yu Watanabe
a2b1572ce4
Merge pull request #19287 from yuwata/network-manage-foreign-routing-policy-rule-19106
network: add ManageForeignRoutingPolicyRules= boolean setting
2021-04-14 19:01:41 +09:00
Yu Watanabe
c7cbe25d11
Merge pull request #19069 from LetzteInstanz/waiting_for_address_family
systemd-networkd-wait-online: wait for specific address family
2021-04-14 18:57:39 +09:00
Luca Boccassi
ab1aa6368a rfkill: add some casts to silence -Werror=sign-compare 2021-04-14 10:26:31 +01:00
LetzteInstanz
70448bb1c1 test-network: test waiting for address family 2021-04-14 09:00:12 +09:00
LetzteInstanz
6dc4531d16 wait-online: wait for address family
This introduce -4 and -6 commandline options.
2021-04-14 09:00:08 +09:00
LetzteInstanz
bbea881312 sd-network: read IPv4/IPv6 address states from state files 2021-04-14 08:51:08 +09:00
LetzteInstanz
8430841b5e network: save IPv4/IPv6 address states into state file
This also introduces RequiredFamilyForOnline= setting to .network file,
and IPv4AddressState/IPv6AddressState DBus properties.
2021-04-14 08:51:02 +09:00
LetzteInstanz
86ae2d69a3 network: move AddressFamily into network-util for the use by wait-online later 2021-04-14 08:30:18 +09:00
gaoyi
993eb00016 udev: delete useless codes
It seems no one will touch queue.bin
2021-04-14 08:07:40 +09:00
Yegor Alexeyev
21b6b87eb3 dhcp: Implemented BindToInterface= configuration option 2021-04-14 07:30:40 +09:00
Frantisek Sumsal
84031b5d6e test: bunch of assorted tweaks to make shellcheck happy 2021-04-13 19:14:35 +02:00
Frantisek Sumsal
4544002cae test: use arrays to make things a bit cleaner 2021-04-13 13:20:22 +02:00
Frantisek Sumsal
ea539ad297 test: replace the obsolete `` syntax with $() 2021-04-13 12:08:01 +02:00
Frantisek Sumsal
70ad107bdf test: use an explicit no-op for file truncation 2021-04-13 12:08:01 +02:00
Frantisek Sumsal
f794098356 test: tidy up arithmetic expressions 2021-04-13 12:08:01 +02:00
Frantisek Sumsal
3882526798 test: use quotes where necessary
to avoid possible word splitting.
2021-04-13 12:08:01 +02:00
Frantisek Sumsal
084575ff91 test: use set -eux and set -o pipefail everywhere
This should make the scripts more robust.
2021-04-13 12:08:01 +02:00
Luca Boccassi
bcaf24cd77
Merge pull request #19303 from yuwata/fix-typo
tree-wide: fix typo
2021-04-13 09:44:33 +01:00
Yu Watanabe
050f05c2eb tree-wide: update comment about unnecessary initialization 2021-04-13 12:53:32 +09:00
Yu Watanabe
f1a5c566c1 man: fix typo 2021-04-13 12:52:56 +09:00
Yu Watanabe
3fe23a96d6 man: update description for ManageForeignRoutes= 2021-04-13 12:23:59 +09:00
Yu Watanabe
d94dfe7053 network: introduce ManageForeignRoutingPolicyRules= boolean setting in networkd.conf
The commit 0b81225e5791f660506f7db0ab88078cf296b771 makes that networkd
remove all foreign rules except those with "proto kernel".

But, in some situation, people may want to manage routing policy rules
with other tools, e.g. 'ip' command. To support such the situation,
this introduce ManageForeignRoutingPolicyRules= boolean setting.

Closes #19106.
2021-04-13 12:22:42 +09:00
Yu Watanabe
6bfadad9bb network: add missing default setting in networkd.conf 2021-04-13 12:07:09 +09:00
Francois Gervais
54cfe9a75f
load-fragment: parse specifiers in CPUAffinity= (#19281) 2021-04-13 07:25:29 +09:00
Zbigniew Jędrzejewski-Szmek
7c5fd25119 meson: do not fail if rsync is not installed with meson 0.57.2
https://github.com/mesonbuild/meson/issues/8641

Our CI started to fail. Even if the change is reverted in meson,
we need a quick workaround here.
2021-04-12 21:28:23 +01:00
Frantisek Sumsal
72ae959efd packit: drop the 'sources' file after cloning the Fedora repo
Otherwise rebase-helper thinks we're are a dist-git repository,
replacing the generated git archive with PR changes with the tarball
found in the 'sources' file.
2021-04-12 18:10:04 +02:00
Lennart Poettering
59b8635a33
Merge pull request #18701 from bugaevc/mdns-unicast
resolved: reply using unicast mDNS when appropriate
2021-04-12 17:53:38 +02:00
Zbigniew Jędrzejewski-Szmek
839eb4a458
Merge pull request #13496 from wat-ze-hex/custom-bpf-progs-parameterized-3
bpf: extend bpf cgroup program support
2021-04-12 14:31:42 +02:00
gaoyi
45f5efdea7 man: fix discriptions for --exec-delay
There are two ambiguity in the original description:
1. It will delay all RUN instructions, include builtin.
2. It will delay before running RUN, not each of RUN{program} instructions.
2021-04-12 13:03:26 +02:00
Yu Watanabe
9bafb8d504 sd-dhcp-client: constify argument in sd_dhcp_lease_get_xxx() 2021-04-12 09:55:26 +02:00
Yu Watanabe
37da8bca92 networkctl: drop unused variables 2021-04-12 09:09:57 +02:00
Luca Boccassi
0efcbecd8b test-repart: use cryptsetup and losetup autoclose
The test occasionally fails as the umount is not yet completed when
cryptsetup close is invoked.
Both cryptsetup and losetup have supported deferred cleanup for some
time now, so use it instead to avoid races.

++ losetup -P --show --find /tmp/test-repart.dMOfYQ8UUF/zzz
+ LOOP=/dev/loop6
+ VOLUME=test-repart-11882
+ touch /tmp/test-repart.dMOfYQ8UUF/empty-password
+ cryptsetup open --type=luks2 --key-file=/tmp/test-repart.dMOfYQ8UUF/empty*** test-repart-11882
+ mkdir /tmp/test-repart.dMOfYQ8UUF/mount
+ mount -t ext4 /dev/mapper/test-repart-11882 /tmp/test-repart.dMOfYQ8UUF/mount
+ diff -r /tmp/test-repart.dMOfYQ8UUF/mount/def /tmp/test-repart.dMOfYQ8UUF/definitions
+ umount /tmp/test-repart.dMOfYQ8UUF/mount
+ cryptsetup close test-repart-11882
Device test-repart-11882 is still in use.
+ rm -rf /tmp/test-repart.dMOfYQ8UUF
2021-04-11 23:50:31 +09:00
Luca Boccassi
3f66ded568 scsi_id: use read_line instead of fgets
LGTM warns about it:

"Call to fgets() is potentially dangerous. Use read_line() instead."
2021-04-11 15:45:06 +01:00
Yu Watanabe
37b7a716d3
Merge pull request #19164 from mmatsuya/main
tmpfiles: use a entry in hashmap as ItemArray in read_config_file()
2021-04-11 16:46:25 +09:00
Luca Boccassi
a7b7cab66d mkosi.arch: add rsync build dependency
Program rsync found: NO

man/meson.build:187:0: ERROR: Program 'rsync' not found
2021-04-10 22:22:08 +02:00
Oleg Popov
b204bdd4cc Extend characters set for PKCS11 URI
There are tokens with dots (and other symbols) in PKCS11 URI:

pkcs11:model=Rutoken%20ECP;manufacturer=Aktiv%20Co.;serial=3xxxxxxb;token=livelace
pkcs11:model=PRO;manufacturer=Aladdin%20R.D.;serial=CC62FB25;token=val%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00;id=%33%32%31%30%33%61%36%37%36%65%32%34%35%62%32%31;type=private
2021-04-10 20:24:18 +01:00
Yu Watanabe
5c078687dc network: refuse to configure NDISC twice 2021-04-10 20:16:11 +01:00
Lennart Poettering
1065501406 resolved: add RFC 8375 "home.arpa" to list of default NTA
RFC 8375 introduced "home.arpa" as special TLD for home networks. Let's
hence add it to our default list of NTAs.
2021-04-10 20:14:57 +01:00