Commit Graph
100 Commits
Author SHA1 Message Date
Luca Boccassi b0c45a633a modprobe: set 'ifb numifbs=0' to avoid autocreating ifb0
Fixes https://github.com/systemd/systemd/issues/30913
2024-01-12 23:24:54 +00:00
Luca Boccassi ffcb8647ca Merge pull request #30904 from YHNdnzj/no-selinux-reload
core/execute: don't reload selinux before spawning executor
2024-01-12 15:51:54 +00:00
Luca Boccassi d6b39152a9 Merge pull request #30717 from yuwata/network-ref-unref
network: introduce address_ref() and friends
2024-01-10 19:34:48 +00:00
Luca Boccassi 3df2b718b2 Merge pull request #30716 from yuwata/network-cancel-request
network: also remove configuration on cancelling request
2024-01-10 19:33:16 +00:00
Luca Boccassi 09263532b6 Merge pull request #30720 from yuwata/dhcp-server-address-verification
dhcp-server: several fixlets for address verification
2024-01-10 19:29:25 +00:00
Luca Boccassi 311f80cee2 Merge pull request #30764 from yuwata/network-queue-fix-assertion
network/queue: exit from loop of processing request when a new request is queued
2024-01-10 19:27:57 +00:00
Luca Boccassi 31056154dd Merge pull request #30811 from yuwata/network-route-metric
network/route-metric: introduce RouteMetric to unify route metric handling
2024-01-10 19:25:52 +00:00
Luca Boccassi dadd7d46d9 Merge pull request #30809 from yuwata/resolve-fix-EDE-handling
resolve: fix EDE handling
2024-01-10 19:21:55 +00:00
Luca Boccassi d5f270fdbb Merge pull request #30870 from aafeijoo-suse/firstboot-help-fix
firstboot: minor fixes
2024-01-10 19:04:18 +00:00
Luca Boccassi b4a85f75b0 Merge pull request #30843 from keszybz/test-relative-paths
Use relative paths in test units
2024-01-09 12:23:35 +00:00
Luca Boccassi c3f4d9f9a4 Merge pull request #30842 from aafeijoo-suse/analyze-q-man-help-fix
analyze: minor fixes
2024-01-09 10:40:19 +00:00
Luca Boccassi 90043781ba Merge pull request #30743 from bluca/coverity
Assorted coverity fixes
2024-01-05 09:27:21 +01:00
Luca Boccassi 08b099a005 Merge pull request #30774 from mrc0mmand/test-tweaks
test: install correct kpartx udev rules (again) and dump cores of sanitized binaries
2024-01-05 09:26:42 +01:00
Luca Boccassi 6a80e22766 Merge pull request #30759 from mrc0mmand/resolved-followup
resolve: initialize `r` during OOM
2024-01-05 09:26:19 +01:00
Luca Boccassi 81a183800f tmpfiles: add --purge switch
Any file/directory created by a tmpfiles.d will be deleted. Useful for
purge/factory reset patterns.
2024-01-04 17:36:43 +01:00
Luca Boccassi 1323a222d2 sd-dhcp-client: add assert_not_reached in switch case
Tell static analysis that r is always initialised

Follow-up for 1809132064

CID#1533109
2024-01-04 14:30:20 +01:00
Luca Boccassi 5af0f171f9 udev: add upper bound of 5 hours to SYSTEMD_UDEV_EXTRA_TIMEOUT_SEC=
Follow-up for b16c6076cb

CID#1533111
2024-01-04 14:30:20 +01:00
Luca Boccassi 43108bf87a dissect: add assert to guide static analysis
CID#1533112
2024-01-04 14:30:20 +01:00
Luca Boccassi c658ad79f0 core: add an assert to guide static analysis
Follow-up for 4fb0d2dc14

CID#1533110
2024-01-04 14:30:20 +01:00
Luca Boccassi 2717d36d9d core: fix cgroup copy
Follow-up for 84c01612de

CID#1533113
2024-01-04 12:42:23 +01:00
Luca Boccassi cae58298dd core: fix OOM check
Follow-up for 84c01612de

CID#1533114
2024-01-04 12:41:31 +01:00
Luca Boccassi 2e3414660c varlink: avoid logging content of message if it contains sensitive data
This is important now that creds are sent via varlink

 systemd-creds[463]: varlink-3: Sending message: {"parameters":{"data":"Zm9vYmFyCg=="}}
 systemd-creds[462]: varlink-3: New incoming message: {"method":"io.systemd.Credentials.Encrypt","parameters":{"data":"Zm9vYmFyCg=="}}
