1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-12 08:58:20 +03:00

62152 Commits

Author SHA1 Message Date
Lennart Poettering
77e86a2702 meson: sort includes
(cherry picked from commit 882032faaf9e2d2524936e82ccc770903d4c38d6)
(cherry picked from commit c14a47547d040c4976f20388f5535ed655bbd035)
(cherry picked from commit 40ea469735cb869c98c9bd3e651a25b74cade631)
(cherry picked from commit 9d7f1c6bc1579bb067b6077e4488024e97cc989b)
(cherry picked from commit a73de752a40ef36d05af928bafcd216c4a7aa65d)
2024-11-16 18:30:43 +00:00
Lennart Poettering
fe1967ad4c 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)
(cherry picked from commit b6b898c9a7ae63f50aa5352c7fe9460ba01187ab)
2024-11-16 18:30:43 +00:00
Chen Guanqiao
e4a412ba8c 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)
(cherry picked from commit 39f4a5abbecb75b53aa7270568e60339e655111c)
2024-11-16 18:30:43 +00:00
David Joaquín Shourabi Porcel
98a78d1473 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)
(cherry picked from commit e218821b4cf74165fe3b9dfff276f9da29c5b318)
2024-11-16 18:30:43 +00:00
David Joaquín Shourabi Porcel
a0b0e8b079 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)
(cherry picked from commit 333784508d8e9de267bc750c629cf1046cc00957)
2024-11-16 18:30:43 +00:00
Lennart Poettering
65b5ba057e 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)
(cherry picked from commit 62efdf81734c6648986c2e8083dd2c99df544fcd)
2024-11-16 18:30:43 +00:00
Luca Boccassi
8c2b72148f 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)
(cherry picked from commit 85cc6a46de1e93294083f86e184b9f1bbafbbff3)
v252.31
2024-10-10 18:34:03 +01:00
Frantisek Sumsal
6070f1ea7a 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)
(cherry picked from commit 1a20768c9b67dcf60312f2094d4d8c90928b9ef4)
2024-10-10 18:34:03 +01:00
Luca Boccassi
6f68f0b14e 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)
(cherry picked from commit 7efc3959c9ebd7dec47e3fb72f34fe6913facc1a)
2024-10-10 18:34:03 +01:00
Luca Boccassi
9dc1f70a67 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)
(cherry picked from commit e8ced0004fb16ea70414c4d60f8b6bade53c0f38)
2024-10-10 18:34:03 +01:00
Luca Boccassi
e7ef63c07a 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)
(cherry picked from commit 57572e26f968fe9d00eda09d99800064ef01f217)
2024-10-10 18:34:03 +01:00
Luca Boccassi
fc689f7d91 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)
(cherry picked from commit 2bfe1e1b5cb1d73a70a64467dd8ecae325928809)
2024-10-10 18:34:03 +01:00
Luca Boccassi
90ee0690e4 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)
(cherry picked from commit 9642f72eee4bbfacbd92a9e80d8dcf7466a9cc9f)
2024-10-10 18:34:03 +01:00
Luca Boccassi
de398a6ee4 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)
(cherry picked from commit d737ef1c4f11439e03e1fe9489a7a63e9b7a9234)
2024-10-10 18:34:03 +01:00
Mike Yuan
544fe85202 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)
(cherry picked from commit 6c142117e5ecd2fe143afaee14c9a0fcbdb85b9b)
2024-10-10 18:34:03 +01:00
Yu Watanabe
ac307521cd 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)
(cherry picked from commit 916fb2dcc8d5696e825e5d5b029b4513f06f8af0)
2024-10-10 18:34:03 +01:00
Yu Watanabe
dc0da55a33 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)
(cherry picked from commit cc2523a53efba1f3825db636812fb2975b4bf1c3)
2024-10-10 18:34:03 +01:00
Daniel Martinez
7ac6ac23f3 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)
(cherry picked from commit 2641b10e03078f97ce94c5eaf391ed73ce152517)
2024-10-10 18:34:03 +01:00
Michal Koutný
358ce368d4 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)
(cherry picked from commit 48b38de4e627cdcb56d933d26837badcffc22036)
2024-10-10 18:34:03 +01:00
Jörg Behrmann
3043269df4 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)
(cherry picked from commit d3ec58670f1ce8bf8177128c3e6412f5f2b47a5f)
2024-10-10 18:34:03 +01:00
Luca Boccassi
f48de00aaf 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)
(cherry picked from commit 35263682e80f271f606bb7dc7c993a50f156aff7)
2024-10-10 18:34:03 +01:00
Lukas Nykryn
5bb02b5e9e 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)
(cherry picked from commit f2fb29f82f016bde04e47a6e580c6fc927914ac9)
2024-10-10 18:34:03 +01:00
Daan De Meyer
18dd6a21c4 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)
(cherry picked from commit e9c2bd22b31898f628869a095cad6df7a5b143ef)
2024-10-10 18:34:03 +01:00
Lennart Poettering
8576833fc8 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)
(cherry picked from commit 5469d511b3e444ed48a1bc20e27808348b1331e1)
2024-10-10 18:34:03 +01:00
Marcel Hellwig
acdb029bca 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)
(cherry picked from commit a921cd8df72ccd775ed25043a0131a25588308aa)
2024-10-10 18:34:03 +01:00
Zbigniew Jędrzejewski-Szmek
2771c46f7c 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)
(cherry picked from commit f4a7ec30a0914de01068f284d7864ab5443cdf40)
2024-10-10 18:34:03 +01:00
Michal Koutný
11fa01ab07 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)
(cherry picked from commit 52ccb2d5581587f4048b0f83df41941df7cdcb19)
2024-10-10 18:34:03 +01:00
Yu Watanabe
0f6f0b41e1 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)
(cherry picked from commit 6449cd6417e6090ec8aeabc9b90b73a870b16cb1)
2024-10-10 18:34:03 +01:00
Yu Watanabe
63b28b7bf1 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)
(cherry picked from commit 232eeb16a5780e6b1129003d091f71d5344fb0a0)
2024-10-10 18:34:03 +01:00
Yu Watanabe
fc8c1f7fc3 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)
(cherry picked from commit a83ca1a25099547c421d926408267553bf14d9a1)
2024-10-10 18:34:03 +01:00
Luca Boccassi
5433c7ec77 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)
(cherry picked from commit 7778e248d8d8e305eb8aa0a63a629f233fcdb5c1)
2024-10-10 18:34:03 +01:00
Luca Boccassi
93c1232af7 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)
(cherry picked from commit e31a80da8a63c7aed48c9e529819ee4dad42cf26)
2024-10-10 18:34:03 +01:00
Yu Watanabe
b268f50e39 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)
(cherry picked from commit 2fa6459cb381b6ed4f0af91631666b7261f24f8f)
2024-10-10 18:34:03 +01:00
Yu Watanabe
648d06616f repart: initialize seed earlier
As the seed is used by context_load_partition_table() -> derive_uuid().

