Commit Graph

83156 Commits

Author SHA1 Message Date
Luca Boccassi
5ae58ac2b9 test: add a secureboot test with an addon 2025-07-28 23:11:04 +01:00
Luca Boccassi
5ba50a7f2c mkosi: enable secure boot and autoenroll by default
With GHA now fixed, just always enable SB so that we get extra
coverage
2025-07-28 23:11:04 +01:00
Luca Boccassi
b61bff3436 test: preserve ESP when testing bootctl 2025-07-28 23:11:04 +01:00
Luca Boccassi
add7a4a9f2 test: do not fail TEST-70-TPM2 when secure boot is enabled
[  183.037401] TEST-70-TPM2.sh[2876]: + systemd-creds decrypt --name=pcrlock.arch /tmp/fakexbootldr/loader/credentials/pcrlock.arch.cred
[  183.054755] TEST-70-TPM2.sh[3003]: Found container virtualization none.
[  183.083789] TEST-70-TPM2.sh[3003]: Reading EFI variable /sys/firmware/efi/efivars/LoaderTpm2ActivePcrBanks-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
[  183.094377] TEST-70-TPM2.sh[3003]: Detected slow EFI variable read access on LoaderTpm2ActivePcrBanks-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: 55.799ms
[  183.095353] TEST-70-TPM2.sh[3003]: Reading EFI variable /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c.
[  183.099653] TEST-70-TPM2.sh[3003]: Credential uses fixed key for fallback use when TPM2 is absent — but TPM2 is present, and SecureBoot is enabled, refusing.
2025-07-28 23:11:04 +01:00
Luca Boccassi
8631b0f8b9 mkosi: update mkosi commit reference to cb1a3c90490922441548d09b09c7b76426e4bc20
* cb1a3c9049 FirmwareVariables: allow generating during image build
* 6104923534 env: export $EFI_ARCHITECTURE in hook scripts on EFI arches
* fef33f96a2 mkosi-tools: ukify moved to systemd-ukify in openSUSE
* ec4475a846 ensure builds with cache over device boundaries
* 7be5159f24 Change UnifiedKernelImages to enum and accept signed/unsigned
* 071ac4a575 mkosi-vm: install systemd-boot-efi-signed where available
* 1865be628e opensuse: Install OpenSUSE-release if another release package is not installed
* 0381b17819 qemu: Disable hpet for x86 VMs
* 4f63700eb3 mkosi-tools: install systemd-boot-tools for bootctl
* 1230ed333b man: remove duplicate 'the' in FirmwareVariables description
2025-07-28 23:11:04 +01:00
Brett Holman
04abe03189 man: correct the number of active unit states 2025-07-28 20:32:48 +01:00
Yu Watanabe
be876c5933 efi-api: cast before shift
Fixes the following error when running with sanitizers:
```
TEST-87-AUX-UTILS-VM.sh[670]: + bootctl install --make-entry-directory=yes
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/systemd/systemd-bootx64.efi".
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/BOOT/BOOTX64.EFI".
TEST-87-AUX-UTILS-VM.sh[695]: Created "/boot/fedora".
TEST-87-AUX-UTILS-VM.sh[695]: Random seed file /boot/loader/random-seed successfully refreshed (32 bytes).
TEST-87-AUX-UTILS-VM.sh[695]: ../src/shared/efi-api.c:618:38: runtime error: left shift of 243 by 24 places cannot be represented in type 'int'
```
2025-07-28 19:10:26 +01:00
Zbigniew Jędrzejewski-Szmek
9fa08842b7 shell-completion: drop deprecated systemd-efi-options from suggestions 2025-07-28 19:08:50 +01:00
Yu Watanabe
e43efecc8f TEST-23-UNIT-FILE: do not wait indefinitely but set a reasonable timeout
Otherwise, the test does not finish until the global timeout is reached.

