]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agoMerge pull request #30541 from yuwata/network-address-empty
Yu Watanabe [Fri, 22 Dec 2023 02:50:44 +0000 (11:50 +0900)] 
Merge pull request #30541 from yuwata/network-address-empty

network/address: make Address= in [Network] support an empty string

4 months agoMerge pull request #30575 from arthurzam/bash
Luca Boccassi [Thu, 21 Dec 2023 22:44:17 +0000 (23:44 +0100)] 
Merge pull request #30575 from arthurzam/bash

bash-completion: add some missing options

4 months agoMerge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps
Lennart Poettering [Thu, 21 Dec 2023 21:47:54 +0000 (22:47 +0100)] 
Merge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps

fstab-generator: disable default deps if x-systemd.{wanted,required}-by= is used

4 months agoMerge pull request #28658 from H5117/enroll_with_ec
Lennart Poettering [Thu, 21 Dec 2023 21:45:40 +0000 (22:45 +0100)] 
Merge pull request #28658 from H5117/enroll_with_ec

cryptsetup: Add support for EC keys in PKCS#11 tokens

4 months agoMerge pull request #30547 from poettering/uid0
Lennart Poettering [Thu, 21 Dec 2023 21:45:15 +0000 (22:45 +0100)] 
Merge pull request #30547 from poettering/uid0

add new "uid0" command as alternative multi-call interface for systemd-run, as sudo replacement

4 months agoDrop /dev test in test-mountpoint-util
Daan De Meyer [Thu, 21 Dec 2023 18:46:54 +0000 (19:46 +0100)] 
Drop /dev test in test-mountpoint-util

Even /dev isn't always guaranteed to be a mount point, so let's drop
this part of the test.

4 months agobash-completion: add missing option to systemd-confext 30575/head
Arthur Zamarin [Thu, 21 Dec 2023 21:23:13 +0000 (23:23 +0200)] 
bash-completion: add missing option to systemd-confext

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agobash-completion: add missing option to systemd-cgls
Arthur Zamarin [Thu, 21 Dec 2023 21:13:35 +0000 (23:13 +0200)] 
bash-completion: add missing option to systemd-cgls

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agobash-completion: add missing option to systemd-cat
Arthur Zamarin [Thu, 21 Dec 2023 21:07:05 +0000 (23:07 +0200)] 
bash-completion: add missing option to systemd-cat

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agoMerge pull request #30568 from poettering/creds-varlink
Yu Watanabe [Thu, 21 Dec 2023 20:30:23 +0000 (05:30 +0900)] 
Merge pull request #30568 from poettering/creds-varlink

creds: add varlink interface to encrypt/decrypt credentials

4 months agoMerge pull request #30566 from poettering/varlink-inval-param
Yu Watanabe [Thu, 21 Dec 2023 20:28:36 +0000 (05:28 +0900)] 
Merge pull request #30566 from poettering/varlink-inval-param

add a new helper varlink_error_invalid_parameter_name(), and make more use of the existing varlink_error_invalid_parameter()

4 months agopolkit: simplify bus_verify_polkit_async() + drop auth-by-cap dbus feature
Lennart Poettering [Wed, 22 Nov 2023 17:56:19 +0000 (18:56 +0100)] 
polkit: simplify bus_verify_polkit_async() + drop auth-by-cap dbus feature

This simplifies bus_verify_polkit_async() and related calls quite a bit:

1. This removes any support for authentication-by-Linux-capability. This
   is ultimately a kdbus leftover: with classic AF_UNIX transports we
   cannot authenticate by capabilities securely (because we cannot
   acquire it from the peer without races), hence we never actually did.
   Since the necessary kernel work didn't materialize in the last 10y,
   and is unlikely to be added, let's just kill this context. We cannot
   quite remove the caps stuff from sd-bus for API compat, but for our
   polkit logic let's kill it.

2. The "good_uid" and "interactive" params are only necessary in very
   few cases, hence let's move them to a new call
   bus_verify_polkit_async_full() and make bus_verify_polkit_async() a
   wrapper around it without those two parameters.

This also fixes a bunch of wrong uses of the "interactive" bool. The
bool makes no sense today as the ALLOW_INTERACTIVE_AUTHORIZATION field
in the D-Bus message header replaces it fully. We only need it to
implement method calls we introduced prior to that header field becoming
available in D-Bus. And it should only be used on such old method calls,
and otherwise always be set to false.

This does not change behaviour in any way. Just simplifies stuff.

Fixes: #21586
4 months agovarlink: make use of varlink_error_invalid_parameter() helper where appropriate 30566/head
Lennart Poettering [Thu, 21 Dec 2023 14:47:26 +0000 (15:47 +0100)] 
varlink: make use of varlink_error_invalid_parameter() helper where appropriate