Fixes #34257.

(cherry picked from commit b8a8000aba4620a1d93ac1d04dbb86050d9c5fe8)
(cherry picked from commit f85a4fba330822c44f9b2deb527acecc03bcfed9)
(cherry picked from commit 175dafa27b2eca0c47e2c4137f61ae78e1e5b769)
(cherry picked from commit ed474d3ede9d0582760afd238607983389e708e0)
(cherry picked from commit b859991a8b5a6fac767c61f199b01e44f3277f52)
2024-10-10 18:34:03 +01:00
Yu Watanabe
781710ec17 nspawn: refuse to bind mount device node from host when --private-users= is specified
Also do not chown if a device node is bind-mounted.

Fixes #34243.

(cherry picked from commit efedb6b0f3cff37950112fd37cb750c16d599bc7)
(cherry picked from commit a23591891b9e85107f39d103eabbb5bc9a6ced6f)
(cherry picked from commit bc72d9557cdc0411ce95543238f95d82b5ce4a72)
(cherry picked from commit b431088c81fb37e1e38220213bc9dbf79ffe3239)
(cherry picked from commit 675c5775f9756aba3b59e80ed18e8fe1a92c5827)
2024-10-10 18:34:03 +01:00
Mike Yuan
1fc21724ca audit-util: check correct errno
(cherry picked from commit 190a0953808608b099f9465f9e786e4efe276c26)
(cherry picked from commit c90ae08b0a5f2844504a109f71dcd773c16d8260)
(cherry picked from commit a3872e60aed7ba05c9da967fac65afa7470ff9c9)
(cherry picked from commit 4503a6d9e063c740458351a1f5160394affc1fa9)
(cherry picked from commit 6dadc4e1fa38df9fef8878fbe04abbe31279e600)
2024-10-10 18:34:03 +01:00
Daan De Meyer
cada01df60 repart: Keep existing directory timestamps intact when copying
Otherwise, when merging multiple directory trees, the output becomes
unreproducible as the directory timestamps will be changed to the current
time when copying identical directories from the second tree.

