Commit Graph
100 Commits
Author SHA1 Message Date
Luca Boccassi 4c7ec40e4e Chores for RC1 (#38300) 2025-07-23 17:54:25 +01:00
Luca Boccassi 467b1c4e4b core: gracefully ignore PrivateBPF=yes if the kernel does not support it (#38238)
Fixes #38225.
2025-07-18 23:36:24 +01:00
Luca Boccassi 0ae3a8d147 Small comment fixes (#38252) 2025-07-17 22:56:28 +01:00
Luca Boccassi 681e45716a analyze: several follow-ups for recent changes (#38253)
Follow-ups for 9a08000d18 (#37838) and
ad6e02e7b4 (#38132).
2025-07-17 20:10:47 +01:00
Luca Boccassi 6235121abf netdev-util: allow setting local address based on dhcp-pd addresses as well (#38211)
This extends the functionality introduced in #21648 to allow using
addresses chosen from a delegated prefix as well as the existing
SLAAC/LL/DHCP functionality.
2025-07-17 14:14:49 +01:00
Luca Boccassi 5b94f463f0 shell-completion: prettify and discard error messages (#38210)
followup of #38182
2025-07-15 09:30:30 +01:00
Luca Boccassi 7ebbe57ece Kill several SysV compat functionalities (v258) (#38178) 2025-07-15 01:21:13 +01:00
Luca Boccassi 9ae2dbf7f4 Two fixlets for coverage test (#38183) 2025-07-14 21:16:36 +01:00
Luca Boccassi d25e515ebc mkosi: enable arm64 job and test fixlets (#38066)
Enable nspawn job, as there's no nested kvm so VMs are too slow. Fix
some tests that fail in a VM anyway, might add a nightly job later that
runs them.
2025-07-05 11:46:30 +01:00
Luca Boccassi b8fe5fa129 Small cleanups for tests (#38063) 2025-07-04 19:24:29 +01:00
Luca Boccassi bfa39a8654 ci: restrict x86-only packages to x86 configs (#38056)
Prepare the ground for non-x86 CI jobs. Still work in progress, but
these preparatory steps work and can be already included.
2025-07-04 01:26:22 +01:00
Luca Boccassi 144ea281f3 sd-event struct typedefs and comments (#37790) 2025-07-03 22:22:40 +01:00
Luca Boccassi 0754db571b openssl-util: allow to build with openssl without UI support (#38041)
This makes it possible to build systemd with
-Dc_args='-DOPENSSL_NO_UI_CONSOLE=1'. Hopefully, now systemd can be
built with other openssl implementations, like BoringSSL, which deos not
support UIs.

Closes #38024.
2025-07-03 22:11:02 +01:00
Luca Boccassi a63f0ea73d test: allow to run test-local-addresses with IPv6 disabled by default, and assume RTA_VIA is always supported (#38039) 2025-07-03 09:58:02 +01:00
Luca Boccassi f00c2ac34a mkosi: update mkosi commit reference to 0d1143150835b21c1bfe64428df5f45b558280b1 (#37977)
* b2fe7ba6b1 Do not use return in finally
* b4f3088535 Ensure directories exist before running sync scripts
* e83e7036b0 mkosi-obs: also allow enrolling additional certs in KEK
* b6432fbc29 initrd: Copy /etc/pki/rpm-gpg into sandbox tree
* 44b96b93c8 Partially revert "resources: add systemd-boot-efi"
* 7a22260179 Check that keys are both in context.cli and history
* 6570b21a4b fix: Remove `erofs-utils` from initrd
* ff61c5022a mkosi-initrd: Add atkbd and i8042 modules to the default
initrd modules
* eaa37f7c6c Generate initrds outside of umask context manager
* de09209520 ci: Drop differential shellcheck
* d07c6b93c9 build(deps): bump github/codeql-action from 3.28.16 to
3.28.18
* 9a12fb1bef Check that commit exists in config_parse_minimum_version()
* 9e5b4f8932 kmod: factor out comparison and also count empty
directories as invalid
* 39ed5ef6c2 apt: support including additional configuration for
reprepro
2025-06-26 17:27:04 +01:00
Luca Boccassi 4cce53b76a Small udpates to TPM2_PCR_MEASUREMENTS page (#37978) 2025-06-26 14:28:03 +01:00
Luca Boccassi f8b598d381 socket-activate: normalize COMMAND notation in help text + man (#37967) 2025-06-25 15:05:24 +01:00
Luca Boccassi ad39648171 network/dhcp6: handle conflict addresses gracefully (#37916) 2025-06-23 22:23:35 +01:00
Luca Boccassi da993edcf7 tpm2: print clear log message in case of dictionary lockout mode (#37894)
Fixes: #32260
2025-06-19 22:55:36 +01:00
Luca Boccassi abe149d669 add parameter to specify hash alg used for PKCS#1 signature in PKCS#7 creation (#37794)
The pkcs7_new() function currently uses the hash algorithm from the X509
certificate's signature, but the content signature may use a different
hash algorithm. This adds a parameter to allow specifying what hash
algorithm the content signature generation used.
2025-06-10 23:07:26 +01:00
Luca Boccassi fe8cdd18d6 docs: small improvements for html man pages menu selector (#37663)
Result is already live at
https://www.freedesktop.org/software/systemd/man
2025-05-30 12:33:48 +01:00
Luca Boccassi f13bc8533c login: receive synthetic events for devices with 'uaccess' tag (#37654)
Fixes #37579.
2025-05-29 15:11:14 +01:00
Luca Boccassi 7a232071d0 Man page fixes (#37645) 2025-05-28 19:15:46 +01:00
Luca Boccassi 5a01c7c5f4 network: fix handling of ENODATA when reading IFLA_MASTER attribute (#37633)
Fixes #37629.
2025-05-28 12:20:00 +01:00
Luca Boccassi 27ffdb6d9e {pidfd,cgroup}-util: avoid alignment warning when accessing f_handle (#37520)
NetworkManager imports some systemd code, which we then build with
`-Wcast-align=strict`. This results in this warning:

```
../src/libnm-systemd-shared/src/basic/pidfd-util.c: In function 'pidfd_get_inode_id':
../src/libnm-systemd-shared/src/basic/pidfd-util.c:255:41: warning: cast increases required alignment of target type [-Wcast-align]
  255 |                                 *ret = *(uint64_t*) fh.file_handle.f_handle;
      |                                         ^
```

Since the address of `f_handle` should always be aligned at the word
boundary (it is preceded by 2 int`s` in `file_handle`), this patch uses
`CAST_ALIGN_PTR()` to avoid this warning.
2025-05-20 14:50:22 +01:00
Luca Boccassi 82d3551fbf repart: add --append-fstab parameter (#37238)
If --generate-fstab=PATH is used, there is the possibility that the
fstab file already exists, making systemd-repart fail.

This commit will add a new --append-fstab= parameter, that will read
the file and merge it with the new generated content.  Using the
comments, the command can separate the automatic-generated section from
the user-provided section, allowing for the next append the replacement
only of the automatic-generated section, keeping the user one.
2025-05-20 14:49:43 +01:00
Luca Boccassi 6946eed3fa core: Also refresh confext extensions when reloading notify-reload service (#33995)
`ExtensionImages=` and `ExtensionDirectories=` now let you specify
vpick-named extensions; however, since they just get set up once when
the service is started, you can't see newer versions without restarting
the service entirely. Here, also reload confext extensions when you
reload a service. This allows you to deploy a new version of some
configuration and have it picked up at reload time without interruption
to your workload.

Right now, we would only reload confext extensions and leave the sysext
ones behind, since it didn't seem prudent to swap out what is likely
program code at reload. This is made possible by only going for the
`SYSTEMD_CONFEXT_HIERARCHIES` overlays (which only contains `/etc`).

This PR:
- Adjusts `service.c` to also refresh extensions when needed. 
- Adds integration tests to check that a confext reload actually
occurred.
- Adds to the `systemd.exec` man pages to document this behavior.

This is a follow up to #24864 and #31364. Thank you to @bluca and
@goenkam for help in getting this up.
2025-05-20 11:27:34 +01:00
Luca Boccassi a49f3c3890 Update hwdb (#37470)
Update hwdb, even though we are pretty far from a release in order to:
- incrementally test upstream additions to hwdb
- allow backports to stable branches
2025-05-15 12:09:03 +01:00
Luca Boccassi ed5c3f4436 core: use socket cookie for naming per-connection service instances + set $SO_COOKIE env var to it (#37469) 2025-05-15 11:11:21 +01:00
Luca Boccassi fa25fece05 Minor docs cleanups (#37439) 2025-05-14 17:16:05 +01:00
Luca Boccassi e7ddaf3bbc udev: Make Storage Tests Stable Again ! (#37262) 2025-04-29 14:37:20 +01:00
Luca Boccassi 30c3e937e3 Update example to F42 and fix invocation with dnf5 (#37250) 2025-04-25 13:35:05 +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
Luca Boccassi 5935d74613 fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/ (#37109) 2025-04-12 23:05:10 +01:00
Luca Boccassi a681435015 busctl: several cleanups for introspect command (#37103) 2025-04-12 11:46:58 +01:00
Luca Boccassi 386b94e6f6 fido2: hook up with plymouth for notifications (#37089)
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-12 01:06:31 +01:00
Luca Boccassi dd85fbf6aa Some cleanups and a CI fix for test-sd-device (#37083) 2025-04-10 14:47:02 +01:00
Luca Boccassi 4dca06cba9 udev: several trivial cleanups (#37059) 2025-04-09 10:32:42 +01:00
Luca Boccassi 442d8c3f06 TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs() (#37039)
Fixes a bug introduced by 46322f2742
(v256).
Fixes #36991.
2025-04-08 09:52:13 +01:00
Luca Boccassi a088ab8d42 udev: fix potential stuck on exit (#37022)
If an event is requeued after termination is requested, previously
systemd-udevd never called sd_event_exit() and stuck.
2025-04-07 23:54:23 +01:00
Luca Boccassi c1b0e39ffd tree-wide: allow building with -Werror=flex-array-member-not-at-end (#36993)
Fixes #36988.
2025-04-04 18:37:54 +01:00
Luca Boccassi 79bc7625f6 test: fix usage of --hostnqn= (#36927)
Fixes #36908.
2025-04-01 14:04:23 +01:00
Luca Boccassi a20c2d6589 test and manpages follow-ups (#36924) 2025-04-01 13:52:14 +01:00
Luca Boccassi fce07bcb7a meson: add feature flag for nspawn build (#36876)
Other tools have it, nspawn doesn't, add one
2025-03-28 13:55:19 +00:00
Luca Boccassi 6561d02ee1 mkosi: Use build image prepare scripts for tools tree as well (#36861)
Instead of listing dependencies manually for the default tools tree,
let's reuse the prepare scripts from the build image. To make this work,
the sync script has to be configured for the tools tree as well so that
it's invoked both when building the tools tree and for the regular
image,
otherwise, when doing the first build in a fresh checkout, the sync
script
won't have executed yet as sync scripts for the regular images are
executed
after building the default tools tree.
2025-03-28 13:31:28 +00:00
Luca Boccassi 3f8431d038 mkosi: update fedora commit reference (#36875)
* 617952132d Run integration testsuite standalone if available
2025-03-28 02:06:06 +00:00
Luca Boccassi 3d9f3420b5 test: update to use the new ASSERT_OK() macro and friends (#36838)
Converted the unitest implemented in src/test/test-watch-pid.c that
still uses assert_se() to use the new ASSERT_OK() macro and friends.
2025-03-26 15:21:55 +00:00
Luca Boccassi 1cc8e4a183 logind: inhibitor fixups (#36817) 2025-03-26 00:22:27 +00:00
Luca Boccassi 1a5f9b2caf tools/check-version-history: avoid DeprecationWarning with newer lxml (#36860)
We get the same warning thousands of times:
/work/src/tools/check-version-history.py:28: FutureWarning: This search
incorrectly ignores the root element, and will be fixed in a future
version. If you rely on the current behaviour, change it to

"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='udev_device_get_properties_list_entry']"

We also need to update the ignorelist to the new form.
2025-03-25 19:34:44 +00:00
Luca Boccassi a372936346 Trivial updates for docs and comments (#36854) 2025-03-25 10:37:42 +00:00
Luca Boccassi 5aee5bda1a tree-wide: introduce LOG_ITEM() macro for verifying format string (#36780)
This introduce `LOG_ITEM()` macro that checks format strings in
log_struct() and friends.

Hopefully, this silences false-positive warnings by Coverity.
2025-03-24 12:58:14 +00:00
Luca Boccassi 2e3efb1884 some dbus property fixes (#36830) 2025-03-22 15:54:16 +00:00
Luca Boccassi 3d278519fa build: add C23 support (#35085)
To support C23, this introduces UTF8() macro to define UTF-8 literals,
as C23 changed char8_t from char to unsigned char.
This also makes pointer signedness warning critical, and updates C
standards table for tests.
2025-03-17 11:29:33 +00:00
Luca Boccassi 32f66088de several fixes for Coverity (#36753) 2025-03-15 11:46:14 +00:00
Luca Boccassi d9208ff9a4 keyutil: support adding content into PKCS#7 signature (#36663)
Support including the data that was signed inside the PKCS#7 signature.
This creates a self-contained file where the signature of the data can
be verified without any other information, since the file contains the
data, signature, and certificate (which contains the public key used for
the signing).

One use case of this is IPE which requires a PKCS#7 signature that is
not "detached", i.e. includes the IPE configuration that has been
signed.

This also slightly adjusts the test case to use the x509 certificate
inside the PKCS#7 signature instead of supplying it externally during
verification.
2025-03-08 01:42:20 +00:00
Luca Boccassi ab943600e9 load-fragment: Fix config_parse_namespace_flags() for DelegateNamespaces= (#36633)
Boolean values have to be handled separately for RestrictNamespaces=
because
they get stored in a field with reverse meaning (which namespaces are
retained),
so let's check which field we're parsing and set the proper value
accordingly.
2025-03-07 11:58:13 +00:00
Luca Boccassi cb26206f2f hostnamectl: show image info in hostnamectl (#36638)
On image-based systems these properties are quite fundamental, hence
show them in the hostnamed output.
2025-03-06 22:36:20 +00:00
Luca Boccassi 383df6ff06 test-async: Wait for asynchronous_sync() to finish (#36611)
Otherwise, if the system is busy, TEST-02-UNITTESTS will fail as
systemd will time out trying to kill the transient unit that we're
running test-async in.
2025-03-05 12:36:45 +00:00
Luca Boccassi 7eb1cd2f0c Ukify tweaks (#36389) 2025-03-05 11:26:47 +00:00
Luca Boccassi c76920e7a9 nspawn: add hotkey for rebooting/powering off container (#36583) 2025-03-05 01:55:11 +00:00
Luca Boccassi 6321ec2dfa packit: Switch to meson.version for the current version (#36509) 2025-02-25 21:07:56 +00:00
Luca Boccassi dad055ee52 Coding style followups (#36476) 2025-02-21 21:58:54 +00:00
Luca Boccassi 48ae15816b exec-invoke: Use FORK_DETACH when forking off pid namespace child (#36446)
This ensures the child process is immediately re-parented to the
manager process which avoids a "Supervising process xxx which is
not our child. We'll most likely not notice when it exits." warning
which can currently happen if the parent systemd-executor parent
process sends the pid namespace child process pidref to the manager
process and the manager process dispatches the child process pidref
before the systemd-executor parent process exits, since at that point
the pid namespace child process's parent will still be the
systemd-executor parent process and not the manager process.
2025-02-21 00:27:17 +00:00
Luca Boccassi 5dbc4f37c5 tree-wide: tweaks to mount point inode creation (#36308)
Some love for make_mount_point_inode_from_xyz() and ports PID 1 over to
it for mount units.

Alternative to #36290
2025-02-19 22:09:52 +00:00
Luca Boccassi 4225242149 repart: add parameter to attach offline verity signature (#36405)
Add --join-signature=hash:sig - when a verity signature partition
has been deferred in a previous run, this allows attaching a signature
that was created offline, for example on a build system like OBS where
the private key is not available to the build process.

Can be specified multiple times, the right partition to act upon will
be selected by matching the data+verity partitions UUIDs with the
provided roothash(es)
2025-02-19 18:12:19 +00:00
Luca Boccassi 7b0403bef9 network: drop old kernel support (#36402) 2025-02-18 22:39:36 +00:00
Luca Boccassi 1f1b403d03 journal-remote: several follow-ups for compression support, and trivial cleanups (#36334)
Follow-ups for cfaf78001c (#34822).
2025-02-16 14:33:47 +00:00
Luca Boccassi 21d36ef770 mkosi: Fix mkosi.clangd (#36387)
- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.
2025-02-14 20:02:45 +00:00
Luca Boccassi 1585237b6a varlink idl fixes (#36376) 2025-02-13 21:16:04 +00:00
Luca Boccassi 382e8a03ca network: allow to configure routing policy rule even if requesting interface is not activated yet (#36257)
Fixes a regression caused by 4f8b153d90
(v257).
Fixes #36244.
2025-02-07 22:56:36 +00:00
Luca Boccassi 3477e9bd45 ukify: add --pcrsig and --join-pcrsig arguments to append offline signature (#36181)
Add a build parameter to take an existing UKI and attach a .pcrsig
section
to it. This allows one to create a UKI with a .pcrpkey section with
--policy-digest to get the json output from sd-measure, sign the digest
offline, and attach the .pcrsig section with the signature later.
2025-02-07 17:14:45 +00:00
Luca Boccassi e678a46f51 homectl: fix typos in help text (#36279)
I noticed two small typos while reading the help text for homectl.  
The `-P` option is described as "Same as
--enforce-password-**password**=no" when the option's name is
`--enforce-password-policy`.
While checking the man page to check if the typo was also there, i
noticed another typo where `--enforce-password-policy=no` has 3 dashes
instead of 2 in the description for `-P`.
2025-02-05 19:54:08 +00:00
Luca Boccassi 2ee81b556f network/route: improve Gateway=_dhcp4 handling (#36183)
- Also configures route to the gateway and prefix route in the specified
table, if necessary.
- Also set preferred source address of the route.

Closes #36168.
2025-02-05 12:19:01 +00:00
Luca Boccassi 515ab90e4d cryptenroll/repart/creds: no longer default to binding against literal PCR 7 (#36200)
PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.
2025-01-30 14:57:15 +00:00
Luca Boccassi c4c3eb03fd Minor fixes for ukify tests (#36197) 2025-01-28 18:49:42 +00:00
Luca Boccassi 103bf54e2c wait-online: add initial support for waiting for DNS (#34640)
Add a new flag, `--dns`, to systemd-networkd-wait-online to allow
waiting for DNS to be configured. The `--dns` flag respects the `--ipv4`
and `--ipv6` flags, as well as `--interface=` and `--any`.
2025-01-28 17:33:39 +00:00
Luca Boccassi 126f545a01 resolved: do not disable mdns/llmnr globally if it's enabled on any link (#36158)
Fixes a regression caused by 2976730a4d.
Fixes #36078.
Fixes #36126.

Replaces #36153.
Replaces #36156.
2025-01-25 10:49:44 +00:00
Luca Boccassi 338813351e udev-dump: also show written sysfs attributes and sysctl entries (#36091)
Split-out of #35968.
2025-01-22 20:56:31 +00:00
Luca Boccassi 60ca3caec6 OBS: switch to new top-level namespace (#36121)
https://build.opensuse.org/project/show/system:systemd
2025-01-22 20:50:44 +00:00
Luca Boccassi f6a04dc149 ukify: print debug/progress messages to stderr and pass through --json to systemd-measure (#36081) 2025-01-20 21:34:59 +00:00
Luca Boccassi 27c947ec3d tree-wide: switch various uses of mkdtemp() over to mkdtemp_malloc() (#36057) 2025-01-17 19:49:49 +00:00
Luca Boccassi 861d0c081a tree-wide: drop references to CentoS/RHEL 7 and 8 (#35881) 2025-01-06 18:38:05 +00:00
Luca Boccassi a712dd45ff Two fmf fixes (#35879) 2025-01-06 18:05:44 +00:00
Luca Boccassi 807db92ab4 sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname() (#35863)
Devices under /sys/firmware/ do not have subsystems. Hence, the
validation in sd_device_new_from_subsystem_sysname() ->
device_new_from_path_join() always failed.

Fixes a bug introduced by cd7c71154c
(v257).
Fixes #35861.
2025-01-06 11:06:23 +00:00
Luca Boccassi 021b51a72b Two doc updates (#35810) 2025-01-02 16:04:00 +00:00
Luca Boccassi f1f0230cf0 bash-completion/journalctl: list user units when --user is already specified (#35799)
Also, escape the current input before matching listed user units.

Fixes #35794.
2025-01-02 11:20:31 +00:00
Luca Boccassi 1737bc0c1e mkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)
The commit history of
[src.opensuse.org](https://src.opensuse.org/pool/systemd/src/branch/devel)
has been reset again to 2015 (both branches, factory and devel)... this
is unusable for now. I'd suggest switching to the github mirror of
code.opensuse.org, maintained since 2019 (at least github is not down
that often and the commit history does not change).
2024-12-30 18:42:29 +00:00
Luca Boccassi 4db0252c7f mkosi: update opensuse spec repo commit 2024-12-26 13:35:29 +00:00
Luca Boccassi 34fcd36388 tree-wide: add missing header for glibc < 2.34 (#35756)
`unistd.h` gets into the dependency tree via
`/usr/include/bits/sigstksz.h`, which was added with glibc-2.34.
2024-12-26 12:24:26 +00:00
Luca Boccassi 0f67cb3606 Minor fixes in man pages, example scripts, error log (#35683)
No functional changes.
2024-12-19 17:08:13 +00:00
Luca Boccassi c5f95bc19b udev: move several definitions (#35613) 2024-12-14 16:32:02 +00:00
Luca Boccassi d68c8888c2 TEST-07-PID1: fixlets for running with sanitizers (#35616)
Hopefully fixes #35546.
2024-12-14 12:21:45 +00:00
Luca Boccassi 764c91ed12 semaphore: bump timeout (#35610)
When semaphore is overloaded tests can take more than 1hr, bump timeout
and reinstate some removed tests
2024-12-14 00:21:39 +00:00
Luca Boccassi ed803ee195 journalctl: make --setup-keys honor --output=json and --quiet (#35507)
Closes #35503.
Closes #35504.
2024-12-13 13:40:09 +00:00
Luca Boccassi 6dfd290031 core: Add PrivateUsers=full (#35183)
Recently, PrivateUsers=identity was added to support mapping the first
65536 UIDs/GIDs from parent to the child namespace and mapping the other
UID/GIDs to the nobody user.

However, there are use cases where users have UIDs/GIDs > 65536 and need
to do a similar identity mapping. Moreover, in some of those cases,
users want a full identity mapping from 0 -> UID_MAX.

To support this, we add PrivateUsers=full that does identity mapping for
all available UID/GIDs.

Note to differentiate ourselves from the init user namespace, we need to
set up the uid_map/gid_map like:
```
0 0 1
1 1 UINT32_MAX - 1
```

as the init user namedspace uses `0 0 UINT32_MAX` and some applications
- like systemd itself - determine if its a non-init user namespace based
on uid_map/gid_map files.

Note systemd will remove this heuristic in running_in_userns() in
version 258 (https://github.com/systemd/systemd/pull/35382) and uses
namespace inode. But some users may be running a container image with
older systemd < 258 so we keep this hack until version 259 for version
N-1 compatibility.

In addition to mapping the whole UID/GID space, we also set
/proc/pid/setgroups to "allow". While we usually set "deny" to avoid
security issues with dropping supplementary groups
(https://lwn.net/Articles/626665/), this ends up breaking dbus-broker
when running /sbin/init in full OS containers.

Fixes: #35168
Fixes: #35425
2024-12-13 12:25:13 +00:00
Luca Boccassi 9fdf10604b core: fix loading verity settings for MountImages= (#35577)
The MountEntry logic was refactored to store the verity
settings, and updated for ExtensionImages=, but not for
MountImages=.

Follow-up for a1a40297db
2024-12-12 13:06:07 +00:00
Luca Boccassi fc35981fda network: several cleanups (#35267) 2024-12-12 12:47:23 +00:00
Luca Boccassi 184ce19841 gpt-auto: take timeout opts in rootflags= into account; hibernate-resume: always respect user-defined timeout (#35518) 2024-12-12 11:01:40 +00:00
Luca Boccassi 47859053ba Export two more functions, and update symbol tests (#35578)
Prompted by #35554.
Continuation of #35555.
2024-12-12 10:39:29 +00:00
Luca Boccassi d1ecd61176 Fix unit tests in unprivileged docker container (#35556) 2024-12-11 16:28:30 +00:00