4 months agovarlink: add helper varlink_error_invalid_parameter_name()
Lennart Poettering [Thu, 23 Nov 2023 21:24:20 +0000 (22:24 +0100)] 
varlink: add helper varlink_error_invalid_parameter_name()

4 months agotest: add simple creds/varlink integration test 30568/head
Lennart Poettering [Fri, 24 Nov 2023 15:30:15 +0000 (16:30 +0100)] 
test: add simple creds/varlink integration test

4 months agocreds: add varlink API for encrypting/decrypting credentials
Lennart Poettering [Thu, 23 Nov 2023 21:22:27 +0000 (22:22 +0100)] 
creds: add varlink API for encrypting/decrypting credentials

4 months agovarlink: add helper varlink_error_invalid_parameter_name()
Lennart Poettering [Thu, 23 Nov 2023 21:24:20 +0000 (22:24 +0100)] 
varlink: add helper varlink_error_invalid_parameter_name()

4 months agoupdate TODO 30547/head
Lennart Poettering [Wed, 20 Dec 2023 10:58:02 +0000 (11:58 +0100)] 
update TODO

4 months agotest: add minimal integration test coverage for uid0 tool
Lennart Poettering [Wed, 20 Dec 2023 18:10:13 +0000 (19:10 +0100)] 
test: add minimal integration test coverage for uid0 tool

4 months agoman: try to improve wording on --slice-inherit docs
Lennart Poettering [Wed, 20 Dec 2023 14:01:52 +0000 (15:01 +0100)] 
man: try to improve wording on --slice-inherit docs

4 months agorun/uid0: tint the terminal background color (and add new --background= switch)
Lennart Poettering [Wed, 20 Dec 2023 11:09:27 +0000 (12:09 +0100)] 
run/uid0: tint the terminal background color (and add new --background= switch)

This adds a new --background= switch that allows specifiying a
background color for the terminal while the tool runs.

It also teaches the tool when invoked as uid0 to tint the terminal in a
reddish hue when operating as root, and in a yellowish hue when
operating as any other user.

This should highlight nicely when the user is operating with elevated
privileges, or changed privileges.

4 months agocolor-util: add helper to convert RGB → HSV
Lennart Poettering [Wed, 20 Dec 2023 11:08:32 +0000 (12:08 +0100)] 
color-util: add helper to convert RGB â†’ HSV

We already have HSV â†’ RGB, add the opposite operation.

4 months agocolor-util: split out HSV color conversion into color-util.[ch]
Lennart Poettering [Wed, 20 Dec 2023 11:07:37 +0000 (12:07 +0100)] 
color-util: split out HSV color conversion into color-util.[ch]

4 months agoptyfwd: optionally, change ANSI background color of forwarded terminals
Lennart Poettering [Wed, 20 Dec 2023 11:04:06 +0000 (12:04 +0100)] 
ptyfwd: optionally, change ANSI background color of forwarded terminals

As the bytes flow through our terminal forwarder we can color the
background of the terminal with a color of our choices, if that's
desired.

This will later allow us to color the background of the uid0 tool when
running as root with a slightly alarming red color.

This does two things:

1. When an ANSI sequence is seen that resets the background color, it is
   extended to immediately set the color to our choice.
2. When a newline is seen it is immeidately extended to set the
   background color again and clear the current line till the end.

Net effect: all lines written while we forward the ttys will be shown
with the background color of choice.

4 months agoterminal-util: add helper that determines terminal default bg color
Lennart Poettering [Wed, 20 Dec 2023 11:02:01 +0000 (12:02 +0100)] 
terminal-util: add helper that determines terminal default bg color

4 months agoterminal-util: add helper for disabling terminal echo in termios struct
Lennart Poettering [Wed, 20 Dec 2023 11:01:32 +0000 (12:01 +0100)] 
terminal-util: add helper for disabling terminal echo in termios struct

4 months agomkosi: don't turn off installation of our PAM snippets
Lennart Poettering [Tue, 19 Dec 2023 20:40:32 +0000 (21:40 +0100)] 
mkosi: don't turn off installation of our PAM snippets

Otherwise we don't get the new PAM snippet for the uid0 PAM stack
installed.

4 months agorun: optionally set the "ignore-failure" flag for ExecStart= lines
Lennart Poettering [Tue, 19 Dec 2023 20:39:50 +0000 (21:39 +0100)] 
run: optionally set the "ignore-failure" flag for ExecStart= lines

