]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agoMerge pull request #31411 from poettering/build-path
Luca Boccassi [Fri, 23 Feb 2024 11:57:42 +0000 (11:57 +0000)] 
Merge pull request #31411 from poettering/build-path

userdbd,homed,importd,sysupdate,pid1: make it easier to run daemons that have callouts from build dir

3 months agoupdate TODO
Lennart Poettering [Fri, 23 Feb 2024 10:09:08 +0000 (11:09 +0100)] 
update TODO

3 months agoMerge pull request #31352 from DaanDeMeyer/versioning
Zbigniew Jędrzejewski-Szmek [Fri, 23 Feb 2024 10:07:56 +0000 (11:07 +0100)] 
Merge pull request #31352 from DaanDeMeyer/versioning

Rework meson-vcs-tag.sh

3 months agosd-dhcp,sd-ndisc: drop mistakenly set copyright
Yu Watanabe [Fri, 23 Feb 2024 04:16:23 +0000 (13:16 +0900)] 
sd-dhcp,sd-ndisc: drop mistakenly set copyright

Follow-ups for
  6efa51f8621cf6a44c5d8472aa50142e19452c7f (sd-dhcp-client-id.h),
  97c3506dcd6e16fd285ce383f8fea992e923aa17 (sd-dhcp-duid.h),
  461dbb2fa97b5c03b19462bf0f462c9f96a59f1b (sd-dhcp-option.h),
  dd8ab4a2060ed1dd0ccf1044f221750bd193cd85 (sd-dhcp-server-lease.h),
  ca34b434812f30989aa7d181e7e433815cb70dda (sd-ndisc-protocol.h and sd-ndisc-router.h).

3 months agoci(freezer): use GitHub Markdown magic for messages
Jan Macku [Fri, 23 Feb 2024 08:05:35 +0000 (09:05 +0100)] 
ci(freezer): use GitHub Markdown magic for messages

It should make messages easier to notice.

GitHub docs: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts

3 months agoudev: Add /dev/media/by-path symlinks for media controllers
Max Staudt [Thu, 22 Feb 2024 08:47:36 +0000 (17:47 +0900)] 
udev: Add /dev/media/by-path symlinks for media controllers

Add persistent symlinks for media controller ("mediaX") devices, based
on their ID_PATH udev properties.

For example, if the uvcvideo driver creates /dev/media0, a persistent
name may be:
/dev/media/by-path/pci-0000:04:00.3-usb-0:1:1.0-media-controller

Persistent links are a handy tool to make scripts self-documenting
during development or in tests, as well as less error prone in case of
devices changing enumeration order. For media controllers, one can
alternatively scan through all of them and look for a matching bus_info
in their struct media_device_info, but the links are much handier when
drafting something by hand.

A similar pattern already exists for Video4Linux /dev/videoX devices,
see 60-persistent-v4l.rules for those.

3 months agonetwork: introduce per-interface IP forwarding settings
Yu Watanabe [Tue, 20 Feb 2024 21:20:45 +0000 (06:20 +0900)] 
network: introduce per-interface IP forwarding settings

This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.

3 months agoREADME: mention fq_codel
zzywysm [Thu, 22 Feb 2024 18:03:06 +0000 (13:03 -0500)] 
README: mention fq_codel

In 2014, systemd started choosing fq_codel as the default_qdisc in order to fight internet bufferbloat.

https://github.com/systemd/systemd/commit/e6c253e363dee77ef7e5c5f44c4ca55cded3fd47
https://github.com/systemd/systemd/commit/fa98c99ea7f7c5bec3962fa52f4d3496a9777024

While the subsequent change made this change no longer trigger warnings if fq_codel wasn't present, it is still recommended to have this enabled.  Add the necessary kernel configuration to the documentation.

3 months agoMerge pull request #31441 from yuwata/sd-ndisc-fix-timer
Luca Boccassi [Thu, 22 Feb 2024 18:48:43 +0000 (18:48 +0000)] 
Merge pull request #31441 from yuwata/sd-ndisc-fix-timer

sd-ndisc: disable timer event source only when a valid RA received

3 months agoMerge pull request #31445 from keszybz/slow-tests
Luca Boccassi [Thu, 22 Feb 2024 14:14:23 +0000 (14:14 +0000)] 
Merge pull request #31445 from keszybz/slow-tests

Mark more tests as slow

3 months agoMerge pull request #31414 from poettering/bsod-tweaks
Luca Boccassi [Thu, 22 Feb 2024 12:48:38 +0000 (12:48 +0000)] 
Merge pull request #31414 from poettering/bsod-tweaks

bsod: some small bsod tweaks

3 months agodocs: fix typo in page name
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 12:01:17 +0000 (13:01 +0100)] 
docs: fix typo in page name

Fixup for 163e2c8346933b13a783ad179129bcc713649e78.

