1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-02 09:47:03 +03:00

63703 Commits

Author SHA1 Message Date
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
Yu Watanabe
b859991a8b 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)
2024-09-11 15:10:37 +02:00
Yu Watanabe
675c5775f9 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)
2024-09-11 15:10:37 +02:00
Mike Yuan
6dadc4e1fa 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)
2024-09-11 15:10:37 +02:00
Daan De Meyer
3adfd9f411 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)
2024-09-11 15:10:37 +02:00
Ronan Pigott
f37f685be6 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)
2024-09-11 15:10:37 +02:00
Alyssa Ross
30fdceafa3 bootctl: don't load etc/machine-info from cwd
arg_root defaults to null, so if --root isn't given, this would try reading
etc/machine-info from the current working directory, which is likely to fail.

Fixes: 77db9ef2ab ("boot: Make sure we take --root into account everywhere.")
(cherry picked from commit 0452779b0054f5c2724b745b1db33bba1ac8e677)
(cherry picked from commit 8d7eef9ee5ead7c7b47b2ad4418529ac5cf17bb3)
(cherry picked from commit a573fd18483ea3e14cef1a7c7d1c6b825dce0df5)
(cherry picked from commit 0b6faf92a2022b5a58b2df139c95fd104be324d3)
2024-09-11 15:10:37 +02:00
Raphaël Mélotte
4e088c3ad5 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)
2024-09-11 15:10:37 +02:00
Daan De Meyer
8bc9741422 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)
2024-09-11 15:10:37 +02:00
Daan De Meyer
ff09fe5b27 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)
2024-09-11 15:10:37 +02:00
Daan De Meyer
35628ef46b 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)
2024-09-11 15:10:37 +02:00
Luca Boccassi
b93fd73575 mkosi: work around jammy's debootstrap issue
testing/sid is merged-usr via base-files now, so debootstrap fails.
Update the option on the fly.

(cherry picked from commit 7ca567cdc15f910adc39d95e69e66921bd43ed29)
2024-09-11 15:10:37 +02:00
Yu Watanabe
65bcac1198 test: remove temporary directory for test-ukify on success
(cherry picked from commit e9a5b4a10eaa10fd43c69d148d57c7f4d8e10a4f)
(cherry picked from commit 8e9af7b18ac5f2adf64b5f9bdc9c4df67ec5d721)
(cherry picked from commit bfe84a55f4e8e1c069e971b566fd53242310bb87)
(cherry picked from commit a2a7968701a4ed5e35bcd9ee2b2b0473ec949773)
v253.24
2024-08-19 20:22:44 +02:00
Thorsten Scherer
3630195780 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)
2024-08-19 20:22:44 +02:00
Daan De Meyer
778f622380 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)
2024-08-19 20:22:44 +02:00
Ivan Shapovalov
468144c1f5 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)
2024-08-19 20:22:44 +02:00
Yu Watanabe
5159b7af61 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)
2024-08-19 20:22:44 +02:00
Cristian Rodríguez
a26459885d 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)
2024-08-19 20:22:44 +02:00
Nick Rosbrook
f2c2b65ba7 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)
2024-08-19 20:22:44 +02:00
Yu Watanabe
bc255767a7 journal: comment the default value in journald.conf
(cherry picked from commit 0d113f8e70243c1a8f0587105195e51e027a4725)
(cherry picked from commit 8d5806b1e22798d8ee18b889af47568f5fccf3ed)
(cherry picked from commit 5ee15b924edf1c43ccabf47c489936173ced0249)
(cherry picked from commit 459fdc1c34e15d9ffe22e289e1ec3adf3bf6573c)
2024-08-19 20:22:44 +02:00
Yu Watanabe
643780a559 resolve: refuse invalid service without type field
Fixes Fixes #33935.

(cherry picked from commit b48ab08732a76b7337628e1e716f11c687000903)
(cherry picked from commit 0195db6e919e80bdd6b4b706ebc24d5e935f5422)
(cherry picked from commit 7b1bb6e0bc5608e5d14964faf302242827387583)
(cherry picked from commit bafd8fcb364ebb655671ccb3cb7ca1dbe1259e74)
2024-08-19 20:22:44 +02:00
Luca Boccassi
d62a0aaf0c base-filesystem: do not attempt to create a /lib64 -> /usr/lib/<tuple> symlink
In multi-arch distributions (debian and derivatives) multiarch tuples under
/usr/lib are used, such as /usr/lib/x86_64-linux-gnu/ but the /lib64 symlink
should never point there, it should always point to /usr/lib64, as that's
how they are set up by distribution-specific tools.