4 months agorun: when invoked as "uid0", expose some sudo-like behaviour
Lennart Poettering [Tue, 19 Dec 2023 18:10:52 +0000 (19:10 +0100)] 
run: when invoked as "uid0", expose some sudo-like behaviour

This turns "systemd-run" into a multi-call binary. When invoked under
the name "uid0", then it behaves a bit more like traditional "sudo".
This mostly means defaults appropriuate for that, for example a PAM
stack, interactivity and more.

Fixes: #29199
4 months agoenv-util: add strv_env_assignf() helper
Lennart Poettering [Tue, 19 Dec 2023 18:09:17 +0000 (19:09 +0100)] 
env-util: add strv_env_assignf() helper

4 months agoMerge pull request #30567 from yuwata/hashmap_isempty
Yu Watanabe [Thu, 21 Dec 2023 17:36:19 +0000 (02:36 +0900)] 
Merge pull request #30567 from yuwata/hashmap_isempty

tree-wide: use hashmap_isempty() and friends

4 months agoMerge pull request #30564 from poettering/varlink-log-tweaks
Yu Watanabe [Thu, 21 Dec 2023 17:31:09 +0000 (02:31 +0900)] 
Merge pull request #30564 from poettering/varlink-log-tweaks

varlink: minor fixes & tweaks

4 months agoMerge pull request #30563 from poettering/socket-tweaks
Yu Watanabe [Thu, 21 Dec 2023 17:30:46 +0000 (02:30 +0900)] 
Merge pull request #30563 from poettering/socket-tweaks

two minor tweak to socket-util.c

4 months agosd-journal: use FOREACH_ARRAY() at one more place 30567/head
Yu Watanabe [Thu, 21 Dec 2023 16:28:44 +0000 (01:28 +0900)] 
sd-journal: use FOREACH_ARRAY() at one more place

4 months agotree-wide: use hashmap_isempty() and friends
Yu Watanabe [Thu, 21 Dec 2023 16:27:09 +0000 (01:27 +0900)] 
tree-wide: use hashmap_isempty() and friends

4 months agovarlink: check state rather than flags to determine whether it makes sense to reply 30564/head
Lennart Poettering [Fri, 24 Nov 2023 15:11:46 +0000 (16:11 +0100)] 
varlink: check state rather than flags to determine whether it makes sense to reply

We already checked the flags before, and updated the state accordingly,
hence let's only look at the state afterwards. This allows us to use the
same expressions for all cases where we want to reply automatically to
clients.

4 months agovarlink: add an extra assert encoding our assumption that ucred is valid here
Lennart Poettering [Thu, 23 Nov 2023 17:23:40 +0000 (18:23 +0100)] 
varlink: add an extra assert encoding our assumption that ucred is valid here

4 months agovarlink: never turn method call handler errors into connection errors
Lennart Poettering [Thu, 23 Nov 2023 17:15:14 +0000 (18:15 +0100)] 
varlink: never turn method call handler errors into connection errors

Let's make sure method call handlers failing will result in that very
method call failing but not the whole connection. We mostly got that
right, except for "oneway" calls where the method reply is supposed to
be eaten up, but wasn't. Fix that.

4 months agovarlink: switch various log calls to the local log helpers
Lennart Poettering [Thu, 23 Nov 2023 17:13:51 +0000 (18:13 +0100)] 
varlink: switch various log calls to the local log helpers

Most code in varlink.c got that right, but some didn't. Fix that.

4 months agosocket-util: remove unnecessary variable 30563/head
Lennart Poettering [Thu, 23 Nov 2023 16:58:15 +0000 (17:58 +0100)] 
socket-util: remove unnecessary variable

4 months agosocket-util: make sure SO_PEERSEC returned string is always NUL terminated
Lennart Poettering [Thu, 23 Nov 2023 17:05:04 +0000 (18:05 +0100)] 
socket-util: make sure SO_PEERSEC returned string is always NUL terminated

it's not entirely clear to me if the manual NUL termination is
necessary, but let's better be safe than sorry, since this is apparently
up to the LSMs, and I am not sure we can trust them all.

A lot of other code (such as dbus-broker) patches in the NUL byte, hence
let's be rather safe-then-sorry, it's trivial after all.

4 months agodbus-execute: use new exec_context_get_set_login_environment() helper also as backing...
Lennart Poettering [Thu, 21 Dec 2023 09:19:15 +0000 (10:19 +0100)] 
dbus-execute: use new exec_context_get_set_login_environment() helper also as backing for dbus property

Note sure why it didn't occur earlier to me, but now that we have this
nice helper to get the effective value of the set_login_environment
field instead of just falling back to "false".

Follow-up for: #30552

