Commit Graph
1418 Commits
Author SHA1 Message Date
davidak bbd707a882 docs: document AI use disclosure consistently
The example also adds the model version to have it for reference.
2026-03-16 10:55:02 +01:00
Rito Rhymes e5a6cc3a6f docs: contain image sizing and prevent overflow on mobile
`max-width: 100%` keeps images from expanding beyond
their container and creating horizontal overflow scroll
on small screens.

`height: auto` ensures the image scales proportionally
when width is adjusted.
2026-03-12 09:38:03 +01:00
Rito Rhymes f18df62e71 docs: wrap bare enum constants in inline code in JOURNAL_FILE_FORMAT 2026-03-12 09:37:24 +01:00
Rito Rhymes f9d4dce604 docs: allow long inline code to wrap to prevent overflow on mobile 2026-03-12 00:22:19 -04:00
Rito Rhymes 4443626b16 docs: allow long links to wrap to prevent overflow on mobile 2026-03-12 00:22:19 -04:00
Zbigniew Jędrzejewski-Szmek 52abc9fe96 basic/stdio-util: introduce asprintf_safe
asprintf is nice to use, but the _documented_ error return convention is
unclear:
> If  memory  allocation  wasn't possible, or some other error occurs,
> these functions will return -1, and the contents of strp are undefined.

What exactly "undefined" means is up for debate: if it was really
undefined, the caller wouldn't be able to meaningfully clean up, because
they wouldn't know if strp is a valid pointer. So far we interpreted
"undefined" — in some parts of the code base — as "either NULL or a
valid pointer that needs to be freed", and — in other parts of the
codebase — as "always NULL". I checked glibc and musl, and they both
uncoditionally set the output pointer to NULL on failure.

There is also no information _why_ asprintf failed. It could be an
allocation error or format string error. But we just don't have this
information.

Let's add a wrapper that either returns a good string or a NULL pointer.
Since there's just one failure result, we don't need a separate return
value and an output argument and can simplify callers.
2026-03-06 17:46:59 +01:00
Lennart Poettering 66a43b02e6 docs: document the "verity" NvPCR measurements
I forgot this when I posted 32f405074a,
let's add it now.
2026-03-02 23:26:21 +00:00
Daan De Meyer 838528104b nsresourced: Optionally map foreign UID range
Whenever delegating UID ranges to a user namespace, it can also be
useful to map the foreign UID range, so that the container running in
the user namespace with delegated UID ranges can download container
images and unpack them to the foreign UID range.

Let's add an option mapForeign to make this possible. Note that this option
gives unprivileged users full access to the any foreign UID range owned directory
that they can access. Hence it is recommended (and already was recommended) to
store foreign UID range owned directories in a 0700 directory owned by the
owner of the tree to avoid access and modifications by other users.

This is already the case for the main users of the foreign UID range,
namely /var/lib/machines, /var/lib/portables and /home/<user> which all
use 0700 as their mode.

Users will also be able to create foreign UID range owned inodes in any
directories their own user can write to (on most systems this means /tmp,
/var/tmp and /home/<user>).
2026-02-24 18:29:37 +01:00
r-vdp 450e0dce02 systemd-boot: add a preferred setting that's similar to default but avoids booting known-bad entries
Motivation:
Currently, when setting the default boot pattern, boot assessment status
is not taken into account. This means that with boot assessment enabled,
when an explicit boot entry is configured as the default entry using an
EFI var, as is common for instance in A/B boot schemes, the configured
entry will be booted indefinitly, regardless of the entry's boot
assessment status.
In order to allow for this use case in combination with boot assessment,
we introduce a new `preferred` keyword, both in the config file and in the
bootctl CLI, that acts very similar to the existing `default` keyword but
takes boot assessment into account and never selects any entries that
have been marked as bad.
If the preferred pattern does not resolve to any bootable entry, and a
default pattern is also specified, then the default pattern will be
considered next, and we may then still select a known-bad entry to be
booted.

