1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-22 22:03:43 +03:00

63748 Commits

Author SHA1 Message Date
Yu Watanabe
d3843cb4aa TEST-60-MOUNT-RATELIMIT: wait for mount unit being started or stopped
(cherry picked from commit c5928a768417b298eb2741107fa7492e93d637fc)
(cherry picked from commit 3b171cb7bc6d84381f8ac27722503b103745cd2b)
(cherry picked from commit ee80f6b05ce022a2803f9bcd31c81b28bbb5992b)
(cherry picked from commit 7a64921bc27f054c169d743ef0aa22d669e4e45d)
2024-11-16 10:30:57 +00:00
Luca Boccassi
9bb135904b Fix maybe-uninitialized warnings with gcc 14.2
../src/resolve/resolved-bus.c: In function ‘call_link_method’:
../src/resolve/resolved-bus.c:1769:16: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
 1769 |         return handler(message, l, error);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1755:15: note: ‘l’ was declared here
 1755 |         Link *l;
      |               ^
../src/resolve/resolved-bus.c: In function ‘bus_method_get_link’:
../src/resolve/resolved-bus.c:1828:13: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
 1828 |         p = link_bus_path(l);
      |             ^~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1816:15: note: ‘l’ was declared here
 1816 |         Link *l;
      |               ^

(cherry picked from commit 5f911aca8434b4163514019fcb4c1c967a50617c)
(cherry picked from commit 2590b77f39f7c1264b686e0b379465f5670631d3)
(cherry picked from commit 4c9509ad0c57a88370be9e938e3e130a3398e4c5)
(cherry picked from commit 7d275f119c21bb2db8b35b34743898f4c908c7fa)
2024-11-16 10:30:57 +00:00
Yu Watanabe
42d89850de journalctl: erase verify key before free
Even optarg is erased, copied string was not erased.
Let's erase the copied key for safety.

(cherry picked from commit d0ad4e88d4e6b5e312c359a6505125f7e088f3e3)
(cherry picked from commit 28f7c958fb799887cb67528a85ca59f0ccd9261e)
(cherry picked from commit 6b13398c220a01e2eff5bb25da7d457f445c82e9)
(cherry picked from commit b115781317b6a8c649ae2b92c7839ce8872fdffb)
2024-11-16 10:30:57 +00:00
Yu Watanabe
abd0c2def6 TEST-19-CGROUP: add test cases for IPAddressAllow=/IPAddressDeny=
(cherry picked from commit 5f3cfb9d5ee334c53cc407308ba677401a6ba1cd)
(cherry picked from commit 04bf8544baa3ef4c675e610f35dd44f2ea60382e)
(cherry picked from commit 41ebd133657cbf83b202fe132ea96c0ae2906fc8)
(cherry picked from commit 481f29f7fa7cf44548da063c74a3c2c5f6088658)
2024-11-16 10:30:57 +00:00
Yu Watanabe
b434c13273 core/cgroup: fix IPAddressAllow=/IPAddressDeny= set through DBus
Fixes a regression caused by 84ebe6f01381c21b88e37e856956c9c9ee6781d6 (v250).
Fixes #34773.

(cherry picked from commit 77bbd9f1bd2b01bcb2a49ed42c6dc06613532bcf)
(cherry picked from commit a94b2c39f94e7af82a56c52941cc1c6aeaf2318f)
(cherry picked from commit 71fca73f70c96fb9c7573d73d6eae2c5fccd1d56)
(cherry picked from commit 556f0549d317e2ea4342fc684d89ce354e42d66d)
2024-11-16 10:30:57 +00:00
Yu Watanabe
831c6a1fe0 network/dhcp6: set hostname even if UseAddress=no
Follow-up for f963f8953daeab03b892616ce0c65f7572932187 and
1536b7b2d00819615bf8eba194de7ccd20c3689f.