3 months agoMerge pull request #31432 from poettering/vmspawn-qemu-rename
Luca Boccassi [Thu, 22 Feb 2024 11:04:45 +0000 (11:04 +0000)] 
Merge pull request #31432 from poettering/vmspawn-qemu-rename

vmspawn: drop "qemu" word from most switches

3 months agoMerge pull request #31178 from neighbourhoodie/add-old-website-content
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 11:04:29 +0000 (12:04 +0100)] 
Merge pull request #31178 from neighbourhoodie/add-old-website-content

Migrate the content of the old website

3 months agotest-nss-hosts: treat negative host lookup as slow 31445/head
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 10:35:07 +0000 (11:35 +0100)] 
test-nss-hosts: treat negative host lookup as slow

The negative lookup can be quite slow. On my local network, skipping
this test saves about half of the runtime of test-nss-hosts.

3 months agotest-ukify: skip signing in tests when slow tests are disabled
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 10:26:53 +0000 (11:26 +0100)] 
test-ukify: skip signing in tests when slow tests are disabled

I have a large initrd (built with mkosi-initrd) and the test-ukify takes 30 s.
Let's use the usual approach of skipping the slowests tests.

(pytest has marks, and it would be nicer to mark tests with pytest.mark.slow,
and then use "-m 'not slow'" in the meson test invocation. But markers must be
pre-registered, otherwise pytest emits a warning. There are a few ways to
register markers, but they all require "project configuration", but because of
how we invoke pytest, this is hard to do. So let's just use an environment
variable.)

3 months agodocs: use collections to structure the data 31178/head
hulkoba [Tue, 30 Jan 2024 11:57:10 +0000 (12:57 +0100)] 
docs: use collections to structure the data

3 months agodocs: add distributions and mastodon
hulkoba [Mon, 29 Jan 2024 12:20:19 +0000 (13:20 +0100)] 
docs: add distributions and mastodon

3 months agodocs: add Manuals and Documentation for Users and Administrators
hulkoba [Mon, 29 Jan 2024 11:55:10 +0000 (12:55 +0100)] 
docs: add Manuals and Documentation for Users and Administrators

3 months agodocs: add documentation for developers
Mariano Giménez [Tue, 23 Jan 2024 16:44:31 +0000 (17:44 +0100)] 
docs: add documentation for developers

3 months agoadd related packages links
Mariano Giménez [Tue, 23 Jan 2024 15:25:38 +0000 (16:25 +0100)] 
add related packages links

3 months agoadd The systemd for Developers Series pages
Mariano Giménez [Tue, 23 Jan 2024 14:51:29 +0000 (15:51 +0100)] 
add The systemd for Developers Series pages

3 months agoadd administrators blog series links to extra_pages.json
Mariano Giménez [Tue, 23 Jan 2024 11:17:17 +0000 (12:17 +0100)] 
add administrators blog series links to extra_pages.json

3 months agoadd videos and presentations
Mariano Giménez [Tue, 23 Jan 2024 09:38:32 +0000 (10:38 +0100)] 
add videos and presentations

3 months agoadd publications to extra_pages.json
Mariano Giménez [Tue, 23 Jan 2024 08:58:17 +0000 (09:58 +0100)] 
add publications to extra_pages.json

3 months agosd-ndisc: actually refuse RA message from null address 31441/head
Yu Watanabe [Thu, 22 Feb 2024 05:33:29 +0000 (14:33 +0900)] 
sd-ndisc: actually refuse RA message from null address

3 months agosd-ndisc: disable timer event source only when a valid RA received
Yu Watanabe [Thu, 22 Feb 2024 04:59:57 +0000 (13:59 +0900)] 
sd-ndisc: disable timer event source only when a valid RA received

Fixes #31439.

3 months agoMerge pull request #31409 from ssahani/macvlan
Yu Watanabe [Thu, 22 Feb 2024 03:40:54 +0000 (12:40 +0900)] 
Merge pull request #31409 from ssahani/macvlan

netdev: macvlan - Allow to set the broadcast queueing threshold

3 months agotest-network: add test for macvlan BroadcastQueueMulticastLength= and BroadcastQueueT... 31409/head
Susant Sahani [Thu, 22 Feb 2024 00:45:41 +0000 (09:45 +0900)] 
test-network: add test for macvlan BroadcastQueueMulticastLength= and BroadcastQueueThreashold=

3 months agotest-network: use assertIn()
Yu Watanabe [Thu, 22 Feb 2024 00:46:45 +0000 (09:46 +0900)] 
test-network: use assertIn()

3 months agonetdev/macvlan: allow to set the broadcast queueing threshold
Susant Sahani [Tue, 20 Feb 2024 13:12:20 +0000 (18:42 +0530)] 
netdev/macvlan: allow to set the broadcast queueing threshold