Fixes: https://github.com/systemd/systemd/issues/31215
Fixes: https://github.com/systemd/systemd/issues/40192
2026-02-18 03:28:12 +09:00
Yu Watanabe 618952f07e CODING_STYLE: fix typo
Follow-up for 83b4a5bb3d.
2026-02-16 14:35:21 +09:00
andre4ik3 4afa6cf07a locale-util: allow overriding locale directory via environment 2026-02-16 08:09:33 +09:00
Michael Vogt b5f8725989 varlinkctl: add pluggable protocol support to sd-varlink
When sd_varlink_connect_url() gets an unknown URL we now
check if there is a `$LIBEXECDIR/varlink-bridges/$scheme`
binary and execute it (with the url as the first arguments).

This makes varlink more flexible as it provides a way to
dynamically add "bridges" in LIBEXECDIR/varlink-bridges/. This is
conceptually similar to the libvarlink `varlink --bridge` command
and allows to e.g. call varlink over http{,s} via e.g. the new
varlink-http-bridge.

With a running varlink-http-bridge [0] one can do:
```console
$ varlinkctl call http://localhost:8080/ws/sockets/io.systemd.Hostname \
    io.systemd.Hostname.Describe {}
{
        "Hostname" : "top",
...
```

Closes: https://github.com/systemd/systemd/issues/40640

