1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
Commit Graph

55093 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
0c62d52fe6
Merge pull request #21691 from yuwata/network-route-prefix-length
network: route: several tiny cleanups
2021-12-09 09:24:36 +01:00
Yu Watanabe
ab8a8a4e77 libsystemd-network: ignore -ENETDOWN or friends in recv()
And this makes most errors in io events ignored.
2021-12-09 09:10:51 +01:00
Yu Watanabe
d2d602f4b4 network: refuse empty or numeric route table names 2021-12-09 09:06:41 +01:00
Yu Watanabe
283f7c9872 doc: fix typo 2021-12-09 08:50:19 +01:00
Yu Watanabe
72fa19239d network: route: mask lower bits of destination or source prefix
Let's gracefully handle user's misconfiguration, e.g.
Destination=192.168.0.1/24
2021-12-09 07:02:59 +09:00
Yu Watanabe
e944711fba network: json: add src address when its prefix length is non-zero
This should not change anything. Just for consistency with
route_set_netlink_message(), which sets RTA_SRC attribute when prefix
length is non-zero.
2021-12-09 07:02:29 +09:00
Yu Watanabe
7cf0ed03f2 network: route: show prefix length of the source in debugging logs
Similar fix to b489d6a26e.
2021-12-09 06:52:01 +09:00
Дамјан Георгиевски
12caf72716 bootctl: optionally install .signed efi file
if /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed exists
install that instead of /usr/lib/systemd/boot/efi/systemd-bootx64.efi

the idea is that SecureBoot tooling can create the efi.signed file
whenever /usr/lib/systemd/boot/efi/systemd-bootx64.efi from the package
is updated.
2021-12-08 22:21:34 +01:00
Yu Watanabe
0264c60d44
Merge pull request #21686 from yuwata/network-wlan-fix-reconfigure
network: do not reconfigure wireless interface when previously not connected to any APs
2021-12-09 05:57:12 +09:00
Daan De Meyer
8097f80500
Merge pull request #21637 from nabijaczleweli/EBA
kernel-install: export BOOT_ROOT instead of hacking it in hooks, note KERNEL_INSTALL_* ABI
2021-12-08 20:15:38 +00:00
Yu Watanabe
c923992c5c
Merge pull request #21678 from keszybz/sysusers-work
Make it easier to figure out what sysusers is doing and why
2021-12-09 04:35:50 +09:00
Yu Watanabe
d9910948eb network: do not reconfigure wireless interface when previously not connected to any APs
Follow-up for 6706ce2fd2.

Fixes #21685.
2021-12-09 03:04:24 +09:00
Yu Watanabe
da94e4ddf5 network: wifi: ssid may be NULL
This fixes the following log message:
systemd-networkd[888]: wlan0: nl80211: received new_interface(7) message: iftype=station, ssid=(null)
2021-12-09 02:43:29 +09:00
Luca Boccassi
c65a0cf62f
Merge pull request #21667 from yuwata/resolve-do-not-re-read-settings-from-networkd-when-unmodified
resolve: do not re-read settings from networkd when link state file is unmodified
2021-12-08 13:28:15 +00:00
Daan De Meyer
ecfa85e9e1 docs: Clarify that the fd store is discarded when a service is stopped 2021-12-08 13:27:28 +00:00
Frantisek Sumsal
52e4ac691e
Merge pull request #21676 from keszybz/rename-variables-to-make-codeql-happy
Rename variables to make codeql happy
2021-12-08 13:24:17 +00:00
наб
a96fc72dbf journal: succes[s]fully typo
As found by fossies codespell:
https://fossies.org/linux/test/systemd-main.bb916f3.211208.tar.gz/codespell.html
2021-12-08 13:23:56 +00:00
наб
b51e71b2d2
kernel-install: note $KERNEL_INSTALL_{MACHINE_ID,BOOT_ROOT}= ABI 2021-12-08 13:44:27 +01:00
наб
9e82a74cb0
kernel-install: export $BOOT_ROOT and use it in downstreams
The previous approach, to strip "$MACHINE_ID/$KERNEL_VERSION" from the
end, is pretty bad and encourages this for users, which makes them
inflexible to this being modified locally
2021-12-08 13:43:19 +01:00
Frantisek Sumsal
efea45f19c ci: ignore FIXME alerts in the CodeQL Action
We already track them in LGTM and it unnecessarily clutters the Security
page.
2021-12-08 12:42:28 +00:00
Zbigniew Jędrzejewski-Szmek
5374bc7cb4 sysusers: raise level of message about UID/GID being already used
It can be quite important that a different value was used, so let's
log this by default.
2021-12-08 11:47:29 +01:00
Zbigniew Jędrzejewski-Szmek
9a5af4b7ac sysusers: improve message about conflicting entries
Without any markup, the sentence could be quite confusing:
g user 55
g user 56
→
"Two or more conflicting lines for user configured"
It also wasn't clear which line is ignored.