2024-01-03 11:54:48 +01:00
Luca Boccassi fa9a6db478 json: add JSON_FORMAT_REFUSE_SENSITIVE to json_variant_format()
Returns -EPERM if any node in the variant is marked as sensitive,
useful to avoid leaking data to log messages and so on
2024-01-03 11:54:48 +01:00
Luca Boccassi c0d672f161 Merge pull request #30684 from systemd/update-labeler-configuration
ci: migrate labeler configuration to the new format
2024-01-02 13:24:48 +01:00
Luca Boccassi 86b8b66675 Merge pull request #30591 from yuwata/device-util
device-util: introduce device_in_subsystem() and device_is_devtype() helper functions
2024-01-01 19:26:39 +01:00
Luca Boccassi 9d75598bc4 Merge pull request #30593 from yuwata/sd-dhcp-duid
dhcp: introduce sd_dhcp_duid and relevant functions
2024-01-01 19:24:31 +01:00
Luca Boccassi e191de6947 Merge pull request #30614 from yuwata/udev-event-take-worker
udev: make UdevEvent take UdevWorker object
2024-01-01 19:18:07 +01:00
Luca Boccassi 3ea26cb8b2 Merge pull request #30674 from YHNdnzj/bus-wait-for-cleanup
bus-wait-for-{jobs,units}: some cleanups/modernizations
2024-01-01 19:11:46 +01:00
Luca Boccassi aa735b0219 units: add ConditionSecurity=tpm2 to systemd-tpm2-setup units
ConditionSecurity=measured-uki can be true even with TPM 1.2 which we
don't support, so add an explicit check for TPM 2.0.

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

Follow-up for 2e64cb71b9
2023-12-29 03:14:34 +09:00
Luca Boccassi cfb912abaf bash completion: add systemd-analyze architectures
Follow-up for fb8cc599ed
2023-12-27 17:52:06 +01:00
Luca Boccassi 5df839e99f analyze: allow --no-legend with architectures verb
It prints a table with a header, allow omitting it

Follow-up for fb8cc599ed
2023-12-27 17:50:07 +01:00
Luca Boccassi c24c63e946 bash completion: make systemctl mount-image/bind autocomplete on active services
The verb works only on running service units, so complete on that as the first
parameter, and a local file as the second. The other parameters are inside the
service namespace so we can't autocomplete from the outside, return early.
2023-12-27 17:48:05 +01:00
Luca Boccassi 79272d3098 bash completion: add systemctl service-log-level/target 2023-12-27 16:59:03 +01:00
Luca Boccassi 74ce6bbdee Merge pull request #30631 from yuwata/network-address-free
network/address: tiny cleanups for address_free()
2023-12-26 19:21:15 +01:00
Luca Boccassi d6fe382122 Merge pull request #30594 from yuwata/udev-timeout-cleanups
udev: several cleanups for timeout settings
2023-12-24 00:26:13 +01:00
Luca Boccassi 65e1e29e55 Merge pull request #30596 from yuwata/sd-device-db-cleanups
sd-device: several cleanups for udev database related functions
2023-12-24 00:23:35 +01:00
Luca Boccassi 85915f312c meson: check for pefile dependency before enabling ukify
ukify (and all the tests, including the autogenerated check-version-ukify)
does not work unless pefile is available, so track it as a dependency
in meson to avoid unit test failures later
2023-12-24 06:54:41 +09:00
Luca Boccassi d45ca9a905 man: conditionalize sd-pcrlock and sd-measure on the same variable as their binaries
The binaries are built and installed if HAVE_TPM2 is set, and ignore ENABLE_BOOTLOADER,
so do the same for the manpages.

For the sd-pcrlock case this also installs the manpage aliases for the units, which
are not installed with -Dbootloader=disabled, but there's no way to conditionalize
the aliases, so on balance it's better to have too much documentation rather than
too little.

Fixes https://github.com/systemd/systemd/issues/30588
2023-12-23 18:04:08 +08:00
Luca Boccassi bc22b7be0a Merge pull request #30590 from yuwata/backlight-cleanups
backlight: several cleanups and use dispatch_verb()
2023-12-22 23:35:27 +01:00
Luca Boccassi 4f276e97de test: fix check for device in test-execute
The unit actually uses /dev/kmsg, not /dev/kvm