Allow to set the broadcast queueing threshold
on macvlan devices. This controls which multicast packets will be
processed in a workqueue instead of inline.

3 months agoMerge pull request #31429 from poettering/pcrlock-hash-order-fix
Yu Watanabe [Wed, 21 Feb 2024 23:29:56 +0000 (08:29 +0900)] 
Merge pull request #31429 from poettering/pcrlock-hash-order-fix

pcrlock: handle cases where order of hash algs in firmware binary logs differs in header and records

3 months agoMerge pull request #31425 from YHNdnzj/fd-util-followup
Yu Watanabe [Wed, 21 Feb 2024 23:29:11 +0000 (08:29 +0900)] 
Merge pull request #31425 from YHNdnzj/fd-util-followup

fd-util: introduce fd_verify_safe_flags

3 months agoMerge pull request #31403 from yuwata/pam-sd-bus-session
Yu Watanabe [Wed, 21 Feb 2024 23:28:38 +0000 (08:28 +0900)] 
Merge pull request #31403 from yuwata/pam-sd-bus-session

pam_systemd_home: close sd-bus connection on failure

3 months agobasic/linux: update kernel headers from v6.8-rc5
Yu Watanabe [Wed, 21 Feb 2024 19:50:18 +0000 (04:50 +0900)] 
basic/linux: update kernel headers from v6.8-rc5

3 months agojournal-native: ignore server_process_native_file error on caller's side 31425/head
Mike Yuan [Wed, 21 Feb 2024 06:03:55 +0000 (14:03 +0800)] 
journal-native: ignore server_process_native_file error on caller's side

Also, stop saying ", ignoring". It is unclear whether the message
or the error is ignored. "ignoring message" or "refusing" is OK.

3 months agofd-util: introduce fd_verify_safe_flags
Mike Yuan [Wed, 21 Feb 2024 05:45:01 +0000 (13:45 +0800)] 
fd-util: introduce fd_verify_safe_flags

As per https://github.com/systemd/systemd/pull/31419#discussion_r1496921074

3 months agohwdb: Add headset form-factor override for Xbox Wireless Dongle
medusalix [Wed, 21 Feb 2024 20:02:37 +0000 (21:02 +0100)] 
hwdb: Add headset form-factor override for Xbox Wireless Dongle

The Xbox Wireless Headset does not get assigned a sound form factor
when connected via the dongle using the `xone` driver.
Add USB IDs for the old & new dongle and built-in variants.

3 months agonetwork/json: use DUID obtained by sd_dhcp6_client_get_duid()
Yu Watanabe [Wed, 21 Feb 2024 19:26:42 +0000 (04:26 +0900)] 
network/json: use DUID obtained by sd_dhcp6_client_get_duid()

Follow-up for e5aa8c193d730bca26fe123258d9a73834509f26.

3 months agotree-wide: be more careful when passing literal integers to "t" bus message fields
Lennart Poettering [Wed, 21 Feb 2024 10:03:35 +0000 (11:03 +0100)] 
tree-wide: be more careful when passing literal integers to "t" bus message fields

Since we use varargs for sd_message_append() we need to make sure the
parameters we pass are actually 64bit wide, if "t" is used. Hence cast
appropriately if necessary.

I went through the whole tree, and in most cases we got it right, but
there are some cases we missed so far.

Inspired by: #31420

3 months agotest: temporarily enable session lingering for the test user #2
Frantisek Sumsal [Wed, 21 Feb 2024 14:42:35 +0000 (15:42 +0100)] 
test: temporarily enable session lingering for the test user #2

Similarly to bbac11c993 we need to enable session lingering for the test
user, so the long-running test units are not killed prematurely:

