Commit Graph
80829 Commits
Author SHA1 Message Date
Beniamino Galvani ec65c29e51 network: fix handling of routing policy rule fwmask
The firewall mask should be applied even if the mark is 0, to allow defining a
value of e.g. 0/255.

Fixes #36973
2025-04-17 09:18:54 +09:00
MaxHearnden 49ff90c70d resolve: query the parent zone for DS records
RFC 4035 Section 4.2 requires that missing DS records are queried for in
the parent zone rather than the child zone, the old behaviour could
cause subdomains under home.arpa (RFC 8375) to fail validation.

This commit assumes that QDCOUNT = 1 as per RFC 9619

Fixes https://github.com/systemd/systemd/issues/19496
2025-04-17 03:24:11 +09:00
Yu Watanabe 76cb6f535e network/netdev: hash_ops related cleanups (#37119) 2025-04-17 03:22:36 +09:00
Yu Watanabe 86aa7cb4b8 network/macsec: use hash_ops with destructor 2025-04-16 23:29:45 +09:00
Yu Watanabe c64c71fbe5 network/macsec: replace security_association_init() with structured initializer 2025-04-16 23:29:45 +09:00
Yu Watanabe 2af1f13c6f network/wireguard: use hash_ops with destructor for managing WireguardPeer 2025-04-16 23:29:45 +09:00
Yu Watanabe 643f1c1306 network/l2tp: use hash_ops with destructor for managing sessions 2025-04-16 23:29:45 +09:00
Daan De Meyer 1a4c2e8807 mkosi: Two improvements (#37155) 2025-04-16 15:12:15 +02:00
Daan De Meyer 52a82bcfc9 mkosi: Reuse main image prepare scripts in subimages
In the subimages we also want to make sure all dependencies of the
systemd packages are cached so reuse the same prepare scripts from
the main image to do that.

We only want required dependencies in the subimages, not recommended
or suggested dependendencies, so add an environment variable
$SYSTEMD_REQUIRED_DEPS_ONLY which the prepare scripts can check for
and enable it for the subimages.
2025-04-16 14:37:58 +02:00
Daan De Meyer 0ac6fc2917 mkosi: Make sure coreutils is installed in initrd/exitrd
This is already installed but Fedora/CentOS systems are nudged towards
installing coreutils-single which then later causes issues when we try
to install coreutils as a dependency of systemd so let's make sure we
pick coreutils from the beginning.
2025-04-16 14:21:45 +02:00
Lennart Poettering bbeeea4362 bootctl: replace --no-variables by --variables=BOOL
I think the current behaviour of not doing EFI variables when we are run
in a container makes a ton of sense, but in some cases it's useful to
do EFI var setup even when a set of namespaces is set up for us, for
example to recover a hosed installation from a rescue disk.

While we are at it, let's remove some duplicate checks, and
systematically output information why we skip various operations.

Fixes: #36174 #35005
2025-04-16 13:39:12 +02:00
Daan De Meyer 53628612b7 elf2efi: Add back python 3.7 compat
The walrus operator was introduced in python 3.9 so using it
accidentally bumped the minimum python version to 3.9 from 3.7 and
bluca still cares about keeping this working on 3.8 so let's remove
the usage of the walrus operator.

Follow up for d6a29eee2b
2025-04-16 13:06:27 +02:00
Yu Watanabe ef79411c31 use hashmap_dump_sorted() and friends at more several places (#37150) 2025-04-16 19:20:19 +09:00
Lennart Poettering 3d3d8f1dd2 update TODO 2025-04-16 10:48:31 +02:00
Yu Watanabe f477751b10 docs: fix mkosi section for Environment= setting 2025-04-16 08:30:25 +09:00
Yu Watanabe 667fc1d993 conf-files: use hashmap_dump_sorted() at one more place 2025-04-16 08:17:52 +09:00
Yu Watanabe dcf1c14b95 resolve: use set_dump_sorted() at one more place 2025-04-16 08:16:21 +09:00
Yu Watanabe a0fa3f1616 resolve: fix memleak
Follow-up for 5c274555c3.
2025-04-15 23:34:49 +01:00
Luca Boccassi 86cfbfae97 xattr: fix assert that breaks importctl (#37146)
getxattr_at_malloc() calls getxattr_pinned_internal() with size 0 to get
the size of the xattr, and then asserts because n > 0
```
Assertion '(size_t) n <= size' failed at src/basic/xattr-util.c:107, function getxattr_pinned_internal().
```

Follow-up for b8df25dcfe
2025-04-16 06:44:24 +09:00
Yu Watanabe 8a05dbb31a core: remove cgroup v1 properties (#37026) 2025-04-16 06:22:46 +09:00
Yu Watanabe b2b270e1d1 cgroup-setup: use path_join() to get path to cgroup attribute
We already have the path to the cgroup. Hence, it is not necessary to
call cg_get_path() again.
2025-04-16 03:56:04 +09:00
Yu Watanabe 188286eec6 cgroup-setup: drop unnecessary controller argument
This also removes unnecessary cg_{create,attach,trim}_everywhere(),
and rename cg_enable_everywhere() -> cg_enable().
2025-04-16 03:56:04 +09:00
Yu Watanabe c35a585763 cgroup-setup: drop cgroup v1 support 2025-04-16 03:56:04 +09:00
Yu Watanabe 3988e2489a core: drop several more cgroup version check 2025-04-16 03:56:04 +09:00
Yu Watanabe 3fcb98cbff core/bpf-foreign: drop unnecessary check for cgroup v1 2025-04-16 03:56:04 +09:00
Yu Watanabe ff7f99db30 core/bpf-devices: drop cgroup v1 support 2025-04-16 03:55:00 +09:00
Yu Watanabe 4ee64e4365 core/cgroup: drop cgroup v1 specific code in unit_update_cgroup() 2025-04-16 03:42:11 +09:00
Yu Watanabe 35f88201f2 core/cgroup: drop unnecessary cgroup version check in several getters
After 2b61489e5a, these checks are not
necessary anymore.
2025-04-16 03:25:46 +09:00
Yu Watanabe 0818300288 core/cgroup: drop unnecessary _unified_ modifier from function names 2025-04-16 03:25:45 +09:00
Yu Watanabe f1c5534eb6 core/cgroup: remove logic of CGroup v1 attribute assignment 2025-04-16 03:19:16 +09:00
Yu Watanabe a7b06f6c30 core/cgroup: remove unused legacy parameters in CGroupContext 2025-04-15 22:34:22 +09:00
Yu Watanabe 3e316a6699 core/cgroup: remove CGroup v1 settings in dump message 2025-04-15 22:34:22 +09:00
Yu Watanabe 5da476ac77 bus-unit-util: refuse setting CGroup v1 properties through DBus 2025-04-15 22:34:22 +09:00
Yu Watanabe db6986e02c core: deprecate CGroup v1 DBus properties 2025-04-15 22:34:22 +09:00
Yu Watanabe 98d64ff500 core: remove deprecated CGroup v1 settings 2025-04-15 22:34:22 +09:00
Yu Watanabe 051675ea80 test: replace deprecated CGroup v1 settings with v2 ones 2025-04-15 22:34:22 +09:00
Yu Watanabe 5d902cc21f journal: hash_ops related cleanups (#37115) 2025-04-15 22:32:15 +09:00
Yu Watanabe 9fdb01ed66 resolve: hash_ops related cleanups (#37116) 2025-04-15 22:31:57 +09:00
Yu Watanabe 7a7a9bbed3 network-tools: hash_ops related cleanups (#37118) 2025-04-15 22:31:40 +09:00
Yu Watanabe 3cb9ac88a0 journal: drop old kernels support (#37137)
This drops several codes for supporting old kernels.
Also, this cleanups code a bit.
2025-04-15 22:30:51 +09:00
Luca Boccassi bd9c55ebe2 import/export: add support for zstd 2025-04-15 12:21:30 +01:00
Yu Watanabe 7566bbc5cb journal/kmsg: drop old kernels (<3.6) support
The flags field was added by kernel v3.6:
https://github.com/torvalds/linux/commit/d39f3d77c9b1fe7cc33a14beb4a4849af0a4ac22

Now our baseline on the kernel is v5.4, so we can assume there exists
the flags field after the monotonic timestamp.

This also adds several short comments.
2025-04-15 06:19:07 +09:00
Yu Watanabe 9ec1e87bf3 journal/kmsg: modernize server_open_dev_kmsg()
Let's assign fd and event source only on success.
2025-04-15 06:18:52 +09:00
Yu Watanabe 117aa1cab4 journal/kmsg: drop Server.dev_kmsg_readable flag and use Server.read_kmsg
When /dev/kmsg is opened, the two flags have the same value.

This also adds an assertion in server_read_dev_kmsg().
2025-04-15 06:17:22 +09:00
Yu Watanabe da741d9fd9 journal/kmsg: drop support old kernels (<3.5) without reading /dev/kmsg support
/dev/kmsg is readable since kernel v3.5:
https://github.com/torvalds/linux/commit/e11fea92e13fb91c50bacca799a6131c81929986

Now our baseline on the kernel is v5.4. Let's assume /dev/kmsg is always
readable.
2025-04-15 05:22:28 +09:00
Yu Watanabe d127423ce6 journal: remove old kernels (<3.2) support in monitoring hostname
Similar to cc983fc9dc.
2025-04-15 04:24:12 +09:00
Yu Watanabe b01f00e9c5 test: drop error conditions for old kernels (<3.2)
Now our baseline on the kernel is 5.4.
2025-04-15 03:41:40 +09:00
Yu Watanabe d50cfa98aa tree-wide: IFA_FLAGS is supported since kernel v3.14
Now our baseline on the kernel is v5.4.
Let's unconditionally use the IFA_FLAGS attribute, and drop the getter
and setter for the deprecated header element.

Continuation of 29c2d4e158.
2025-04-15 03:41:16 +09:00
Yu Watanabe 6dbf2c1beb sd-netlink,sd-device: drop old kernels (<4.2) support
NETLINK_LIST_MEMBERSHIPS is supported since kernel v4.2, specifically
https://github.com/torvalds/linux/commit/b42be38b2778eda2237fc759e55e3b698b05b315

Our baseline on the kernel is v5.4. Let's drop unnecessary conditions.
2025-04-15 03:40:40 +09:00
Yu Watanabe d3d375a686 udev-builtin-net_id: drop old kernels (<4.20) support
Since kernel v4.20, specifically since
https://github.com/torvalds/linux/commit/9b8b2a323008aedd39a8debb861b825707f01420
IP-over-Infiniband driver also uses dev_port.

As our baseline on the kernel is v5.4. Let's remove the fallback code.
For more details about the fallback, see
https://github.com/systemd/systemd/pull/10082#issuecomment-421416461
2025-04-15 03:40:14 +09:00