(cherry picked from commit 8fead9c9e46e5f71ae6f6b038ff7f72c5a13b663)
(cherry picked from commit 30cf66855b6e31e7de2bff6d79d5c2d9fc17d684)
(cherry picked from commit f4189fdd1de998703feb9ca221b700fdaee5cd31)
(cherry picked from commit 51ed671255ed2313e17869e01b9bb7fa587a1ea1)
2024-11-16 10:30:57 +00:00
Gaël PORTAY
51ac5cfc05 docs: add a missing : character
This adds the missing colon character to the section systemd-sysusers.

(cherry picked from commit 8ef5ea2bf6d8c9ef12b00ab3838b9af81e30bf5d)
(cherry picked from commit 6a288cd999090661461be74f24fd29cb90da1f3f)
(cherry picked from commit a2c6d50b6480e150e8df110178e98d1888395067)
(cherry picked from commit 4b21746e2110cd1875f9a7278a7aa2ce36ab3519)
2024-11-16 10:30:57 +00:00
Lennart Poettering
18002c8364 man: document preference for secure_getenv() in coding style
(cherry picked from commit c9b477415a6293b74df67c8118bafb0ef8662819)
(cherry picked from commit 1f0d68c6e9dc7cc9bd14f47d03eec10389e2c845)
(cherry picked from commit 833a89efc70c56fd7a143369efaf33212bb06021)
(cherry picked from commit 6bb1aba7533bab897107811ef1d789cacdfc0c91)
2024-11-16 10:30:57 +00:00
Daan De Meyer
388630c5a9 systemd-update-helper: Show executed commands if debug logging is enabled
(cherry picked from commit 8b8668b9e71837cb541cd432bc37e4c9405e49cd)
(cherry picked from commit c7762098ec09c2626204c9580c91295414137bba)
(cherry picked from commit b095673440f3c0ab434475cf539aff018e7f5e20)
(cherry picked from commit d1bc81ba33996c8881ec0716c1ea22bde329bbc8)
2024-11-16 10:30:57 +00:00
Lennart Poettering
6feda43612 seccomp: allowlist uretprobe() syscall
This is a new syscall provided by the kernel used to implement faster
uprobes. It's not supposed to be called by userspace, but only by kernel
generated uprobe code.

It should be fine to allow this, as the kernel authenticates the
invocation itself, and we shouldn't break compat with things.

Note that this allowlisting is not sufficient to make ureprobe() work.
libseccomp must be tought the syscall too, but this can happen
independently.

Fixes: #34615
(cherry picked from commit d693c483a2bb3eae490fd78d68fc16d0a731fee2)
(cherry picked from commit 389fbf464907132479cd1d18c7cbee17328f36cf)
(cherry picked from commit 1fd57ca01c180fd77b626e0f091762ecd1e2736c)
(cherry picked from commit bde6caa9efbffd0e1b8220231a22bdb59c9b78f4)
2024-11-16 10:30:57 +00:00
Lennart Poettering
a73de752a4 meson: sort includes
(cherry picked from commit 882032faaf9e2d2524936e82ccc770903d4c38d6)
(cherry picked from commit c14a47547d040c4976f20388f5535ed655bbd035)
(cherry picked from commit 40ea469735cb869c98c9bd3e651a25b74cade631)
(cherry picked from commit 9d7f1c6bc1579bb067b6077e4488024e97cc989b)
2024-11-16 10:30:57 +00:00
Lennart Poettering
b6b898c9a7 man: reword comment a bit regarding ExecStartPre= multiple commands
The documentation claimed that ExecStartPre=/ExecStartPost= accepts
multiple command lines, in contrast to ExecStart=. This is half an
untruth, because ExecStart= allows that too – as long as Type=oneshot is
set.

Hence, reword this a bit, and do not emphasize the contrast.

Prompted by: #34570

(cherry picked from commit c3069a6bfb454a0e02607ad21b5badf9847fe11a)
(cherry picked from commit ff667d8c2ef7ed2378fb1de39e1bcc2af2197d0e)
(cherry picked from commit d0063ca6949c2b3dfad3e233f5ac10df928d6b12)
(cherry picked from commit 4e2337232959e431217b860f2a27599d74e9eb40)
2024-11-16 10:30:57 +00:00
Chen Guanqiao
39f4a5abbe mount: optimize mountinfo traversal by decoupling device discovery
In mount_load_proc_self_mountinfo(), device_found_node() is synchronously called
during the traversal of mountinfo entries. When there are a large number of
mount points, and the device types are not significantly different, this results
in excessive time consumption during device discovery, causing a performance
bottleneck. This issue is particularly prominent on servers with a large number
of cores in IDC.

