]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agotest: Connect test unit to console when running interactively 36586/head
Daan De Meyer [Mon, 3 Mar 2025 11:35:11 +0000 (12:35 +0100)] 
test: Connect test unit to console when running interactively

When running interactively, let's connect the test unit directly
to the console. This enables adding "bash" anywhere within an
integration test to get a shell within the test environment.

8 months agotest: Disable status messages when we start running a test
Daan De Meyer [Mon, 3 Mar 2025 11:33:56 +0000 (12:33 +0100)] 
test: Disable status messages when we start running a test

As soon as we start running a test, we want pid 1 to stop showing
status messages so let's tell pid 1 to stop showing status messages.

8 months agotest: Move getty-pre.target logic into integration-test-wrapper.py
Daan De Meyer [Mon, 3 Mar 2025 10:51:13 +0000 (11:51 +0100)] 
test: Move getty-pre.target logic into integration-test-wrapper.py

Also pull in getty-pre.target via Wants= so it actually gets pulled
into the transaction.

8 months agotest: Check stdin for interactivity, not stderr
Daan De Meyer [Mon, 3 Mar 2025 10:44:42 +0000 (11:44 +0100)] 
test: Check stdin for interactivity, not stderr

8 months agotests: remove cache=unsafe from TEST-64-UDEV-STORAGE
Jörg Behrmann [Sun, 2 Mar 2025 14:52:08 +0000 (15:52 +0100)] 
tests: remove cache=unsafe from TEST-64-UDEV-STORAGE

mkosi switch to the newer -blockdev qemu option in systemd/mkosi#3557 [1], but
cache=unsafe is an option only -drive supports.

Since the qemu-system_x86-64 man page [2] says this, cache.writeback=on is the
default and mkosi setting the other two options to the values corresponding to
unsafe, it should be fine to drop the cache=unsafe option.

┌─────────────┬─────────────────┬──────────────┬────────────────┐
│             │ cache.writeback │ cache.direct │ cache.no-flush │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writeback    │ on              │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│none         │ on              │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writethrough │ off             │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│directsync   │ off             │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│unsafe       │ on              │ off          │ on             │
└─────────────┴─────────────────┴──────────────┴────────────────┘

[1] https://github.com/systemd/mkosi/pull/3557
[2] https://manpages.ubuntu.com/manpages/noble/en/man1/qemu-system-x86_64.1.html