4 months agoresolved: actually check authenticated flag of SOA transaction
Michal Sekletar [Wed, 20 Dec 2023 15:44:14 +0000 (16:44 +0100)] 
resolved: actually check authenticated flag of SOA transaction

Fixes #25676

4 months agocore: imply SetLoginEnvironment= if PAMName= is set
Lennart Poettering [Wed, 20 Dec 2023 18:08:05 +0000 (19:08 +0100)] 
core: imply SetLoginEnvironment= if PAMName= is set

This geneally makes sense as setting up a PAM session pretty much
defines what a login session is.

In context of #30547 this has the benefit that we can take benefit of
the SetLoginEnvironment= effect without having to set it explicitly,
thus retaining some compat of the uid0 client towards older systemd
service managers.

5 months agotest-network: add test case of an empty string assignment for Address= 30541/head
Yu Watanabe [Wed, 20 Dec 2023 19:09:47 +0000 (04:09 +0900)] 
test-network: add test case of an empty string assignment for Address=

5 months agotest-network: use the main .network file
Yu Watanabe [Wed, 20 Dec 2023 19:08:02 +0000 (04:08 +0900)] 
test-network: use the main .network file

These tests are not interested in most addresses specified in the .network file.
As 10-many-address.conf drop-in config for the .network file contains so
many addresses, hopefully this improves test performance.

5 months agonetwork/address: make Address= in [Network] support an empty string
Yu Watanabe [Wed, 20 Dec 2023 19:08:53 +0000 (04:08 +0900)] 
network/address: make Address= in [Network] support an empty string

Closes #30485.

5 months agonetwork: also log drop-in config files
Yu Watanabe [Wed, 20 Dec 2023 13:22:34 +0000 (22:22 +0900)] 
network: also log drop-in config files

We have already show used drop-in config files in networkctl, but
also showing that in log may be useful.

Closes #30483.

5 months agoMerge pull request #30548 from yuwata/analyze-check-all-executables
Yu Watanabe [Wed, 20 Dec 2023 18:36:35 +0000 (03:36 +0900)] 
Merge pull request #30548 from yuwata/analyze-check-all-executables

analyze: check all executables

5 months agonetwork/neighbor: fix log message and comment
Yu Watanabe [Fri, 15 Dec 2023 00:21:19 +0000 (09:21 +0900)] 
network/neighbor: fix log message and comment

5 months agosystemctl: configure boot loader options only when going through firmware
Mike Yuan [Wed, 20 Dec 2023 13:25:27 +0000 (21:25 +0800)] 
systemctl: configure boot loader options only when going through firmware

Fixes #30497

5 months agoMerge pull request #30538 from poettering/ptyfwd-reset-color
Yu Watanabe [Wed, 20 Dec 2023 16:17:00 +0000 (01:17 +0900)] 
Merge pull request #30538 from poettering/ptyfwd-reset-color

ptyfwd: reset colors when we exit the pty forwarding logic

5 months agoMerge pull request #30543 from YHNdnzj/execute-cleanup
Yu Watanabe [Wed, 20 Dec 2023 16:16:34 +0000 (01:16 +0900)] 
Merge pull request #30543 from YHNdnzj/execute-cleanup

core/execute: trivial cleanup

5 months agoanalyze-verify: verify all executables 30548/head
Yu Watanabe [Wed, 20 Dec 2023 14:20:01 +0000 (23:20 +0900)] 
analyze-verify: verify all executables

ExecStart= and friends for .service and .socket can be specified
multiple times.
This also checks all commands for .mount and .swap, not only for the
current control command.

5 months agoTEST-65-ANALYZE: only mount /usr if necessary
Yu Watanabe [Wed, 20 Dec 2023 14:36:38 +0000 (23:36 +0900)] 
TEST-65-ANALYZE: only mount /usr if necessary

Follow-up for 8f764b32eabd3d39abfc0f4eaffd282223df4768.

Otherwise, we fail to umount several directories on shutdown.
---
[   15.684430] systemd[1]: Failed unmounting tmp-root-proc.mount.
[   15.689379] systemd[1]: Failed unmounting tmp-root-run.mount.
[   15.710572] systemd[1]: Failed unmounting tmp-root-sys-fs-cgroup.mount.
[   15.913953] systemd[1]: Failed unmounting tmp-root-dev.mount.
[   15.924603] systemd[1]: Failed unmounting tmp-root-sys.mount.
[   15.938207] systemd[1]: Failed unmounting tmp-root.mount.
[   15.952395] systemd[1]: Failed unmounting tmp.mount.

5 months agoptyfwd: make sure pty_forward_free() follows our usual semantics regarding NULL 30538/head
Lennart Poettering [Wed, 20 Dec 2023 10:59:52 +0000 (11:59 +0100)] 
ptyfwd: make sure pty_forward_free() follows our usual semantics regarding NULL