This patch decouples device discovery from the mountinfo traversal process,
avoiding redundant device operations. As a result, it significantly improves
performance, especially in environments with numerous mount points.

Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
(cherry picked from commit 00ad3f02275b507a753495ace5e5f84cb38b604d)
(cherry picked from commit 44e1774660fcddcfefcf153cc3c189ea35572d63)
(cherry picked from commit ea35f88ae763b4f99d57c4ec7fd0d3aa6351a352)
(cherry picked from commit 7ed40368310297c2321be0aaf08526b3d390c75b)
2024-11-16 10:30:57 +00:00
David Joaquín Shourabi Porcel
e218821b4c man: machinectl(1): Fix description of subcommand poweroff
(cherry picked from commit a41da1e7037dc36a601d3428343bbc7f0eed3e20)
(cherry picked from commit 697d247e308828e74132305606f73078616f42e2)
(cherry picked from commit 54a43fe71072f649beafe839dfd44b58b348740e)
(cherry picked from commit 4e089fc7ad5eb942a423bba3485167c81d8ce24d)
2024-11-16 10:30:57 +00:00
David Joaquín Shourabi Porcel
333784508d man: systemd-nspawn(1): Fix some typos
(cherry picked from commit f4e3c6e5b318d22a9c40144c6d52ae68a70c264c)
(cherry picked from commit 5a2f94d2dae50fbaa430a96a3096368dfc488380)
(cherry picked from commit 109da92157425ffecd4ef063b74439f611fdb305)
(cherry picked from commit 10808d1efba40252e56d06166554a07f5033a5ab)
2024-11-16 10:30:57 +00:00
Lennart Poettering
62efdf8173 resolved: fix fastopen fallback
We should not invalidate the socket address size before we use it.

Fixes: #34579
(cherry picked from commit 5699e4c2d470a12c922c4b7c86a8987837911626)
(cherry picked from commit 964f7772ad0ff637db80ae0a9e0afb41a40f5b04)
(cherry picked from commit 4dca5688cb4c97f9072fe1c668923b2e56bfdf15)
(cherry picked from commit 969f4f3ea1163a5caa2b22ca05ea68aaed97034b)
2024-11-16 10:30:57 +00:00
Daan De Meyer
caae99a948 core: Bump log level of reexecute request to notice
A daemon-reload is important enough to deserve logging at notice
level.

(cherry picked from commit 4ee41be82507348fbbc9d3ab28aae6330eb51663)
(cherry picked from commit 31e38b55b2e4bb1aa42fe106ea14df8e82758303)
(cherry picked from commit 79dc77a7ffed671a16c44369df2552cf733dbbef)
(cherry picked from commit 50e3bc139fc750c7b15bda55807fcb9209787319)
2024-11-16 10:30:57 +00:00
Luca Boccassi
400261fd55 Revert "logind-dbus: check auth. for all inhibitor operations"
This has been reported to cause a regression.
Fixes https://github.com/systemd/systemd-stable/issues/447

This reverts commit 75aefdd9c4c7cf1f75e6b1e43ab210f879c3b7e1.
v253.26
2024-10-10 10:33:40 +01:00
Luca Boccassi
85cc6a46de test: mask rc.local generator, broken on Jammy
On jammy it started to fail, it's not really needed and we install
an empty stub anyway, so just mask the generator

(cherry picked from commit 565916c245b53b49f5917f5326d21246f46ae3db)
(cherry picked from commit dfb007ffe0a9aa3a1d0f7930131b129fbaa2b3d9)
2024-10-10 10:33:40 +01:00
Frantisek Sumsal
1a20768c9b test: drop removed SCSI passthrough feature
This feature has been deprecated since QEMU 5.0 and finally removed in
QEMU 9.1 [0] which now causes issues when running the storage tests on
latest Arch:

------ testcase_long_sysfs_path: BEGIN ------
...
qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,bus=pci_bridge25: Property 'virtio-blk-pci.scsi' not found
E: qemu failed with exit code 1

[0] a271b8d7b2

(cherry picked from commit cd57920fbf6a8f7769a82cfc9bebc12965de0199)
(cherry picked from commit c5baa5d9d9d778aee25b751387c60f43a0a6fb74)
(cherry picked from commit 192a6e99a950c9cbcbe2a79f9045a06a10ca0288)
(cherry picked from commit 1d2451056bc6bb0cfeb9b29504584216967780c5)
2024-10-10 10:33:40 +01:00
Luca Boccassi
7efc3959c9 semaphore: do not build docs
There are other CI runs that build manpages, speed up build which is close to 1hr limit

(cherry picked from commit d58a904d35d3abcb7265b28b14aac596631e27d6)
(cherry picked from commit 966d8a90ca44659123c15e3a7e7d498aa2b50510)
(cherry picked from commit 0c6e525a1f998c37849c04a215e5a68312331272)
(cherry picked from commit ece14d98c2ee8407b319a51405b598e0b0fda054)
2024-10-10 10:33:40 +01:00
Luca Boccassi
e8ced0004f semaphore: stop building and running extra unit tests
This slows down the build, which is often near the 1hr limit. There are
other jobs running the extra unit tests.

(cherry picked from commit 3bc5480bac474263881e4c5919d5cce0debf3c40)
(cherry picked from commit 52afaa8034f59dda44ec181e79604a9a222e60ad)
(cherry picked from commit 3891c50ce67bb4aeda13e099240c684c6dd9ca25)
(cherry picked from commit 0c82cc26af64516f667eb34072dbf9ead3821798)
2024-10-10 10:33:40 +01:00
Luca Boccassi
57572e26f9 Semaphore: switch from /tmp to /var/tmp to avoid disk space issues
Builds have been failing as we run out of space in /tmp/, move to
/var/tmp

(cherry picked from commit 0c7b5dad33ee01b7ff6b7a8c583a7e2c27ac0673)
(cherry picked from commit bc0102b0caacb97041ada0b0dbca40da09eab453)
(cherry picked from commit 82baa27f9d1c5f15906b4aa9b9a40b3d900bec09)
(cherry picked from commit f19a717e989b7e37ccc6d8f51395d9ac856b0158)
2024-10-10 10:33:40 +01:00
Luca Boccassi
2bfe1e1b5c semaphore: remove workaround for adduser
Offending commit has been reverted, so it's no longer necessary:

9016769691

Follow-up for 8b7485c505f1e7a55896069224109adaf10c16b9

(cherry picked from commit 2bbe5ca17866494f5cbead3d7d574262a492aab2)
(cherry picked from commit 030f72f33565a291920a6e5dff6e2be98cc0bf39)
(cherry picked from commit 55ee831d46d8b1ccabab8e80a6f63494b509aca9)
2024-10-10 10:33:40 +01:00
Luca Boccassi
9642f72eee semaphore: move back to autopkgtest master branch
Instead of fixing the commit, we can workaround the adduser issue by
simply creating a user manually beforehand, which means the broken
codepath in autopkgtest is not taken. We can remove it once it's
fixed upstream, which is in progress:

https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/297
(cherry picked from commit 8b7485c505f1e7a55896069224109adaf10c16b9)
(cherry picked from commit 4f4cd7c9f4164a9fcf496ac789e9544579ac6611)
(cherry picked from commit 9b4703992b2b51c8c962f46449f3d717dfab8529)
2024-10-10 10:33:40 +01:00
Luca Boccassi
d737ef1c4f semaphore: speed up build
- avoid stripping debug symbols and creating dbgsym packages
- avoid LTO, slows down build a lot
- avoid compressing packages, they are thrown out immediately after use
- avoid building udeb packages, not needed