https://packages.debian.org/bookworm/amd64/libc6-i386/filelist
https://packages.debian.org/bookworm/mipsel/libc6-mips64/filelist
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L295
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L517
http://bugs.debian.org/1076491

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

(cherry picked from commit b75c13731ee0867a8d7889348fc8da1869af7551)
(cherry picked from commit 38caeac7680b3f7a81b741336f57f9b56d040297)
(cherry picked from commit b2738ee8155a826e3812253f5672ac8acaa5aa8c)
(cherry picked from commit 3b1f76da88453a2c3e94fa351b45ecab619d717f)
2024-08-19 20:22:44 +02:00
Ronan Pigott
b8316a0ca3 resolved: don't treat conn reset as packet loss
tcp reset / icmp port-unreachable are markedly different conditions than
packet loss. It doesn't make much sense to retry in this case. It's
actually not clear if there is any benefit at all retrying tcp
connections, which were presumably already retried as necessary by the
tcp stack.

(cherry picked from commit ddd710a355acc698b48159f3e501dda5a7dc2704)
(cherry picked from commit f5376fea7de173e9369e8af569fc6ecabd0d7282)
(cherry picked from commit 030dbbc39e54666bd0f393ef47f0b0d9b2dfe8b4)
(cherry picked from commit 1b5bc5ab49fccd1e23d6ee6ba5f37d8347156790)
2024-08-19 20:22:44 +02:00
Yu Watanabe
2d261daa16 import: check overflow
Fixes CID#1548022 and CID#1548075.

(cherry picked from commit f7012a93a7f04fa29c7933a4963aa17fcf120e97)
(cherry picked from commit 11c15905cd4759b89a1da63d05772c1f7c3744a4)
(cherry picked from commit a920cc9b3a8fc8b9ee57fa5c4a30d9234eb7a819)
(cherry picked from commit ff17a1023e2715ee5f54cc741b47e1eb1c444f35)
2024-08-19 20:22:44 +02:00
Yu Watanabe
9d9458a00e network: request non-NULL SSID when a wlan interface is configured as station
To avoid conflicts with user .network file for the wlan interface with Bond=.
See https://github.com/systemd/systemd/issues/19832#issuecomment-857661200.

(cherry picked from commit e2becab08506d8a085f4c18231c7f354db16df9f)
(cherry picked from commit ad861b6ae6ee9660912f03f73f771c98f426753c)
(cherry picked from commit 2a182ae521331fc71cf5aabc20bf0e8f0b38ae42)
(cherry picked from commit d00860118d9fa6787ed4f35cbde047c819548c12)
2024-08-19 20:22:44 +02:00
Luca Boccassi
f94e0a3a6b efi: fix link to legacy EFI handover protocol
(cherry picked from commit 4d6ab7e8440845301c90211beb22015e7232faa1)
(cherry picked from commit c12c122e2ad3668848ffff69913006d420bda41d)
(cherry picked from commit 407ac39dd8c3ac41c7c9c6f2f9c8307cd60b5ce9)
(cherry picked from commit 2fa6dd17940b9f49d30d1be99f4f03ec99e9e000)
2024-08-19 20:22:44 +02:00
Yu Watanabe
5d28f089ab network: call link_handle_bound_by_list() before trying to reconfigure interface
Otherwise, when an interface gained its carrier, the interface may not
have matching .network file yet, then link_reconfigure_impl() returns
zero, and link_handle_bound_by_list() is skipped.

Fixes #33837.

(cherry picked from commit 36b8ad085c6902631ad7054bffbda33d6d168823)
(cherry picked from commit 0d98178abb5ea470d03d05680e58ff0e59fe69bd)
(cherry picked from commit 84c4a44f17b0cd68ba5f2ee0342a5a32299a3d62)
(cherry picked from commit 4efaf9dc9af9631e8d83ac7c3efa491f8567cdf7)
2024-08-19 20:22:44 +02:00
Yu Watanabe
bb8b029b3b network: do not bring down bound interfaces immediately
Even if a timespan specified to IgnoreCarrierLoss= for an interface,
when the carrier of the interface lost, bound interfaces might be bring
down immediately.

