]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
15 months agocore: refuse credentials with invalid names matching with glob 33916/head
Yu Watanabe [Sat, 3 Aug 2024 05:25:16 +0000 (14:25 +0900)] 
core: refuse credentials with invalid names matching with glob

Even if the glob pattern is valid, the pattern may match credentials
with invalid names. So, we need to check the names of the found
credentials.

Follow-up for 947c4d3952e30604b97f657dca08f93a0a8f4bae.

15 months agotest: a credential can be imported multiple times with different names
Yu Watanabe [Sat, 3 Aug 2024 05:22:37 +0000 (14:22 +0900)] 
test: a credential can be imported multiple times with different names

This is supported since 831f208783aeac443e6f2fc2efc3119535a032ef.
Let's explicitly test the functionality.

15 months agocore: make ImportCredentialEx= DBus property support without renaming
Yu Watanabe [Sat, 3 Aug 2024 05:19:35 +0000 (14:19 +0900)] 
core: make ImportCredentialEx= DBus property support without renaming

Note that the conf parser for ImportCredential= checks in the same way.

Follow-up for 831f208783aeac443e6f2fc2efc3119535a032ef.

15 months agocreds-util: fix typo
Yu Watanabe [Sat, 3 Aug 2024 04:33:59 +0000 (13:33 +0900)] 
creds-util: fix typo

Follow-up for 947c4d3952e30604b97f657dca08f93a0a8f4bae.

15 months agoMerge pull request #33911 from YHNdnzj/cgroup-setup-cleanup
Yu Watanabe [Fri, 2 Aug 2024 21:20:02 +0000 (06:20 +0900)] 
Merge pull request #33911 from YHNdnzj/cgroup-setup-cleanup

cgroup-setup/util: several cleanups; make use of cgroup.kill on client request

15 months agoman/net-naming-scheme: mention that NAMING_BRIDGE_MULTIFUNCTION_SLOT is reverted
Yu Watanabe [Fri, 2 Aug 2024 07:45:15 +0000 (16:45 +0900)] 
man/net-naming-scheme: mention that NAMING_BRIDGE_MULTIFUNCTION_SLOT is reverted

Follow-up for af7417ac7b07bc01232982bf46e9d72e69e7f820.
Closes #33596.

15 months agoman: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)
Yu Watanabe [Fri, 2 Aug 2024 04:42:29 +0000 (13:42 +0900)] 
man: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)

Prompted by #33702.

15 months agovmspawn: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:56:08 +0000 (05:56 +0900)] 
vmspawn: fix typo

Follow-up for 862c68a914ab4561d83875e58e05dcf65cb4a551.

15 months agoukify: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:55:02 +0000 (05:55 +0900)] 
ukify: fix typo

Follow-up for 987f4bce938e790622a4b4b89d37daa7adfdc141.

15 months agoudevadm: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:54:08 +0000 (05:54 +0900)] 
udevadm: fix typo

Follow-up for 0e789e6d48046d43c50dd949a71ac56f1127bb96.

15 months agoimport: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:53:04 +0000 (05:53 +0900)] 
import: fix typo

Follow-up for 17a6043a145f19f4f5b020fa4bb9c82c1ce160e7.

15 months agologin: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:51:54 +0000 (05:51 +0900)] 
login: fix typo

Follow-up for 0e10c3d8724b0a5d07871c9de71565ac91dd55b7.

15 months agocore/execute: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:50:46 +0000 (05:50 +0900)] 
core/execute: fix typo

Follow-up for 628c214656fada4228b62b1546220ac781002897.

15 months agoboot: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:49:53 +0000 (05:49 +0900)] 
boot: fix typo

Follow-up for dcac1e4a9ba231d8e88d36dbecf3d8b6c9b07cb2.

15 months agocgroup-util: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:48:51 +0000 (05:48 +0900)] 
cgroup-util: fix typo

Follow-up for 0fbb569de1dcc06118dba006cf7a40caf6cd94d0.

15 months agomkosi: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:47:52 +0000 (05:47 +0900)] 
mkosi: fix typo

Follow-up for 7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb.

15 months agoman: fix typo
Yu Watanabe [Fri, 2 Aug 2024 20:46:28 +0000 (05:46 +0900)] 
man: fix typo