(cherry picked from commit 7eedcb4e3ba34487d128abd3c86e0467bbd0bc92)
(cherry picked from commit 81930bc09135a0a27215947d5b27b7d248eeaf1e)
(cherry picked from commit b070eb9598b7c8890d1bbb1cbb7e327d6c4285b2)
2024-10-10 10:33:40 +01:00
Mike Yuan
6c142117e5 various: correct laccess() error check
laccess is our own macro that uses RET_NERRNO.

(cherry picked from commit 7c1dd9e288047a69d4a6a6dd6585725410cfdadd)
(cherry picked from commit 4296a567d48ee43917b4f338fa1e927ffd53b36b)
(cherry picked from commit 9cf6035d14cf292e8e94b25ecacf16a6fbc69f97)
(cherry picked from commit 8770e0900893ed3196b6acb76fa9ac67ed75edc0)
2024-10-10 10:33:40 +01:00
Lukas Nykryn
d3683fffd6 core: warn if a generator is world-writable
... because that is obviously a security risk.

(cherry picked from commit da32cac8a014ddf048fc7bad84dafdbc204d4dc8)
(cherry picked from commit 7ac58949a37db3ddb662908d3aadaf5934fec222)
(cherry picked from commit 3b0731b9d414e08f67f1976e2d400974f470fd3f)
(cherry picked from commit 7c72562c4dd1fd6707aea7615581ff64773651b3)
2024-10-10 10:33:40 +01:00
Yu Watanabe
916fb2dcc8 test: add test case for issue #34637
(cherry picked from commit 88d186e4829bc7ef4a4253fe2bf4857903bca830)
(cherry picked from commit 7b9e412d8aba8f415f35d02da5e5fa5bd92632cc)
(cherry picked from commit d0569c4405841779a89c3bc9594de99ae5ebe3f8)
(cherry picked from commit 42f7d15e0a9ebf08c088e638a3e416dd8af8e90f)
2024-10-10 10:33:40 +01:00
Yu Watanabe
cc2523a53e udev-node: skip stack directory creation for diskseq
The disk/by-diskseq symlink should not be shared with multiple block
devices. Hence, it is not necessary to create stack directory for the
symlink that manages which device owns the symlink.

This is not just a optimization.
If a service unit tries to mount a disk image but the service fails, then
the diskseq of the loop device for the image may be continuously increased
during restart, and inodes in /run may increase rapidly, as the stack
directories are cleaned up only when udev queue is empty.

Fixes #34637.

(cherry picked from commit 09373c1a50297079e6b0447ea97af4e9a60f77fa)
(cherry picked from commit 02a5e5a32338869cc0ac352da81cf6d83da5c9e9)
(cherry picked from commit 54bc0dab04e86ad7f93087e24f5d6148b8f72e9f)
(cherry picked from commit 67216d22ef4d2105d9c66d857cae84e8a4371775)
2024-10-10 10:33:40 +01:00
Daniel Martinez
2641b10e03 Use case insensitive comparison for the machine's architechture
boot loader specification states:

architecture: refers to the architecture this entry is for. The argument
should be an architecture identifier, using the architecture vocabulary
defined by the EFI specification (i.e. IA32, x64, IA64, ARM, AA64, …).
If specified and it does not match the local system architecture this
entry should be hidden. The comparison should be done case-insensitively.

Example: architecture aa64

https://uapi-group.org/specifications/specs/boot_loader_specification/#type-1-boot-loader-entry-keys
(cherry picked from commit f819a516dbbddb16724f33dcef5badcb6fe8b80b)
(cherry picked from commit d65b7426e93e50c470173614c2eaca094f318ab5)
(cherry picked from commit 129c30beb66b1736bfcbb44140cd406b32dc0369)
(cherry picked from commit a4577e361b0d3168cc6f69771963af5fbcfea610)
2024-10-10 10:33:40 +01:00
Michal Koutný
48b38de4e6 test: Add test for per-device cgroup properties
Reported in #34126