Let's also postpone bringing down bound interfaces with the specified
timespan.

(cherry picked from commit e8eaed0240d642e70c567b08f3593e4cf45a255a)
(cherry picked from commit 9468a6ea47cfb8412875923d09b8a8ae6ee02119)
(cherry picked from commit 80e93a0640e06b9fbe7d7354b4fad8a6ad140140)
(cherry picked from commit f2e34bdb57edbed90bb6eafd3d2d08d5f4e5436f)
2024-08-19 20:22:44 +02:00
Daan De Meyer
c98e7cdedf kernel-install: Try some more initrd variants in 90-loaderentry.install
On CentOS/Fedora, dracut is configured to write the initrd to
/boot/initramfs-$KERNEL_VERSION...img so let's check for that as well
if no initrds were supplied.

(cherry picked from commit b56920e36c5692c0dde701bfb48330653a9c62c9)
(cherry picked from commit 1cb21b2cb194501464c52c1f32ae55f593689cc3)
(cherry picked from commit 22acfc05a72da8d79e907e1a1f34896735e00b22)
(cherry picked from commit 7182b54b8660f2429115cf41dafa321cee7baf27)
2024-08-19 20:22:44 +02:00
Daan De Meyer
02edc3eef5 kernel-install: Only read cmdline from /proc/cmdline when not in container
If we're running from within a container, we're very likely not going
to want to use the kernel command line from /proc/cmdline, so let's add
a check to see if we're running from a container to decide whether we'll
use the kernel command line from /proc/cmdline.

(cherry picked from commit 35c01ec59e0c2e6bd06cb18ca2ff612c6a7ea35d)
(cherry picked from commit c386327fc851863abf4c27076bd368dfc55b83a0)
(cherry picked from commit 0b4d00b28469353df337add92930626744adf06e)
(cherry picked from commit 2b3cc8d4986bfde0b7ea6362f55d13ba060e01b3)
2024-08-19 20:22:44 +02:00
Vladimir Panteleev
ba8c10a195 man: clarify systemd-path variable source
(cherry picked from commit 3f24fa57df552accc2a6f9ab4d36724ba7227eff)
(cherry picked from commit ec3f2c8c8ad86004d6048510382167ee5f1ded61)
(cherry picked from commit 8e0cb57134161105f4eceae321a3ad3e51c60639)
(cherry picked from commit 53493370d24ecaa0b49175c9ab5849a193a5935c)
2024-08-19 20:22:44 +02:00
Vladimir Panteleev
0b5bb2b1da man: improve ManagerEnvironment documentation
- Improve wording for explanation when these variables are inherited

- Clarify that these variables are not placed in the process environment block,
  so /proc/PID/environ cannot be used as a debugging tool

(cherry picked from commit 6c1e0823b04525716d9ee0031a2b6735d3f7dfa4)
(cherry picked from commit 5cf0c45f64079430b0b7c12ad323f238386260b0)
(cherry picked from commit 79f335d0ef2d3c35fdf4c19988c711a3abd31ee0)
(cherry picked from commit bb28a6c0b68a4a9dc2aa33972b3419680d333c05)
2024-08-19 20:22:44 +02:00
Jose Ignacio Tornos Martinez
f410f29020 kernel-install: remove depmod generated file modules.weakdep
The new file, modules.weakdep, generated by depmod to get the weak
dpendencies information can be present
(05828b4a6e),
so remove it like the other similar files.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
(cherry picked from commit eef4cd51f94d837bd0e71512c831634a2902522d)
(cherry picked from commit 0cdec6e1fef4174c0d04aaca195ab56750437535)
(cherry picked from commit ae0c61b4a722a7eacd2cc544798467e209238bf7)
(cherry picked from commit d9abcf946689cf26f531d0faa82c9be114b9cacc)
2024-08-19 20:22:44 +02:00
Yu Watanabe
7ac2395b6b sd-event: change error code -EINVAL -> -EIO
EINVAL should be used when a function is called with an invalid
argument. Here, the signal is not a function argument.

Follow-up for 7a64c5f23efbb51fe4f1229c1a8aed6dd858a0a9.