Follow-up for ae7482b994
2023-12-22 15:32:28 +01:00
Luca Boccassi 12b6b3cfd9 Merge pull request #30550 from yuwata/network-nexthop-cleanups-3
network: several cleanups for nexthop (part3)
2023-12-22 10:44:39 +01:00
Luca Boccassi eb2afc75e0 Merge pull request #30575 from arthurzam/bash
bash-completion: add some missing options
2023-12-21 23:44:17 +01:00
Luca Boccassi 08542781e2 Merge pull request #30531 from yuwata/trivial-cleanups
Trivial cleanups
2023-12-19 23:19:25 +01:00
Luca Boccassi c2d5d8c401 Merge pull request #30464 from CodethinkLabs/misc-integration-test-fixes
Misc integration test fixes
2023-12-18 16:11:16 +01:00
Luca Boccassi e7bfce0d0a Merge pull request #30492 from mrc0mmand/skip-TEST-08-without-systemd-in-initrd
test: skip TEST-08-INITRD if systemd didn't run in the initrd
2023-12-18 16:10:33 +01:00
Luca Boccassi 1905d621db Merge pull request #30484 from mrc0mmand/test-tweaks
A couple of test-related tweaks
2023-12-15 12:20:35 +01:00
Luca Boccassi 266e8d0eb6 Merge pull request #30417 from YHNdnzj/unit-log-resource
core/unit: clean up unit_log_resources
2023-12-14 08:45:26 +00:00
Luca Boccassi 1845fccada Merge pull request #30469 from poettering/userdbd-tweaks2
userdb: some smaller userdb tweaks
2023-12-14 08:19:51 +00:00
Luca Boccassi b896058883 Merge pull request #30450 from poettering/cgroups-delegate-attr-update
cgroup: bring list of delegated cgroup attributes up-to-date with cur…
2023-12-13 13:50:41 +00:00
Luca Boccassi bf8726d1ee Merge pull request #30363 from yuwata/analyze-find-template
analyze: also find template unit when an instance is specified
2023-12-11 15:56:21 +00:00
Luca Boccassi 1eeaa93de3 executor: don't duplicate FD array to avoid double closing
Just use ExecParam directly, as these are all internal to sd-exec now
anyway. Avoids double close when execution fails after FDs are set up
for inheritance and were already re-arranged.

Fixes https://github.com/systemd/systemd/issues/30412
2023-12-11 15:55:50 +00:00
Luca Boccassi 32adf62a69 Merge pull request #30406 from yuwata/resolve-clean-exit
resolve: make resolved exit cleanly
2023-12-10 18:42:24 +00:00
Luca Boccassi 7aea3cf8c2 Merge pull request #30404 from yuwata/network-peer
network/route: fix reachability check when peer address is specified
2023-12-10 14:13:37 +00:00
Luca Boccassi 65ea0d9e75 Merge pull request #30407 from yuwata/network-clean-exit
network: make networkd exit cleanly
2023-12-10 12:54:17 +00:00
Luca Boccassi 3b3bce04f0 test-login: remove dead code
HANDLE_SLEEP is == _HANDLE_ACTION_SLEEP_LAST and the loop is bounded
by < _HANDLE_ACTION_SLEEP_LAST, so no need to check for it

CID#1529414
2023-12-09 13:17:02 +00:00
Luca Boccassi 2343f6b11e logind: use ASSERT_PTR to validate result before use
handle_action_lookup() in general can return NULL, but not
here as the handle is checked before, so add an assert.

CID#1529415
CID#1529416
2023-12-09 13:17:02 +00:00
Luca Boccassi fc9d7ddbac systemctl: fix copy/paste
on_circle is set twice to the same value

CID#1529418
2023-12-09 13:17:02 +00:00
Luca Boccassi 5572e9d82f journal-remote: set upper length bound when parsing incoming headers
CID#1529420
2023-12-09 13:17:02 +00:00
Luca Boccassi 9614dd542b mount: check that MountParameters is valid before use
Follow-up for 6c75eff6af

