Commit Graph

1231 Commits

Author SHA1 Message Date
Yu Watanabe
f477751b10 docs: fix mkosi section for Environment= setting 2025-04-16 08:30:25 +09:00
Yu Watanabe
7a5a667b1a JSON User/Group records: Add properties for UUIDs (#37024)
It is useful to have stable and unique identifiers for a security
principal. The majority of identitiy management systems in use with Unix
systems today (e.g. Active Directory objectGUID, FreeIPA ipaUniqueID,
Kanidm UUIDs) assign each account and group a unique UUID and exposing
that to applications allows them to refer to accounts in a stable
manner.

At this time we are merely adding the properties to the user/group
records. Adding ways to perform lookups by these IDs is left for a
future PR.

See [discussion](https://mastodon.social/@pid_eins/114283987142625086) and
[this comment](https://github.com/systemd/systemd/issues/24032#issuecomment-2745246757).

I'm sure there are wording aspects which could be improved, but I
believe this is a reasonable initial stab at the problem.
2025-04-11 07:10:56 +09:00
Erin Shepherd
800afbbcd7 JSON User/Group records: Add properties for UUIDs
It is useful to have stable and unique identifiers for a security principal.
The majority of identitiy management systems in use with Unix systems today
(e.g. Active Directory objectGUID, FreeIPA ipaUniqueID, Kanidm UUIDs) assign
each account and group a unique UUID and exposing that to applications allows
them to refer to accounts in a stable manner.

This change does not implement user or group lookup by UUID; that is left for
a later PR.
2025-04-07 23:50:35 +02:00
Yu Watanabe
4c697fdd9c docs/NETWORK_ONLINE: fix typo
Follow-up for 45b1321653.
2025-04-07 17:02:00 +09:00
Yu Watanabe
223be3e8cc docs/ARCHITECTURE: fix typo
Follow-up for e1c52cb271.
2025-04-07 17:00:35 +09:00
Mike Yuan
6801a9d88a nspawn: drop cgroup v1 handling 2025-04-04 14:36:11 +02:00
Daan De Meyer
0298ddb881 docs: Make sure we run mkosi genkey before everything else
Otherwise other commands might fail saying the keys don't exist
yet.
2025-04-03 16:37:56 +02:00
Lennart Poettering
3777c6e65a udev: new "image_dissect" builtin that can be used to generate symlinks based on partition designators (#36631)
This replaces #36209 and implements this via a new builtin, rather than
by shelling out to systemd-dissect.

Replaces: #36209 
Replaces: #28894
Fixes: #34319 
Fixes: #33453 
Fixes: #27897
Fixes: #18035
2025-04-03 13:32:11 +02:00
Lennart Poettering
e34c89897a dissect-image: guess verity root hash from the resources we found
When dissecting an image, let's make use of the Verity data even if we
got told no root hash explicitly: we can simply determine it by
concatenating the data partition uuid with the verity partition uuid.

Of course, on first thought this doesn't really add much: if the root
hash is not pinned from somewhere, this does not guarantee trust in
the image.

However, this is very useful for attestation: if we have the root hash
we can measure it before mounting things, even if we don't actually
authenticate it.

Hence, at best this helps us with attestation, at worst it doesn't improve
security but certainly doesn't hurt it.
2025-04-03 11:08:57 +02:00
Daan De Meyer
342d21ef19 mkosi: Move all mkosi configuration into mkosi/ subdirectory
Now that mkosi can automatically pick up its main configuration from
a mkosi/ subdirectory if it exists and there is no configuration in the
top level directory, let's make use of it  to reduce the amount of clutter
in the top level directory of the repository.

This will also make it easier to install the mkosi configuration files as
part of the testing packages later on.
2025-04-03 09:59:15 +02:00
Andreas Schneider
fd784642a2 docs/user_record: Put timeZone and resourceLimits in their own paragraph 2025-04-02 20:33:37 +09:00
Daan De Meyer
1b49fb9aaa mkosi: Use build image prepare scripts for tools tree as well
Instead of listing dependencies manually for the default tools tree,
let's reuse the prepare scripts from the build image. To make this work,
the sync script has to be configured for the tools tree as well so that
it's invoked both when building the tools tree and for the regular image,
otherwise, when doing the first build in a fresh checkout, the sync script
won't have executed yet as sync scripts for the regular images are executed
after building the default tools tree.
2025-03-28 12:29:09 +01:00
Daan De Meyer
d9f48358bd test: Make it possible to run the integration tests standalone
Currently, to run the integration tests, it's still necessary to
install various other build tools besides meson: A compiler, gperf,
libcap, ... which we want to avoid in CI systems where we receive
prebuilt systemd packages and only want to test them. Examples are
Debian's autopkgtest CI and Fedora CI. Let's make it possible for
these systems to run the integration tests without having to install
any other build dependency besides meson by extracting the logic
required to run the integration tests with meson into a separate
subdirectory and adding a standalone top-level meson.build file which
can be used to configure a meson tree with as its only purpose running
the integration tests.

Practically, we do the following:
- all the integration test directories and integration-test-wrapper.py
  are moved from test/ to test/integration-test/.
- All the installation logic is kept out of test/integration-test/ or
  any of its subdirectories and moved into test/meson.build instead.
- We add test/integration-test/standalone/meson.build to run the
  integration tests standalone. This meson file includes
  test/integration-test via a cute symlink hack to trick meson into
  including a parent directory with subdir().
- Documentation is included on how to use the new standalone mode.
- TEST-64-UDEV-STORAGE and TEST-85-NETWORK are changed to generate separate
  units for each testcase to make them behave more like the other integration
  tests.
2025-03-27 21:37:13 +01:00
Daan De Meyer
d22ffb44c1 tree-wide: Update outdated docs on removed old integration test stuff 2025-03-26 14:40:14 +01:00
Matteo Croce
c154bb65ad condition: introduce ConditionVersion=/AssertVersion=
Add a new condition wich checks against systemd version.
Change condition_test_kernel_version() into a generic condition_test_version()
so most of the code can be reused.

    $ systemctl --version
    systemd 258 (258~devel-g53ca5f6)

    $ systemd-analyze condition 'ConditionVersion=systemd>255'
    test.service: ConditionVersion=>255 succeeded.

    $ systemd-analyze condition 'ConditionVersion=systemd>260'
    test.service: ConditionVersion=>260 failed.

    $ systemd-analyze condition 'ConditionVersion=systemd>=258'
    test.service: ConditionVersion=>=258 succeeded.

    $ systemd-analyze condition 'ConditionVersion=systemd>=257.1'
    test.service: ConditionVersion=>=257.1 succeeded.

    $ uname -r
    6.12.13-200.fc41.aarch64

    $ systemd-analyze condition 'ConditionVersion=kernel > 4.4'
    test.service: ConditionVersion=kernel > 4.4 succeeded.

    $ systemd-analyze condition 'ConditionVersion=kernel > 6.20'
    test.service: ConditionVersion=kernel > 6.20 failed.

    $ systemd-analyze condition 'ConditionVersion=kernel < 9.0'
    test.service: ConditionVersion=kernel < 9.0 succeeded.
2025-03-18 18:36:59 +09:00
Zbigniew Jędrzejewski-Szmek
3a15daf440 Restore docs/PAX_CONTROL_GROUPS
This partially reverts 8d04b8198d.
If we completely drop the file, users will get a 404. But this document
has been in place for a long time and is referred to in many other places,
incl. our old wiki at https://www.freedesktop.org/wiki/Software/.
The page already says that it's been replaced
("… Please consult this document only as a historical reference. …").
We should only remove it from the index (which
8d04b8198d did).

In general, let's be more careful about preserving link stability.
When we change something in a way that breaks URLs, we're creating
pain for users.
2025-03-14 20:33:37 +09:00
Zbigniew Jędrzejewski-Szmek
51eab4afa6 docs/ROOTFS_DISCOVERY: removed doubled dot
Inadvertent change in 487b95d9b6.
2025-03-14 11:06:37 +01:00
Zbigniew Jędrzejewski-Szmek
487b95d9b6 docs/ROOTFS_DISCOVERY: minor wording and syntactic improvements 2025-03-13 16:05:03 +01:00
Ivan Kruglov
cd20d48c69 docs: clarify userns mapping when /proc/sys is rw 2025-03-11 13:25:54 +01:00
Mike Yuan
8d04b8198d docs: reference cgroup v1 as historical and unsupported 2025-03-10 05:24:19 +09:00
Lennart Poettering
0e1ede4b4b homectl: add interface for controlling storage for negative machine ID matches 2025-03-07 18:15:04 +01:00
Lennart Poettering
4f00011b68 homectl: add a 'dry-run' mode for registering/creating users
Since this only covers user creation/registration for now, let's hide it
behind an env var. We might reconsider this eventually and make it a
proper switch one day, but who knows, it after all has this "debug tool"
wiff.
2025-03-07 18:14:14 +01:00
Lennart Poettering
e0a634d520 docs: mention when /var/ has to be writable
In light of https://github.com/systemd/systemd/issues/36635 let's
clarify things a bit regarding writability of /var/.
2025-03-06 17:26:27 +01:00
Lennart Poettering
1ed0f6e9bf docs: document factory reset logic 2025-03-05 12:38:30 +01:00
Lennart Poettering
73e53d2ee4 tpm2-clear: optionally reset TPM during a factory reset 2025-03-05 12:37:51 +01:00
Daan De Meyer
daa2547e31 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.
2025-03-01 16:22:53 +01:00
Lennart Poettering
09b130c9cd doc: add OSC 3008 spec 2025-02-27 15:03:17 +01:00
Yu Watanabe
cf4b70aac4 docs: fix typo
Follow-ups for d5de148996.
2025-02-27 13:37:20 +09:00
Lennart Poettering
14871a6529 efivars: kill SystemdOptions efi var support
This has been depracted since v254 (2023). Let's kill it for
good now, it has been long enough with 2y. Noone has shown up who wants
to keep it. And given it doesn't work in SB world anyway, and is not
measured is quite problematic security wise.
2025-02-26 17:28:43 +01:00
Daan De Meyer
2dbc2d1d0f docs: Use mkosi -R instead of mkosi -t none (#36528)
mkosi now supports -R to rerun build scripts without rebuilding the
image so let's document that instead of the current hack to prevent
the rebuild by changing the output format.
2025-02-26 15:56:51 +01:00
Daan De Meyer
031a474c91 docs: Use mkosi -R instead of mkosi -t none
mkosi now supports -R to rerun build scripts without rebuilding the
image so let's document that instead of the current hack to prevent
the rebuild by changing the output format.
2025-02-26 14:58:53 +01:00
Lennart Poettering
d5de148996 doc: add document explaining the 3 key components of the boot and how we find the rootfs
After the network boot PR got merged we can use some more high-level
docs I guess.
2025-02-26 09:55:43 +01:00
Lin Jian
7593173c94 docs/CONTROL_GROUP_INTERFACE: fix typo 2025-02-21 16:51:49 +00:00
Lennart Poettering
e15d18b4c6 sd-stub: if we are http booted, query source URL and write to EFI variable
This way userspace can read the field, and use it to retrieve more
resources from the same place.
2025-02-21 10:03:32 +01:00
Daan De Meyer
75ace9fd84 docs: Document how to run the unit tests in HACKING.md 2025-02-20 10:31:19 +01:00
Anthony Avina
1bcb739f08 Update footer.html to 2025
Updating footer to reflect current year: 2025
2025-02-17 19:49:32 +00:00
Lennart Poettering
cfe16540c8 homectl: optionally force interactive firstboot query 2025-02-17 15:21:18 +01:00
Daan De Meyer
b429f82eaf mkosi: Update to latest
In https://github.com/systemd/mkosi/pull/3497, mkosi has started parsing
options passed after the verb as regular mkosi options instead of options
for the invoked command. We adapt to this change by adding '--' as a delimiter
everywhere where required.
2025-02-12 21:39:27 +01:00
Andreas Schneider
20634844dd docs: Add an examples for command line access
It took me almost an hour to read through the source code to construct
this line.
2025-02-06 13:38:34 +01:00
Lennart Poettering
9f036cfd57 docs: document the new area functionality 2025-02-06 09:23:49 +01:00
Dimitri John Ledkov
656dea9074 Symlink NVD CPE search 2025-02-03 12:00:24 +00:00
Dimitri John Ledkov
355afa9232 docs: Update CPE fields in package metadata spec
Update osCPE field example to use cpe 2.3 format, as is in active use by
AmazonLinux 2023 for example.

Add appCPE field example to document the upstream application CPE for the
applicable CVEs. Often distribution source package names are different from the
upstream CPE. For example adding/removing "lib" prefix, or adding version
stream "-3" suffix. This typically leads to guessing or fuzzy matching. Adding
appCPE in such cases can help to disambiguate (or collate) correct application
CPEs; especially beyond the lifetime of osCPE support timeframes.
2025-02-03 11:22:25 +00:00
Lennart Poettering
0f477f1d0b docs: fix plural form
Addresses: https://github.com/systemd/systemd/pull/36133#discussion_r1932816287
2025-01-29 13:13:59 +01:00
Lennart Poettering
1ff1e0e01b varlink: add new calls for server-side user record filtering to varlink IDL + to spec
This is preparation for adding server side filtering to the userdb
logic: it adds some fields for this to the userdb varlink API. This only
adds the IDL for it, no client will use it for now, no server implement
it. That's added in later commits.
2025-01-27 23:51:57 +01:00
Daan De Meyer
1743f0370f HACKING: Drop run0 from mkosi boot invocation
mkosi will itself use run0 or sudo when not running as root to invoke
systemd-nspawn, so no need to do it in HACKING.md.
2025-01-24 17:29:58 +01:00
Daan De Meyer
798b9fb7eb HACKING: Move OBS section further down
HACKING.md should first and foremost tell someone how to hack on
systemd, installing packages from OBS isn't the most likely section
a new contributor will be interested in, so let's move it further
down.
2025-01-24 17:28:15 +01:00
Lennart Poettering
72b932aac0 user-record: add fields for setting limits on /tmp/ and /dev/shm/ 2025-01-23 22:16:24 +01:00
Lennart Poettering
16ea491528 docs: mention the two other userdb services we ship these days 2025-01-23 21:13:41 +01:00
Yu Watanabe
ef199874ae mkosi: Update to latest (#36114) 2025-01-23 09:00:39 +09:00
Daan De Meyer
94558e6fc7 mkosi: Update to latest
With the latest mkosi, mkosi takes care of making sure it is
available within mkosi sandbox so we get rid of all the --preserve-env=
options when we invoke mkosi sandbox with sudo as these are not
required anymore. It also doesn't matter anymore if mkosi is installed
in /usr on the host so we get rid of the documentation around that as
well.
2025-01-22 22:25:51 +01:00