Marc Pervaz Boocha [Tue, 31 Oct 2023 17:39:14 +0000 (23:09 +0530)]
Fixed a typo in kernel-install/60-ukify.install.in for globing microcode
searches in a non-existent micocode/* dir instead of micocode* due a typo in #28592
Luca Boccassi [Thu, 26 Oct 2023 20:55:55 +0000 (21:55 +0100)]
core: rename and add comment to ExecParameters cleanup functions
Hugo Carvalho [Wed, 1 Nov 2023 02:48:14 +0000 (03:48 +0100)]
po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (227 of 227 strings)
Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt/
Translation: systemd/main
Lennart Poettering [Tue, 31 Oct 2023 15:10:32 +0000 (16:10 +0100)]
nspawn: make sure idmapped logic works if DDI contains only /usr/ tree
If we have a DDI that contains only a /usr/ tree (and which is thus
combined with a tmpfs for root on boot) we previously would try to apply
idmapping to the tmpfs, but not the /usr/ mount. That's broken of
course.
Fix this by applying it to both trees.
Luca Boccassi [Wed, 1 Nov 2023 00:43:55 +0000 (00:43 +0000)]
Update NEWS
Michal Sekletar [Tue, 31 Oct 2023 16:12:45 +0000 (17:12 +0100)]
man: change title of the section to better reflect actual content
Lennart Poettering [Tue, 31 Oct 2023 13:37:47 +0000 (14:37 +0100)]
Merge pull request #29763 from yuwata/vconsole-conf
locale,firstboot: add comments to vconsole.conf
Yu Watanabe [Tue, 31 Oct 2023 08:31:03 +0000 (17:31 +0900)]
udev: fix device name shown in the log message on failure
Prompted by #29500.
Yu Watanabe [Tue, 31 Oct 2023 08:05:51 +0000 (17:05 +0900)]
udevadm-trigger: mention --type=all in help
Follow-up for
1baeee5784f1b859d2a1446f6776efe6d7fde7b6.
Fixes #29779.
Lennart Poettering [Tue, 31 Oct 2023 13:35:49 +0000 (14:35 +0100)]
Merge pull request #29769 from poettering/network-generator-ll
network-generator: add new mode ip=link-local
Lennart Poettering [Tue, 31 Oct 2023 13:34:47 +0000 (14:34 +0100)]
Merge pull request #29776 from jinliu/pam_kernel_keyring
New PAM module: pam_systemd_loadkey
Yu Watanabe [Tue, 24 Oct 2023 17:32:04 +0000 (02:32 +0900)]
dissect: reenable automatic removal before trying again
The device node may be different from we want to activate, and we may
try to activate different device in the subsequent loop. In such case,
we should enable the automatic removal for the unexpected device.
Otherwise, it will not be removed even when not necessary anymore.
Jin Liu [Tue, 31 Oct 2023 04:48:24 +0000 (12:48 +0800)]
New PAM module: pam_systemd_loadkey
This module reads password from kernel keyring and sets it as PAM authtok.
It's inspired by gdm's pam_gdm, which reads the LUKS password stored by
systemd-cryptsetup, so Gnome Keyring can be automatically unlocked if set
to the same password (when autologin is enabled so the user doesn't enter
a password in gdm).
Lennart Poettering [Tue, 31 Oct 2023 10:19:10 +0000 (11:19 +0100)]
Merge pull request #29778 from yuwata/log-tests-skipped
tests: use log_tests_skipped() more
Lennart Poettering [Mon, 30 Oct 2023 16:57:00 +0000 (17:57 +0100)]
update TODO
Lennart Poettering [Tue, 31 Oct 2023 10:01:44 +0000 (11:01 +0100)]
NEWS: mention that ip=off now means ip=off
Lennart Poettering [Mon, 30 Oct 2023 17:05:42 +0000 (18:05 +0100)]
man: document the new ip=link-local kernel cmdline option
Lennart Poettering [Mon, 30 Oct 2023 16:53:40 +0000 (17:53 +0100)]
network-generator: add support for ip=link-local
Lennart Poettering [Mon, 30 Oct 2023 16:53:58 +0000 (17:53 +0100)]
network-generator: name enum for "ip=dhcp" case same as literal string
Let's make this less confusing, and use the same string externally as
enum name internally.
Yu Watanabe [Mon, 30 Oct 2023 14:07:59 +0000 (23:07 +0900)]
locale: drop implementation detail from comment in config file
Yu Watanabe [Mon, 30 Oct 2023 11:30:12 +0000 (20:30 +0900)]
locale,firstboot: add headers to vconsole.conf
Closes #29717.
Replaces #29760.
Co-authored-by: cunshunxia <cunshunxia@tencent.com>
Yu Watanabe [Mon, 30 Oct 2023 06:04:18 +0000 (15:04 +0900)]
env-util: make write_env_file() optionally take headers
This also makes write_env_file() and write_env_file_label() optionally
take dir_fd, and drop write_env_file_at().
Preparation for later commits.
Yu Watanabe [Tue, 31 Oct 2023 08:14:20 +0000 (17:14 +0900)]
Merge pull request #29247 from naraghavan/naraghavan/dhcpv6-vendor-options
networkd: Add DHCP vendor specific sub options to dbus API
Yu Watanabe [Tue, 31 Oct 2023 05:53:10 +0000 (14:53 +0900)]
tests: use log_tests_skipped() and friend more
Yu Watanabe [Tue, 31 Oct 2023 05:46:38 +0000 (14:46 +0900)]
tests: make log_tests_skipped() and friend accept format string
Yu Watanabe [Tue, 31 Oct 2023 05:35:33 +0000 (14:35 +0900)]
tree-wide: fix typo
Ronan Pigott [Tue, 31 Oct 2023 00:24:42 +0000 (17:24 -0700)]
network: free dhcp6_hostname
Fixes:
b90480c80daa ("network: introduce SendHostname/Hostname DHCPv6 options")
Yu Watanabe [Tue, 31 Oct 2023 01:59:44 +0000 (10:59 +0900)]
Merge pull request #29767 from poettering/host-to-host
automatic support for host-to-host networking that only does link-local addressing
Frantisek Sumsal [Mon, 30 Oct 2023 16:03:19 +0000 (17:03 +0100)]
test-network: copy rules from source & build trees if needed
When running with --build-dir= we need to copy over udev rules from
$BUILD_DIR/udev.d/ and $SOURCE_TREE/udev.d/ to make stuff work as
expected.
Lennart Poettering [Mon, 30 Oct 2023 16:25:18 +0000 (17:25 +0100)]
update TODO
Lennart Poettering [Mon, 30 Oct 2023 16:12:56 +0000 (17:12 +0100)]
network: add default .network file matching ID_NET_AUTO_LINK_LOCAL_ONLY=1
This is name ".network.example" for now, to match the existing
80-ethernet.network file.
I think it would make sense to actually install this by default if told
so via a meson file (and then hopefully this would happen even on
Fedora, though in a split off RPM or so). However, we aren't there yet,
hence for now, just ship the .network files as example, like the others.
Lennart Poettering [Mon, 30 Oct 2023 15:53:59 +0000 (16:53 +0100)]
hwdb,rules: mark host-to-host network devices as only requiring link local addressing
This is a generalization of this logic:
https://github.com/NetworkManager/NetworkManager/blob/main/data/90-nm-thunderbolt.rules
It applies not just to thunderbolt, but to any kind of device, even
matched by vendor/product, via hwdb.
I added two entries for Prolific PC-to-PC devices (of which I have one
lying around).
Frantisek Sumsal [Mon, 30 Oct 2023 10:44:46 +0000 (11:44 +0100)]
test: add one missing cleanup
So the test doesn't fail when run multiple times with the same image.
Raito Bezarius [Fri, 29 Sep 2023 01:51:54 +0000 (03:51 +0200)]
secure-boot: print just before cold-resetting to help diagnose hangs
When testing the secureboot enroll feature, it can be hard to distinguish without
using the QMP API of QEMU whether we are in a hang situation of the UEFI firmware.
Making it clear that we reached the `ResetSystem` can be helpful towards that need.
Mike Yuan [Sun, 29 Oct 2023 16:03:07 +0000 (00:03 +0800)]
sleep-config: allow setting empty HibernateMode= (use kernel default)
Both sleep_mode_supported and write_mode support this,
but parse_sleep_config currently prohibits this - it always
uses our default value if user specifies HibernateMode=<empty>.
Lennart Poettering [Mon, 30 Oct 2023 11:28:50 +0000 (12:28 +0100)]
Update TODO
Lennart Poettering [Mon, 30 Oct 2023 09:48:58 +0000 (10:48 +0100)]
doc: document explicitly when we require specific top-level mounts to be established
Ronan Pigott [Tue, 24 Oct 2023 20:56:22 +0000 (13:56 -0700)]
network: introduce SendHostname/Hostname DHCPv6 options
These options were previously reused by the DHCPv6 client from the
DHCPv4 client settings. Let's separate them for consistency.
Lennart Poettering [Mon, 30 Oct 2023 09:51:35 +0000 (10:51 +0100)]
update TODO
Alex Hudspith [Sat, 28 Oct 2023 14:49:06 +0000 (15:49 +0100)]
man: revise wording of cgtop -k and -P
Resolves: #29753
Luca Boccassi [Fri, 27 Oct 2023 15:33:49 +0000 (16:33 +0100)]
exec-invoke: don't double-close FDs on error
When a late error occurs in sd-executor, the cleanup-on-close of the
context structs happen, but at that time all FDs might have already
been closed via close_all_fds(), so a double-close happens. This
can be seen when DynamicUser is enabled, with a non-existing
WorkingDirectory.
Invalidate the FDs in the context structs if close_all_fds succeeds.
Daan De Meyer [Sat, 28 Oct 2023 08:37:16 +0000 (10:37 +0200)]
mkosi: Use cache and build subdirectories
Next release of mkosi will not use subdirectories under the cache
and build directory by default anymore, so let's make sure we already
start creating those ourselves.
Mike Yuan [Sat, 28 Oct 2023 09:53:54 +0000 (17:53 +0800)]
Merge pull request #29740 from YHNdnzj/sleep-round-four
sleep: make sure we clear HibernateLocation on all error paths
Frantisek Sumsal [Fri, 27 Oct 2023 19:46:18 +0000 (21:46 +0200)]
tmpfiles: ignore EINVAL with --graceful
Add EINVAL to the list of ignored errnos, since acl_from_text() returns
EINVAL if it can't translate the given string.
~# cat /tmp/tmpfiles-test.conf
a+ /tmp/foo - - - - default:group:foo:rwx
~# build/systemd-tmpfiles /tmp/tmpfiles-test.conf --create --graceful
Failed to parse ACL "default:group:foo:rwx", ignoring: Invalid argument
Resolves: #29742
Luca Boccassi [Fri, 27 Oct 2023 23:46:40 +0000 (00:46 +0100)]
test: io.latency cgroup support might not be available, skip test
It doesn't seem to be enabled on Debian stable, and the test fails.
Follow-up for
5efc8183c9cf9b
Lennart Poettering [Thu, 26 Oct 2023 17:22:02 +0000 (19:22 +0200)]
namespace: normalize MountMode type a bit
Let's prefix it with a common prefix, and make sure the names are all
singular and the string table actually matches the names.
No change in behavour, just some rafactoring to make this enum a bit
less special, and make it follow our usual coding style more closely.
Yu Watanabe [Sat, 28 Oct 2023 01:23:23 +0000 (10:23 +0900)]
Merge pull request #29693 from rpigott/dhcp-rapid-commit
network: implement RFC4039 DHCP Rapid Commit
Luca Boccassi [Fri, 27 Oct 2023 22:21:44 +0000 (23:21 +0100)]
Merge pull request #29737 from glance-/tpm2-openssl
tpm2: fix build failure without openssl
Luca Boccassi [Fri, 27 Oct 2023 22:20:46 +0000 (23:20 +0100)]
Merge pull request #29734 from YHNdnzj/fstab-filter-options
fstab-generator: drop ignored mount options from mount unit Options=
Luca Boccassi [Fri, 27 Oct 2023 22:20:23 +0000 (23:20 +0100)]
Merge pull request #29745 from mrc0mmand/more-tests
test: cover more sd-executor related stuff
Frantisek Sumsal [Fri, 27 Oct 2023 06:42:24 +0000 (08:42 +0200)]
test: cover more sd-executor related stuff
Let's probe directives that have slightly more "complex" handling in
the serialization/deserialization machinery.
Frantisek Sumsal [Fri, 27 Oct 2023 16:36:35 +0000 (18:36 +0200)]
core: don't insert an extra space before each SocketBind{Allow,Deny}= item
The extra space was actually screwing up deserialization:
~# systemd-run --wait --pipe -p SocketBindAllow=any true
Running as unit: run-u167.service
Finished with result: exit-code
Main processes terminated with: code=exited/status=234
Service runtime: 1ms
CPU time consumed: 0
~# journalctl -b -p err
...
Oct 27 16:39:15 arch systemd-executor[5983]: Failed to deserialize: Invalid argument
Let's not do that by default and introduce a simple wrapper which
inserts the space after each item only when necessary.
Ronan Pigott [Wed, 25 Oct 2023 00:57:45 +0000 (17:57 -0700)]
test-network: add dhcp rapid commit test
Frantisek Sumsal [Fri, 27 Oct 2023 15:16:57 +0000 (17:16 +0200)]
core: actually set the CPU scheduling policy when deserializing it
Mike Yuan [Thu, 26 Oct 2023 15:39:32 +0000 (23:39 +0800)]
sleep: make sure we clear HibernateLocation on all error paths
Also, let's say "sleep operation" rather than "sleep state",
the latter of which creates ambiguity with /sys/power/state.
Mike Yuan [Thu, 26 Oct 2023 17:29:02 +0000 (01:29 +0800)]
fstab-generator: drop unapplicable mount options for / from mount unit Options=
Prompted by #29705
Note that x-systemd.wanted-by= and x-systemd.required-by= are not
dropped, since we ignore them because they are unnecessary rather
than unapplicable.
Luca Boccassi [Fri, 27 Oct 2023 10:47:43 +0000 (11:47 +0100)]
CI: add a build job with TPM but without OpenSSL
We keep introducing build failures with this combination due to the
high amount of changes, add a combination that covers it
Luca Boccassi [Fri, 27 Oct 2023 12:52:21 +0000 (13:52 +0100)]
resolved: fix build failure with gnutls
Follow-up for
bd1ae178336a3d9143fe
Anton Lundin [Fri, 20 Oct 2023 13:46:07 +0000 (15:46 +0200)]
tpm2: fix build failure without openssl
Nandakumar Raghavan [Wed, 20 Sep 2023 14:33:38 +0000 (14:33 +0000)]
networkd: Add DHCP vendor specific options to dbus API
Add DHCP vendor specific options to expose in dbus API.
This will be added to the JSON output when we query
org.freedesktop.network1.Manager object.
Mike Yuan [Thu, 26 Oct 2023 15:50:50 +0000 (23:50 +0800)]
sleep: minor modernization for lock_all_homes
Mike Yuan [Thu, 26 Oct 2023 15:22:11 +0000 (23:22 +0800)]
sleep: rework write_state and write_mode
Mike Yuan [Thu, 26 Oct 2023 14:20:36 +0000 (22:20 +0800)]
sleep: update help text for suspend-then-hibernate
Mike Yuan [Thu, 26 Oct 2023 14:18:57 +0000 (22:18 +0800)]
sleep: log about errno
Mike Yuan [Thu, 26 Oct 2023 14:17:12 +0000 (22:17 +0800)]
sleep: drop unneeded includes
Mike Yuan [Thu, 26 Oct 2023 12:27:12 +0000 (20:27 +0800)]
sleep: introduce sleep_operation_is_hibernation
Mike Yuan [Thu, 26 Oct 2023 17:19:40 +0000 (01:19 +0800)]
fstab-generator: use RET_GATHER more
xinpeng wang [Wed, 25 Oct 2023 03:19:58 +0000 (11:19 +0800)]
logind: fix abnormal switching causing the screen to go black
After logind receives the SIGRTMIN signal from the kernel, it will execute
manager_vt_switch---session_leave_vt---session_device_pause_all,The device
permissions of the session are removed here;under normal circumstances, the
tty value read from /sys/class/tty/tty0/active changes and switchesto a new
session,give the new session resume device permissions.
But under abnormal circumstances (such as switching quickly on a device using
wayland; and sometimes the kernel will suddenly send a SIGRTMIN signal, but
nothing changes),In these cases, logind does not give session resume device
permission, causing the device to have a black screen and suspended animation.
janana [Fri, 27 Oct 2023 08:19:48 +0000 (16:19 +0800)]
udev: fix typo for persistent flag
The 'parsistent' adjective is misspelt.
Luca Boccassi [Thu, 26 Oct 2023 23:10:28 +0000 (00:10 +0100)]
Merge pull request #29332 from esposem/ukify_simplify
ukify: automatically infer --signtool from the parameters given
Michal Sekletar [Wed, 25 Oct 2023 11:17:18 +0000 (13:17 +0200)]
fstab-generator: drop nofail and noauto options for critical mounts
Setting nofail for /usr mount doesn't make sense because without /usr we
can't really boot. However, having the flag set might cause races in
initrd where we could try to switchroot into rootfs before /usr is
actually mounted. Let's just ignore it so that we always have proper
mount unit ordering for /sysroot/usr mount.
Ronan Pigott [Tue, 24 Oct 2023 18:01:32 +0000 (11:01 -0700)]
network: implement RFC4039 DHCP Rapid Commit
This implements the DHCPv4 equivalent of the DHCPv6 Rapid Commit option,
enabling a lease to be selected in an accelerated 2-message exchange
instead of the typical 4-message exchange.
Ronan Pigott [Wed, 25 Oct 2023 23:17:44 +0000 (16:17 -0700)]
network: cleanup unreachable condition in dhcp client path
The client state is unconditionally set just above, making this
conditional unreachable.
Ronan Pigott [Thu, 26 Oct 2023 21:32:55 +0000 (14:32 -0700)]
editorconfig: add NEWS whitespace configuration
Lennart Poettering [Thu, 26 Oct 2023 16:45:33 +0000 (18:45 +0200)]
fd-uitl: rename PIPE_EBADF → EBADF_PAIR, and add EBADF_TRIPLET
We use it for more than just pipe() arrays. For example also for
socketpair(). Hence let's give it a generic name.
Also add EBADF_TRIPLET to mirror this for things like
stdin/stdout/stderr arrays, which we use a bunch of times.
Raul Cheleguini [Thu, 26 Oct 2023 17:22:31 +0000 (14:22 -0300)]
nspawn: Make parameter provided_mac a const for setup_veth()
Luca Boccassi [Thu, 26 Oct 2023 20:17:03 +0000 (21:17 +0100)]
Merge pull request #29711 from berrange/tests-silverblue
Fix test suite when developing on Fedora SilverBlue (rpm-ostree) host
Luca Boccassi [Thu, 26 Oct 2023 20:16:07 +0000 (21:16 +0100)]
Merge pull request #29727 from aafeijoo-suse/default-tpm2-public-key-fix
tpm2: fixes related to `tpm2-pcr-public-key.pem`
Luca Boccassi [Thu, 26 Oct 2023 13:56:58 +0000 (14:56 +0100)]
core: do not post-process skipped mounts
When a mount is gracefully skipped (e.g.: BindReadOnlyPaths=-/nonexistent)
we still post-process it, like making it read-only. Except if nothing
has been mounted, the mount point will be made read-only for no reason.
Track when mounts are skipped and avoid post-processing.
One day we'll switch all of this to the new mount api and do these
operations atomically or not at all.
Fixes https://github.com/systemd/systemd/issues/29725
Richard Maw [Wed, 25 Oct 2023 17:12:58 +0000 (18:12 +0100)]
test: Skip test-recurse-dir on overlayfs
Daan De Meyer [Thu, 26 Oct 2023 14:46:16 +0000 (16:46 +0200)]
mkfs-util: Use actual UID/GID in protofile instead of root
Antonio Alvarez Feijoo [Thu, 26 Oct 2023 14:51:37 +0000 (16:51 +0200)]
repart: do not ignore `tpm2-pcr-public-key.pem`
If `--tpm2-public-key=` is not specified, but `tpm2-pcr-public-key.pem` exists
in /{etc,run,usr/lib}/systemd/, it's being ignored.
Fixes
9e437994
Daniel P. Berrangé [Wed, 25 Oct 2023 16:52:11 +0000 (17:52 +0100)]
test-fstab-generator: skip test impacted by /mnt symlink
On rpm-ostree distributions such as Fedora SilverBlue /mnt
(and other well known paths) will be a symlink to a location
under /var. The fstab generator emits correct output in this
case, however, the data does not match the expected output
stored in the source tree.
Rather than trying to adapt the test data, just skip this
single test scenario when we see /mnt is a symlink.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé [Wed, 25 Oct 2023 16:39:04 +0000 (17:39 +0100)]
test-systemd-tmpfiles: skip when /tmp has unexpected ownership
The systemd-tmpfiles binary will report a fatal error if /tmp is not owned
either by root, or by the current user:
Detected unsafe path transition /tmp (owned by nobody) →
/tmp/test-systemd-tmpfiles.a8qc6n18 (owned by berrange)
during canonicalization of
tmp/test-systemd-tmpfiles.a8qc6n18/test-content.7chd7rdi
When doing development inside a 'toolbox' container (which is required
on a Fedora SilverBlue distro), /tmp is owned by 'nobody', because it
has been passed through from the host and host UID 0 gets mapped to
UID 65536 by usernamespaces. This triggers the unsafe path transition
error message.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé [Wed, 25 Oct 2023 16:19:35 +0000 (17:19 +0100)]
test-blockdev-util: avoid abort when /home is a symlink
On rpm-ostree distributions like Fedora SilverBlue /home (and various
other well known locations) are symlinks to somewhere beneath /var.
The path_is_encrypted() method uses O_NOFOLLOW and as a result will
return ELOOP on /home. This causes test-blockdev-util to abort.
Add ELOOP to the ignorable set of errnos for testing.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Michal Sekletar [Fri, 6 Oct 2023 10:26:44 +0000 (12:26 +0200)]
logind: introduce CreateSessionWithPIDFD()
This new D-Bus API uses pidfd to refer to the session leader. Also,
pam_systemd will try to make use of it when pidfd support is available.
Luca Boccassi [Thu, 26 Oct 2023 13:28:28 +0000 (14:28 +0100)]
Merge pull request #29720 from poettering/cgls-fix-delegate
cgls: fix display of delegation flag
Luca Boccassi [Thu, 26 Oct 2023 13:27:56 +0000 (14:27 +0100)]
Merge pull request #29529 from yuwata/core-namespace-check-priv
core/namespace: check if we have enough privilege
Antonio Alvarez Feijoo [Thu, 26 Oct 2023 13:14:52 +0000 (15:14 +0200)]
cryptenroll: fix bind default TPM2 signed policy to PCR 11
If `--tpm2-public-key=` is not specified, but `tpm2-pcr-public-key.pem` exists
in /{etc,run,usr/lib}/systemd/, the default PCR 11 is not being set.
Fixes
9e437994
Lennart Poettering [Thu, 26 Oct 2023 07:19:45 +0000 (09:19 +0200)]
varlink: make sure 'incomplete' bool is nullable
This field is optional, it only makes sense for user records that
actually have a privileged part to set.
Yu Watanabe [Wed, 11 Oct 2023 04:02:14 +0000 (13:02 +0900)]
test: add a simple test for PrivateNetwork=
Yu Watanabe [Wed, 11 Oct 2023 05:58:38 +0000 (14:58 +0900)]
core/namespace: check if we have enough privilege to mount sysfs or procfs
If we do not have enough privilege to mount a new instance of sysfs or
procfs, units e.g. with PrivateNetwork=yes may fail.
Let's first try to mount sysfs or procfs anyway to check if we have enough
privilege.
Fixes #29526.
Yu Watanabe [Wed, 11 Oct 2023 05:57:54 +0000 (14:57 +0900)]
core/namespace: unify logic of mounting /proc and /sys
No functional change, just refactoring.
Frantisek Sumsal [Thu, 26 Oct 2023 08:16:57 +0000 (08:16 +0000)]
Merge pull request #29718 from yuwata/networkd-update-state-file-after-dhcp6-information-request
network: update state file when DHCPv6 reply for INFORMATION-REQUEST is received
Lennart Poettering [Wed, 25 Oct 2023 21:05:24 +0000 (23:05 +0200)]
cgroup-show: rework cgroup tree display to operate by fd only
This restores display of the "delegate" flag of a cgroup. Previously we
erroneously passed a full fs path where a cgroup path was expected (the
difference being the /sys/fs/cgroup/ prefix), which meant we never read
the xattr properly. Let's fix that by simply operating by fd on the
cgroup and using it for all operations.
Lennart Poettering [Wed, 25 Oct 2023 21:04:15 +0000 (23:04 +0200)]
cgroup-util: add cg_is_delegated_fd() helper
This is just like cg_is_delegate() but operates on an fd instead of a
cgroup path.
Sooner or later we should access cgroupfs mostly via fds rather than
paths, but we aren't there yet. But let's at least get started.
Lennart Poettering [Wed, 25 Oct 2023 21:02:22 +0000 (23:02 +0200)]
tree-wide: port various users over to the new getxattr_at_bool() call
Lennart Poettering [Wed, 25 Oct 2023 20:59:53 +0000 (22:59 +0200)]
xattr-util: add new getxattr_at_bool() helper
This carefully combines getxattr_at_malloc() and parse_bool(), which is
something we use at multiple places.
Topi Miettinen [Wed, 25 Oct 2023 18:32:35 +0000 (21:32 +0300)]
core/cgroup: ignore NFT sets for other sources
Partially fixes: #29678
Luca Boccassi [Wed, 25 Oct 2023 14:15:02 +0000 (15:15 +0100)]
core: do not reset tty if there's no tty configured
Otherwise a lock is taken, which can be taken by multiple units at the
same time, depending on each other, causing a deadlock.
Fixes https://github.com/systemd/systemd/issues/29682