Commit Graph
78498 Commits
Author SHA1 Message Date
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
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
Luca Boccassi 993f6f4281 mkosi: update debian commit reference
* 5d185f7901 Install new files for upstream CI
* c6484e14fc Update changelog for 257.1-7 release
* 543c1e6a42 d/t/tests-in-lxd: more fixes for debci compatibility
* a7d4a7ffa3 Add missing d/copyright file to signed template packages
* ab48efa495 Install new files for upstream CI
* d0cae6d06c Update changelog for 257.1-6 release
* 2fd23ffaaa Drop build dependency on libxen-dev on armhf, no longer available
* 35fbac92a5 d/t/upstream: update mkosi setting name
* 4d9862709e d/t/tests-in-lxd: drop auto-apt-proxy.conf from container
* cf133a8d32 Update changelog for 257.1-5 release
* 77ec315ec5 d/t/upstream: switch from btrfs to ext4 and use nspawn again
* 9c57f51fb8 d/t/upstream: do not mask machined and instead use mkosi workaround
* eb8b91d98b d/t/upstream: do not use --verbose with 'meson test'
* 21c65b7e22 d/t/tests-in-lxd: auto-apt-proxy is in universe in Ubuntu
* 081a78884b d/t/tests-in-lxd: install auto-apt-proxy in the nested container
* faa014a64e Update changelog for 257.1-4 release
* 4a48235928 Backport patch to workaround issue in new mdadm
* 005390f039 d/t/upstream: mask systemd-machined
* f7c86d8ec3 d/t/upstream: disable homed/userdbd in the test runner
* a1c30e55e0 d/t/upstream: do not use nspawn for tests
* 9bad1d3021 d/t/upstream: decrease parallelism to nproc - 1
* 7d1d583d7b Update changelog for 257.1-3 release
* dfe5996032 autopkgtest: mark tests-in-lxd as flaky
* 331567b13d d/t/upstream: disable ToolsTree= in mkosi config
* 04af5d8604 Update changelog for 257.1-2 release
* 2e58f0092c d/t/tests-in-lxd: use a single autopkgtest invocation
* 4b608de1d2 d/t/tests-in-lxd: prefer $AUTOPKGTEST_TMP to manual discovery
* fb4f3e4272 d/t/tests-in-lxd: do not fail if /etc/apt/sources.list.d/autopkgtest.list does not exist
* 385bbd0147 d/t/tests-in-lxd: set -x to get more logs
* ab678ff879 d/t/tests-in-lxd: quote variables to fix shellcheck warning
* 0d0eb96f16 d/t/tests-in-lxd: workaround broken os-release in sid
* 916a518d8e d/t/tests-in-lxd: use correct lxc image for debian
* 97deb28f99 Update changelog for 257.1-1 release
* 6276567a1d Install systemd-creds bash completion
* 084248775c Drop patches, merged upstream
* c4aa4ac6bd Update upstream source from tag 'upstream/257.1'
* dffde7eae8 d/watch: restrict to v257.x series
* 3c5143991c d/t/tests-in-lxd: fix autopkgtest source dir
* 5626a78ad1 systemd-ukify: recommend python3-cryptography
* ca5fdf7bc5 d/t/control: move tests-in-lxd above upstream suite
* 71c3f1014c d/systemd-resolved.postinst: copy existing /etc/resolv.conf on new installs
* 6ca4f4c1e5 d/control: make systemd-sysv Depends: on matching version of systemd
* eae57033c2 debian/control: add Breaks: systemd (<< ${binary:Version}) for udev
* 408cc1872c debian/systemd.postinst: Skip daemon-reexec and try-restarts during shutdown
* 6b3a01118b debian/tests/boot-and-services: drop test_no_failed
* 5a333eef8c d/t/tests-in-lxd: run some tests under LXD
* 882d221400 d/t/upstream: fix mkosi syntax warnings
2025-01-04 22:02:17 +09:00
Yu Watanabe bbb0dbe6b1 udev-ctrl: refuse ENV control message with invalid environment assignment
Previously, udevd accepts an arbitrary pair of key and value.
Let's make the environment variable assignment more strict for safety.