5 months agoptyfwd: reset colors when we exit the pty forwarding logic
Lennart Poettering [Wed, 20 Dec 2023 10:58:35 +0000 (11:58 +0100)] 
ptyfwd: reset colors when we exit the pty forwarding logic

Just in case there was still a color set, make sure to reset things.

5 months agoMerge pull request #30537 from poettering/run-arg-service-type-fix
Yu Watanabe [Wed, 20 Dec 2023 14:46:11 +0000 (23:46 +0900)] 
Merge pull request #30537 from poettering/run-arg-service-type-fix

run: arg_service_type is not supposed to be allocated from heap

5 months agoMerge pull request #30536 from yuwata/network-bridge-vlan-debugging-logs
Yu Watanabe [Wed, 20 Dec 2023 14:46:01 +0000 (23:46 +0900)] 
Merge pull request #30536 from yuwata/network-bridge-vlan-debugging-logs

network/bridge-vlan: add debugging logs and documentation update

5 months agocore/execute: use assertion for _done function 30543/head
Mike Yuan [Wed, 20 Dec 2023 13:56:49 +0000 (21:56 +0800)] 
core/execute: use assertion for _done function

As per our usual coding style.

5 months agocore/execute: remove unneeded brackets
Mike Yuan [Wed, 20 Dec 2023 13:11:26 +0000 (21:11 +0800)] 
core/execute: remove unneeded brackets

I did not merge the if-s, since I think it's easier to read
in the current form with those long socketpair() calls.

5 months agobootctl: update/list/remove all instances of systemd-boot in /EFI/BOOT
Daan De Meyer [Sun, 10 Dec 2023 21:44:25 +0000 (22:44 +0100)] 
bootctl: update/list/remove all instances of systemd-boot in /EFI/BOOT

systemd-boot might be installed in /EFI/BOOT under more names than
just /EFI/BOOT/BOOTX64.efi. The prime example is shim which loads
its second stage binary from /EFI/BOOT/grubx64.efi. To accomodate
use cases where systemd-boot is installed as /EFI/BOOT/grubx64.efi,
let's always check the entire /EFI/BOOT directory for binaries that
identify as systemd-boot and list/update/remove those as well.

Let's keep this somewhat generic though and not install ourselves as
grubx64.efi since that would mean having to check for shim which is
a can of worms we probably don't want to open.

5 months agorules: set up tty permissions and group for /dev/hvc* nodes
Franck Bui [Tue, 19 Dec 2023 12:56:58 +0000 (13:56 +0100)] 
rules: set up tty permissions and group for /dev/hvc* nodes

Before b4bf9007cbe, the permissions and group of the hypervisor consoles were
set by agetty(8).

5 months agoMerge pull request #30525 from YHNdnzj/networkctl-mask
Yu Watanabe [Wed, 20 Dec 2023 12:00:36 +0000 (21:00 +0900)] 
Merge pull request #30525 from YHNdnzj/networkctl-mask

networkctl: introduce verb mask and unmask

5 months agorun: underline section titles in --help as we usually do 30537/head
Lennart Poettering [Tue, 19 Dec 2023 18:09:59 +0000 (19:09 +0100)] 
run: underline section titles in --help as we usually do

5 months agorun: arg_service_type is not supposed to be allocated from heap
Lennart Poettering [Tue, 19 Dec 2023 18:10:36 +0000 (19:10 +0100)] 
run: arg_service_type is not supposed to be allocated from heap

5 months agonetwork/bridge-vlan: add debugging logs about set or removed VLAN IDs 30536/head
Yu Watanabe [Wed, 20 Dec 2023 10:47:04 +0000 (19:47 +0900)] 
network/bridge-vlan: add debugging logs about set or removed VLAN IDs

Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863937968.

5 months agoman,NEWS: mention that all previously assigned VLAN IDs are cleared
Yu Watanabe [Wed, 20 Dec 2023 10:12:34 +0000 (19:12 +0900)] 
man,NEWS: mention that all previously assigned VLAN IDs are cleared

Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863934902.

5 months agoman: fix indentation
Yu Watanabe [Wed, 20 Dec 2023 10:11:55 +0000 (19:11 +0900)] 
man: fix indentation

5 months agoMerge pull request #30534 from yuwata/man-page-update-and-fix-typo
Yu Watanabe [Wed, 20 Dec 2023 09:43:32 +0000 (18:43 +0900)] 
Merge pull request #30534 from yuwata/man-page-update-and-fix-typo

Man page update and fix typo