[   18.822261] testsuite-55.sh[403]: + systemctl start --machine testuser@.host --user testsuite-55-testchill.service
[   18.852775] systemd[1]: Started run-u17.service.
[   19.256431] (o-bridge)[526]: pam_unix(login:session): session opened for user testuser(uid=4711) by testuser(uid=0)
[   19.288346] systemd[1]: Started session-2.scope.
[   20.165874] systemd[392]: Created slice session.slice.
[   20.166459] systemd[392]: Starting dbus-broker.service...
[   20.220189] dbus-broker-launch[529]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +31: Eavesdropping is deprecated and ignored
[   20.220189] dbus-broker-launch[529]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +33: Eavesdropping is deprecated and ignored
[   20.220494] systemd[392]: Started dbus-broker.service.
[   20.224276] dbus-broker-launch[529]: Ready
[   20.231702] systemd[392]: Created slice testsuite.slice.
[   20.231976] systemd[392]: Created slice testsuite-55.slice.
[   20.232259] systemd[392]: Created slice testsuite-55-workload.slice.
[   31.065294] testsuite-55.sh[403]: + systemctl start --machine testuser@.host --user testsuite-55-testbloat.service
[   31.065641] (sd-pam)[528]: pam_unix(login:session): session closed for user testuser
[   31.066103] (sd-pam)[528]: pam_systemd(login:session): Failed to release session: Access denied
[   31.066152] systemd[392]: Started testsuite-55-testchill.service.
[   31.068062] systemd[1]: run-u17.service: Deactivated successfully.
[   31.068217] dbus-broker[389]: A security policy denied :1.20 to send method call /org/freedesktop/login1:org.freedesktop.login1.Manager.ReleaseSession to org.freedesktop.login1.
[   31.075901] (o-bridge)[537]: pam_unix(login:session): session opened for user testuser(uid=4711) by testuser(uid=0)
[   31.091098] systemd[1]: Stopping session-2.scope...
[   31.092158] systemd[1]: Started run-u21.service.
[   31.092993] systemd[1]: session-2.scope: Deactivated successfully.
[   31.093287] systemd[1]: Stopped session-2.scope.
[   31.095798] systemd[1]: Stopping user@4711.service...
[   31.103541] systemd[392]: Activating special unit exit.target...
[   31.108359] systemd[392]: Stopped target default.target.
[   31.109798] systemd[392]: Stopped target timers.target.
[   31.110790] systemd[392]: Stopping testsuite-55-testchill.service...
[   31.112154] systemd[392]: Stopped testsuite-55-testchill.service.
[   31.114033] systemd[392]: Removed slice testsuite-55-workload.slice.
[   31.114971] systemd[392]: Removed slice testsuite-55.slice.
[   31.115858] systemd[392]: Removed slice testsuite.slice.
...
[   31.475949] testsuite-55.sh[403]: + systemctl --machine testuser@.host --user status testsuite-55-testchill.service
[   31.490464] systemd[1]: session-3.scope: Deactivated successfully.
[   31.565929] systemd[1]: Started run-u33.service.
[   31.592437] (o-bridge)[583]: pam_unix(login:session): session opened for user testuser(uid=4711) by testuser(uid=0)
[   31.610210] systemd[1]: Started session-5.scope.
[   31.616960] testsuite-55.sh[578]: ○ testsuite-55-testchill.service - No memory pressure
[   31.616960] testsuite-55.sh[578]:      Loaded: loaded (/usr/lib/systemd/tests/testdata/units/testsuite-55-testchill.service; static)
[   31.616960] testsuite-55.sh[578]:      Active: inactive (dead)
[   31.617438] (sd-pam)[586]: pam_unix(login:session): session closed for user testuser

Addresses https://github.com/systemd/systemd/pull/31426#issuecomment-1956436844.

3 months agovmspawn: rename "qemu" specific switches to not carry the "qemu" prefix 31432/head
Lennart Poettering [Wed, 21 Feb 2024 15:23:55 +0000 (16:23 +0100)] 
vmspawn: rename "qemu" specific switches to not carry the "qemu" prefix

This renames a few of the switches vmspawn takes, such as --qemu-mem=
and --qemu-smp= to names without the "qemu" moniker and uses less
cryptic names (i.e. --ram= and --cpus=).

I think it's a bit unsystematic that so far we use the "qemu" prefix for
some options but not for others. At least I could not figure out a
system when we use it and when we don't. Hence let's clean it up and
just use simpler names without suffix.

After all we might want to plug other hypervisors behind vmspawn one
day, hence I think there's value in sticking to generic names for these
switches that allow us to switch out backends easily. In particular for
--ram= and --cpus= which are probably the most fundamental of VM settings
there are.

The old switches are support for compat, but not advertised in man page
or --help text anymore.

I left "--qemu-gui" under its current name, since it fundamentally is a
a qemu concept, exposing a qemu specific graphical UI.

3 months agovspawn: prefer "VSOCK" spelling over "vsock" and "VSock"
Lennart Poettering [Wed, 21 Feb 2024 15:18:24 +0000 (16:18 +0100)] 
vspawn: prefer "VSOCK" spelling over "vsock" and "VSock"

The vsock(7) man page appears to prefer "VSOCK" spelling for the
concept, let's also use it as much as we can.

3 months agoupdate TODO
Lennart Poettering [Wed, 21 Feb 2024 14:46:12 +0000 (15:46 +0100)] 
update TODO

3 months agobsod: don't fail in an error path 31414/head
Lennart Poettering [Wed, 21 Feb 2024 08:59:51 +0000 (09:59 +0100)] 
bsod: don't fail in an error path

If we fail in an error path, don't override the error we are processing,
just print a warning and continue.

3 months agobsod: remove one redundant variable
Lennart Poettering [Wed, 21 Feb 2024 08:59:35 +0000 (09:59 +0100)] 
bsod: remove one redundant variable

3 months agobsod: normalize VT indexes
Lennart Poettering [Wed, 21 Feb 2024 08:53:58 +0000 (09:53 +0100)] 
bsod: normalize VT indexes