Inspired by https://github.com/systemd/systemd/pull/21156.
2021-12-08 11:47:15 +01:00
Zbigniew Jędrzejewski-Szmek
64fe10957b sysusers: add --dry-run 2021-12-08 11:46:33 +01:00
Zbigniew Jędrzejewski-Szmek
98167876a0 sysusers: use ordered_hashmap_isempty() 2021-12-08 11:46:33 +01:00
Yu Watanabe
bb916f350a network: call link_check_ready() when all stacked netdevs are created
Follow-up for 879377cad5.

Otherwise, the underlying interface may stuck in configuring state.
2021-12-08 18:40:13 +09:00
Yu Watanabe
214db8eb5d resolve: do not re-read settings from networkd if link state file is unmodified
If many interface creation/deletion occurs continuously, then resolved
becomes easily busy. Let's slightly optimize the event triggered by
sd-network.
2021-12-08 18:34:08 +09:00
Yu Watanabe
8e0bacab6e sd-network: introduce sd_network_link_get_stat() 2021-12-08 18:34:04 +09:00
Yu Watanabe
f4af5f0010 sd-network: drop unnecessary +1 for buffer size 2021-12-08 18:33:35 +09:00
Daan De Meyer
9872fe44cb
Merge pull request #21527 from vcaputo/journal-file-mfd-centric
journal-file: get rid of JournalFile.mmap
2021-12-08 09:26:53 +00:00
Zbigniew Jędrzejewski-Szmek
3f316701d7 sysusers: use uppercase UID/GID consistently in messages 2021-12-08 10:19:53 +01:00
Zbigniew Jędrzejewski-Szmek
874e525de4 test-dhcp-option: inline iterator variable declarations 2021-12-08 10:13:50 +01:00
Zbigniew Jędrzejewski-Szmek
1a735f9b22 test-exec-util: rename variable to avoid global/local name conflict 2021-12-08 10:13:50 +01:00
Zbigniew Jędrzejewski-Szmek
74e2e54896 test-dhcp-option: rename variable to avoid global/local name conflict
CodeQL was complaining that the local variable obscurs the global
one. It is indeed a bit confusing when reading this… Let's rename
the variable to avoid confusing the reader.
2021-12-08 10:13:44 +01:00
Zbigniew Jędrzejewski-Szmek
21c7bc1dad gitignore: remove patterns for build files in source dir
Those made sense when autotoolz were used. With meson, everything
should land in the build dir, and this is only likely to obscure issues
with custom build rules.
C.f. https://github.com/systemd/systemd/pull/20429#issuecomment-988132332
2021-12-08 09:52:31 +01:00
наб
dcd9d196a4 kernel-install: respect $MACHINE_ID and ignore /etc/machine-id if on tmpfs
Confer https://github.com/systemd/systemd/pull/19006#issuecomment-800234022:
  On some systems it's the admin's explicit choice not to to have the
  machine ID leak into the ESP
  On some systems the machine ID is transient, generated at every boot,
  and hence should not be written to the ESP
2021-12-08 09:34:02 +01:00
Yu Watanabe
733caba389
Merge pull request #21672 from yuwata/network-old-kernel-support
network: old kernel support
2021-12-08 10:11:20 +09:00
Zbigniew Jędrzejewski-Szmek
e7bd34cd64 meson: drop libgcrypt dep from resolved tests
Follow-up for pull request #21170.