Follow-up for 7102dc52e6b03248da1f01b3a8a4b83c6d7a1316 and 3d689b675b565c29a51c7127ae30839987aaa18b.

15 months agoman/net-naming-scheme: add missing period
Yu Watanabe [Fri, 2 Aug 2024 07:51:15 +0000 (16:51 +0900)] 
man/net-naming-scheme: add missing period

Follow-up for 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb.

15 months agoMerge pull request #33913 from berrange/cvm-s390x
Yu Watanabe [Fri, 2 Aug 2024 20:32:39 +0000 (05:32 +0900)] 
Merge pull request #33913 from berrange/cvm-s390x

Add detection of confidential virtualization on s390x architcture

15 months agoadvanced-issue-labeler: use correct label for env-generator
Mike Yuan [Fri, 2 Aug 2024 19:00:00 +0000 (21:00 +0200)] 
advanced-issue-labeler: use correct label for env-generator

15 months agoman/systemd-detect-virt: list known CVM technologies 33913/head
Daniel P. Berrangé [Fri, 2 Aug 2024 12:17:56 +0000 (13:17 +0100)] 
man/systemd-detect-virt: list known CVM technologies

Add a section which lists the known confidential virtual machine
technologies.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
15 months agoman/systemd-detect-virt: fix row spanning for VM header
Daniel P. Berrangé [Fri, 2 Aug 2024 12:07:13 +0000 (13:07 +0100)] 
man/systemd-detect-virt: fix row spanning for VM header

This fixes

  commit 9b0688f491674b53ef7a52bdf561a430c53673d6
  Author: Yu Watanabe <watanabe.yu+github@gmail.com>
  Date:   Tue Jan 9 10:52:49 2024 +0900

    virt: add Google Compute Engine support

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
15 months agoconfidential-virt: add detection for s390x target
Daniel P. Berrangé [Fri, 2 Aug 2024 10:03:10 +0000 (11:03 +0100)] 
confidential-virt: add detection for s390x target

The s390x platform provides confidential VMs using the "Secure Execution"
technology, which is also referred to as "Protected Virtualization" or
just "prot virt" in Linux / QEMU.