We introduce a new copy flag to achieve this behavior.

(cherry picked from commit d850a544bc1f895decb452160c97a884a20b12b7)
(cherry picked from commit d5640c4f8583de2752a7f4e03006a1fa74942da1)
(cherry picked from commit 7a3b3ad5225811e1a768e3a16cef5a0b6fe3a231)
(cherry picked from commit 87cc4d908f92dd1762f46605030a6c2d5feea688)
(cherry picked from commit 3adfd9f41119add47f3538493df2da760b982de0)
2024-10-10 18:34:03 +01:00
Ronan Pigott
911452f91f resolved: clear the AD bit for bypass packets
When the bypass logic is invoked, such as for queries to the stub with
the DO bit set, be certain to clear the AD bit in the reply before
forwarding it if the answer is not known to be authentic.

(cherry picked from commit 13e15dae9f0b4566d3ea2ed058a5dd44751216da)
(cherry picked from commit 3a2be652282db2d55d5e28546e6c9a594fb8c43e)
(cherry picked from commit 6c243bbb70d994a83518099092ea71d50635ad8b)
(cherry picked from commit edec5cc57513fad7910a50f16d669a99683f22bf)
(cherry picked from commit f37f685be623fab839aca13c8204d89bf4f3f58a)
2024-10-10 18:34:03 +01:00
Raphaël Mélotte
9364961ee0 src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZE
Builds with kernels headers < 4.14 fail with:

../src/shared/loop-util.c: In function ‘loop_configure_fallback’:
../src/shared/loop-util.c:237:31: error: ‘LOOP_SET_BLOCK_SIZE’ undeclared (first use in this function); did you mean ‘LOOP_SET_DIRECT_IO’?
                 if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) c->block_size) < 0)
                               ^~~~~~~~~~~~~~~~~~~
                               LOOP_SET_DIRECT_IO

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

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
(cherry picked from commit 56ab1c54497d9fac74380ff9e11aaf931a917d2b)
(cherry picked from commit 0730ec4f3ecbbb550864ff0dbadeeeb5e271eb50)
(cherry picked from commit ed087e865896521e5965f218ee61e074a0a098d9)
(cherry picked from commit e9e2923bc1054d5910a59089b867bff79018a711)
(cherry picked from commit 4e088c3ad5527f1943b96827505bd45c5cc141a3)
2024-10-10 18:34:03 +01:00
Daan De Meyer
f7a715eeac test-dhcp-server: Gracefully handle the network being down
(cherry picked from commit 4cf7a676af9a79ff418227d8ff488dfca6f243ab)
(cherry picked from commit 2e52cf1df7f4a874331dcf607e0f4329ffb20bcd)
(cherry picked from commit db1d9bf99602c69363de7c8b30e878cca133fcbe)
(cherry picked from commit 244ca2d63ed566c77ab0c0fd726d8b18b003aee9)
(cherry picked from commit 8bc9741422f5a98883fe66ac50aa3c0cbb73594b)
2024-10-10 18:34:03 +01:00
Daan De Meyer
6538150aa1 test: Gracefully handle running within user namespace with single user
Unprivileged users often make themselves root by unsharing a user namespace
and then mapping their current user to root which does not require privileges.
Let's make sure our tests don't fail in such an environment by adding checks
where required to see if we're not running in a user namespace with only a
single user.