8 months agocore: DelegateNamespaces= does not depend on seccomp (#36580)
Steve Ramage [Sun, 2 Mar 2025 19:23:36 +0000 (11:23 -0800)] 
core: DelegateNamespaces= does not depend on seccomp (#36580)

8 months agosd-id128: gracefully handle systems where kernel keyring access is blocked
Lennart Poettering [Sun, 2 Mar 2025 06:51:05 +0000 (07:51 +0100)] 
sd-id128: gracefully handle systems where kernel keyring access is blocked

In various scenarios we invoke containers with access to the kernel
keyring blocked. Let's make sure we can handle this properly: when the
invocation ID is stored in in the kernel keyring and we try to read it
and get EPERM we should handle it gracefully, like EOPNOTSUPP.

8 months agoosc-context: several follow-ups (#36579)
Lennart Poettering [Sun, 2 Mar 2025 21:00:09 +0000 (22:00 +0100)] 
osc-context: several follow-ups (#36579)

8 months agovmspawn: switch from -drive to -blockdev option
Jörg Behrmann [Sun, 2 Mar 2025 15:07:54 +0000 (16:07 +0100)] 
vmspawn: switch from -drive to -blockdev option

8 months agocore/main: don't write shutdown OSC context outside of pid1 36579/head
Mike Yuan [Sun, 2 Mar 2025 14:11:29 +0000 (15:11 +0100)] 
core/main: don't write shutdown OSC context outside of pid1

Follow-up for 98c283131cda67c98946ef373e3bb33aa52de59a

8 months agorun: send out TERM= only if actually set
Mike Yuan [Sun, 2 Mar 2025 13:35:59 +0000 (14:35 +0100)] 
run: send out TERM= only if actually set

Follow-up for 4d6eb6441a5332c285e35907894c7d4f3463ba64

8 months agorun: log about osc_context_open_chpriv() failure
Mike Yuan [Sun, 2 Mar 2025 13:45:28 +0000 (14:45 +0100)] 
run: log about osc_context_open_chpriv() failure

Follow-up for 575922c914c732bb77c99aee54c84dc365d60631

8 months agoosc-context: drop unneeded temporary variable
Mike Yuan [Sun, 2 Mar 2025 15:00:39 +0000 (16:00 +0100)] 
osc-context: drop unneeded temporary variable

8 months agologin/pam_systemd: use isatty_safe()
Mike Yuan [Sun, 2 Mar 2025 15:00:05 +0000 (16:00 +0100)] 
login/pam_systemd: use isatty_safe()

Follow-up for d8069b8add9a2290d7ed85012f8459fccfc632ed

8 months agoRevert "sd-json: add new sd_json_variant_unset_field() call"
Lennart Poettering [Sun, 2 Mar 2025 05:57:25 +0000 (06:57 +0100)] 
Revert "sd-json: add new sd_json_variant_unset_field() call"

This reverts commit b6a2df630701de0bcf77850ced213d7fc3d0c4de.

The functionality is entirely redundant, we already have
sd_json_variant_filter() which does the same, and is in fact even more
powerful, since it takes a list instead of a single field to remove.

8 months agohwdb: Add accel orientation quirk for the GPD Pocket 4
Chris Grant [Sat, 1 Mar 2025 12:14:22 +0000 (01:14 +1300)] 
hwdb: Add accel orientation quirk for the GPD Pocket 4

8 months agohwdb: add Code Mercenaries Hard- und Software GmbH Virtual RC USB
Jaroslav Škarvada [Sat, 1 Mar 2025 12:16:24 +0000 (13:16 +0100)] 
hwdb: add Code Mercenaries Hard- und Software GmbH Virtual RC USB

It's official VRC USB dongle. Make it work in SDL apps, wine,
Steam, ... and fix the erratic mouse events when the dongle is in use.

8 months agoAdd a few more bypass environment variables
Daan De Meyer [Fri, 28 Feb 2025 16:14:49 +0000 (17:14 +0100)] 
Add a few more bypass environment variables

When we're building ParticleOS images, we don't want the package
manager (or mkosi) to run systemd-sysusers, systemd-tmpfiles or
systemctl preset so let's add a few more bypass environment
variables that we can set to have execution of these skipped like
we already have $SYSTEMD_HWDB_UPDATE_BYPASS and $KERNEL_INSTALL_BYPASS.

8 months agocore: Add DelegateNamespaces= (#36532)
Daan De Meyer [Sat, 1 Mar 2025 14:18:45 +0000 (15:18 +0100)] 
core: Add DelegateNamespaces= (#36532)

8 months agobuild(deps): bump github/codeql-action from 3.27.5 to 3.28.10
dependabot[bot] [Sat, 1 Mar 2025 09:57:32 +0000 (09:57 +0000)] 
build(deps): bump github/codeql-action from 3.27.5 to 3.28.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.28.10.
- [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/f09c1c0a94de965c15400f5634aa42fac8fb8f88...b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d)

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

Signed-off-by: dependabot[bot] <support@github.com>
8 months agobuild(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1
dependabot[bot] [Sat, 1 Mar 2025 09:57:25 +0000 (09:57 +0000)] 
build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1.
- [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/62b2cac7ed8198b15735ed49ab1e5cf35480ba46...f49aabe0b5af0936a0987cfb85d86b75731b0186)

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

Signed-off-by: dependabot[bot] <support@github.com>
8 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Sat, 1 Mar 2025 09:57:22 +0000 (09:57 +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.4.0 to 5.5.3.
- [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/cc6721c45a8800cc666de45493545a07a638d121...dd551ce780d8af741f8cd8bab6982667b906b457)

---
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>
8 months agocore: Add DelegateNamespaces= 36532/head
Daan De Meyer [Tue, 4 Feb 2025 14:48:36 +0000 (15:48 +0100)] 
core: Add DelegateNamespaces=

This delegates one or more namespaces to the service. Concretely,
this setting influences in which order we unshare namespaces. Delegated
namespaces are unshared *after* the user namespace is unshared. Other
namespaces are unshared *before* the user namespace is unshared.

Fixes #35369

8 months agobump minimum required version of glibc to 2.31, and drop many fallback logic around...
Yu Watanabe [Fri, 28 Feb 2025 19:18:17 +0000 (04:18 +0900)] 
bump minimum required version of glibc to 2.31, and drop many fallback logic around statx() (#36558)

glibc-2.31 was released on 2020-02-01, which is more than 5 years ago.
Let's also bump the baseline of glibc.

8 months agodissect: Skip partitions with _empty label
Daan De Meyer [Fri, 28 Feb 2025 12:09:17 +0000 (13:09 +0100)] 
dissect: Skip partitions with _empty label

8 months agohomed: port to notify_recv() + convert to PidRef (#36557)
Lennart Poettering [Fri, 28 Feb 2025 16:00:31 +0000 (17:00 +0100)] 
homed: port to notify_recv() + convert to PidRef (#36557)

Just some refactoring/modernization

8 months agomountpoint-util: make statx() failure critical 36558/head
Yu Watanabe [Fri, 28 Feb 2025 10:28:33 +0000 (19:28 +0900)] 
mountpoint-util: make statx() failure critical

Two error conditions are unreachable, as now both glibc and kernel
support statx(). In other many places, failure in statx() are handled as
critical, even if it is filtered by seccomp or so. Let's follow the same
way here.

8 months agostat-util: drop statx_fallback()
Yu Watanabe [Fri, 28 Feb 2025 10:19:23 +0000 (19:19 +0900)] 
stat-util: drop statx_fallback()

Now both our required baseline of glibc and kernel support statx.

8 months agotest-stat-util: check if linux/stat.h is actually included from sys/stat.h
Yu Watanabe [Fri, 28 Feb 2025 14:28:42 +0000 (23:28 +0900)] 
test-stat-util: check if linux/stat.h is actually included from sys/stat.h

8 months agotree-wide: drop workarounds for statx()
Yu Watanabe [Thu, 27 Feb 2025 17:06:32 +0000 (02:06 +0900)] 
tree-wide: drop workarounds for statx()

struct statx in glibc header was introduced in glibc-2.28
(fd70af45528d59a00eb3190ef6706cb299488fcd), but at that time,
sys/stat.h conflicts with linux/stat.h. Since glibc-2.30
(5dad6ffbb2b76215cfcd38c3001778536ada8e8a), sys/stat.h includes
linux/stat.h if exists.

Since now our baseline of glibc is 2.31. Hence, we can drop workarounds
for struct statx by importing linux/stat.h from newer kernel (v6.14-rc4).

8 months agoREADME: bump supported minimum glibc version to 2.31
Yu Watanabe [Fri, 28 Feb 2025 14:15:16 +0000 (23:15 +0900)] 
README: bump supported minimum glibc version to 2.31

The current glibc versions used by major distributions:
CentOS 9:  2.34
CentOS 10: 2.39
Fedora 40: 2.39
Fedora 41: 2.40
Fedora 42: 2.41
Ubuntu 20.04 LTS (focal): 2.31
Ubuntu 22.04 LTS (jammy): 2.35
Ubuntu 24.04 LTS (noble): 2.39
Ubuntu 24.10 (oracular):  2.40
Debian 11 (Bullseye, oldstable): 2.31
Debian 12 (Bookworm, stable):    2.36
openSUSE SLE-15-SP6: 2.38
openSUSE Tumbleweed: 2.40

Hence, based on our supporting policy, we can bump the base line to 2.31.
This commit does not change anything on our source code. But, will drop
many workarounds for supporting older glibc in later commits.

8 months agobasic/linux: update kernel headers from v6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 07:38:11 +0000 (16:38 +0900)] 
basic/linux: update kernel headers from v6.14-rc4

8 months agotmpfiles: fix output value assignment
Yu Watanabe [Fri, 28 Feb 2025 11:25:05 +0000 (20:25 +0900)] 
tmpfiles: fix output value assignment

Fixes a bug in 7eeda1da90c79ba420a6d82c1d9589b23048d79f (v256).

8 months agorecurse-dir: fix wrong assertion and error code in log
Yu Watanabe [Fri, 28 Feb 2025 11:22:42 +0000 (20:22 +0900)] 
recurse-dir: fix wrong assertion and error code in log

Fixes a bug in b5a07e524e42d2594174ca1a5b72aa4fdb9af94c (v250).

8 months agohomed: port worker management to PidRef 36557/head
Lennart Poettering [Fri, 28 Feb 2025 08:58:36 +0000 (09:58 +0100)] 
homed: port worker management to PidRef

8 months agopidref: take more fields into account in pidref_compare_func()
Lennart Poettering [Fri, 28 Feb 2025 08:56:02 +0000 (09:56 +0100)] 
pidref: take more fields into account in pidref_compare_func()

8 months agopidref: export hash funcs
Lennart Poettering [Fri, 28 Feb 2025 08:50:29 +0000 (09:50 +0100)] 
pidref: export hash funcs

That way we can use them for definition of additional hash_ops that map
pidrefs to arbitrary other resources.

8 months agohomed: port to notify_recv_with_fds()
Lennart Poettering [Fri, 28 Feb 2025 08:24:52 +0000 (09:24 +0100)] 
homed: port to notify_recv_with_fds()

Found another implementation of the sd_notify() reception. Modernize it.

8 months agonotify-recv: add notify_recv() flavour that returns a split up strv instead of he...
Lennart Poettering [Fri, 28 Feb 2025 08:35:24 +0000 (09:35 +0100)] 
notify-recv: add notify_recv() flavour that returns a split up strv instead of he message text as string

This is useful at various places, since we split up the message as first
thing there anyway.

8 months agoprofile: return earlier if it is loaded from non-bash shell
Yu Watanabe [Fri, 28 Feb 2025 07:26:53 +0000 (16:26 +0900)] 
profile: return earlier if it is loaded from non-bash shell

Follow-up for dadbb34919abd3fefeb5b8ccc9794da9398a2503.

8 months agopo: Translated using Weblate (Lithuanian)
Justinas Kairys [Fri, 28 Feb 2025 08:38:40 +0000 (09:38 +0100)] 
po: Translated using Weblate (Lithuanian)

Currently translated at 70.0% (180 of 257 strings)

Co-authored-by: Justinas Kairys <j.kairys@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/lt/
Translation: systemd/main

8 months agotest-network: extend test case for static routes
Yu Watanabe [Thu, 27 Feb 2025 18:24:39 +0000 (03:24 +0900)] 
test-network: extend test case for static routes

- split out verifications into two functions,
- also check the following scenarios:
  * unmanaging an existing interface,
  * re-managing an unmanaged interface,
  * adding a new unmanaged interface,
  * removing an unmanaged interface.

8 months agomkosi: update debian commit reference
Luca Boccassi [Fri, 28 Feb 2025 01:28:34 +0000 (01:28 +0000)] 
mkosi: update debian commit reference

4dab786933 Install new files
a57877706d Install new files
a6a26c4294 Install new files for upstream profile
2cc2784bbe Install new files for upstream
191edb6aa3 d/t/tests-in-lxd: skip test on any setup error
47c0a694b0 systemd-sysv: add Protected: yes
62ed7598fa README: add note about out-of-tree patches being forbidden
dfd1b0409f systemd-resolved: recommend libidn2-0
88291172bc d/rules: ignore more blhc false positives

8 months agoosc-context: fix typo
Yu Watanabe [Fri, 28 Feb 2025 06:51:02 +0000 (15:51 +0900)] 
osc-context: fix typo

Follow-up for 91aa93ec8d213340b7dea8dcd2e3fe5f90265517.

8 months agomachine-id-setup: bhyve also provides a uuid
Dan McGregor [Thu, 27 Feb 2025 22:18:23 +0000 (16:18 -0600)] 
machine-id-setup: bhyve also provides a uuid

When using UEFI with bhyve it behaves similarly to qemu, and provides
a product_uuid. Use it if found, just like with qemu.

8 months agoIssue OSC ANSI sequence whenever we change "context" of a TTY, i.e. acquire privs...
Lennart Poettering [Thu, 27 Feb 2025 21:12:54 +0000 (22:12 +0100)] 
Issue OSC ANSI sequence whenever we change "context" of a TTY, i.e. acquire privs, enter container or VM or similar (#35224)

This is mostly a strawman to get a discussion going regarding how to
communicate to terminal emulators such as ptyxis about run0 (and nspawn,
and vmspawn, and moe) and what it does.

It's hierarchical and I think still relatively simple.

/cc @chergert

8 months agoparse-util: extend the maximum length of nftable identifiers
Yu Watanabe [Thu, 27 Feb 2025 17:28:41 +0000 (02:28 +0900)] 
parse-util: extend the maximum length of nftable identifiers

Since kernel v4.14, more specifically, after the following four commits,
https://github.com/torvalds/linux/commit/e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770
https://github.com/torvalds/linux/commit/b7263e071aba736cea9e71cdf2e76dfa7aebd039
https://github.com/torvalds/linux/commit/387454901bd62022ac1b04e15bd8d4fcc60bbed4
https://github.com/torvalds/linux/commit/615095752100748e221028fc96163c2b78185ae4
the maximum length of nftable identifiers are extended to 255.

Now, our kernel baseline is 5.4, hence we can freely use the extended
name length.

This also modernizes code a bit, and adds test cases.

Closes #36542.

8 months agosbsign: trivial coding style cleanups
Yu Watanabe [Thu, 27 Feb 2025 17:12:26 +0000 (02:12 +0900)] 
sbsign: trivial coding style cleanups

Follow-ups for 8c0098d4861d8a9a617330e30c9ffad099fb641e.

8 months agolibfido2-util: accept cached pin in fido2_generate_hmac_hash()
Martin Wilck [Mon, 17 Feb 2025 17:40:35 +0000 (18:40 +0100)] 
libfido2-util: accept cached pin in fido2_generate_hmac_hash()

fido2_generate_hmac_hash() sets req->keyring to "fido2-pin" when
calling ask_password_auto(), suggesting that a key by this name
can be read from the kernel keyring. But the keyring is never
opened because the ASK_PASSWORD_ACCEPT_CACHED flag is not set.

Set ASK_PASSWORD_ACCEPT_CACHED to allow automated / scripted
setup of encrypted volumes with FIDO2. If the PIN turns out to
be invalid, clear ASK_PASSWORD_ACCEPT_CACHED to avoid retrying
and possible lockout.

8 months agosbsign: Add support for offline signing (#36485)
Lennart Poettering [Thu, 27 Feb 2025 16:34:05 +0000 (17:34 +0100)] 
sbsign: Add support for offline signing (#36485)

Add new options --prepare-offline-signing, --signed-data= and
--signed-data-signature= which allow for offline signing in a
similar manner to pesign.

8 months agounits: measure additional phases into PCR 11 when entering storage target mode or...
Lennart Poettering [Thu, 27 Feb 2025 14:29:48 +0000 (15:29 +0100)] 
units: measure additional phases into PCR 11 when entering storage target mode or factory reset (#36543)

Let's "spoil" access to TPM secrets when we boot into these two modes.
This matters in particular for storagetm: if the host gets exploited
while booted into storage target mode any secrets kept by the TPM might
remain accessible otherwise. By measuring a new "phase" word into PCR 11
we "blow the fuse" however on this boot.

8 months agocore: also issue OSC 3008 from service context 35224/head
Lennart Poettering [Fri, 31 Jan 2025 16:40:46 +0000 (17:40 +0100)] 
core: also issue OSC 3008 from service context

(Note: we also change TEST-13-NSPAWN.machined.sh minimally here, because
it checks for byte precise output of a pty allocated for a service
invocation - which it's not going to get if it claims that the pty is an
all-powerful one. After all this PR ensures that we'll generate the new
OSC sequence on non-dumb terminals associated with services. Hence, set
TERM=dumb explicitly to ensure no ANSI sequences are generated, ever.
Which is a nice test btw that TERM=dumb really does its thing here.)

8 months agoterminal-util: change conditioning in terminal_reset_defensive()
Lennart Poettering [Fri, 31 Jan 2025 14:32:01 +0000 (15:32 +0100)] 
terminal-util: change conditioning in terminal_reset_defensive()

So far we conditioned the logic that issues ansi sequences for resetting
the TTY based on whether something is a pty is not (under the assumption
we need no reset on ptys, since they are shortlived).

This is simply wrong though. The pty that a container getty is invoked
on is generally long-lived: as long as the container is up, and it will
be reused between getty instances/sessions all the time. In such a case
we really should reset properly.

Let's instead make the logic dependent on whether TERM is set to
anything other than "dumb". The previous commit made sure we always set
TERM in a sensible way in systemd-run, hence this
*explicit* logic sounds like a much better choice now, as it mea

8 months agoterminal-util: change 2nd parameter of terminal_reset_defensive() to flags
Lennart Poettering [Fri, 31 Jan 2025 14:30:07 +0000 (15:30 +0100)] 
terminal-util: change 2nd parameter of terminal_reset_defensive() to flags

let's convert the 2nd argumeng form a boolean to a proper flags
parameter. Doesn't change behaviour in anyway, but is more readable, and
prepares ground for adding more flags soon.

8 months agonspawn: set TERM to "dumb" if we are invoked outside of TTY context
Lennart Poettering [Fri, 31 Jan 2025 19:23:39 +0000 (20:23 +0100)] 
nspawn: set TERM to "dumb" if we are invoked outside of TTY context

8 months agorun: tweak logic how we set $TERM for activated services
Lennart Poettering [Fri, 31 Jan 2025 14:06:34 +0000 (15:06 +0100)] 
run: tweak logic how we set $TERM for activated services

There are two cases when we invoke a service on a TTY:

1. We ourselves are connected to a TTY and would intend to enable PTY
   forwarding.
2. We are allocating a TTY but are not ourselves connected to a TTY and
   just want to input/output to pipe or other non-TTY fd.

Let's propagate $TERM only as-is in the first case. In the 2nd case,
let's explicitly set $TERM to "dumb", so that invoked progams do not
issue needless ansi sequences, since we are not propagating them to a
terminal either.

This should be a much safer result, for cases where people include
invocations of systemd-nspawn with full TTY allocation in a shell
pipeline or so.

(of course, the user can always explicitly override this)

8 months agoprofile: generate shell + command OSC events
Lennart Poettering [Thu, 30 Jan 2025 14:09:21 +0000 (15:09 +0100)] 
profile: generate shell + command OSC events

8 months agopam_systemd: issue context OSC sequences when allocating new TTY session
Lennart Poettering [Thu, 30 Jan 2025 12:45:55 +0000 (13:45 +0100)] 
pam_systemd: issue context OSC sequences when allocating new TTY session

note: this also adds making a copy of the session type string after
registering the session. That's because we need to check the session
type we settled on later to condition out the OSC sequence (because it
should only be issued on TTY sessions). However, the session type string
originally quite likely points into the PAM environment block, which we
update in the meantime, invalidating that pointer. hence, make an
explicit copy first, and use that.

8 months agorun: generate OSC context sequence in run0/system-run
Lennart Poettering [Mon, 18 Nov 2024 11:46:50 +0000 (12:46 +0100)] 
run: generate OSC context sequence in run0/system-run

8 months agomachinectl: add OSC context support to login/shell commands
Lennart Poettering [Mon, 18 Nov 2024 11:46:08 +0000 (12:46 +0100)] 
machinectl: add OSC context support to login/shell commands

8 months agovmspawn: generate vm context OSC
Lennart Poettering [Mon, 18 Nov 2024 11:35:00 +0000 (12:35 +0100)] 
vmspawn: generate vm context OSC

8 months agonspawn: output context OSC
Lennart Poettering [Mon, 18 Nov 2024 11:33:13 +0000 (12:33 +0100)] 
nspawn: output context OSC

8 months agopid1: issue boot context issue at boot
Lennart Poettering [Mon, 18 Nov 2024 10:46:42 +0000 (11:46 +0100)] 
pid1: issue boot context issue at boot

8 months agoosc-util: add helpers for writing OSC context events
Lennart Poettering [Mon, 18 Nov 2024 10:45:59 +0000 (11:45 +0100)] 
osc-util: add helpers for writing OSC context events

8 months agodoc: add OSC 3008 spec
Lennart Poettering [Mon, 18 Nov 2024 23:05:42 +0000 (00:05 +0100)] 
doc: add OSC 3008 spec

8 months agoUpdate TODO 36485/head
Daan De Meyer [Thu, 27 Feb 2025 09:38:15 +0000 (10:38 +0100)] 
Update TODO

8 months agosbsign: Add support for offline signing
Daan De Meyer [Fri, 21 Feb 2025 23:31:41 +0000 (00:31 +0100)] 
sbsign: Add support for offline signing

Add new options --prepare-offline-signing, --signed-data= and
--signed-data-signature= which allow for offline signing in a
similar manner to pesign.

8 months agosbsign: Split out functions and switch to lower level APIs
Daan De Meyer [Fri, 21 Feb 2025 11:22:45 +0000 (12:22 +0100)] 
sbsign: Split out functions and switch to lower level APIs

Preparation for adding offline signing support. Some additional
features and fixes are included as well:

- We make sure to add an empty SMIMECAP attribute instead of a populated
  one to mimick pesign more.
- We switch to PKCS7_dataFinal() instead of PKCS7_final() as all that the
  latter does is an unnecessary copy before calling PKCS7_dataFinal().
- We add support for passing in the signing time via $SOURCE_DATE_EPOCH.

8 months agoman: clean up how we name our PEM files in examples (#36541)
Lennart Poettering [Thu, 27 Feb 2025 12:27:42 +0000 (13:27 +0100)] 
man: clean up how we name our PEM files in examples (#36541)

Kinda a follow-up for 2cc58b6c8ad1826f22b120c4148d123018a7b92c

8 months agounits: measure "factory-reset" into PCR 11 when we request factory reset 36543/head
Lennart Poettering [Thu, 27 Feb 2025 11:41:57 +0000 (12:41 +0100)] 
units: measure "factory-reset" into PCR 11 when we request factory reset

Let's make sure that the moment where factory reset is requested is
visible in the TPM PCR state, so that access to secrets is terminated.

This is particulary interesting when the system is booted with
systemd.unit=factory-reset.target on the kernel command line, requesting
a factory reset on the following boot. The preparations done in
userspace should already lose access to the TPM in that case.

8 months agounits: measure the fact we enter storage target mode into TPM
Lennart Poettering [Thu, 27 Feb 2025 11:33:36 +0000 (12:33 +0100)] 
units: measure the fact we enter storage target mode into TPM

storagetm mode means we we are network accessible. let's lock down
access to TPM secrets in this case: let's measure a pcr "phase" string
into PCR 11.

This is good as it means that if we are exploited in this state FDE
secrets protected by TPM are likely to remain protected, since the PCR
values wouldn't allow access.

8 months agoexec-invoke: Introduce setup_delegated_namespaces()
Daan De Meyer [Thu, 27 Feb 2025 08:28:15 +0000 (09:28 +0100)] 
exec-invoke: Introduce setup_delegated_namespaces()

No functional change, just refactoring.

8 months agoman: follow our own naming rules more closely 36541/head
Lennart Poettering [Thu, 27 Feb 2025 09:07:36 +0000 (10:07 +0100)] 
man: follow our own naming rules more closely

In some examples we inserted "-initrd" after the "public-key" instead of
before when naming PEM files. Let's fix that, and stick to common
suffixes.

8 months agoman: follow our certificate/public-key/private-key PEM file naming rules
Lennart Poettering [Thu, 27 Feb 2025 09:02:09 +0000 (10:02 +0100)] 
man: follow our certificate/public-key/private-key PEM file naming rules

In 2cc58b6c8ad1826f22b120c4148d123018a7b92c and related we established
rules on naming certs/public-keys/private-keys:

*-public-key.pem
*-private-key.pem
*-certificate.pem

Let's follow that naming in repart's man page too.

8 months agosbsign: Copy source to dest later
Daan De Meyer [Wed, 26 Feb 2025 09:14:56 +0000 (10:14 +0100)] 
sbsign: Copy source to dest later

Preparation for later commit.

8 months agokeyutil: Use fopen_tmpfile_linkable()
Daan De Meyer [Thu, 27 Feb 2025 09:03:29 +0000 (10:03 +0100)] 
keyutil: Use fopen_tmpfile_linkable()

8 months agokeyutil: Reword pkcs7 documentation string a little
Daan De Meyer [Thu, 27 Feb 2025 09:03:12 +0000 (10:03 +0100)] 
keyutil: Reword pkcs7 documentation string a little

8 months agoopenssl-util: Introduce pkcs7_new()
Daan De Meyer [Tue, 25 Feb 2025 07:53:13 +0000 (08:53 +0100)] 
openssl-util: Introduce pkcs7_new()

8 months agosbsign: Fix wrong variable being passed to log_error_errno()
Daan De Meyer [Wed, 26 Feb 2025 09:32:25 +0000 (10:32 +0100)] 
sbsign: Fix wrong variable being passed to log_error_errno()

8 months agoexec-invoke: Simplify logic
Daan De Meyer [Thu, 27 Feb 2025 08:24:04 +0000 (09:24 +0100)] 
exec-invoke: Simplify logic

8 months agoexec-invoke: Move KSM logic up
Daan De Meyer [Tue, 18 Feb 2025 11:25:16 +0000 (12:25 +0100)] 
exec-invoke: Move KSM logic up

Let's move it up to be located together with other resource logic
instead of having it stuffed inbetween the sandboxing logic.

8 months agoexec-invoke: Fix unshare() error handling (#36537)
Daan De Meyer [Thu, 27 Feb 2025 08:16:07 +0000 (09:16 +0100)] 
exec-invoke: Fix unshare() error handling (#36537)

8 months agoexec-invoke: Fix invalid use of error variable 36537/head
Daan De Meyer [Wed, 26 Feb 2025 21:34:33 +0000 (22:34 +0100)] 
exec-invoke: Fix invalid use of error variable

Follow up for 406f1775017a5631bc91a1f53ac5e50f4fbfac0c

8 months agoexec-invoke: Fix unshare() error handling
Daan De Meyer [Wed, 26 Feb 2025 21:31:35 +0000 (22:31 +0100)] 
exec-invoke: Fix unshare() error handling

Follow up for cd58b5a13537fc89b669ff9232ba2206214c9fa1

8 months agostoragetm: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:48:31 +0000 (13:48 +0900)] 
storagetm: fix typo

Follow-up for 1761066b135f1a322c446f102343ea4aa61fe3ee.

8 months agotest: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:42:00 +0000 (13:42 +0900)] 
test: fix typo

Follow-up for f01132aacfe925d95f3a28841412011c79913967.

8 months agodocs: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:32:01 +0000 (13:32 +0900)] 
docs: fix typo

Follow-ups for d5de14899641395893425b36fdb0e95929647b38.

8 months agoman: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:28:17 +0000 (13:28 +0900)] 
man: fix typo

Follow-up for f8825c1364fb1c3f3f5d96654e779fd51500f476.

8 months agojournal-remote: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:26:38 +0000 (13:26 +0900)] 
journal-remote: fix typo

Follow-up for c259c9e25329c93cb1b7363f89d917ffa5ce57c1.

8 months agonetwork: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:25:10 +0000 (13:25 +0900)] 
network: fix typo

Follow-up for 6698795edaf68f99354cf73d04307e1e2f4598c0.

8 months agohwdb: add GOLD WARRIOR SIM PhoenixRC 10411R
Jaroslav Škarvada [Wed, 26 Feb 2025 22:46:42 +0000 (23:46 +0100)] 
hwdb: add GOLD WARRIOR SIM PhoenixRC 10411R

Fixes #36522

8 months agomeson: Add missing dbus_programs dependency on update-dbus-docs
Daan De Meyer [Wed, 26 Feb 2025 21:06:41 +0000 (22:06 +0100)] 
meson: Add missing dbus_programs dependency on update-dbus-docs

All dbus programs have to be up-to-date for update-dbus-docs to
produce the expected output, so add the missing dependency.

8 months agopam_systemd/pam_systemd_home: various fixes (#36505)
Yu Watanabe [Thu, 27 Feb 2025 03:37:05 +0000 (12:37 +0900)] 
pam_systemd/pam_systemd_home: various fixes (#36505)

8 months agocore/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify...
Mike Yuan [Wed, 26 Feb 2025 14:02:58 +0000 (15:02 +0100)] 
core/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify-reload

Follow-up for 3bd28bf721dc70722ff1c675026ed0b44ad968a3

SERVICE_RELOAD_SIGNAL state can only be reached via explicit reload jobs,
and we have a clear distinction between that and plain RELOADING=1
notifications, the latter of which is issued by clients doing reload
outside of our job engine. I.e. upon SERVICE_RELOAD_SIGNAL + RELOADING=1
we don't propagate reload jobs again, since that's done during transaction
construction stage already. The handling of combined RELOADING=1 + READY=1
so far is bogus however, as it tries to propagate duplicate reload jobs.
Amend this by following the logic for standalone RELOADING=1.

8 months agopo: Translated using Weblate (Lithuanian)
Justinas Kairys [Wed, 26 Feb 2025 22:45:40 +0000 (23:45 +0100)] 
po: Translated using Weblate (Lithuanian)

Currently translated at 69.6% (179 of 257 strings)

Co-authored-by: Justinas Kairys <j.kairys@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/lt/
Translation: systemd/main

8 months agoupdate TODO 36505/head
Lennart Poettering [Mon, 24 Feb 2025 11:07:58 +0000 (12:07 +0100)] 
update TODO

8 months agotest: extend test case to validate per-area $XDG_RUNTIME_DIR
Lennart Poettering [Mon, 24 Feb 2025 11:08:16 +0000 (12:08 +0100)] 
test: extend test case to validate per-area $XDG_RUNTIME_DIR

8 months agopam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTOR...
Lennart Poettering [Sun, 23 Feb 2025 02:12:16 +0000 (03:12 +0100)] 
pam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTORY mgmt

When a user logs into a non-default area we give them a private
$HOME for that area (that's what 'area' is supposed to be after all). We
so far left $XDG_RUNTIME_DIRECTORY as it was. Let's change that and
mirror the subdirectory logic there too.

Why? $XDG_RUNTIME_DIR is generally the place where AF_UNIX sockets are
bound that can be used to connect to per-user services. (in particular
all those which are behind D-Bus.) If we don't patch $XDG_RUNTIME_DIR
like this then this means all the backing services will use the main
area, which is problematic (since clients and services will disagree on
$HOME), and makes it impossible to support the area concept for
graphical logins properly.

This does not actually make graphical logins work, but it at least makes
them fail cleanly. That's because this patch alone won't make sure a
per-area service manager/dbus instance is invoked automatically. That
however can be added later, in a patch to logind.

8 months agopam-systemd: rework update_environment()
Lennart Poettering [Wed, 26 Feb 2025 17:14:06 +0000 (18:14 +0100)] 
pam-systemd: rework update_environment()

Let's tweak update_environment() a bit: instead of being a NOP when no
value is specified, let's actively unset the specified environment
variable if it is set.

This shouldn't change much, since for the cases we call the function so
far the env vars in question should not be set before us in a way we'd
set them differently. However, this is nice preparation for later, as we
can make use of this for XDG_AREA which we might want to unset if we
consider the area dir invalid.

8 months agopam-systemd: modernize export_legacy_dbus_address() a bit
Lennart Poettering [Wed, 26 Feb 2025 17:13:10 +0000 (18:13 +0100)] 
pam-systemd: modernize export_legacy_dbus_address() a bit

Let's log about unexpected access() failures among other things