(cherry picked from commit ab9af70edb23f2a66e93e2e16f87cd98873885b7)
(cherry picked from commit 84f0eda3781f49ff7f3035861b02fe247b89d65e)
(cherry picked from commit da81ee2f78526f78b3c57661a59de681d208e35e)
(cherry picked from commit 42885ab01726b5937390704f1d6ec33f0321fd53)
2024-08-19 20:22:44 +02:00
David Tardon
e681d161fb sd-event: do not assert on invalid signal
The signalfd_siginfo struct is received from outside via a FD, hence
assert() is not appropriate way to check it. Just do a normal runtime
check.

(cherry picked from commit 7a64c5f23efbb51fe4f1229c1a8aed6dd858a0a9)
(cherry picked from commit 7a48ea958bf146a45cb4a3b7ff7aeb5885469196)
(cherry picked from commit 5fa8b5d74aa81e884613ba68c6f765834e6dd02c)
(cherry picked from commit 74fa56ebc3d323bd6cd2315eb8b1057f0ea359a8)
2024-08-19 20:22:44 +02:00
David Tardon
75aefdd9c4 logind-dbus: check auth. for all inhibitor operations
Fixes #33834

(cherry picked from commit 639719e01065c3a2f557d70e4d8088c2ec71c7c6)
(cherry picked from commit b2df49a87b17ba79b6e97d87199ceb1e4cbdb5de)
(cherry picked from commit 76d1f0664cf47b657040343ddb20298b157f2724)
(cherry picked from commit 0d624910a42961f0286229d95acd77cf73f5add0)
2024-08-19 20:22:44 +02:00
Dan Streetman
5a5d5b9c46 basic/bitfield: add bitfield operations
Add macros to manage bits in a bitfield (e.g. uint32_t, uint64_t, etc),
such as setting, clearing, checking bits, and iterating all set bits.

These are similiar to the bitmap operations, but operate on basic types
instead of requiring a Bitmap object.

(cherry picked from commit 33d9beed07b3dab05d07d57e8af13bb19b9e3095)
2024-08-19 20:22:44 +02:00
Mike Yuan
273146fc75 basic/log: do not treat all negative errnos as synthetic
Currently, IS_SYNTHETIC_ERRNO() evaluates to true for all negative errnos,
because of the two's-complement negative value representation.
Subsequently, ERRNO= is not logged for most of our own code.
Let's fix this, by formatting all synthetic errnos as positive.
Then, treat all negative values as non-synthetic.

While at it, mark the evaluation order explicitly, and remove
unneeded comment.

Fixes #33800

(cherry picked from commit 268f58076f7e0258dce75f521d08199092279853)
(cherry picked from commit 4ad6b2631d73a574859a62d33715a7bdef810bcf)
(cherry picked from commit 1fc7e3473c2fec27bdc0b19753e4ea84cd39644f)
(cherry picked from commit 9463b376bcbb1a177bf46d64845b52eae79af739)
2024-08-19 20:22:44 +02:00
Luca Boccassi
4990aaa954 hwdb: update to main@{2024-07-24}
git restore -s origin/main hwdb.d/ test/hwdb.d

(cherry picked from commit b731debea9221ca43edc49f85be23db2fde79492)
(cherry picked from commit 6c260ee0349c8ee169ac57d14f4effe366f19383)
(cherry picked from commit 4c3f4584cc7d11c9575377a8948bcbedaf698440)
v253.23
2024-07-25 09:16:58 +01:00
vdovhanych
0fcee2c4de add udev rules for trezor hw wallet devices
(cherry picked from commit 2cf425ec573b8f67025c5e74cd267015129e7349)
(cherry picked from commit a78a52465298e8f5a927da9c9fc56c41837018aa)
(cherry picked from commit e8fe599736d70fbaf553940ea99360575637408b)
(cherry picked from commit f3eff7a838128dc690683aa94b9e1fbea3924bae)
2024-07-25 09:16:58 +01:00
Mike Yuan
69985ea680 core: reliably check if varlink socket has been deserialized
Follow-up for 6906c028e83b77b35eaaf87b27d0fe5c6e1984b7

The mentioned commit uses access() to check if varlink socket
already exists in the filesystem, but that isn't sufficient.

> Varlink sockets are not serialized until v252, so upgrading from
> v251 or older means we will not listen anymore on the varlink sockets.
>
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074789
> for more details as this was found when updating from Debian Bullseye to a new version.