(cherry picked from commit 321637743313f896e275fd038996b8cfb5a070b3)
(cherry picked from commit 84cd501ae4d2689ac39e510d1d33b7e3234f5199)
(cherry picked from commit 5184f867e4e6c684da8fe804b366d4fe55e46373)
(cherry picked from commit 43202f551a5602f043eeb65f6a0720ec778a3afa)
2024-10-10 10:33:40 +01:00
Jörg Behrmann
d3ec58670f man: Use proper conjunction and remove superfluous or
(cherry picked from commit 56f32d9e782f8ba43f17cb04687c915a7e41d10e)
(cherry picked from commit 5b5f5666b2fd32950325387a3e0bc0b60f0b1808)
(cherry picked from commit 7cc52eb6e10256c0eaf9b2da6083f9f966ce1eac)
(cherry picked from commit c3bcc2f897d6090d7690c2da39d5bf8cbb752d28)
2024-10-10 10:33:40 +01:00
Luca Boccassi
35263682e8 man: consolidate list of active unit states into a shared table
Avoids the need to maintain the same list over and over again, and
link it to the defition table in the implementation as a reminder
too

(cherry picked from commit 3509fe124d3a4fe2934028f83ae156ade050c8fe)
(cherry picked from commit 1075727f7fe9436d2e468147cf663aaa1be867fd)
(cherry picked from commit 42521e2d2d0b8beb59ed58b9bb3135e58468fcd7)
(cherry picked from commit e644a619bf1f66a3627156f4f4548ea62eae60f9)
2024-10-10 10:33:40 +01:00
Lukas Nykryn
f2fb29f82f man: using WantedBy=default.target is not a good idea
We had several users, that wrote their unit files with
WantedBy=default.target because it should be started "every time".
But for example in Fedora/CentOS/RHEL, this often breaks for
example selinux relabels (where we just want to do a relabel and reboot).

(cherry picked from commit 67b6404b80cf8078f3d9ec6d4c2f34ac25b15077)
(cherry picked from commit adc57cd81c02e5afc8efcbc64eb3a6305a97c62c)
(cherry picked from commit 02447d28887d01bf8f980c16bd80ea40f30ef73a)
(cherry picked from commit 3f7bf5ac5fb1c68ca68be42e02be9bb1da8e0a38)
2024-10-10 10:33:40 +01:00
Daan De Meyer
e9c2bd22b3 tree-wide: Fix Wformat warnings
The latest clang has started catching more integer promotions which
cause us to pass the wrong type to printf() format specifiers so let's
fix those.

(cherry picked from commit c73d14c43e7998ca54011875ad25afc634d57498)
(cherry picked from commit e129e3a8618b1b56f70978cb1db1d66a0fdcd573)
(cherry picked from commit 44e3f1cc351b6097d8a6251bc8bf8468247b98b7)
(cherry picked from commit 7b9f8e99f3d3678b3245b731b6e7e263f7d60736)
2024-10-10 10:33:40 +01:00
Lennart Poettering
5469d511b3 tree-wide: always do dlopen() with RTLD_NOW + RTLD_NODELETE
Let's systematically use RTL_NOW|RLTD_NODELETE as flags passed to
dlopen(), across our codebase.