CID#1530430
2023-12-09 11:57:01 +00:00
Luca Boccassi 1d13163520 Merge pull request #30387 from mrc0mmand/TEST-17-tweaks
test: a couple of tweaks for TEST-17-UDEV
2023-12-09 11:06:37 +00:00
Luca Boccassi 6c75eff6af core: create workdir/upperdir when mounting a Type=overlay mount unit
So far we created the target directory, and the source for bind mounts,
but not workdir/upperdir for overlays, so it has to be done separately
and strictly before the unit is started, which is annoying. Check the
options when creating directories, and if upper/work directories are
specified, create them.
2023-12-08 11:22:14 +09:00
Luca Boccassi ebc7510380 core: relax dependency on RootImage= storage from Requires= to Wants=
If a unit is running in an image and wants to survive a soft-reboot,
then it can't be deactivated by the storage of the image going away.
Relax the dependency to a Wants=. Access to the image is not needed
when the unit is running anyway, so downgrade to Wants=.
2023-12-08 11:16:31 +09:00
Luca Boccassi ae7482b994 core: do not make private /dev/ read-only too soon
The read-only bit is flipped after setting up all the mounts, so that
bind mounts can be added. Remove the early config, and add a unit
test.

Fixes https://github.com/systemd/systemd/issues/30372
2023-12-08 11:09:14 +09:00
Luca Boccassi 012789399e README.md: irc:// URLs are not rendered as links by markdown on Github
Use the webchat link and spell out the channel and server instead
2023-12-06 22:23:16 +01:00
Luca Boccassi f08d1fea30 Merge pull request #30295 from yuwata/hostnamectl-machine-id
hostnamectl: read machine ID and boot ID through DBus
2023-12-06 21:12:36 +00:00
Luca Boccassi 0065f4b142 RELEASE: mark a few items for the final step
Doesn't make much sense to push RCs to the stable repository, just
do that in the final tag push
2023-12-06 21:07:42 +00:00
Luca Boccassi 880eaa3a62 NEWS: open for v256 2023-12-06 21:07:16 +00:00
Luca Boccassi d5401e36dc Merge pull request #30332 from bluca/softreboot_pivot_in_place
switch-root: also check that mount IDs are the same, not just inodes
2023-12-06 21:01:13 +00:00
Luca Boccassi f9a284f02d Merge pull request #30214 from bluca/wants_mounts_for
Add WantsMountsFor= and use it in the cryptsetup generator
2023-12-06 21:00:37 +00:00
Luca Boccassi db11bab38c NEWS: finalize for v255 2023-12-06 20:32:40 +00:00
Luca Boccassi fa8e6bb3b2 Merge pull request #30334 from DaanDeMeyer/repart-fixes
repart: Add Minimize=best to --make-ddi= partition definitions
2023-12-06 20:29:04 +00:00
Luca Boccassi 5c1557888f Merge pull request #30341 from bluca/news
Update hwdb and NEWS
2023-12-06 16:57:29 +00:00
Luca Boccassi a7418691e4 hwdb: update
ninja -C build update-hwdb
2023-12-06 10:06:50 +00:00
Luca Boccassi 48696c2d37 NEWS: note that newly introduced tools are experimental
So that we can change interfaces for at least one release if needed
2023-12-06 10:00:25 +00:00
Luca Boccassi e6e335b5d4 NEWS: update contributors list 2023-12-06 09:57:38 +00:00
Luca Boccassi a14b75e218 selinux: downgrade log about state to trace
It is printed on every invocation of sd-executor, which is noisy and not useful

Follow-up for: bb5232b6a3
2023-12-05 19:25:50 +00:00
Luca Boccassi f83a74dfb8 switch-root: also check that mount IDs are the same, not just inodes
If /run/nextroot/ has been set up, use it, even if the inodes are
the same. It could be a verity device that is reused, but with
different sub-mounts or other differences. Or the same / tmpfs with
different /usr/ mounts. If it was explicitly set up we should use it.

Use the new helper to check that the mount IDs are also the same,
not just the inodes.
2023-12-05 17:20:27 +00:00
Luca Boccassi 5134e54625 basic: add fds_are_same_mount() helper 2023-12-05 17:20:27 +00:00
Luca Boccassi 26522a66a3 Merge pull request #30313 from mrc0mmand/ubuntu-ci
Reduce the number of deny-list files for Ubuntu CI
2023-12-04 18:23:34 +00:00
Luca Boccassi a483c75822 Merge pull request #30314 from DaanDeMeyer/dmi
Document kernel configs required for reading credentials from SMBIOS
2023-12-04 10:29:06 +00:00
Luca Boccassi cc9f4cad8c executor: apply LogLevelMax earlier
SELinux logs before we have a chance to apply it, move it up as it
breaks TEST-04-JOURNAL:

[  408.578624] testsuite-04.sh[11463]: ++ journalctl -b -q -u silent-success.service
[  408.578743] testsuite-04.sh[11098]: + [[ -z Dec 03 13:38:41 H systemd-executor[11459]: SELinux enabled state cached to: disabled ]]

Follow-up for: bb5232b6a3
2023-12-04 11:45:22 +09:00
Luca Boccassi 1707d5daf8 Merge pull request #30297 from keszybz/fixups
A few unrelated fixups for recent commits
2023-12-03 12:34:24 +00:00
Luca Boccassi c7ce20f01f NEWS: finalize for v255-rc4 2023-12-02 02:05:30 +00:00
Luca Boccassi ebaf2821e6 Merge pull request #30291 from keszybz/seccomp-unknown-syscall
Backwardscompatibly handle syscalls unknown to us or libseccomp
2023-12-02 02:04:24 +00:00
Luca Boccassi 8163ef5712 hwdb: update 2023-12-01 22:07:08 +00:00
Luca Boccassi 9a848052e4 NEWS: update contributors list 2023-12-01 22:05:08 +00:00
Luca Boccassi f4a35f2ad9 core: do not drop CAP_SETUID if it is in AmbientCapabilities=
Follow-up for 24832d10b6
2023-12-01 10:48:14 +00:00
Luca Boccassi edb37ee15c Revert "mkosi ci: enable jammy-proposed"
libsolv has migrated to jammy-updates, so we can disable the
proposed-updates repository again.

This reverts commit 48bfc6791d.
2023-11-29 17:30:54 +01:00
Luca Boccassi 762ef04f55 Update TODO 2023-11-29 11:04:59 +00:00
Luca Boccassi c9be8e420e cryptsetup: use WantsMountsFor= for key/header when nofail is set
The header and keyfile are necessary only for opening the device, not
for closing, so it is not necessary to deactivate the generated
cryptsetup unit when the header or keyfile backing store are removed.

This is especially useful in the case of softreboot, when the new
mount root is setup under /run/nextroot/ but we don't want to close
the cryptsetup devices for encrypted /var/ or so, and we simply
mount it directly on /run/nextroot/var/ before the soft-reboot.
2023-11-29 11:04:59 +00:00
Luca Boccassi 8284c2cb68 core: switch var-tmp.mount to WantsMountsFor for PrivateTmp=yes
Align with tmp.mount
2023-11-29 11:04:59 +00:00
Luca Boccassi 46d45f90b3 core: use new WantsMountsFor= for PrivateTmp=yes and tmp.mount 2023-11-29 11:04:59 +00:00
Luca Boccassi 61aa5f707e core: add WantsMountsFor= on WorkingDirectory= if it's allowed to be missing 2023-11-29 11:04:59 +00:00
Luca Boccassi 9e615fa3aa core: add WantsMountsFor=
This is the equivalent of RequiresMountsFor=, but adds Wants= instead
of Requires=. It will be useful for example for the autogenerated
systemd-cryptsetup units.

Fixes https://github.com/systemd/systemd/issues/11646
2023-11-29 11:04:59 +00:00
Luca Boccassi 499d32655f Merge pull request #30203 from yuwata/resolve-dump-cache
resolve: fix varlink message verification
2023-11-28 15:35:11 +00:00
Luca Boccassi 3dfbddf3ee Merge pull request #30216 from poettering/loginctl-table-tweaks
loginctl: minor tweaks to tabular output
2023-11-28 15:33:35 +00:00
Luca Boccassi 5ff5250787 Merge pull request #30220 from yuwata/journald-vs-soft-reboot
unit: stop journald before SIGKILL on soft-reboot
2023-11-28 15:32:08 +00:00
Luca Boccassi 04fc5b6047 Merge pull request #30170 from bluca/exec_bpf_fd
core: pass bpf_outer_map_fd to sd-executor only if RestrictFileSystems was set
2023-11-27 15:44:50 +00:00
Luca Boccassi 36f4476361 Merge pull request #30172 from yuwata/analyze-verify-unit-path
analyze: do not prepend CWD to SYSTEMD_UNIT_PATH needlessly
2023-11-24 10:35:28 +00:00
Luca Boccassi 2d042c75ff core: remove redundant check when serializing FDs
The helpers already skip if the FD is < 0
2023-11-23 19:14:52 +00:00