Commit Graph
78531 Commits
Author SHA1 Message Date
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
Yu Watanabe d5cdcba928 mkosi: replace deprecated settings and command with new ones
Follow-up for c008b70370.

These settings and command were deprecated by the following commit.
https://github.com/systemd/mkosi/commit/ebcd2efa03af5c04de91434634f2e4a956f7e53c
2025-01-06 12:00:43 +01:00
Daan De Meyer eaf0f79293 machine: several follow-ups for #35066 (#35868)
Addresses the post-merge review comments.
2025-01-06 11:59:55 +01:00
Lennart Poettering 336acebc77 basic: port various pidfd/pidref helpers to PIDFD_GET_INFO and PIDFD_GET_*_NAMESPACE (#35242)
Supersedes #35308 (cherry-picked one commit and replaced the rest)

(I left a few comments that's folded by GitHub. Please make sure to
check them too.)
2025-01-06 11:23:08 +01:00
Lennart Poettering 7f72184f12 more pidref'ification (#35839)
This is split out of #35264, but makes a ton of sense on its own.
2025-01-06 11:21:43 +01:00
Daan De Meyer 65b603492d tty-ask-password-agent: if we're spawning further agents, grant them notify access (#35855)
Alternative to #35853
2025-01-06 10:05:29 +01:00
Lennart Poettering dd445d6e99 cgroup-util: add remoteness checks to all cg_pidref_get_xyz() calls 2025-01-06 09:54:41 +01:00
Lennart Poettering 1740d3e04b sd-login: make use of getpeerpidref() and cg_pidref_get_*() 2025-01-06 09:54:41 +01:00
Lennart Poettering 92d78966fd cgroup-util: add pidref counterparts for cg_pid_get_session() + cg_pid_get_owner_uid() 2025-01-06 09:54:41 +01:00
Lennart Poettering b2206fe514 socket-util: introduce getpeerpidref()
This combines getpeercred() and getpeerpidfd() and returns a PidRef
2025-01-06 09:45:57 +01:00
Yu Watanabe c192d87d83 machine: comment source and destination must be absolute
Addresses the post-merge review comment:
https://github.com/systemd/systemd/pull/35066#discussion_r1901841247
2025-01-06 17:14:26 +09:00
Yu Watanabe 8551ac2092 machine: use json_dispatch_const_path() where applicable
Follow-up for #35066 and 3866e9ce9d.
2025-01-06 17:09:43 +09:00
Yu Watanabe 5eec51a6c1 packit: Move fmf metadata into upstream (#35700)
This moves https://src.fedoraproject.org/tests/systemd into upstream so
it's one less moving piece that we need to remember.
2025-01-06 10:37:56 +09:00
Daan De Meyer b0b88f18b3 packit: Move fmf metadata into upstream
This moves https://src.fedoraproject.org/tests/systemd into upstream
so it's one less moving piece that we need to remember. While we're at
it, do various cleanups as well:

- Remove non-packit logic
- Set NO_BUILD in mkosi.local.conf as it's not picked up from the
  process environment
- Don't set unused environment variables
- Remove workdir logic as we run in an ephemeral VM already
- Drop --verbose from meson test to reduce noise
  from passed tests
- Use mkosi sandbox and drop duplicated deps from metadata file
- Stop running the unit tests as they already run as part of the rpm
  build and as part of the integration tests.
- Various style fixes
2025-01-05 23:21:36 +01:00
Daan De Meyer 8a9b989cba mkosi: Make path exclude more generic
The systemd rpms we try to install in packit have /usr/bin/bash and
/usr/bin/python3 as dependencies which breaks dnf5 because mkosi
doesn't download filelists metadata and
https://bugzilla.redhat.com/show_bug.cgi?id=2263771 is still not fixed
almost a year after being reported.
2025-01-05 23:19:44 +01:00
Daan De Meyer c008b70370 mkosi: Update to latest 2025-01-05 21:18:32 +01:00
Yu Watanabe 3328d1e181 sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname()
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-05 03:52:05 +09:00
Yu Watanabe 7e5238625e sd-device: add missing debugging log
It was unexpectedly dropped by 660087dc9c.
2025-01-05 03:09:57 +09:00
Luca Boccassi c9098abd57 mkosi: update debian commit reference
* 7dc7ee8007 d/rules: drop duplicated config flag
* 2f417d66d1 Install new files for upstream CI
2025-01-05 01:49:43 +09:00
Chris Hofstaedtler 18f3c91a04 analyze: fix URLs to DeviceAllow=, IPAddressDeny=
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
2025-01-05 01:49:05 +09:00
Yu Watanabe be68dcdc20 firewall-util: allow to override the table and map names through env var
Then, use test specific names to make the test not conflict with
networkd.

Hopefully fixes #35526.
2025-01-05 01:48:29 +09:00
Mike Yuan 9598708a12 cgroup-util: explain why cg_pidref_get_path() cannot be ported over to pidfd helpers (yet)
See also: https://github.com/systemd/systemd/pull/35242#issuecomment-2506686806
2025-01-04 17:48:23 +01:00
Mike Yuan f1ba5c900b cgroup-util: introduce generic cg_path_from_cgroupid() helper
Taken from nsresourced/userns-registry.c userns_destroy_cgroup()
2025-01-04 17:48:22 +01:00
Mike Yuan 223d455670 process-util: make pid_is_unwaited() wrapper around pidref version 2025-01-04 17:48:22 +01:00
Mike Yuan 47f64104d1 process-util: port pidref_get_uid() and pidref_is_my_child() to pidfd helpers 2025-01-04 17:48:22 +01:00
Yu Watanabe 12f77fe058 hostname: read hardware serial from device tree (#35797)
Closes #35792.
2025-01-05 01:46:58 +09:00
Mike Yuan 85e7bbfaa4 pidfd-util: introduce pidfd_get_{ppid,uid,cgroupid} which goes via PIDFD_GET_INFO too 2025-01-04 17:08:01 +01:00
Mike Yuan dcf0ef3f42 pidfd-util: try to translate pidfd -> pid through ioctl(PIDFD_GET_INFO) 2025-01-04 17:08:01 +01:00
Mike Yuan 92b8e5e72f namespace-util: introduce pidref_in_same_namespace() 2025-01-04 17:08:01 +01:00
Mike Yuan a33f691374 process-util: move namespace_get_leader() to namespace-util
This allows us to drop the hack for recursive includes.
2025-01-04 17:08:00 +01:00
Mike Yuan 0577339d7d various: add missing include for namespace-util.h
Preparation for later commits for removing inclusion
of namespace-util from process-util.h
2025-01-04 17:08:00 +01:00
Mike Yuan 4cad58788b namespace-util: hook pidref_namespace_open() up with pidfd_get_namespace()
Supersedes #35308
2025-01-04 17:08:00 +01:00
Mike Yuan 2f7cd6c70a namespace-util: correct assertion in namespace_is_init()
Follow-up for 18ead2b03d
2025-01-04 17:07:59 +01:00
Mike Yuan 07610cafcf namespace-util: modernize fd_is_namespace() and is_our_namespace()
- Make fd_is_namespace() take NamespaceType
- Drop support for kernel without NS_GET_NSTYPE (< 4.11)
- Port is_our_namespace() to namespace_open_by_type()
  (preparation for later commits, where the latter
  would go by pidfd if available, avoiding procfs)
2025-01-04 17:07:59 +01:00
Yu Watanabe 1775337a36 namespace-util: refuse remote pidref in pidref_namespace_open() 2025-01-04 17:07:59 +01:00
Mike Yuan 72661e0091 pidfd-util: introduce helper for obtaining ns fd using PIDFD_GET_*_NAMESPACE directly 2025-01-04 17:07:59 +01:00
Mike Yuan 9a7b20b6a6 errno-util: add ERRNO_IS_IOCTL_NOT_SUPPORTED that checks EINVAL additionally 2025-01-04 17:07:58 +01:00
Mike Yuan 5d873679b1 core/socket: include peer pidfd id in socket service instance if available 2025-01-04 17:07:58 +01:00
Mike Yuan 2fa42318c3 pidref: move generic pidfd_get_inode_id() to pidfd-util
Prompted by https://github.com/systemd/systemd/pull/35224/commits/221d6e54c60389f26c2c79dbfa4e83204d2775d7

Also generalize pidfd_check_pidfs() and expose have_pidfs for later use.
2025-01-04 17:07:58 +01:00
Mike Yuan ebddfb0dee basic: introduce missing_pidfd.h 2025-01-04 16:58:13 +01:00
Mike Yuan b234026d09 process-util: extract pidfd-related funcs into pidfd-util.[ch] 2025-01-04 16:58:13 +01:00
Mike Yuan 4b59f6e63d tty-ask-password-agent: if we're spawning further agents, grant them notify access
Follow-up for 254649d576

Otherwise, systemd-ask-password-console.service times out
being started since the main process never delivers READY=1
notification.

Alternative to #35853
2025-01-04 16:44:53 +01:00
Mike Yuan c56935a09d tty-ask-password-agent: coding style tweaks 2025-01-04 16:44:50 +01:00
Mike Yuan 5734893f82 tree-wide: make sigactions static const 2025-01-04 16:40:53 +01:00
Mike Yuan bed4386e29 signal-util: generalize sigaction_nop_nocldstop 2025-01-04 16:40:53 +01:00
Yu Watanabe 573e8fc217 ptyfwd: fix typo
Follow-up for 8224a48da9.
2025-01-04 23:46:57 +09:00
Yu Watanabe ffe2923303 sd-varlink: introduce sd_varlink_get_current_method() 2025-01-04 23:33:09 +09:00
Yu Watanabe 8252b74f2d varlink: add comments for io.systemd.service interface 2025-01-04 23:17:47 +09:00
Yu Watanabe 04b09924b2 udev: split on_ctrl_msg() into small pieces (#35736) 2025-01-04 23:17:17 +09:00
Yu Watanabe 2da8da32b0 varlink: several cleanups for io.systemd.service interface (#35733) 2025-01-04 23:17:03 +09:00