Various distros build with "-z now" anyway, hence it's weird to specify
RTLD_LAZY trying to override that (which it doesn't). Hence, let's
follow suit, and just do what everybody else does.

Also set RTLD_NODELETE, which is apparently what distros will probably
end up implying sooner or later anyway. Given that for pretty much all
our dlopen() calls we never call dlclose() anyway, let's just set this
everywhere too, to make things systematic.

This way, the flags we use by default match what distros such as fedora
do, there are no surprises, and read-only relocations can be a thing.

Fixes: #34537
(cherry picked from commit bd4beaa2ebfbbec0a1263a7091a91e528ce8cf13)
(cherry picked from commit e012eedd727a38bd18c9a540b92b95aa880d2b42)
(cherry picked from commit 82019cc6913a0901baef4fed6442cee1afb61e6f)
(cherry picked from commit 4d4e8b37a64e6d122bb2d0b0a48659ca122da03a)
2024-10-10 10:33:40 +01:00
Marcel Hellwig
a921cd8df7 Update sd_bus_message_append_array.xml
fix pointer constness in documentation

(cherry picked from commit fec09ff094670a6903b12b1c599b00b39a2b0c88)
(cherry picked from commit 072ea04e26c84ac25419316c659f4d89d8002f34)
(cherry picked from commit a422935fe076c758b4a05dc495944d798b71b938)
(cherry picked from commit add0dca8d386a3c735c24ab53e33402f13bf0783)
2024-10-10 10:33:40 +01:00
Zbigniew Jędrzejewski-Szmek
f4a7ec30a0 systemctl: fix printing of RootImageOptions
The type is a(ss), so a custom printer is required.

Fixes https://github.com/systemd/systemd/issues/33967.

(cherry picked from commit 69c751c61cb2b386afe51f03b58f8f7ceeeb643e)
(cherry picked from commit 28ced52894cf6921d1fe9831f2def29de164e189)
(cherry picked from commit 64d833dfa6bcac6d4c991447bfd63d6bcda1ba6b)
(cherry picked from commit a28e7e93ea21cc8388e03aef6543c092e07550bd)
2024-10-10 10:33:40 +01:00
Daan De Meyer
9787154222 repart: Determine verity sig size based on partition designator
Verity= is an image build concept, not a first boot concept, whereas
a partition designator is always available, so let's do the size stuff
based on that.

(cherry picked from commit e11745d000d7e9b3112bb336735c1bdfa77e9add)
(cherry picked from commit 4143bc70ed7d131cda9f0aa2f86d4aedd38e0fce)
(cherry picked from commit d371cb47251f1a8772cb136056123e5dc583eb65)
(cherry picked from commit d29a4b9e63617d46914c83a4d11633d43c334f83)
2024-10-10 10:33:40 +01:00
Michal Koutný
52ccb2d558 core/cgroup: Apply IODevice*= directives in configured order
Different device paths may resolve to same device node
(lookup_block_device()), e.g.
        IOReadBandwidthMax=/dev/sda1 18879
        IOReadBandwidthMax=/dev/sda2 18878
where both partitions resolve to /dev/sda and when these values are
applied (they are associated with original paths, i.e. as if applied for
different device) in the order from io_device_limits.

The parsing code prepends, so they end up in reverse order wrt config
file. Switch the direction so that the order of application matches the
order of configuration -- i.e. semantics in all other unit file
directives.

Apply same change to all directives that use per-device lists. (The
question whether partitions should be resolved to base device is
independent.)

And apply the changes equally to DBus properties write handlers.

Fixes #34126

(cherry picked from commit 0fa0dfa04465651a18107d503f9967f84bd761d1)
(cherry picked from commit 00dfa7964b5e48a37596207ad8b2862b157cffaf)
(cherry picked from commit f45acd05bec88521bb2f25bbd6c3792a35ad3a87)
(cherry picked from commit 8846e2146a1ecb33f728aeec94867e9c85d51b55)
2024-10-10 10:33:40 +01:00
Daan De Meyer
4eb2cafe22 Add an extra debug log to dissect_image()
(cherry picked from commit 0121b84e41cd187e44c275a23db1a656656ec37f)
(cherry picked from commit efd5e357d7ed6b7def0d12631835efd6a5bf5f5a)
(cherry picked from commit cef973c15d9f089b62f4791e2b2e7a807481aefb)
(cherry picked from commit 8453f775b0d51551bc495d45442b6856cfc10890)
2024-10-10 10:33:40 +01:00
Yu Watanabe
6449cd6417 sd-ipv4acd: fix assertion triggered when an ARP received in STARTED state
When a network is busy, an ARP may be received before the timer event
source triggered first time.

Fixes #34489.

(cherry picked from commit 146b44d0a0001712ced2f22ca76d242eedac26ad)
(cherry picked from commit 06eb9b14829f3a5819f6daefb09fdb855cd868f4)
(cherry picked from commit b054898f12f1987d5c6fae91e664cd7f57f7fdaa)
(cherry picked from commit 8ed0c0bc4899f73934f3fc1c55c5cbb58b789a4d)
2024-10-10 10:33:40 +01:00
Yu Watanabe
232eeb16a5 test: add tests for seccomp_suppress_sync()
(cherry picked from commit c07e10628b6add9ee9664956a28d3f727c9848f8)
(cherry picked from commit 308c93c51f85f1b6a5e6a3def951fa8e5643048d)
(cherry picked from commit 299c64d8c23f5f8e4491526e9fb2d7e48b1e45af)
(cherry picked from commit 0dd69495e10c964322cd8c5a34611df3dabc75b3)
2024-10-10 10:33:40 +01:00
Yu Watanabe
a83ca1a250 seccomp-util: pass negative fds as is to fsync() and friends
Closes #34478.

Co-authored-by: Mike Yuan <me@yhndnzj.com>
(cherry picked from commit 144fbbac235b6b89d5d31795be1cc0dca9852ccc)
(cherry picked from commit 4bbd6f589ad97a0df6ab59e03c8c535d298d05eb)
(cherry picked from commit 04a54264beb34dbdf256c5784a6d62a3e772029e)
(cherry picked from commit c70e6577e1f49c5c7df3146c017e58755825b90e)
2024-10-10 10:33:40 +01:00
Luca Boccassi
7778e248d8 portable: ensure PORTABLE_FORCE_ATTACH works even when there is a leftover unit
Force means force, we skip checks with PID1 for existing units, but
then bail out with EEXIST if the files are actually there. Overwrite
everything instead.

(cherry picked from commit 1e2d1a7202400e08a00782f32804fdc503259806)
(cherry picked from commit 2552348da2c961ac9732614eb129228bba4d51da)
(cherry picked from commit 5ce348ab304b3fab0eeb35fafd0b711aad60ad99)
(cherry picked from commit 7bdcb237518f3801b801d7694c70636985f74d3e)
2024-10-10 10:33:40 +01:00
Luca Boccassi
e31a80da8a hwdb: update to main@{2024-09-10}
git restore -s origin/main hwdb.d/ test/hwdb.d

(cherry picked from commit f13e3a93d7c2c549ff9a83cdbb04c30ab9e46bea)
(cherry picked from commit 799ecea375f38ae339939620ae65e358c9af5e4f)
(cherry picked from commit ea9af9d780b304cad47805a44da005f6d63ffa3b)
v253.25
2024-09-11 15:10:37 +02:00
Yu Watanabe
bf4bc357f4 tree-wide: check if non-empty password is acquired
(cherry picked from commit 204529d0fcde9a95119b489225620f36649c2f5b)
(cherry picked from commit e80e9dce63787d1d4494ed65d7c27018344387d5)
(cherry picked from commit a505f10b4b35b09cab6d4b06a364e52e3982ee55)
(cherry picked from commit 1a628174759c03ad8590b6b35bf3baa75bcc35ba)
2024-09-11 15:10:37 +02:00
Yu Watanabe
339e0b4c31 ask-password: refuse empty password strv
Fixes #34270.

(cherry picked from commit 623a8b1922bdbd2fb06bc5f2c67d3d6930efc58e)
(cherry picked from commit 34881c9d5afdd05e9e6f1824cbea9d1954ea80c0)
(cherry picked from commit 553d5b03bd61f7f52b4e8f99df924878bcf34e1a)
(cherry picked from commit abaef1ab9758800949c4d64fcb40608666e0bbea)
2024-09-11 15:10:37 +02:00
Yu Watanabe
2fa6459cb3 test: add test case for systemd-repart --seed=random
For issue #34257.

(cherry picked from commit 56d6ebd40468e2a743b39ad7d87b0675bdf9a042)
(cherry picked from commit 69282da9aab90c2dc1e440b04af5b2163779515a)
(cherry picked from commit fbfe769c4553b49640733efc82577cf30b02cd94)
(cherry picked from commit 1211e6c7709681dac4d3f93e54166c2b846e8e73)
2024-09-11 15:10:37 +02:00