I hoped that we would drop libgcrypt fully and drop all references to the
library in meson, but this doesn't seem feasible (because of the use in
sd-journal). But let's remove it here, all the resolved code has been switched
to work either of the two libraries.
2021-12-08 01:00:56 +00:00
Yu Watanabe
990d0aa980 dhcp: fix assertion failure
Fixes #21671.
2021-12-08 08:52:33 +09:00
Vito Caputo
74fb5be62d journal-file: require MMapCache* for journal_file_open()
Previously the MMapCache* was optionally NULL, which open would
handle by creating a new MMapCache* for the occasion.

This produced some slightly circuitous refcount-handling code in
the function, as well as arguably creating opportunities for
weirdness where an MMapCache* was intended to be supplied but
happened to be NULL, which this magic would then paper over.

In any case, this was basically only being utilized by tests,
apparently just to avoid having to create an MMapCache.  So
update the relevant tests to supply an MMapCache and make
journal_file_open() treat a NULL MMapCache* as fatal w/assert.
2021-12-07 14:39:20 -08:00
Vito Caputo
333d067262 mmap-cache: add MMapCache trivial cleanup helpers
Enable _cleanup_(mmap_cache_unrefp) style cleanup for MMapCache*
2021-12-07 14:16:28 -08:00
Vito Caputo
a8da63309c journal-file: goodbye JournalFile.mmap
This gets rid of the manual MMapCache ref/unref goop in
journal_file_{open,close}(), in favor of just letting the
JournalFile.cache_fd MMapFileDescriptor carry the baton.
2021-12-07 13:03:34 -08:00
Vito Caputo
8b4fbbb0a1 journal: stop using JournalFile.mmap everywhere
Preparatory commit; before JournalFile can stop hanging onto its
copy of MMapCache, all these users need to find another way.

Most of the time these callers already have the MMapCache onhand,
so it's no big deal for them to just supply it.

journal_file_rotate() in particular needed to change, and it
seemed wise to not use the mmap_cache_fd_cache() accessor on
f->cache_fd, instead requiring the caller supply the cache to
use.  This was done with an eye towards a potential future where
the journal_file_archive() isolates the cache_fd to a private
cache, which the newly rotated-to file wouldn't be allowed to
use.  It's no biggie for the existing callers to just provide the
appropriate surviving cache.

Basically the mmap_cache_fd_cache() accessor was added just for
journal-verify.c's (ab)use of the mmap-cache.  Which, if the
ugly singleton MMapCache assumption ever goes away, can be
cleaned up to simply use a separate MMapCache for those search
arrays.
2021-12-07 13:00:25 -08:00
Vito Caputo
176bf8b827 mmap-cache: add MMapFileDescriptor.cache accessor
Sometimes we want to reuse an existing MMapFileDescriptor's
cache, but it's a private struct.

This lets us access that pointer if necessary.
2021-12-07 12:42:19 -08:00
Vito Caputo
fd9ac6c307 mmap-cache: ref/unref MMapCache in fd add/free
Preparatory commit; callers manually ref/unref MMapCaches
alongside MMapFileDescriptor add/frees, when the latter should be
sufficient.

A subsequent commit will drop some of those manual MMapCache
reference hoop-jumping, leaving the lifecycle bound to
MMapFileDescriptors.
2021-12-07 12:42:19 -08:00
Yu Watanabe
8ed68422e1 network: address: read flags from message header when IFA_FLAGS is not supported by kernel
Follow-up for 0828a38605.

Fixes #21670.
2021-12-08 05:40:09 +09:00
Yu Watanabe
f14a6e7f48 network: route: tighten variable scope
Follow-up for 5e82a61375.
2021-12-08 05:39:31 +09:00
Yu Watanabe
73fc85227d sd-network: drop _public_ attribute
sd-network is not public yet.
2021-12-08 03:06:44 +09:00
Zbigniew Jędrzejewski-Szmek
f333ed27fa
Merge pull request #20476 from jamacku/new-feature-reloaded-stamp
core: indicate the time when units were loaded
2021-12-07 18:47:25 +01:00
James Hilliard
d40ce01814 bpf: refactor skeleton generation
This should hopefully fix cross compilation for the bpf programs.
2021-12-07 18:37:17 +01:00
Zbigniew Jędrzejewski-Szmek
d4f8cd4d83
Merge pull request #21625 from yuwata/network-dhcp-6rd
network: dhcp: add 6rd support
2021-12-07 17:26:37 +01:00