[0] https://github.com/mvo5/varlink-http-bridge/pull/1
2026-02-13 19:07:20 +01:00
Tabis Kabis b15b337f8e Switch back to 'http' in SVG files (#40661)
Firefox & Chrome don't render images because of 'https' being used in the SVG.
Switch back to 'http'.

Follow-up for 0922f62126
2026-02-12 17:49:19 +00:00
Lennart Poettering 83b4a5bb3d CODING_STYLE: add a brief log msg style guide 2026-02-12 18:00:37 +01:00
Luca Boccassi e67b008fa3 journald: set a lower size limit for FDs from unpriv processes
Unprivileged processes can send 768M in a FD-based message to journald,
which will be malloc'ed in one go, likely causing memory issues.
Set the limit for unprivileged users to 24M.

Allow coredumps as an exception, since we always allowed storing
up to the 768M max core files in the journal.

Reported on yeswehack.com as #YWH-PGM9780-48
2026-02-09 13:51:59 +01:00
Zbigniew Jędrzejewski-Szmek df8747806b Two cleanups (#40587) 2026-02-09 11:02:41 +01:00
Zbigniew Jędrzejewski-Szmek 25860000b6 Fix wording in two places
Noticed this while going through the stable series…
Also update location after 97318131fd.
2026-02-09 11:01:15 +01:00
Luca Boccassi a2e55fceee docs: note step to update obs workflow file on release 2026-02-09 09:36:53 +01:00
Mike Yuan 595ea7c2e8 docs/INCOMPATIBILITIES: fix typo 2026-02-09 02:36:50 +01:00
Lennart Poettering 43ef7c944c CODING_STYLE: document how to handle kernel compat
Let's define a way how to mark codepaths that are subject to
deletion once the kernel baseline reaches a certain version, to make it
easier to find these cases.

WHile we are at it, introuce a whole section in CODING_STYLE about
kernel version compat.

I followed the new scheme in #39621, but we can merge the coding style
guidelines on this already.
2026-02-06 21:01:37 +01:00
Zbigniew Jędrzejewski-Szmek 2cbea2dd75 docs: update old man page links to the official location 2026-02-03 12:49:37 +01:00
Zbigniew Jędrzejewski-Szmek d905ac0da1 docs/INCOMPATIBILITIES: describe the new meson option 2026-02-03 12:49:37 +01:00
Zbigniew Jędrzejewski-Szmek 0acd1b4f35 units: restore runlevel[0-6].target aliases
This partially reverts commit e58ba80a40. Those
aliases were removed as part of the removal of sysvinit compat, but the removal
was immediately reported as a regression by users. In particular, users can
have one of those set as the default target, or use those names in Wants= or
Requires= dependencies. At least in Fedora, the removal was immediately
reverted.

When looking at our "portability and stability promise", I noticed that those
units are explicitly listed in the promise. Let's restore them upstream. They
are conditionalized under a new -Dcompat-sysv-interfaces=bool option, so that
downstreams like Arch that wasnt to strictly avoid legacy interfaces can easily
disable them. They are dropped from the docs, like we do for all deprecated
interfaces.
2026-02-01 09:40:10 +01:00
Zbigniew Jędrzejewski-Szmek f4dd927e5c docs/PORTABILITY_AND_STABILITY: update the policy
The kernel has a "don't break userspace" policy [1] which is very easy
to understand and like (even if the details are complicated). We had a
complicated policy statement, but the actual practice is that we'll
generally avoid changes that cause problems for users. So the whole
detailed table is more of a guideline than something that we can rely
on.

To improve public perception, and to align the docs with practice, let's
make a general promise to keep stability, and change the existing table
to a "guideline" that tells people which interfaces to use and which not
to use so that use and development of systemd don't conflict or create
pain.

The existing document was very long, and I think it'll have a bigger
impact if it shorter. In particular, the chart is dropped, because it
was of limited use and severly outdated, because we have added many new
interfaces and components without updating it. Adding the missing
elements (and then keeping it updated) would be a lot of effort. The
chart would be most useful to somebody trying to build a systemd
reimplementation, but there haven't been many attempts like this, so
let's save the work and drop it and make the document shorter.

I also dropped the mentions of Debian. Back in the day, we did indeed
adopt many Debian conventions for config files and such, but over the
years the scope of the project has grown quite a bit and that part
of systemd is a small fraction now. And we've adopted conventions
and ideas from many other places too, so we don't mention Debian
specifically.

[1] https://docs.kernel.org/admin-guide/reporting-regressions.html
2026-01-31 17:28:42 +01:00
Yu Watanabe f3600fe955 docs: fix typo, grammar, and broken links (#40498) 2026-01-31 01:21:04 +09:00
Yu Watanabe 0922f62126 docs: update external links
- fix many links and drop unreachable links,
- always use https rather than http if supported,
2026-01-31 01:11:11 +09:00
Philip Withnall a05439097f docs: Add a diagram for the internals of sysupdate
I had to sketch this out before I could get the internals of
systemd-sysupdate straight in my head, particularly around how an
`UpdateSet` points to one `Instance` from each of a set of `Resource`s,
and those `Instance`s are either all sources or all targets.

Hopefully this is useful to the next person to look at the code.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2026-01-30 13:19:33 +09:00
Yu Watanabe bd604320af docs: fix multiple grammar errors
Generated by GitHub Copilot.
2026-01-29 00:40:18 +09:00
Lennart Poettering 3775fab341 CODING_STYLE: suggest a clear order for func params that combine fd and path 2026-01-24 20:52:00 +01:00
Daan De Meyer 824fcb95c9 portable: Enable unpriv operation
This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.

The user profiles are a copy of the system profiles but without
DynamicUser=yes (can't be used by user managers) and without
ProtectHome=yes (this masks /home which breaks StateDirectory= which
is lcoated inside /home)
2026-01-21 15:09:46 +01:00
DaanDeMeyer 995c507a6f nss-util: Add support for $SYSTEMD_NSS_LOG_LEVEL
When setting SYSTEMD_LOG_LEVEL=debug and debugging a tool that happens
to do NSS lookups, the resulting logs from varlink are obnoxiously
verbose. Let's parse a separate log level environment variable in NSS
to allow overriding the log level for NSS specifically so these noisy
logs can be silenced.
2026-01-21 12:03:07 +01:00
Lennart Poettering d0badc0a61 sysupdate: add simple "freshness" validation to systemd-sysupdate
In order to make "freeze" attacks against the update logic harder let's
add the ability to encode a "Best Before" date into SHA256SUMS directory
listings: if the current time is already beyond that time, we'll ignore
the SHA256SUMS as "stale" and fail the upgrade. Or in other words: the
freeze attack will now result in a client-side error eventually, instead
of success state.

The best before data is encoded in an optional pseudo-file listed in SHA256SUMS:
any file named BEST-BEFORE-YYYY-MM-DD.
2026-01-20 21:22:35 +01:00
Mike Yuan 73b82070e1 docs,man: more SysV compat removal notes 2026-01-18 15:50:54 +09:00
Yu Watanabe d207be293c Drop support for SysV rc-local script support
As already announced for several years.
2026-01-16 22:56:28 +09:00
Yu Watanabe 0a2cdd5891 Drop remaining references about sysv script support
Follow-up for 986fee6217.
2026-01-16 22:56:08 +09:00
DaanDeMeyer 90e80b9e8b docs: Document practice of using comments for argument names 2026-01-14 16:52:58 +01:00
Luca Boccassi 986fee6217 Drop support for sysvinit scripts
As announced by a few releases now, finally drop support for
sysvinit scripts.
Keep rc-local generator for now, as it's really a distinct
feature even though from the same era.
2026-01-06 10:34:02 +01:00
Yu Watanabe 2ff1a84b19 docs: update password agent document (#40235)
Adding some missing information from the code to the docs.
2026-01-02 08:03:37 +09:00
Ben Boeckel 0d15b2304b docs/PASSWORD_AGENTS: document the AcceptCached= field 2025-12-31 10:59:41 -05:00
Ben Boeckel 9f4606c361 docs/PASSWORD_AGENTS: document the Silent= field 2025-12-31 10:59:25 -05:00
Ben Boeckel dc08cb1eb8 docs/PASSWORD_AGENTS: clarify that Echo=0 may obscure 2025-12-31 10:58:53 -05:00
Ben Boeckel 19d7ce2f7b docs/PASSWORD_AGENTS: note that the user directory may be created 2025-12-31 10:58:26 -05:00
DaanDeMeyer f3c67f7e16 docs: Add explicit reference to unprivileged userns docs of mkosi
Fixes #40216
2025-12-28 09:31:47 +00:00
Mike Yuan 6e44160e0f docs/RELEASE: correct numbering without 7
Follow-up for b1192a01cd
2025-12-18 15:44:08 +01:00
Lennart Poettering d91aed3b55 docs: add redirection of the osc context to uapi website 2025-12-18 10:50:23 +01:00
Luca Boccassi ea73b8887b docs: update mkosi config file path in release process
Follow-up for fb514c2f8f
2025-12-18 00:47:14 +00:00
Luca Boccassi b1192a01cd docs: add OBS step to release process
Version rewriting in obs-service-tar-scm is not happy with rc tags
2025-12-18 00:46:41 +00:00
Luca Boccassi b262ded0bd Boot loader menu docs and tweaks (#39842) 2025-12-17 23:00:59 +00:00
Zbigniew Jędrzejewski-Szmek 755637b04a docs/BLI: add missing descriptions of feature bits
Follow up for 2553a5482c,
92bb46c464,
e15d18b4c6,
a67f22c4a7,
e1f1b5fc62.
2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 1228429908 docs/BOOT_LOADER_INTERFACE: use full variable names once
We said in the header that "all EFI variables use the vendor UUID
4a67b082-0a4c-41cf-b6c7-440b29bb8c4f", but people not familiar with
UEFI might not know that this is concatenated with the variable name.
Let's use the full form once — when introducing the variable — to
make it easier to grep and search for.

While at it, use sembreaks in the document. This makes subsequent
changes much easier to review. (It also shows that some sentences
are rather long and thus hard to understand.)
2025-12-17 22:55:23 +01:00