(cherry picked from commit ef31767ed7e21672a50b77e7b3935948aaba114c)
(cherry picked from commit ec5cdf9ba0e003de6f824a000c0bbe46fb4e0925)
(cherry picked from commit 4d4513c1fed6140d2d5588fed5f0eddc935439f3)
(cherry picked from commit 1c514e7eee225bc036044ab65689c2d98f3b2d10)
(cherry picked from commit ff09fe5b27cffa86061f3b79936c31af91b97f3b)
2024-10-10 18:34:03 +01:00
Daan De Meyer
750bf7aa73 test-netlink: Gracefully handle the loopback interface being down
(cherry picked from commit d098b8df6e5c1b4c834272dd1397345483116db6)
(cherry picked from commit f6f96b05585ef3b05cef843a2c1cb2c55e77d3ba)
(cherry picked from commit 77ee2a8d72964137d3e162d9d9f656e4266357a2)
(cherry picked from commit 8096e238c8a56793c75ed49bc58977da6c6ed8f2)
(cherry picked from commit 35628ef46b79f55c83e6e687d172bf1e070c980b)
2024-10-10 18:34:03 +01:00
Frantisek Sumsal
8d0d45540c test: tell delv to load anchors from /etc/bind.keys explicitly
Since [0] delv no longer does that automagically, so we have to that
explicitly with each delv invocation.

Resolves: #30477

[0] c144fd2871

(cherry picked from commit 438c7cb20e83a3b88f6accc3e78d3da5e21f6db2)
(cherry picked from commit d62f1bbe31e45059113fcc82957e4c5cb0d7d69e)
(cherry picked from commit e7b9528e3ab9aa98e2b0e18cc7c56295b0cc05a5)
(cherry picked from commit ddef180fc6bf9d6e3aebf8ed6f587c3a788f8231)
2024-10-10 18:34:03 +01:00
Luca Boccassi
3f24e1e7e5 Revert "journal: comment the default value in journald.conf"
Because of how dpkg handles config files, this will cause a prompt to
users on upgrade, which is undesirable for stable updates, so revert it
in v252-stable.

This reverts commit 1970b832e66914c00092630b636043b26ece476f.
2024-08-25 18:31:06 +01:00
Thorsten Scherer
e5aa858d29 repart: Fix misleading typo in GPT partition flag
Bit 60 is the one corresponding to ReadOnly, not 50.  Fix this.

(cherry picked from commit 932cc94436e653d0487c29e0dd44685610cd7bcb)
(cherry picked from commit 2665618555d08fc3877043cac392f1b6573811b7)
(cherry picked from commit f38c19bc695636700d85c5eb689680b017cc29e8)
(cherry picked from commit 5ae6c773e4e6f3e95db8de7d6b4e1a8ff45f7e10)
(cherry picked from commit 3630195780cb4ddd2a9560cfd67c8e6d58b5c231)
v252.30
2024-08-19 22:25:31 +02:00
Daan De Meyer
5f0c1c408c docs: Mention the new mount API in the container interface doc
Let's mention that the new mount API may be used to establish new
mounts in a container without needing the /run/host/incoming directory.