This is for making the test fail earlier when something spurious happens:
```
[FAILED] Failed to start TEST-23-UNIT-FILE-short-lived.service - Shortlived Unit.
TEST-23-UNIT-FILE.sh[776]: + '[' 0 -eq 0 ']'
TEST-23-UNIT-FILE.sh[776]: + sleep .5
(snip)
58/98 systemd:integration-tests / TEST-23-UNIT-FILE  TIMEOUT  1800.52s  killed by signal 9 SIGKILL
```
2025-07-28 17:28:13 +01:00
Luca Boccassi
257e941cc1 journal: fix log filtering for syslog message (#38372)
Fixes #38361.
2025-07-28 14:24:14 +01:00
Yu Watanabe
ab56a96194 TEST-87-AUX-UTILS-VM: make coredumps stored in archived journal file
Fixes the following race:
```
TEST-87-AUX-UTILS-VM.sh[839]: + coredumpctl -1
TEST-87-AUX-UTILS-VM.sh[1169]: TIME                        PID UID GID SIG     COREFILE EXE             SIZE
TEST-87-AUX-UTILS-VM.sh[1169]: Sun 2025-07-27 23:22:02 UTC 885   0   0 SIGABRT present  /tmp/test-dump 19.9K
TEST-87-AUX-UTILS-VM.sh[839]: + coredumpctl -n 1
TEST-87-AUX-UTILS-VM.sh[1172]: Journal file /var/log/journal/a8285330872602d1377cbaaf68869946/system.journal is truncated, ignoring file.
TEST-87-AUX-UTILS-VM.sh[1172]: No coredumps found.
```
2025-07-28 16:40:33 +09:00
Yu Watanabe
e0b5e14835 TEST-04-JOURNAL: add test case for log filtering through syslog
For issue #38361.
2025-07-28 16:29:31 +09:00
Yu Watanabe
b926dda2ef TEST-04-JOURNAL: several cleanups
- move scripts from test/units/ to the test specific units directory,
- drop meaningless true from silent-success.service,
- call journalctl from the same bash invocation of echo.

No functional change, just refactoring and preparation for the next
commit.
2025-07-28 16:29:31 +09:00
Yu Watanabe
c60a16ba8f journal: check filtering after parsing timestamp, identifier, pid, and so on
Otherwise, filtering regex with '^' does not work.

Fixes a bug in 87a13dabbd (v253).
Fixes #38361.
2025-07-28 16:29:31 +09:00
Yu Watanabe
706e622e88 include: update kernel headers from v6.16-rc7
- netfilter changes in v6.16-rc1 were reverted,
- vm_sockets.h now includes sys/socket.h, hence our workaround is not
  necessary anymore.
2025-07-27 23:50:06 +01:00
Luca Boccassi
bef244392b stub: fix passing kernel cmdline when loading via shim
This was mistakenly dropped when the custom PE loader was added.
Add it back, otherwise no smbios/addon cmdline options are passed
through.

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

Follow-up for 40aabfae72
2025-07-27 22:44:05 +01:00
Yu Watanabe
4fb09adec4 Rework file system group magic lookups (#38340) 2025-07-28 03:39:34 +09:00
Yu Watanabe
7292d676d0 test: skip verification for racy test cases
FORMAT_LIFETIME() internally calls now(), hence we cannot provide any
reliable verifications for finite lifetime.
2025-07-28 03:37:31 +09:00
Zbigniew Jędrzejewski-Szmek
aca4353ab2 Rework file system group lookups
We want to check if the magic we got from statfs() is one of the magics listed
for one of the file systems in the given group. To do this, we'd iteratate over
the file system names, convert each name to an array of magics, and compare
those to the one we got. We were using gperf-generated lookup table for this,
so the string lookups were quick, but still this seems unnecessarily complex.
Let's just generate a simple lookup function, because we can:

$ src/basic/filesystem-sets.py fs-in-group
bool fs_in_group(const struct statfs *st, FilesystemGroups fs_group) {
        switch (fs_group) {
        case FILESYSTEM_SET_BASIC_API:
                return F_TYPE_EQUAL(st->f_type, CGROUP2_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, CGROUP_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, DEVPTS_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, MQUEUE_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, PROC_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, SYSFS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, TMPFS_MAGIC);
        case FILESYSTEM_SET_ANONYMOUS:
                return F_TYPE_EQUAL(st->f_type, ANON_INODE_FS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, PIPEFS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, SOCKFS_MAGIC);
...

We flatten the nested lookup of group=>fs=>magic into a single level.
The compiler can work its magic here to make the lookup quick.
2025-07-27 13:14:05 +02:00
Zbigniew Jędrzejewski-Szmek
b0123576f4 meson: rework generation of file system lookup helpers
Previously, the gperf table was the main "source of truth", and additional
information (e.g. which file system names are obsolete) was scattered in
various files. We would then parse the gperf file, using python, awk, grep, and
bash, and use the results in various ways. This is hard to understand and
maintain. Let's replace all of this with a single python script that generates
the requested outputs as appropriate.

$ diff -u <(git show @{u}:src/basic/filesystems-gperf.gperf) \
          <(src/basic/filesystem-sets.py gperf)
shows that the outputs are the same except for comments.

Similarly, 'src/basic/filesystem-sets.py fs-type-to-string' and
'src/basic/filesystem-sets.py filesystem-sets' can be used to view
the generated code.

The check that the kernel doesn't define any new file system magics is
converted into a normal test. It doesn't seem necessary to fail the build
when that happens.
2025-07-27 13:13:54 +02:00
Zbigniew Jędrzejewski-Szmek
c136be3f04 basic/stat-util: avoid access syscall
I was looking at strace for systemd-getty-generator and noticed the call to
faccessat2(3</sys>, "", W_OK, AT_EMPTY_PATH), even though we already did
fstatfs(3</sys>), which should give us all the necessary information. Let's
only do this additional check when it's likely to yield something useful, i.e.
for network fses and otherwise skip the syscall.

The call to statvfs is replaced by statfs because that gives us the .f_type
field and allows is_network_fs() to be called.

I'm a bit worried that the is_network_fs() is somewhat costly. This will be
improved in later commits.
2025-07-27 13:13:43 +02:00
Jesse Guo
9e6f0d4bbd po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 19:23:54 +09:00
Yu Watanabe
31f388ea15 sd-bus: escape invalid characters in error message
At many places, we pass arguments of dbus method calls to
sd_bus_error_setf(), and produces unprintable log messages.
Let's always escape the generated error message.

This fixes something like the following:
```
[ 1921.875668] systemd-logind[611]: Got message type=method_call sender=:1.46 destination=:1.6 path=/org/freedesktop/login1 interface=org.freedesktop.login1.Manager member=GetSeat  cookie=1344 reply_cookie=0 signature=s error-name=n/a error-message=n/a
[ 1921.875758] systemd-logind[611]: [725B blob data]
[ 1921.875777] systemd-logind[611]: [768B blob data]
```
2025-07-27 11:03:15 +01:00
Luca Boccassi
ef101750ca TEST-21-DFUZZER: improve stability of the test, and enable services to be tested (#37862)
Fixes #37834.
2025-07-27 10:33:12 +01:00
Yu Watanabe
5c68c51045 NEWS: announce legacy iptables/libiptc support will be dropped in v259
nftables is available since kernel 3.13 (released on 19 January 2014).
Major distributions have already provided nftables, and marked/called
iptables as deprecated or legacy.

Moreover, currently, iptables/libiptc backend does not support IPv6.

Hence, it is not necessary to keep iptables/libiptc backend anymore.
Let's drop it in the next release.

Note, fedora/centos have already disabled iptables/libiptc support since v249.
2025-07-27 09:15:28 +02:00
Valentin David
5e2ad03dd8 pcrlock: Return positive exit status
Follow-up for 89e83aada8.

`is-supported` expects to return a positive exit status.
To achieve that, verb_make_policy() needs to return 0 on success.

Finishes the fix for #38019.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2025-07-27 01:03:13 +01:00
Yu Watanabe
7db7b75ab3 TEST-04-JOURNAL: add more test cases for LogFilterPatterns=
For issue #38361.
2025-07-27 01:00:38 +01:00
Yu Watanabe
a77506c75f test: several cleanups for TEST-74-AUX-UTILS.socket-activate.sh
- wait after kill,
- try --now only once,
- ignore error in reading /proc/$PID/comm when --now is set,
  as the process may be already died.

Follow-up for 9e0d0c3fdf.

Hopefully fixes #38352.
2025-07-27 00:59:52 +01:00
Yu Watanabe
0464222aed locale: escape invalid keymap on logging
The keymap string may come from dbus method and may contain invalid
characters.
2025-07-27 00:58:02 +01:00
Yu Watanabe
e9eaa66ed8 man/repart: fix the required btrfs-progs version
Follow-up for 12c29e5b3a.

Prompted by #38355.
2025-07-27 00:56:28 +01:00
Yu Watanabe
69865ca697 TEST-21-DFUZZER: suppress debugging logs from homed, nsresourced, and userdbd 2025-07-27 08:48:53 +09:00
Yu Watanabe
2487f72bdc TEST-21-DFUZZER: enable services to be tested
Since e19e17df57, timesyncd is disabled by
default, and fuzzing for timesyncd failed.

```
[  754.247451] TEST-21-DFUZZER.sh[658]: Bus: org.freedesktop.timesync1 (system)
[  754.247725] TEST-21-DFUZZER.sh[658]: + systemd-run --pipe --wait -- dfuzzer -b 10000 -n org.freedesktop.timesync1
[  754.282237] TEST-21-DFUZZER.sh[3236]: Running as unit: run-p3236-i3237.service
[  754.348983] TEST-21-DFUZZER.sh[3238]: [SESSION BUS]
[  754.350443] TEST-21-DFUZZER.sh[3238]: Bus not found.
[  754.350705] TEST-21-DFUZZER.sh[3238]: [SYSTEM BUS]
[  754.359249] TEST-21-DFUZZER.sh[3238]: Error while calling method 'GetConnectionUnixProcessID': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
[  754.359520] TEST-21-DFUZZER.sh[3238]: Couldn't get the PID of the tested process
[  754.359764] TEST-21-DFUZZER.sh[3238]: Exit status: 4
[  754.386721] TEST-21-DFUZZER.sh[3236]:           Finished with result: exit-code
[  754.387331] TEST-21-DFUZZER.sh[3236]: Main processes terminated with: code=exited, status=4/NOPERMISSION
[  754.387537] TEST-21-DFUZZER.sh[3236]:                Service runtime: 74ms
[  754.387706] TEST-21-DFUZZER.sh[3236]:              CPU time consumed: 21ms
[  754.389210] TEST-21-DFUZZER.sh[3236]:                    Memory peak: 12.9M (swap: 0B)
```

Also, create dummy interface for networkd and resolved.

Fixes #37834.
2025-07-27 08:48:53 +09:00
Yu Watanabe
5e2b606e4e TEST-21-DFUZZER: first test session bus, then service bus, finally system bus 2025-07-27 08:48:53 +09:00
Yu Watanabe
951e313b9a TEST-21-DFUZZER: update the list of destructive methods 2025-07-27 08:48:53 +09:00
Jesse Guo
f37c473fc5 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 07:28:56 +09:00
Jesse Guo
7c23e3bc31 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 04:39:40 +09:00
Jesse Guo
40e48f74be po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 99.6% (263 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 04:12:29 +09:00
Jesse Guo
fb3efa1ad1 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 99.2% (262 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 01:27:31 +09:00
Jesse Guo
0b22962be6 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 98.8% (261 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 00:22:34 +09:00
Yu Watanabe
3ea86aa673 TEST-64-UDEV-STORAGE: wait for partition devices being created before calling udevadm trigger
For some reasons, kernel or sfdisk once remove the created partitions
and recreated them. And if 'udevadm trigger' triggers devices currently
being removed, the udevd does not receive the triggered events, and the
command stuck.

```
[   33.150452] TEST-64-UDEV-STORAGE.sh[546]: + sfdisk --wipe=always /dev/md/mdmirpar
[   33.478336] systemd-udevd[442]: md127: Device is queued (SEQNUM=2163, ACTION=change)
[   33.480153] kernel:  md127: p1 p2 p3
[   33.483772] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2164, ACTION=add)
[   33.483914] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2165, ACTION=add)
[   33.484999] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2166, ACTION=add)
[   33.485564] systemd-udevd[442]: md127: Received inotify event of watch handle 164.
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + SYSTEMD_LOG_LEVEL=debug
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + timeout 30 udevadm trigger --settle --parent-match /dev/md/mdmirpar
[   33.485905] systemd-udevd[442]: Successfully forked off '(udev-synth)' as PID 3208.
[   33.486067] systemd-udevd[442]: md127: Removing watch handle 164.
[   33.489035] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2167, ACTION=remove)
[   33.489048] systemd-udevd[442]: Received inotify event about removal of watch handle 164.
[   33.489507] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2168, ACTION=remove)
[   33.496298] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2169, ACTION=remove)
[   33.500628] systemd-udevd[442]: md127: Device is queued (SEQNUM=2170, ACTION=change)
[   33.502355] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2171, ACTION=add)
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Triggered device with action 'change'.
[   33.512532] systemd-udevd[442]: md127: Device is queued (SEQNUM=2172, ACTION=change, UUID=a0b75692-08ad-428a-859b-9ef8772874d7)
[   33.512666] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2173, ACTION=change, UUID=4cd75a91-aa5b-4678-878c-0420b6c2e1e9)
[   33.512796] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2174, ACTION=add)
[   33.512910] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2175, ACTION=add)
[   33.531834] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.553563] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.561262] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.562468] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.563143] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.564174] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.567614] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.597750] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.623522] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.676268] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.686088] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
```

Let's wait for partition devices being actually created, and wait for
all queued events being processed. Then, call 'udevadm trigger'.
2025-07-26 11:20:16 +01:00
Luca Boccassi
b5a7f13a42 tree-wide: bunch of fixlets raised by coverity (#38341) 2025-07-26 11:10:00 +01:00
김인수
7157c7c4a5 po: Translated using Weblate (Korean)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main
2025-07-26 18:34:15 +09:00
Yu Watanabe
08cf7c70b9 fs-util: avoid overflow in MODE_TO_PTR() with MODE_INVALID
Note, currently MODE_TO_PTR() and PTR_TO_MODE() are only used in
src/udev/udev-rules.c .

Fixes CID#1548060.
2025-07-26 05:00:02 +09:00
Yu Watanabe
c119eb0edc install: skip later first_word() calls if one of earlier calls passes
Prompted by CID#1587764, that is false-positive.
2025-07-26 05:00:02 +09:00
Yu Watanabe
635894a493 fuzz-efi-string: add missing OOM check
Fixes CID#1610113 and CID#1610114.
2025-07-26 05:00:02 +09:00
Yu Watanabe
fa43d54b55 delta: add missing error check
Follow-up for 59829bb37a.
Fixes CID#1611425.
2025-07-26 05:00:02 +09:00
Yu Watanabe
2c3b3e2fd9 ordered-set: avoid overflow
Previously, ordered_set_put_strdupv() and friends returns the number of
pushed entries, but that is potentially larger than INT_MAX (of course,
realistically, OOM is triggered in that case).

No caller uses the number of the new entries. Let's return 1 when at
least one element is added.

Fixes CID#1611523.
2025-07-26 05:00:02 +09:00
Yu Watanabe
6ce3b1fa33 test: add explicit test cases for cpu_set_add() and cpu_set_add_range()
cpu_set_add_range() is used in parse_cpu_set(), hence already tested.
But it is better to test these functions explicitly.

For CID#1611787 and CID#1611788, that should be false-positive.
2025-07-26 05:00:02 +09:00
Yu Watanabe
d54f1e4329 cpu-set-util: check if cpu set is already allocated
Prompted by CID#1611789, CID#1611790, and CID#1611791.
2025-07-26 04:59:58 +09:00
Luca Boccassi
bcc73cafdb bootctl: automatically set --graceful when running in chroot
Installing stuff in a chroot should not fail because efivars are
not available. When running in a container touching efivars is
completely disabled, but there are some cases (recovery) where
it is needed to touch them in a chroot, so don't disable them but
avoid failing the run instead.
2025-07-25 20:44:03 +01:00