5 months agotest: trigger /boot mount if it's an automount
Frantisek Sumsal [Tue, 19 Dec 2023 14:05:23 +0000 (15:05 +0100)] 
test: trigger /boot mount if it's an automount

If the target mount point is an automount, checking it for writeability
without triggering it first is iffy and yields different results based
on kernel version:

~# systemd-run --wait --pipe -p ProtectSystem=yes bash -xec 'uname -r; mount -l | grep boot; test ! -w /boot'
Running as unit: run-u36.service; invocation ID: f948ff4f3c8e4bcfba364ead94bd0ad9
+ uname -r
4.18.0-529.el8.x86_64
+ mount -l
+ grep boot
systemd-1 on /boot type autofs (rw,relatime,fd=43,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=356096)
+ test '!' -w /boot
Finished with result: exit-code
Main processes terminated with: code=exited/status=1

~# systemd-run --wait --pipe -p ProtectSystem=yes bash -xec 'uname -r; mount -l | grep boot; test ! -w /boot'
Running as unit: run-u274.service; invocation ID: ccc53ed63c3249348cf714f97a3a7026
+ uname -r
6.6.7-arch1-1
+ mount -l
+ grep boot
systemd-1 on /boot type autofs (rw,relatime,fd=95,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=730583)
+ test '!' -w /boot
Finished with result: success
Main processes terminated with: code=exited/status=0

One solution would be to use /boot/ instead of just /boot, which triggers
the automount during the check, but in that case the mount would happen
_after_ we apply the ProtectSystem= stuff, so the mount point would
be unexpectedly writable:

~# systemd-run --wait --pipe -p ProtectSystem=yes bash -xec 'uname -r; mount -l | grep boot; test ! -w /boot/ || mount -l | grep boot'
Running as unit: run-u282.service; invocation ID: 2154f6b4cbd34ddeb3e246cb7c991918
+ uname -r
6.6.7-arch1-1
+ mount -l
+ grep boot
systemd-1 on /boot type autofs (rw,relatime,fd=95,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=730583)
+ test '!' -w /boot/
+ mount -l
+ grep boot
systemd-1 on /boot type autofs (rw,relatime,fd=95,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=730583)
/dev/vda2 on /boot type vfat (rw,nosuid,nodev,noexec,relatime,nosymfollow,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)

Let's just trigger the (possible) automounts explicitly before we do any
checks to avoid all this stuff.

Also, when at it, check that ProtectSystem=yes|full correctly protects
the ESP mount as well.

Follow-up for 97bbb9cfbd.

5 months agoTEST-24-CRYPTSETUP: add test for PKCS#11 tokens 28658/head
Vladimir Stoiakin [Wed, 1 Nov 2023 14:52:50 +0000 (17:52 +0300)] 
TEST-24-CRYPTSETUP: add test for PKCS#11 tokens

Introduces new dependencies on SoftHSM, OpenSC and GnuTLS for the test.

5 months agouserdb: fix typo 30534/head
Yu Watanabe [Wed, 20 Dec 2023 06:11:59 +0000 (15:11 +0900)] 
userdb: fix typo

Follow-up for 523121d543bb1f32dca48d62e1a88cc204e5bb96.

5 months agoman: environment value -> udev property
Yu Watanabe [Wed, 20 Dec 2023 06:08:49 +0000 (15:08 +0900)] 
man: environment value -> udev property

These are not environment variables, but udev properties.

Follow-up for 3b2e7dc5a285edbbb1bf6aed2d88b889d801613f.

5 months agonetworkctl: introduce verb mask and unmask 30525/head
Mike Yuan [Tue, 19 Dec 2023 07:38:32 +0000 (15:38 +0800)] 
networkctl: introduce verb mask and unmask

Suggested in https://github.com/systemd/systemd/pull/29928#discussion_r1386626565

5 months agonetworkctl-config-file: check for masked config before editing/showing
Mike Yuan [Tue, 19 Dec 2023 08:20:08 +0000 (16:20 +0800)] 
networkctl-config-file: check for masked config before editing/showing

5 months agonetworkctl-config-file: split out reload_daemons
Mike Yuan [Sat, 16 Dec 2023 16:02:22 +0000 (00:02 +0800)] 
networkctl-config-file: split out reload_daemons

5 months agonetworkctl-cat: insert a newline between different config files
Mike Yuan [Sat, 16 Dec 2023 11:57:02 +0000 (19:57 +0800)] 
networkctl-cat: insert a newline between different config files

5 months agonetworkctl: split out networkctl-config-file.[ch]
Mike Yuan [Sat, 16 Dec 2023 11:19:29 +0000 (19:19 +0800)] 
networkctl: split out networkctl-config-file.[ch]