Note, we already refuse environment variables with the same way in
net/link-config.c.
2025-01-04 21:54:40 +09:00
Yu Watanabe 4c547d216a udev: introduce udev_property_name_is_valid() and friends 2025-01-04 21:54:40 +09:00
Yu Watanabe b358833ee9 udev-config: split on_ctrl_msg() into small pieces
No functional change, just refactroing and preparation for later
commits.
2025-01-04 21:54:40 +09:00
Yu Watanabe 4ea611b8a4 varlink: invert uid check to reduce call of getuid() 2025-01-04 20:57:06 +09:00
Yu Watanabe 93081be64b sd-json: introduce json_dispatch_log_level()
Then, use it in io.systemd.service.SetLogLevel method.
2025-01-04 20:57:06 +09:00
Daan De Meyer 64c4961e80 sd-json: replace ASSERT_PTR() with assert_return() (#35849) 2025-01-04 11:06:36 +01:00
Yu Watanabe c10fbe2cf8 libsystemd: drop duplicated symbol
Follow-up for 107986a33e.
2025-01-04 09:28:14 +01:00
Yu Watanabe 37a393b99e sd-json,sd-varlink: trivial coding style fixlets 2025-01-04 13:20:50 +09:00
Yu Watanabe c882735596 sd-json: replace ASSERT_PTR() with assert_return() in public functions 2025-01-04 13:10:38 +09:00
Yu Watanabe aac9d150ed tpm2: tweaks to PCR mask parsing (#35835) 2025-01-04 12:42:54 +09:00
Lennart Poettering b1fb2d971c nspawn: move uid shift/chown() code into shared/ 2025-01-04 12:23:31 +09:00
Tim Crawford bd07786b90 hwdb: Add newer System76 Pangolins
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-01-04 12:05:22 +09:00
Yu Watanabe e10a748400 libsystemd: drop duplicated symbol
Follow-up for 107986a33e.
2025-01-04 12:01:24 +09:00
Daan De Meyer 276890d629 ptyfwd: Add --read-only option 2025-01-03 21:14:47 +01:00
Tim Crawford 83154c8995 hwdb: Add micmute for System76
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-01-03 21:06:55 +01:00
Lennart Poettering 57e55f93bb terminal-util: modernize vtnr_from_tty() a bit 2025-01-03 21:05:58 +01:00
Daan De Meyer 496639d02c mkosi: Handle directories in debian/not-installed correctly (#35832)
If a directory is specified without a glob pattern, we have to exclude
all files in that directory, so add a recursive glob to every directory
and enable the bash globstar feature when globbing to '**/*' matches all
files and directories beneath the given directory.
2025-01-03 20:27:05 +01:00
Daan De Meyer d0d647e084 Introduce systemd-pty-forward (#35761)
This allows running a command with tinted terminal background.
2025-01-03 19:34:42 +01:00
Daan De Meyer e965430f57 mkosi: Warn on unpackaged files in the debian package build 2025-01-03 19:33:32 +01:00
Daan De Meyer bcb10ac473 TEST-74-AUX-UTILS: Use tee
Something is failing but we can't see what from the logs so let's use
tee so we can.
2025-01-03 19:32:48 +01:00
Daan De Meyer 8224a48da9 Introduce systemd-pty-forward
This allows running a command with tinted terminal background.
2025-01-03 17:07:33 +01:00
Daan De Meyer 37ce3fd2b7 core: do not disconnect from bus when failed to install signal match (#35779)
If bus_add_match_full() is called without install callback and we failed
to install the signal match e.g. by timeout, then add_match_callback()
will disconnect from the bus. Let's use a custom install handler and
handle failures gracefully.

This does not *solve* the root cause of issue
https://github.com/systemd/systemd/issues/30573, but should improve the
situation when the issue is triggered.
2025-01-03 16:45:50 +01:00
Lennart Poettering 9f97f2899a dissect-image: rename ReplyParameters → MountImageReplyParameters 2025-01-03 16:44:08 +01:00
Lennart Poettering bacc04bedc dissect: minor simplifications 2025-01-03 16:43:43 +01:00
Lennart Poettering 3866e9ce9d sd-json: add json_dispatch_const_path() helper
The new json_dispatch_const_path() is to json_dispatch_path() what
sd_json_dispatch_const_string() is to sd_json_dispatch_ string(), i.e.
doesn't implicitly strdup() the string, but gives you the pointer into
the JSON structure, and thus requires you to keep it pinned.
2025-01-03 16:38:56 +01:00
Daan De Meyer b0d0b08c62 dissect: minor additions to the systemd-dissect tool (#35829) 2025-01-03 16:05:30 +01:00
Daan De Meyer b6507d81ce nspawn: trivial tweaklets (#35831) 2025-01-03 15:54:43 +01:00
Lennart Poettering bde379461d hwdb: replace f20 by micmute in mm kbd database (#34325)
here's a (strawman for now) PR addressing #34323.

don't merge until there's consensus that it's the right time to address
this.

Fixes: #34323
2025-01-03 14:55:50 +01:00
Daan De Meyer 568988bec4 vmspawn: Switch to virtconsole for headless console (#35836)
virtconsole is the modern way to set up a headless serial connection
to a virtual machine so let's make use of it instead of -serial. This
also allows us to get rid of the per architecture serial console device
names and makes vmspawn more consistent with mkosi qemu which already
uses
virtconsole.
2025-01-03 13:54:09 +01:00
Daan De Meyer b0e9ac018d machine: introduce io.systemd.Machine.BindMount method (#35066)
This PR introduces io.systemd.Machine.BindMount method which is
alternative to DBus's BindMountMachine.
2025-01-03 13:19:48 +01:00