This can be detected through a simple sysfs attribute.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
15 months agoAdded support for L2 BridgeMDB entries (#32894)
jauge-technica [Fri, 2 Aug 2024 15:31:20 +0000 (17:31 +0200)] 
Added support for L2 BridgeMDB entries (#32894)

* Added support for L2 BridgeMDB entries

15 months agoconfidential-virt: split caching of CVM detection into separate method
Daniel P. Berrangé [Fri, 2 Aug 2024 15:26:00 +0000 (16:26 +0100)] 
confidential-virt: split caching of CVM detection into separate method

We have different impls of detect_confidential_virtualization per
architecture. The detection is cached in the x86_64 impl, and as we
add support for more targets, we want to use caching for all. It thus
makes sense to split caching out into an architecture independent
method.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
15 months agotest: don't use /skipped for subtests
Frantisek Sumsal [Fri, 2 Aug 2024 08:13:47 +0000 (10:13 +0200)] 
test: don't use /skipped for subtests

Since, at least the old framework, checks for the presence of the file
at the end and marks the whole test as skipped if it exists.

Resolves: systemd/systemd-centos-ci#728

15 months agocore/unit: utilize cgroup.kill on client request + SIGKILL 33911/head
Mike Yuan [Tue, 30 Jul 2024 21:03:15 +0000 (23:03 +0200)] 
core/unit: utilize cgroup.kill on client request + SIGKILL

15 months agocgroup-util: clean up cg_kill() and friends, completely split out cg_kill_kernel_sigk...
Mike Yuan [Tue, 30 Jul 2024 20:43:49 +0000 (22:43 +0200)] 
cgroup-util: clean up cg_kill() and friends, completely split out cg_kill_kernel_sigkill()

cg_kill_kernel_sigkill() has a narrow use case, and currently
no code really reaches that branch. Let's detach it from
cg_kill_recursive() hence, and call it explicitly later
where appropriate.

15 months agocore/unit: modernize log_kill() too
Mike Yuan [Tue, 30 Jul 2024 19:44:36 +0000 (21:44 +0200)] 
core/unit: modernize log_kill() too

15 months agocore/unit: unexport cg_kill log funcs, rather take in bool
Mike Yuan [Tue, 30 Jul 2024 19:37:36 +0000 (21:37 +0200)] 
core/unit: unexport cg_kill log funcs, rather take in bool

It seems unnecessary to duplicate the func ptrs everywhere.

15 months agocgroup-util: drop unused cg_rmdir()
Mike Yuan [Tue, 30 Jul 2024 20:29:00 +0000 (22:29 +0200)] 
cgroup-util: drop unused cg_rmdir()

When removing a cgroup, we always want to eliminate subcgroups
first, i.e. use cg_trim(). And cg_rmdir() (along with
CGROUP_REMOVE flag) is simply unused. Kill it.

15 months agocgroup-util: refactor cg_{ns,freezer,kill}_supported
Mike Yuan [Tue, 30 Jul 2024 19:18:47 +0000 (21:18 +0200)] 
cgroup-util: refactor cg_{ns,freezer,kill}_supported

15 months agocgroup-setup: kernel threads can reside in arbitrary cgroups
Mike Yuan [Tue, 30 Jul 2024 18:35:10 +0000 (20:35 +0200)] 
cgroup-setup: kernel threads can reside in arbitrary cgroups

Realistically this doesn't matter, as cg_migrate() is only
used to populate init.scope. But it's probably better to
make things clear.

15 months agocgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY
Mike Yuan [Tue, 30 Jul 2024 15:45:19 +0000 (17:45 +0200)] 
cgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY

15 months agocgroup-setup: use fchownat() + AT_EMPTY_PATH where appropriate
Mike Yuan [Tue, 30 Jul 2024 15:42:33 +0000 (17:42 +0200)] 
cgroup-setup: use fchownat() + AT_EMPTY_PATH where appropriate

This already existed long before our kernel baseline.
While at it, switch to RET_GATHER().

15 months agocgroup-setup: minor cleanups
Mike Yuan [Tue, 30 Jul 2024 14:10:06 +0000 (16:10 +0200)] 
cgroup-setup: minor cleanups

15 months agocgroup-setup: move cg_{,un}install_release_agent from cgroup-util
Mike Yuan [Tue, 30 Jul 2024 14:15:59 +0000 (16:15 +0200)] 
cgroup-setup: move cg_{,un}install_release_agent from cgroup-util

They're pid1-specific, so move them out of basic/.

15 months agocgroup-setup: group v1-specific functions
Mike Yuan [Tue, 30 Jul 2024 13:52:02 +0000 (15:52 +0200)] 
cgroup-setup: group v1-specific functions

15 months agocgroup-setup: drop unused cg_migrate_callback for cg_attach_everywhere()
Mike Yuan [Tue, 30 Jul 2024 13:40:25 +0000 (15:40 +0200)] 
cgroup-setup: drop unused cg_migrate_callback for cg_attach_everywhere()

While at it, move the typedef from cgroup-util to -setup.

15 months agolocalectl: introduce -l/--full option
Yu Watanabe [Fri, 2 Aug 2024 04:56:47 +0000 (13:56 +0900)] 
localectl: introduce -l/--full option

Closes #33906.

15 months agoMerge pull request #33032 from yuwata/sd-device-monitor-low-level-api
Yu Watanabe [Fri, 2 Aug 2024 03:41:53 +0000 (12:41 +0900)] 
Merge pull request #33032 from yuwata/sd-device-monitor-low-level-api

sd-device-monitor: expose low-level functions

15 months agoMerge pull request #33876 from dbnicholson/firstboot-root-creds-only
Yu Watanabe [Fri, 2 Aug 2024 02:37:05 +0000 (11:37 +0900)] 
Merge pull request #33876 from dbnicholson/firstboot-root-creds-only

firstboot: fix root params with creds and prompting disabled

15 months agoresolved: don't treat conn reset as packet loss
Ronan Pigott [Thu, 1 Aug 2024 17:59:12 +0000 (10:59 -0700)] 
resolved: don't treat conn reset as packet loss

tcp reset / icmp port-unreachable are markedly different conditions than
packet loss. It doesn't make much sense to retry in this case. It's
actually not clear if there is any benefit at all retrying tcp
connections, which were presumably already retried as necessary by the
tcp stack.

15 months agotest: add test case for restarting device monitor 33032/head
Yu Watanabe [Thu, 1 Aug 2024 06:46:03 +0000 (15:46 +0900)] 
test: add test case for restarting device monitor

15 months agosd-device-monitor: rename device_monitor_send_device() -> device_monitor_send()
Yu Watanabe [Wed, 31 Jul 2024 05:21:33 +0000 (14:21 +0900)] 
sd-device-monitor: rename device_monitor_send_device() -> device_monitor_send()

15 months agosd-device-monitor: expose low-level functions
Yu Watanabe [Mon, 27 May 2024 03:22:30 +0000 (12:22 +0900)] 
sd-device-monitor: expose low-level functions

To make it work without sd-event.

Prompted by recent chat:
> Hey all!
> reading man libudev, it says to use sd-device instead now. I've read that
> APIs header file and it seems it no longer has an equivalent to libudev's
> udev_monitor_get_fd, which AFAICT means I have to use sd-event to watch
> for events I'm interested in. I know I can "embed" sd-event in other event
> loops I might already have, but that seems overkill when I'm only interested
> in this one type of event and don't need sd-event for anything else.

15 months agosd-device-monitor: make device_monitor_receive_device() always initialize ret on...
Yu Watanabe [Fri, 2 Aug 2024 02:20:43 +0000 (11:20 +0900)] 
sd-device-monitor: make device_monitor_receive_device() always initialize ret on success

15 months agosd-device-monitor: remove device_monitor_disconnect()
Yu Watanabe [Mon, 27 May 2024 03:12:50 +0000 (12:12 +0900)] 
sd-device-monitor: remove device_monitor_disconnect()

It is not necessary to be exposed anymore.

15 months agoudev: manage only socket address of device monitor
Yu Watanabe [Mon, 27 May 2024 03:05:24 +0000 (12:05 +0900)] 
udev: manage only socket address of device monitor

Previously, the main process of systemd-udevd manages worker process
with their sd_device_monitor object to save the destination address.
Let's save only destination address, and drop worker's sd_device_monitor
object.

15 months agosd-device-monitor: introduce device_monitor_get_address()
Yu Watanabe [Mon, 27 May 2024 03:31:33 +0000 (12:31 +0900)] 
sd-device-monitor: introduce device_monitor_get_address()

Currently it is used internally, but will be used later at other places.

15 months agosd-device: allow to restart device monitor
Yu Watanabe [Mon, 27 May 2024 02:08:33 +0000 (11:08 +0900)] 
sd-device: allow to restart device monitor

Previously, sd_device_monitor_stop() closes socket, hence we cannot
restart monitoring unless recreating sd_device_monitor object.
Let's allow to restart monitor by sd_device_monitor_start().

15 months agosd-device-monitor: introduce sd_device_monitor_is_running()
Yu Watanabe [Thu, 1 Aug 2024 03:26:44 +0000 (12:26 +0900)] 
sd-device-monitor: introduce sd_device_monitor_is_running()

15 months agosd-device-monitor: bind socket in device_monitor_new_full()
Yu Watanabe [Mon, 27 May 2024 01:43:54 +0000 (10:43 +0900)] 
sd-device-monitor: bind socket in device_monitor_new_full()

Previously, device_monitor_enable_receiving() does
- update filter,
- bind socket.

But, binding socket can be done in when the socket is opened.
Let's remove device_monitor_enable_receiving() and bind the socket in
device_monitor_new_full().

15 months agosd-device-monitor: replace -1 with -EBADF
Yu Watanabe [Wed, 31 Jul 2024 03:23:40 +0000 (12:23 +0900)] 
sd-device-monitor: replace -1 with -EBADF

15 months agotest: modernize test-sd-device-monitor.c
Yu Watanabe [Thu, 1 Aug 2024 04:14:47 +0000 (13:14 +0900)] 
test: modernize test-sd-device-monitor.c

15 months agosocket-util: introduce netlink_socket_get_multicast_groups()
Yu Watanabe [Wed, 31 Jul 2024 04:21:08 +0000 (13:21 +0900)] 
socket-util: introduce netlink_socket_get_multicast_groups()

No functional change. Preparation for later commits.

15 months agoMerge pull request #33904 from bluca/os_release_type
Luca Boccassi [Thu, 1 Aug 2024 21:29:37 +0000 (23:29 +0200)] 
Merge pull request #33904 from bluca/os_release_type

os-release: change RELEASE_TYPE value from 'pre-release' to 'development' and break into paragraphs

15 months agoos-release: break RELEASE_TYPE into paragraphs and clarify about rolling stable releases 33904/head
Luca Boccassi [Thu, 1 Aug 2024 19:44:11 +0000 (20:44 +0100)] 
os-release: break RELEASE_TYPE into paragraphs and clarify about rolling stable releases

Arch and Tumbleweed do not do EOLs but are still stable, so clarify the paragraph.
Also break the entry in paragraphs, to make it more readable when rendered.

15 months agoos-release: change RELEASE_TYPE value from 'pre-release' to 'development'
Luca Boccassi [Thu, 1 Aug 2024 19:35:57 +0000 (20:35 +0100)] 
os-release: change RELEASE_TYPE value from 'pre-release' to 'development'

The point was made on https://lists.debian.org/debian-ctte/2024/08/msg00005.html
that 'pre-release sounds' like an RC candidate, ie, something that will change
very slightly in the released version. But this is not necessarily the case
for example at the beginnig of a Fedora Rawhide or Debian Testing release cycle,
so change it to a more generic 'development'

Follow-up for 7102dc52e6b03248da1f01b3a8a4b83c6d7a1316

15 months agoMerge pull request #33893 from yuwata/coverity
Luca Boccassi [Thu, 1 Aug 2024 18:33:53 +0000 (20:33 +0200)] 
Merge pull request #33893 from yuwata/coverity

tree-wide: resolve several issues found by coverity

15 months agoMerge pull request #32988 from AdrianVovk/os-release-prerelease
Luca Boccassi [Thu, 1 Aug 2024 16:56:15 +0000 (18:56 +0200)] 
Merge pull request #32988 from AdrianVovk/os-release-prerelease

os-release: Add RELEASE_TYPE=

15 months agoos-release: Introduce experiment RELEASE_TYPE 32988/head
Adrian Vovk [Fri, 24 May 2024 03:39:52 +0000 (23:39 -0400)] 
os-release: Introduce experiment RELEASE_TYPE

This is for experimental builds of the OS made to test some specific WIP
feature.

For example, let's say the distro in question is Asahi Linux and Apple
just released the M3 SoC. The Asahi developers will start porting to the
M3, and will quickly generate builds of Asahi Linux that can technically
boot but aren't ready for any kind of daily use. These images are marked
as experimental, and can be shared among the developers. If a user
somehow stumbles upon one of these images and tries to install it,
they'll be warned that they're about to install an experimental Apple M3
port of Asahi Linux. Eventually, once the Asahi developers think that
their M3 port is ready for a wider audience, they can merge it into the
mainline Asahi repos, where it will be distributed through the usual
nightly CI builds (where RELEASE_TYPE=pre-release; M3 support is no
longer experimental).

15 months agoos-release: Add RELEASE_TYPE=
Adrian Vovk [Wed, 22 May 2024 22:06:54 +0000 (18:06 -0400)] 
os-release: Add RELEASE_TYPE=

This will allow GUIs to customize their behavior a little based on the
type of release.

For example, an OS installer may display a warning/disclaimer if
RELEASE_TYPE=prerelease. The software updates app might be a bit more
insistent about upgrading to the next major release if
RELEASE_TYPE=stable than if RELEASE_TYPE=lts

15 months agoimport: check overflow 33893/head
Yu Watanabe [Thu, 1 Aug 2024 03:03:54 +0000 (12:03 +0900)] 
import: check overflow

Fixes CID#1548022 and CID#1548075.

15 months agotest: use ASSERT_OK_ERRNO() for setenv() and unsetenv()
Yu Watanabe [Thu, 1 Aug 2024 06:58:30 +0000 (15:58 +0900)] 
test: use ASSERT_OK_ERRNO() for setenv() and unsetenv()

15 months agotest: resolve "Unchecked return value" coverity warning
Yu Watanabe [Thu, 1 Aug 2024 02:57:43 +0000 (11:57 +0900)] 
test: resolve "Unchecked return value" coverity warning

Follow-up for c8210d98a4b64af6fadb1cb765c0451758af1303.
Fixes CID#1548920.

15 months agovmspawn: check overflow earlier
Yu Watanabe [Thu, 1 Aug 2024 02:50:53 +0000 (11:50 +0900)] 
vmspawn: check overflow earlier

Follow-up for 862c68a914ab4561d83875e58e05dcf65cb4a551.
Fixes CID#1550749.

15 months agotest: resolve "Unchecked return value" coverity warning
Yu Watanabe [Thu, 1 Aug 2024 02:47:33 +0000 (11:47 +0900)] 
test: resolve "Unchecked return value" coverity warning

Follow-up for 5fef5552a658130f00dc97d0a1003a6a49f3ca96.
Fixes CID#1558540.

15 months agotest: resolve "Unchecked return value" coverity warning
Yu Watanabe [Thu, 1 Aug 2024 02:44:51 +0000 (11:44 +0900)] 
test: resolve "Unchecked return value" coverity warning

Follow-up for 8c57700b6b61318594aaa757dff5e34219c0281d.
Fixes CID#1558539.

15 months agotest: attempt to install sshd-session from multiple places
Frantisek Sumsal [Thu, 1 Aug 2024 11:14:52 +0000 (13:14 +0200)] 
test: attempt to install sshd-session from multiple places

On Fedora the sshd-session binary is under /usr/libexec/openssh/ so
cover this path as well in the old framework.

Follow-up for aaa7b36bd15ca3a96a1e11a557482b0bc59c769f.

15 months agobuild(deps): bump github/codeql-action from 3.25.11 to 3.25.15
dependabot[bot] [Thu, 1 Aug 2024 09:02:04 +0000 (09:02 +0000)] 
build(deps): bump github/codeql-action from 3.25.11 to 3.25.15

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b611370bb5703a7efb587f9d136a52ea24c5c38c...afb54ba388a7dca6ecae48f608c4ff05ff4cc77a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agobuild(deps): bump meson from 1.4.1 to 1.5.1 in /.github/workflows
dependabot[bot] [Thu, 1 Aug 2024 09:15:29 +0000 (09:15 +0000)] 
build(deps): bump meson from 1.4.1 to 1.5.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.4.1 to 1.5.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.4.1...1.5.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agobuild(deps): bump systemd/mkosi
dependabot[bot] [Thu, 1 Aug 2024 09:02:16 +0000 (09:02 +0000)] 
build(deps): bump systemd/mkosi

Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 4eba736412c702bbbe2c6d4a58a92fa977219249 to 63fc1fde5b1aac1abf07ac499068c2b62263dafb.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/4eba736412c702bbbe2c6d4a58a92fa977219249...63fc1fde5b1aac1abf07ac499068c2b62263dafb)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Thu, 1 Aug 2024 09:02:10 +0000 (09:02 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/60c9f2b924a9c5a2ddbb25e7b23e8e11b56faab9...cc6721c45a8800cc666de45493545a07a638d121)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agobuild(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
dependabot[bot] [Thu, 1 Aug 2024 09:02:08 +0000 (09:02 +0000)] 
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/dc50aa9510b46c811795eb24b2f1ba02a914e534...62b2cac7ed8198b15735ed49ab1e5cf35480ba46)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agojournalctl: fix compile error on i386
Yu Watanabe [Thu, 1 Aug 2024 02:40:20 +0000 (11:40 +0900)] 
journalctl: fix compile error on i386

Fixes the following error:
===
In file included from ../src/basic/macro.h:13,
                 from ../src/basic/dirent-util.h:8,
                 from ../src/journal/journalctl-misc.c:3:
../src/journal/journalctl-misc.c: In function 'show_log_ids':
../src/journal/journalctl-misc.c:107:22: error: comparison is always true due to limited range of data type [-Werror=type-limits]
  107 |         assert(n_ids < INT64_MAX);
      |                      ^
../src/fundamental/macro-fundamental.h:70:44: note: in definition of macro '_unlikely_'
   70 | #define _unlikely_(x) (__builtin_expect(!!(x), 0))
      |                                            ^
../src/basic/macro.h:165:22: note: in expansion of macro 'assert_message_se'
  165 | #define assert(expr) assert_message_se(expr, #expr)
      |                      ^~~~~~~~~~~~~~~~~
../src/journal/journalctl-misc.c:107:9: note: in expansion of macro 'assert'
  107 |         assert(n_ids < INT64_MAX);
      |         ^~~~~~
cc1: all warnings being treated as errors
===

Follow-up for 0a8c1f6212a874b542a57ed5416e7d3575d2da93.

15 months agoMerge pull request #33888 from YHNdnzj/followups
Yu Watanabe [Thu, 1 Aug 2024 02:35:13 +0000 (11:35 +0900)] 
Merge pull request #33888 from YHNdnzj/followups

core: a few follow-ups for recent PRs

15 months agoMerge pull request #32448 from yuwata/journalctl-current-invocation
Yu Watanabe [Thu, 1 Aug 2024 02:33:20 +0000 (11:33 +0900)] 
Merge pull request #32448 from yuwata/journalctl-current-invocation

journalctl: introduce --list-invocations, -I, --invocation= options

15 months agotest: add test for journalctl --list-invocations and --invocation= 32448/head
Yu Watanabe [Sun, 12 May 2024 07:15:22 +0000 (16:15 +0900)] 
test: add test for journalctl --list-invocations and --invocation=

15 months agojournalctl: add --list-invocations command and -I/--invocation options
Yu Watanabe [Thu, 25 Apr 2024 04:38:24 +0000 (13:38 +0900)] 
journalctl: add --list-invocations command and -I/--invocation options

The --list-invocations command is similar to --list-boots, but shows
invocation IDs of specified unit. This should be useful when showing
a specific invocation of a unit.

The --invocation option is similar to --boot, but takes a invocation ID
or an offset. The -I option is equivalent to --invocation=0.

15 months agologs-show: extend journal_get_boots() and friends to find invocation IDs
Yu Watanabe [Thu, 25 Apr 2024 06:28:19 +0000 (15:28 +0900)] 
logs-show: extend journal_get_boots() and friends to find invocation IDs

Currently the extended features are not used, but will be used later.

15 months agologs-show: introduce several helper functions
Yu Watanabe [Thu, 25 Apr 2024 06:27:43 +0000 (15:27 +0900)] 
logs-show: introduce several helper functions

Currently these are not used, but will be used later.

15 months agouse int64_t for index in show_log_ids()
Yu Watanabe [Sat, 22 Jun 2024 08:45:57 +0000 (17:45 +0900)] 
use int64_t for index in show_log_ids()

15 months agojournalctl: split out show_log_ids() from action_list_boots()
Yu Watanabe [Thu, 25 Apr 2024 04:15:49 +0000 (13:15 +0900)] 
journalctl: split out show_log_ids() from action_list_boots()

No functional change, just refactoring and prepraration for later change.

15 months agojournalctl: update log messages
Yu Watanabe [Wed, 31 Jul 2024 02:27:28 +0000 (11:27 +0900)] 
journalctl: update log messages

15 months agologs-show: rename BootId -> LogId
Yu Watanabe [Thu, 25 Apr 2024 01:10:39 +0000 (10:10 +0900)] 
logs-show: rename BootId -> LogId

The struct itself is generic, and can be used for other ID.
Let's rename it to more generic one.
No functional change, just refactoring and preparation for later
commits.

15 months agocore/socket: stop hardcoding every service inactive state 33888/head
Mike Yuan [Wed, 31 Jul 2024 18:02:05 +0000 (20:02 +0200)] 
core/socket: stop hardcoding every service inactive state

History (c068650fcfc69aebb35be1c71f35dbc25b22030a,
941a12dcba57f6673230a9c413738c51374d2998) has proven
that we're not good at keeping socket and service states
in sync. Instead, let's query the high-level unit_active_state()
first, and only hardcode the two special auto-restart
service states.

Additionally, allow returning to listening state on SERVICE_CLEANING.

15 months agocore/cgroup: use UNIT_IS_INACTIVE_OR_FAILED where appropriate
Mike Yuan [Wed, 31 Jul 2024 17:53:53 +0000 (19:53 +0200)] 
core/cgroup: use UNIT_IS_INACTIVE_OR_FAILED where appropriate

15 months agocore/unit: merge use of LOG_CONTEXT_SET_LOG_LEVEL into LOG_CONTEXT_PUSH_UNIT
Mike Yuan [Wed, 31 Jul 2024 17:51:23 +0000 (19:51 +0200)] 
core/unit: merge use of LOG_CONTEXT_SET_LOG_LEVEL into LOG_CONTEXT_PUSH_UNIT

No functional change, since LOG_CONTEXT_PUSH_UNIT is only used
in exec_spawn().

15 months agocore: clean up ambient capability logging
Mike Yuan [Wed, 31 Jul 2024 16:38:14 +0000 (18:38 +0200)] 
core: clean up ambient capability logging

Follow-up for e0ebc81b2d194206c519375394bd67baa19e67ce

15 months agoMerge pull request #33886 from DaanDeMeyer/autologin
Daan De Meyer [Wed, 31 Jul 2024 18:21:12 +0000 (20:21 +0200)] 
Merge pull request #33886 from DaanDeMeyer/autologin

Two mkosi improvements

15 months agoMerge pull request #33885 from DaanDeMeyer/pidref-kthread
Daan De Meyer [Wed, 31 Jul 2024 17:07:35 +0000 (19:07 +0200)] 
Merge pull request #33885 from DaanDeMeyer/pidref-kthread

Two pidfd fixes

15 months agomkosi: Beef up testuser a bit 33886/head
Daan De Meyer [Wed, 31 Jul 2024 15:42:56 +0000 (17:42 +0200)] 
mkosi: Beef up testuser a bit

Give it a password and add it to some common groups.

15 months agomkosi: Switch to autologin via credentials
Daan De Meyer [Wed, 31 Jul 2024 15:38:12 +0000 (17:38 +0200)] 
mkosi: Switch to autologin via credentials

Let's use the newly added credentials to only enable autologin for
/dev/console (systemd-nspawn) and /dev/hvc0 (qemu) instead of enabling
autologin for every tty.

15 months agoMerge pull request #33873 from DaanDeMeyer/rename-creds
Daan De Meyer [Wed, 31 Jul 2024 15:35:58 +0000 (17:35 +0200)] 
Merge pull request #33873 from DaanDeMeyer/rename-creds

core: Add support for renaming credentials with ImportCredential=

15 months agosocket: fix socket activation of stopped services with pinned FD store
Michal Sekletar [Tue, 30 Jul 2024 14:22:03 +0000 (16:22 +0200)] 
socket: fix socket activation of stopped services with pinned FD store

15 months agoMerge pull request #32937 from steelman/github/drop-ambient-caps-executor
Luca Boccassi [Wed, 31 Jul 2024 14:11:30 +0000 (16:11 +0200)] 
Merge pull request #32937 from steelman/github/drop-ambient-caps-executor

core: drop ambient capabilities in systemd-executor

15 months agounits: Import tty specific credentials for each getty unit 33873/head
Daan De Meyer [Tue, 30 Jul 2024 14:22:34 +0000 (16:22 +0200)] 
units: Import tty specific credentials for each getty unit

As explained in the previous commit, this allows us to configure
agetty and login for individual ttys instead of globally.

15 months agocore: Add support for renaming credentials with ImportCredential=
Daan De Meyer [Tue, 30 Jul 2024 14:16:26 +0000 (16:16 +0200)] 
core: Add support for renaming credentials with ImportCredential=

This allows for "per-instance" credentials for units. The use case
is best explained with an example. Currently all our getty units
have the following stanzas in their unit file:

"""
ImportCredential=agetty.*
ImportCredential=login.*
"""

This means that setting agetty.autologin=root as a system credential
will make every instance of our all our getty units autologin as the
root user. This prevents us from doing autologin on /dev/hvc0 while
still requiring manual login on all other ttys.

To solve the issue, we introduce support for renaming credentials with
ImportCredential=. This will allow us to add the following to e.g.
serial-getty@.service:

"""
ImportCredential=tty.serial.%I.agetty.*:agetty.
ImportCredential=tty.serial.%I.login.*:login.
"""

which for serial-getty@hvc0.service will make the service manager read
all credentials of the form "tty.serial.hvc0.agetty.xxx" and pass them
to the service in the form "agetty.xxx" (same goes for login). We can
apply the same to each of the getty units to allow setting agetty and
login credentials for individual ttys instead of globally.

15 months agoexec-credential: Skip duplicate credentials in load_credential_glob()
Daan De Meyer [Wed, 31 Jul 2024 13:02:07 +0000 (15:02 +0200)] 
exec-credential: Skip duplicate credentials in load_credential_glob()

We document that when multiple credentials of the same name are found,
we use the first one found so let's actually implement that behavior.