The 1-based VT indexes are what people usually expect, since the primary
name of VTs uses them (i.e. /dev/tty1, /dev/tty2, …). Hence, let's
always use 1-based VT indexes, and early on convert 0-based VT indexes
to minimize confusion.

3 months agobsod: correct log level on some messages
Lennart Poettering [Wed, 21 Feb 2024 08:46:15 +0000 (09:46 +0100)] 
bsod: correct log level on some messages

3 months agobsod: make sure "Press Any Key" has a blue background too
Lennart Poettering [Tue, 20 Feb 2024 15:33:01 +0000 (16:33 +0100)] 
bsod: make sure "Press Any Key" has a blue background too

3 months agobsod: remove some duplicate logging
Lennart Poettering [Tue, 20 Feb 2024 14:42:10 +0000 (15:42 +0100)] 
bsod: remove some duplicate logging

display_emergency_message_fullscreen() already logs about all erros,
hence don't log again.

3 months agobsod: add new option --tty= to specify TTY to output on
Lennart Poettering [Tue, 20 Feb 2024 14:41:16 +0000 (15:41 +0100)] 
bsod: add new option --tty= to specify TTY to output on

If specified we'll not try to find a free V, but instead just output
directly to the specified TTY. This is particularly useful for
debugging, as it means "systemd-bsod --tty=/dev/tty" just works.

3 months agobsod: adjust --help text to match our usual output
Lennart Poettering [Tue, 20 Feb 2024 14:32:49 +0000 (15:32 +0100)] 
bsod: adjust --help text to match our usual output

3 months agonetwork: JSON - Export DHCPv4 client ID
Susant Sahani [Tue, 20 Feb 2024 08:33:13 +0000 (14:03 +0530)] 
network: JSON - Export DHCPv4 client ID

Allow networkd to export the DHCP4 client ID which right now we don't support.

3 months agoMerge pull request #31326 from CodethinkLabs/vmspawn/extra_drives
Luca Boccassi [Wed, 21 Feb 2024 13:52:22 +0000 (13:52 +0000)] 
Merge pull request #31326 from CodethinkLabs/vmspawn/extra_drives

vmspawn: add --extra-drive= and correctly escape ',' in certain  qemu arguments

3 months agopcrlock: handle measurement logs where hash algs in header are announced in different... 31429/head
Lennart Poettering [Wed, 21 Feb 2024 13:43:42 +0000 (14:43 +0100)] 
pcrlock: handle measurement logs where hash algs in header are announced in different order than in records

Apparently on HyperV the measurement logs announce the hash algs in a
different order in the header than the records have them. Let's handle
this gracefully

3 months agopcrlock: document the env vars we honour to find measurement logs
Lennart Poettering [Wed, 21 Feb 2024 13:42:50 +0000 (14:42 +0100)] 
pcrlock: document the env vars we honour to find measurement logs

This env vars have been supported for a while, let's document them where
we usually document them.

3 months agomeson: Decouple the version tag from the vcs tag 31352/head
Daan De Meyer [Fri, 16 Feb 2024 15:58:58 +0000 (16:58 +0100)] 
meson: Decouple the version tag from the vcs tag

Let's split off a new vcs-tag option from version-tag that configures whether
the current commit should be appended to the version tag. Doing this saves
us from having to fiddle around with generating git versions in packaging
specs and instead let's meson do it for us, even if we pass in a custom
version tag.

With this approach there's no more need for tools/meson-vcs-tag.sh so
we remove it.

3 months agodocs: show mkosi project on website
hulkoba [Wed, 24 Jan 2024 11:13:12 +0000 (12:13 +0100)] 
docs: show mkosi project on website

3 months agoMerge pull request #31426 from YHNdnzj/logind-minor-cleanup
Luca Boccassi [Wed, 21 Feb 2024 11:35:34 +0000 (11:35 +0000)] 
Merge pull request #31426 from YHNdnzj/logind-minor-cleanup

logind: some cleanups

3 months agonetworkd: support setting dhcp server port
Martin Ivicic [Wed, 21 Feb 2024 01:07:26 +0000 (02:07 +0100)] 
networkd: support setting dhcp server port