(cherry picked from commit 74cc5e2041a2c32e1824b32316bd95f2c8a811f5)
(cherry picked from commit 65eff444c4fa7be5eb1be71c5d94ab8732167e11)
(cherry picked from commit 53d92de4b4e6bd383abb2c6e96ae63cbe42f7f89)
(cherry picked from commit c12ef9e5dd3663d04158634aa747e959c88cf8df)
(cherry picked from commit 778f622380e2c03e081dcc5eb9711743f9bed2dc)
2024-08-19 22:25:31 +02:00
Ivan Shapovalov
5d5f712849 core/exec-invoke: call setpriority() after sched_setattr()
The nice value is part of struct sched_attr, and consequently invoking
sched_setattr() after setpriority() would clobber the nice value with
the default (as we are not setting it in struct sched_attr).

It would be best to combine both calls, but for now simply invoke
setpriority() after sched_setattr() to make sure Nice= remains effective
when used together with CPUSchedulingPolicy=.

(cherry picked from commit 711a157738b3dcd29a5ebc8f498eb46bfac59652)
(cherry picked from commit b628d4dfa61234d28ffaa648ec09c5e9972f832a)
(cherry picked from commit 4994f15f35c183792afcfc12de91b9074379a09c)
(cherry picked from commit c90ba5eb8cf12d8180efc37ce0db243115f1e2ac)
(cherry picked from commit 468144c1f56d620ba1710bb217c82b228550a62c)
2024-08-19 22:25:31 +02:00
Yu Watanabe
f89c88c13c meson: enable -Wunterminated-string-initialization
With af1a6db58fde8f64edcf7d27e1f3b636c999934c, now we can build with the
option.

(cherry picked from commit f548bc4011bcdab008b125b9d0993817efa00718)
(cherry picked from commit 772549666cf291d85c28d3bfc1ab2b7227422d4f)
(cherry picked from commit da229ea89a9b5e861e978d3787f9cf422be21553)
(cherry picked from commit fbc4335a4ac84645768225107ab0944725db26e2)
(cherry picked from commit 5159b7af6138329da487c6fa4360179625cd3108)
2024-08-19 22:25:31 +02:00
Cristian Rodríguez
d0195392f0 basic|boot: silence Wunterminated-string-initialization gcc15 warnings
gcc15 has -Wunterminated-string-initialization in -Wextra and
warns about string constants that are not null terminated even though
the functions do do out of bounds access.
Silence the warnings by simply not providing an explicit size.

(cherry picked from commit af1a6db58fde8f64edcf7d27e1f3b636c999934c)
(cherry picked from commit ca09bc33e8b2cbc7c410c300b6df5cf3ce437a3b)
(cherry picked from commit f6f0d85135f472eeae58807918311a6fa78596a1)
(cherry picked from commit e49ce1b1a57e9b32bf90ff33a68370f805a0d3bd)
(cherry picked from commit a26459885d34095e03ee4c3dd576a5fda4e549b2)
2024-08-19 22:25:31 +02:00
Nick Rosbrook
4bc72f7db2 sysusers: check if requested group name matches user name in queue
When creating a user, check if the requested group name matches a user
name in the queue. If that matched user name is also going to be a group
name, then use it for the new user too. In other words, allow the
following:

 u foo -
 u bar -:foo

when both foo and bar are new users.

Fixes #33547

(cherry picked from commit 18a8f03e5160ca3828d327d9bbd1b32f26d792a3)
(cherry picked from commit edf52384c2e99cd5af9bcd4ae4b13fd8f79596d3)
(cherry picked from commit 25003a6450810aeb0722ff6fb566f41297595f49)
(cherry picked from commit ed2da0379a0f1414e6246fd3e8cf200cd8127859)
(cherry picked from commit f2c2b65ba76cd9fcf22603a57e9bcb5e8751540f)
2024-08-19 22:25:31 +02:00