5 months agoshared/install: use RET_GATHER more
Mike Yuan [Fri, 17 Nov 2023 12:32:20 +0000 (20:32 +0800)] 
shared/install: use RET_GATHER more

5 months agoMerge pull request #30493 from teknoraver/main
Yu Watanabe [Wed, 20 Dec 2023 04:42:59 +0000 (13:42 +0900)] 
Merge pull request #30493 from teknoraver/main

Add verbose output on unit start #5717

5 months agotest: reset systemd-resolved.service's restart counter
Frantisek Sumsal [Tue, 19 Dec 2023 15:54:35 +0000 (16:54 +0100)] 
test: reset systemd-resolved.service's restart counter

Otherwise we might occasionally hit the start rate limit, as we restart
the service a bunch of times:

[ 3702.280886] testsuite-75.sh[1135]: + tee /tmp/tmp.wUL8bkJwrt
[ 3702.283684] testsuite-75.sh[1135]: {}
[ 3702.284254] testsuite-75.sh[46]: + restart_resolved
[ 3702.284302] testsuite-75.sh[46]: + systemctl stop systemd-resolved.service
[ 3702.310678] testsuite-75.sh[1140]: + systemctl is-failed systemd-resolved.service
[ 3702.316766] testsuite-75.sh[1141]: inactive
[ 3702.316998] testsuite-75.sh[46]: + systemctl start systemd-resolved.service
[ 3702.322315] systemd[1]: systemd-resolved.service: Start request repeated too quickly.
[ 3702.322343] systemd[1]: systemd-resolved.service: Failed with result 'start-limit-hit'.
[ 3702.322609] systemd[1]: Failed to start systemd-resolved.service - Network Name Resolution.
[ 3702.323619] systemctl[1142]: Job for systemd-resolved.service failed.
[ 3702.323839] systemctl[1142]: See "systemctl status systemd-resolved.service" and "journalctl -xeu systemd-resolved.service" for details.
[ 3702.325035] systemd[1]: testsuite-75.service: Failed with result 'exit-code'.
[ 3702.325391] systemd[1]: Failed to start testsuite-75.service - Tests for systemd-resolved.

Follow-up for b1384db11b and 6ef512c0bb.

5 months agovarlink: these two errors where added to the spec, we aren't squatting the namespace...
Lennart Poettering [Tue, 19 Dec 2023 14:01:59 +0000 (15:01 +0100)] 
varlink: these two errors where added to the spec, we aren't squatting the namespace anymore

https://github.com/varlink/varlink.github.io/commit/4443c57f1ed0f340ec82c925d69181e4b8db7ceb

5 months agoMerge pull request #30531 from yuwata/trivial-cleanups
Luca Boccassi [Tue, 19 Dec 2023 22:19:25 +0000 (23:19 +0100)] 
Merge pull request #30531 from yuwata/trivial-cleanups

Trivial cleanups

5 months agosignal-util: align table 30531/head
Yu Watanabe [Tue, 19 Dec 2023 15:54:10 +0000 (00:54 +0900)] 
signal-util: align table

5 months agotime-util: make usleep_safe() return earlier if 0 is passed
Yu Watanabe [Tue, 19 Dec 2023 15:48:49 +0000 (00:48 +0900)] 
time-util: make usleep_safe() return earlier if 0 is passed

5 months agoMerge pull request #30527 from DaanDeMeyer/sys
Daan De Meyer [Tue, 19 Dec 2023 17:59:09 +0000 (18:59 +0100)] 
Merge pull request #30527 from DaanDeMeyer/sys

test: Skip various tests when /sys is not mounted

5 months agotest: Skip various tests when /sys is not mounted 30527/head
Daan De Meyer [Tue, 19 Dec 2023 15:03:06 +0000 (16:03 +0100)] 
test: Skip various tests when /sys is not mounted

When running tests in a container, /sys might not be mounted, so
let's make sure we skip tests that depend on /sys in this case.

5 months agotest: Make sure SYSTEMD_HWDB_UPDATE_BYPASS is disabled in the hwdb test
Daan De Meyer [Tue, 19 Dec 2023 15:01:54 +0000 (16:01 +0100)] 
test: Make sure SYSTEMD_HWDB_UPDATE_BYPASS is disabled in the hwdb test

Let's make this test independent on what's in the environment.

5 months agomkosi: Add strace and gdb to base image build packages
Daan De Meyer [Tue, 19 Dec 2023 14:59:16 +0000 (15:59 +0100)] 
mkosi: Add strace and gdb to base image build packages

For debugging failing tests in combination with mkosi's --debug-shell.