3 months agonetwork: DHCP6 Allow to export DHCP6 DUID (#31355)
Susant Sahani [Wed, 21 Feb 2024 10:32:27 +0000 (16:02 +0530)] 
network: DHCP6 Allow to export DHCP6 DUID (#31355)

We did not support the export of DHCP6 DUID. Let's add this. Some
applications may use it.

3 months agocryptsetup-tokens: fix typo in comments
Antonio Alvarez Feijoo [Wed, 21 Feb 2024 10:08:18 +0000 (11:08 +0100)] 
cryptsetup-tokens: fix typo in comments

3 months agovmspawn: add --extra-drive= 31326/head
Sam Leonard [Wed, 14 Feb 2024 16:40:40 +0000 (16:40 +0000)] 
vmspawn: add --extra-drive=

3 months agovmspawn: correctly escape ',' in certain values passed to qemu
Sam Leonard [Wed, 14 Feb 2024 15:38:31 +0000 (15:38 +0000)] 
vmspawn: correctly escape ',' in certain values passed to qemu

3 months agohomectl: make sure we sent the full 8 bytes as flags
Frantisek Sumsal [Tue, 20 Feb 2024 21:38:42 +0000 (22:38 +0100)] 
homectl: make sure we sent the full 8 bytes as flags

Otherwise weird stuff happens on the other side:

[1217111.957263] testsuite-46.sh[61]: + homectl create test-user --disk-size=min --luks-discard=yes --image-path=/home/test-user.home --luks-pbkdf-type=pbkdf2 --luks-pbkdf-time-cost=1ms
[1217112.598219] homectl[66]: Operation on home test-user failed: Provided flags are unsupported (0ad2578000000000).

(taken from TEST-46-HOME run on armv7l)

Fixes issue mentioned in https://github.com/systemd/systemd/pull/31419#issuecomment-1955117397.

3 months agoprocess-util: use proc_mounted() check at one more place 31411/head
Lennart Poettering [Tue, 20 Feb 2024 13:39:38 +0000 (14:39 +0100)] 
process-util: use proc_mounted() check at one more place

3 months agopid1: port executor binary pinning to new build path logic
Lennart Poettering [Tue, 20 Feb 2024 11:47:10 +0000 (12:47 +0100)] 
pid1: port executor binary pinning to new build path logic

3 months agosysupdate: port over to new invoke_callout_binary() call
Lennart Poettering [Tue, 20 Feb 2024 12:06:17 +0000 (13:06 +0100)] 
sysupdate: port over to new invoke_callout_binary() call

3 months agouserdbd: port userdbd over to invoke_callout_binary()
Lennart Poettering [Tue, 20 Feb 2024 11:47:44 +0000 (12:47 +0100)] 
userdbd: port userdbd over to invoke_callout_binary()

3 months agoimportd: port importd over to new invoke_callout_binary() API
Lennart Poettering [Tue, 20 Feb 2024 11:47:31 +0000 (12:47 +0100)] 
importd: port importd over to new invoke_callout_binary() API

3 months agohomed: port to use new invoke_callout_binary() API
Lennart Poettering [Tue, 20 Feb 2024 11:46:41 +0000 (12:46 +0100)] 
homed: port to use new invoke_callout_binary() API

3 months agobuild-path: allow overriding of all callout binary paths via an env var
Lennart Poettering [Tue, 20 Feb 2024 10:57:39 +0000 (11:57 +0100)] 
build-path: allow overriding of all callout binary paths via an env var

3 months agobasic: add "build path" logic
Lennart Poettering [Tue, 20 Feb 2024 10:30:27 +0000 (11:30 +0100)] 
basic: add "build path" logic

We have a number of components these days that are split into multiple
binaries, i.e. a primary one, and a worker callout usually. These
binaries are closely related, they typically speak a protocol that is
internal, and not safe to mix and match. Examples for this:

- homed and its worker binary homework
- userdbd and its worker binary userwork
- import and the various pull/import/export handlers
- sysupdate the same
- the service manager and the executor binary

Running any of these daemons directly from the meson build tree is
messy, since the implementations will typically invoke the installed
callout binaries, not the ones from the build tree. This is very
annoying, and not obvious at first.

Now, we could always invoke relevant binaries from $(dirname
/proc/self/exe) first, before using the OS installed ones. But that's
typically not what is desired, because this means in the installed case
(i.e. the usual one) we'll look for these callout binaries at a place
they typically will not be found (because these callouts generally are
located in libexecdir, not bindir when installed).

Hence, let's try to do things a bit smarter, and follow what build
systems such as meson have already been doing to make sure dynamic
library discovery works correctly when binaries are run from a build
directory: let's start looking at rpath/runpath in the main binary that
is executed: if there's an rpath/runpath set, then we'll look for the
callout binaries next to the main binary, otherwise we won't. This
should generally be the right thing to do as meson strips the rpath
during installation, and thus we'll look for the callouts in the build
dir if in build dir mode, and in the OS otherwise.

3 months agologind-dbus: clean up manager_{start,stop,kill}_unit 31426/head
Mike Yuan [Tue, 20 Feb 2024 15:39:27 +0000 (23:39 +0800)] 
logind-dbus: clean up manager_{start,stop,kill}_unit

3 months agologind-dbus: rearrange functions
Mike Yuan [Tue, 20 Feb 2024 09:49:12 +0000 (17:49 +0800)] 
logind-dbus: rearrange functions

3 months agologind-session-dbus: drop unneeded unref_and_replace
Mike Yuan [Tue, 20 Feb 2024 10:03:14 +0000 (18:03 +0800)] 
logind-session-dbus: drop unneeded unref_and_replace

If there's pending s->upgrade_message, we already return early
above.

3 months agoMerge pull request #31405 from yuwata/network-ndisc-reachable-time
Yu Watanabe [Wed, 21 Feb 2024 05:29:01 +0000 (14:29 +0900)] 
Merge pull request #31405 from yuwata/network-ndisc-reachable-time

network/ndisc: set neighbor reachable time

3 months agoMerge pull request #31419 from AdrianVovk/fixup-largefile-define
Mike Yuan [Wed, 21 Feb 2024 05:12:30 +0000 (13:12 +0800)] 
Merge pull request #31419 from AdrianVovk/fixup-largefile-define

Fixup largefile define

3 months agopam_systemd_home: always close already opened bus connection in open_session() 31403/head
Yu Watanabe [Wed, 21 Feb 2024 04:21:31 +0000 (13:21 +0900)] 
pam_systemd_home: always close already opened bus connection in open_session()

Fixes #31375.

3 months agopam_systemd_home: open sd-bus session when necessary
Yu Watanabe [Wed, 21 Feb 2024 03:45:27 +0000 (12:45 +0900)] 
pam_systemd_home: open sd-bus session when necessary

No functional change, just refactoring.

3 months agopam-util: add one more debugging log about sd-bus connection
Yu Watanabe [Tue, 20 Feb 2024 03:27:42 +0000 (12:27 +0900)] 
pam-util: add one more debugging log about sd-bus connection

Continuation of b5b2510800fa50187f5c7342cb9471fdb97bc4b0.

3 months agoMerge pull request #31408 from mrc0mmand/verify-unit-files-v2
Yu Watanabe [Wed, 21 Feb 2024 03:01:48 +0000 (12:01 +0900)] 
Merge pull request #31408 from mrc0mmand/verify-unit-files-v2

test: verify our own units (where applicable)

3 months agoMerge pull request #31400 from poettering/askpw-rework
Luca Boccassi [Tue, 20 Feb 2024 23:45:52 +0000 (23:45 +0000)] 
Merge pull request #31400 from poettering/askpw-rework

Password Asking rework

3 months agofd-util: Add helpers to check if FD flags are safe 31419/head
Adrian Vovk [Tue, 20 Feb 2024 19:54:21 +0000 (14:54 -0500)] 
fd-util: Add helpers to check if FD flags are safe

Adds a SAFE_FD_FLAGS define to list out all the safe FD flags, and also
an UNSAFE_FD_FLAGS() macro to strip out the safe flags and leave only
the unsafe flags. This can be used to quickly check if any unsafe flags
are set and print them for diagnostic purposes

3 months agomissing_fcntl: Fix RAW_O_LARGEFILE
Adrian Vovk [Tue, 20 Feb 2024 19:24:01 +0000 (14:24 -0500)] 
missing_fcntl: Fix RAW_O_LARGEFILE

This value is actually arch-specific, so this commit defines it for all
the arches that set it to some custom value

Fixes https://github.com/systemd/systemd/issues/31417

3 months agoanalyze: always recommend saving the output to a file
Zbigniew Jędrzejewski-Szmek [Tue, 20 Feb 2024 17:14:53 +0000 (18:14 +0100)] 
analyze: always recommend saving the output to a file

The command will refuse to write to a TTY, so give a strong hint
that redirecting to a file is recommended. This makes the synopsis,
man page text, and --help output consistent.

Also drop the space after the redirection operator everywhere.

3 months agocryptsetup: drop "headless" bool, make it a flag in AskPasswordFlags instead 31400/head
Lennart Poettering [Mon, 19 Feb 2024 17:45:49 +0000 (18:45 +0100)] 
cryptsetup: drop "headless" bool, make it a flag in AskPasswordFlags instead

This bool controls whether we should interactively ask for a password,
which is pretty much what the ask_password-api.c APIs are about. Hence,
just make the bool a flag in AskPasswordFlags enum, and use it
everywhere.

This still catches the flag early in upper levels of the codebase,
exactly as before, but if the flag is still present in the lower layers
it's also handled there and results in ENOEXEC if seen.

This is mostly an excercise in simplifying our ridiculously long
function call parameter lists a bit.

3 months agoman: tweak cryptsetup credentials docs a bit
Lennart Poettering [Mon, 19 Feb 2024 17:21:31 +0000 (18:21 +0100)] 
man: tweak cryptsetup credentials docs a bit

Let's bring the credentials into a better order, in order of relevance.

Also, let's clarify what the generic LUKS PIN is about.

Finally, list the credentials in system-credentials(7) too, after all
people might want to unlock a disk with this via SMBIOS Type 11 or so.

3 months agoman: now that the crdentials used by systemd-cryptenroll are in order, document them
Lennart Poettering [Mon, 19 Feb 2024 17:22:49 +0000 (18:22 +0100)] 
man: now that the crdentials used by systemd-cryptenroll are in order, document them

Replaces: #31370

3 months agocryptsetup-pkcs11: also plug credential name to use to credential plugin
Lennart Poettering [Mon, 19 Feb 2024 17:16:47 +0000 (18:16 +0100)] 
cryptsetup-pkcs11: also plug credential name to use to credential plugin

3 months agocryptenroll,cryptsetup: clean up unlock credential for TPM2 + FIDO2
Lennart Poettering [Mon, 19 Feb 2024 17:06:34 +0000 (18:06 +0100)] 
cryptenroll,cryptsetup: clean up unlock credential for TPM2 + FIDO2

Let's make sure that when cryptenroll asks for the TPM2 or FIDO2 token
PIN it uses cryptenroll.* credential namespace, and cryptsetup uses
cryptsetup.*.

3 months agopkcs11-util: clean up credential handling for PKCS11 PIN
Lennart Poettering [Mon, 19 Feb 2024 16:44:01 +0000 (17:44 +0100)] 
pkcs11-util: clean up credential handling for PKCS11 PIN

similar as the previous commit, let's clean up the credential name we
use. Use home.token-pin in case of homectl, and cryptenroll.pkcs11-pin
in case of cryptenroll.

3 months agocryptenroll: use a different credential for new new PIN
Lennart Poettering [Mon, 19 Feb 2024 16:34:20 +0000 (17:34 +0100)] 
cryptenroll: use a different credential for new new PIN

The TPM2 enrollment is the only of the three token enrollments where the
user picks a PIN at enrollment time (the others have a PIN set for the
token, not for the enrollment). Let's make sure it uses a different
credential for retrieving this PIN, in order to make sure people can
programmatically change PINs via credentials (in which case they need to
supply both).

3 months agolibfido2: tweak credential to read fido2 PIN from
Lennart Poettering [Mon, 19 Feb 2024 16:30:56 +0000 (17:30 +0100)] 
libfido2: tweak credential to read fido2 PIN from

Querying a fido2 PIN via askpw for enrolling is currently used in two
places: cryptenroll and homectl. So far we sloppily used the same fixed
credential name "fido2-pin" in both cases. Let's tweak that and make the
credential name match the other credentials cryptenroll or home query,
i.e. using the cryptenroll.* and home.* namespaces.

This is particular done in light of #31370, which wants to make the
credential name public. We really should get the name in order before
making it public.

3 months agopcrlock: normalize credential name for TPM2 PIN
Lennart Poettering [Mon, 19 Feb 2024 16:03:49 +0000 (17:03 +0100)] 
pcrlock: normalize credential name for TPM2 PIN

Let's drop the "systemd-" prefix from the credential name. We do not
prefix credentials that way so far. Don't do so here either.

The name is not really API, it's not documented, hence change it now
where we still can.

3 months agocryptenroll: use correct askpw id for pw request
Lennart Poettering [Mon, 19 Feb 2024 16:01:01 +0000 (17:01 +0100)] 
cryptenroll: use correct askpw id for pw request

The "id" is used in the askpw protocol to recognize password prompts, in
case a service is replying to them and needs some id. Previously we set
an incorrect id, the one of cryptsetup. Fix that.

(I guess the id is not used much, it comes from a time where we had no
credentials, and thus some people wanted to supply passphrases
programmatically rather interactively. The usecase is probably gone, but
we should still set some valid id I guess.)

3 months agodissect-image: use strv_free_erase() at one more place
Lennart Poettering [Mon, 19 Feb 2024 15:38:01 +0000 (16:38 +0100)] 
dissect-image: use strv_free_erase() at one more place

3 months agocryptenroll: fix type confusion on acquire_tpm2_key() parameter
Lennart Poettering [Mon, 19 Feb 2024 15:37:36 +0000 (16:37 +0100)] 
cryptenroll: fix type confusion on acquire_tpm2_key() parameter

3 months agoask-password: rework how we pass request meta info when asking passwords
Lennart Poettering [Mon, 19 Feb 2024 15:35:12 +0000 (16:35 +0100)] 
ask-password: rework how we pass request meta info when asking passwords

Rather than adding more and more parameters to ask_password_auto(), let's
pass a structure of the fields that often are constant anyway.

This way, callers can fill in what they need, and we take the filled
structure which we can pass around internally as one.

This is in particular preparation for adding one more field in one of
the next commits.

3 months agocore/mount: if umount(8) fails but mount disappeared, assume success
Mike Yuan [Fri, 16 Feb 2024 19:03:50 +0000 (03:03 +0800)] 
core/mount: if umount(8) fails but mount disappeared, assume success

Fixes #31337