After this commit, the set up of varlink_server is effectively
split into two steps. manager_varlink_init_system(), which is
called after deserialization, would no longer skip listening
even if Manager.varlink_server is in place, but actually
check if we're listening on desired sockets.
Then, manager_deserialize() can be switched back to using
manager_setup_varlink_server().

Alternative to #33817

Co-authored-by: Luca Boccassi <bluca@debian.org>
(cherry picked from commit d4e5c66ed469c822ca5346c7a445ec1446b1d17f)
(cherry picked from commit b825a8be0b7b857a715e982cee861e8ae6995ee8)
(cherry picked from commit 3b3875ead34bdd14b853e9c77565647244263fa0)
(cherry picked from commit e7155d8d0f5a2de02c800f08d949af0a8daa47a2)
2024-07-25 09:16:58 +01:00
Steve Traylen
ef5c7145a1 Document that MemorySwapMax supports % configuration
Certainly on systemd 252 at least a configuration of
```
MemorySwapMax=40%
```
is supported but this was missing from the man page.
Only MemoryMax was documented as supporting a %.

(cherry picked from commit 8af38e5b0475f514141d314088dcf9fffd7edc37)
(cherry picked from commit 766af3f782299a7cbfba24a4333444ac008c17d2)
(cherry picked from commit 69681c222e8198ed7327173eada85cdd7684546d)
(cherry picked from commit 5ff55bc33c7d8c29ed609e7fe1eb4237566c69b0)
2024-07-25 09:16:58 +01:00
Lennart Poettering
62f8196d7f import-creds: when we hit ENOENT on SMBIOS 11 do not even debug log
We'll *always* hit ENEOENT when iterating through SMBIOS type #11
fields, on the last one. it's very confusing to debug log about that,
let's just not do it.

(cherry picked from commit 5202ee42d5da0ae3a6655d2bc959a19d8c347e9d)
(cherry picked from commit 995c702a347d16cfad4605f3982d5278616ea1f8)
(cherry picked from commit f084959002e9efc2c4dccf410fa745b57f51f512)
(cherry picked from commit b5f3e791c34206befe0355e2fb71e954cbcea4e8)
2024-07-25 09:16:58 +01:00
Mauri de Souza Meneguzzo
b9a08c7558 shared: log error when execve fail
If there is an error with the execv call in fork_agent the
program exits without any meaningful log message. Log the
command and errno so the user gets more information about
the failure.

Fixes: #33418

Signed-off-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
(cherry picked from commit a408d4453145621902b9a3ef78a552f83b09bd8d)
(cherry picked from commit 7fcfb73d71ed1d4230f58de1a94790e0c28719ea)
(cherry picked from commit 76fe6ebee84c22c96f1c9a96707c7e72706989fd)
(cherry picked from commit 084b91100c8a139514382a0f2a6bb2beaa811963)
2024-07-25 09:16:58 +01:00
Lucas Werkmeister
7b09e915e3 man: Mention Type=oneshot timeout directive
Make the warning for oneshot services (where RuntimeMaxSec= has no
effect) more actionable by pointing to the directive people can use
instead to effectively limit their runtime.

(cherry picked from commit 8c4aa0f1c6a78b35712fa6a7acf6d755d0c0bd86)
(cherry picked from commit 468b0646342986c6cc9bd797b4ba189dc488ee8d)
(cherry picked from commit 017d7fd49085e8f877cfa2510f251b9a6b59f207)
(cherry picked from commit a7e6ebc98418bc28f30f89588127e6dbce526156)
2024-07-25 09:16:58 +01:00
Lennart Poettering
9988e0921f sd-device: remove debug log message when dirs are missing
This is a common case, and nothing noteworthy at all. For example, if we
establish an enumerator for listing all devices tagged by some tag, then
the per-tag dir is not going to exist if there are currently no devices
tagged that way, but that's a really common case, and doesn't really
deserve any mention, not even at debug level.

(cherry picked from commit a68c97a54527cacaeeac0c117493639fc455ef5e)
(cherry picked from commit 8aa9e60f89f84a90fb364ee66cf62432a6b877ba)
(cherry picked from commit a321caf0583cc70cf1ba66bdc41d07175ccc1f2a)
(cherry picked from commit 32a32002c77a66499786b2f23e2aab9b21ed9a60)
2024-07-25 09:16:58 +01:00