5 months agosystemctl: show success messages when showing transaction 30493/head
Matteo Croce [Fri, 15 Dec 2023 14:48:20 +0000 (06:48 -0800)] 
systemctl: show success messages when showing transaction

Extend `--show-transaction` so it shows a success message when an unit
is successfully started.

5 months agodbus-wait-for-jobs: change 'quiet' flag to enum
Matteo Croce [Thu, 14 Dec 2023 14:22:14 +0000 (15:22 +0100)] 
dbus-wait-for-jobs: change 'quiet' flag to enum

Change the 'quiet' flag to `bus_wait_for_jobs()` to an enum, so we can
select with more granularity the type of information logged.

5 months agoRevert "mkosi: pin CentOS8 kernel to working version"
Frantisek Sumsal [Tue, 19 Dec 2023 11:06:24 +0000 (12:06 +0100)] 
Revert "mkosi: pin CentOS8 kernel to working version"

A fixed kernel finally landed on mirrors, so let's revert the C8S kernel
pin.

This reverts commit a64398b2ca1cdaee291550face0d1ce5f8ea52f6.

5 months agofind-esp: add debugging log about failure in parsing env variable
Yu Watanabe [Tue, 19 Dec 2023 03:06:00 +0000 (12:06 +0900)] 
find-esp: add debugging log about failure in parsing env variable

Addresses https://github.com/systemd/systemd/pull/30321#discussion_r1429716344.

5 months agoudev: allow/denylist for reading sysfs attributes when composing a NIC name
Lukas Nykryn [Fri, 8 Dec 2023 11:33:06 +0000 (12:33 +0100)] 
udev: allow/denylist for reading sysfs attributes when composing a NIC name

Users can currently pick specific versions of NIC naming, but that
does not guarantee that NIC names won't change after the kernel adds
a new sysfs attribute.

This patch allows for an allow/deny list of sysfs attributes
that could be used when composing the name.

These lists can be supplied as an hwdb entry in the form of
/etc/udev/hwdb.d/50-net-naming-allowlist.hwdb
net:naming:drvirtio_net
  ID_NET_NAME_ALLOW=0
  ID_NET_NAME_ALLOW_ACPI_INDEX=1
  ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1
  ID_NET_NAME_ALLOW_ADDRESS=1
  ID_NET_NAME_ALLOW_ARI_ENABLED=1
  ID_NET_NAME_ALLOW_DEV_PORT=1
  ID_NET_NAME_ALLOW_FUNCTION_ID=1
  ID_NET_NAME_ALLOW_IFLINK=1
  ID_NET_NAME_ALLOW_INDEX=1
  ID_NET_NAME_ALLOW_LABEL=1
  ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1
  ID_NET_NAME_ALLOW_TYPE=1

5 months agocryptsetup: convert a EC point to compressed format if required by a token
Vladimir Stoiakin [Mon, 28 Aug 2023 14:40:05 +0000 (17:40 +0300)] 
cryptsetup: convert a EC point to compressed format if required by a token

5 months agocryptsetup: Add support for EC keys in PKCS#11 tokens
Vladimir Stoiakin [Tue, 15 Aug 2023 17:51:54 +0000 (20:51 +0300)] 
cryptsetup: Add support for EC keys in PKCS#11 tokens

Since EC keys doesn't support encryption directly, we use ECDH protocol.
We generate a pair of EC keys in the same EC group, then derive a shared secret using the generated private key and the public key in the token.
The derived shared secret is used as a volume key. The generated public key is stored in the LUKS2 JSON token header area. The generated private key is erased.
To unlock a volume, we derive the shared secret with the stored public key and a private key in the token.

Co-authored-by: MkfsSion <mkfssion@mkfssion.com>
5 months agocryptenroll, homectl: deduplicate generation of LUKS2 volume keys
Vladimir Stoiakin [Sun, 13 Aug 2023 11:57:02 +0000 (14:57 +0300)] 
cryptenroll, homectl: deduplicate generation of LUKS2 volume keys

5 months agoMerge pull request #30491 from fbuihuu/vconsole-handle-kd-grahpics-mode
Yu Watanabe [Tue, 19 Dec 2023 02:49:31 +0000 (11:49 +0900)] 
Merge pull request #30491 from fbuihuu/vconsole-handle-kd-grahpics-mode

vconsole-setup: handle the case where the vc is in KD_GRAPHICS mode m…

5 months agosiphash: make sure siphash24_compress_usec_t() works the same on LE/BE archs
Lennart Poettering [Mon, 18 Dec 2023 13:52:53 +0000 (14:52 +0100)] 
siphash: make sure siphash24_compress_usec_t() works the same on LE/BE archs

Let's be systematic here, and always hash LE values. It doesn't matter
in our current codebase, but it might one day.