]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
20 months agoman: add cross-links about preset operations 24878/head
Zbigniew Jędrzejewski-Szmek [Fri, 30 Sep 2022 13:31:40 +0000 (15:31 +0200)] 
man: add cross-links about preset operations

20 months agomanager: fix/change evaluation of ConditionFirstBoot
Zbigniew Jędrzejewski-Szmek [Fri, 30 Sep 2022 10:50:40 +0000 (12:50 +0200)] 
manager: fix/change evaluation of ConditionFirstBoot

The code to evaluate the kernel command line option was busted because it
was doing 'return b == !!r' at a point where 'r > 0'. Thus we'd return "true"
in both cases:

$ SYSTEMD_PROC_CMDLINE=systemd.condition-first-boot build/systemd-analyze condition 'ConditionFirstBoot=true'
test.service: ConditionFirstBoot=true succeeded.
Conditions succeeded.
$ SYSTEMD_PROC_CMDLINE=systemd.condition-first-boot build/systemd-analyze condition 'ConditionFirstBoot=false'
test.service: ConditionFirstBoot=false succeeded.
Conditions succeeded.

We only use 'ConditionFirstBoot=true' in units, so this wasn't noticed.

But I think the logic is broken in general: the condition should evaluate as
true only during initial boot. If we rerun the units at later points, we should
not consider ConditionFirstBoot to be true.

Also, the first boot logic is also used in pid1 itself. AFAICT, for two
things: in first boot machine-id is initialized transiently (this allows
first-boot operations to be restarted if boot fails), and preset-all is
executed. But this logic was different and separate from the logic to
evaluate ConditionFirstBoot. The distinction is abolished, and the operations
in pid1 now use the same logic as ConditionFirstBoot, which means that the
kernel command line option is checked, and condition_test_first_boot()
just tests whether pid1 thinks we're in first boot.

This makes things easier to grok for the user: there's just one condition for
"first boot" and it applies to both pid1 and units.

20 months agofirstboot: add debug logging
Zbigniew Jędrzejewski-Szmek [Fri, 30 Sep 2022 09:48:12 +0000 (11:48 +0200)] 
firstboot: add debug logging

$ SYSTEMD_LOG_LEVEL=debug build/systemd-firstboot --prompt-root-password
Found container virtualization systemd-nspawn.
Found /etc/locale.conf, assuming locale information has been configured.
Failed to read credential firstboot.keymap, ignoring: No such device or address
Prompting for keymap was not requested.
Found /etc/localtime, assuming timezone has been configured.
Prompting for hostname was not requested.
Found /etc/machine-id, assuming machine-id has been configured.
Found /etc/passwd and /etc/shadow, assuming root account has been initialized.
Creation of /etc/kernel/cmdline was not requested, skipping.

20 months agostub: Remove unused function parameter
Jan Janssen [Thu, 29 Sep 2022 07:09:52 +0000 (09:09 +0200)] 
stub: Remove unused function parameter

20 months agoresolved: paranoia: restrict socket mode as much as we can
Lennart Poettering [Tue, 27 Sep 2022 12:32:35 +0000 (14:32 +0200)] 
resolved: paranoia: restrict socket mode as much as we can

20 months agotest: wrap `ls` and `stat` to make it work w/ sanitizers in specific cases
Frantisek Sumsal [Wed, 28 Sep 2022 15:01:55 +0000 (17:01 +0200)] 
test: wrap `ls` and `stat` to make it work w/ sanitizers in specific cases

When `/etc/nsswitch.conf` uses `systemd` together with `[SUCCESS=merge]`,
`ls -l` will pull in `libnss_systemd` causing `SIGABRT`, as `ls` is not
instrumented (by default):

```
-bash-5.1# strace -f -e %file ls -l /dev
execve("/usr/bin/ls", ["ls", "-l", "/dev"], 0x7ffc3bb211c8 /* 24 vars*/) = 0
...
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1896, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=359, ...}, 0) = 0
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=965, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10779, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=16195176, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/libasan.so.8", O_RDONLY|O_CLOEXEC) = 3
...
readlink("/proc/self/exe", "/usr/bin/ls", 4096) = 11
open("/proc/self/cmdline", O_RDONLY)    = 3
open("/proc/self/environ", O_RDONLY)    = 3
==620==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=620, si_uid=0} ---
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)
```

This also happens with `stat`. Let's add both `ls` and `stat` to the "wrap list"
to work around this.

Spotted on Arch Linux.

20 months agoresolvectl: add line breaks for readability
Lennart Poettering [Wed, 28 Sep 2022 10:45:31 +0000 (12:45 +0200)] 
resolvectl: add line breaks for readability

20 months agoresolved: don't access sshfp fields from tlsa printer
Lennart Poettering [Wed, 28 Sep 2022 15:12:20 +0000 (17:12 +0200)] 
resolved: don't access sshfp fields from tlsa printer

20 months agoresolved: return regular varlink invalid parameter error if more is not specified...
Lennart Poettering [Wed, 28 Sep 2022 09:44:57 +0000 (11:44 +0200)] 
resolved: return regular varlink invalid parameter error if more is not specified on monitor call

No point in returning EINVAL if we can just return a proper varlink
invalid parameter error

20 months agoresolved: fix parameter reuse in DNS_ANSWER_FOREACH_ITEM() iterator macro
Lennart Poettering [Wed, 28 Sep 2022 09:44:18 +0000 (11:44 +0200)] 
resolved: fix parameter reuse in DNS_ANSWER_FOREACH_ITEM() iterator macro

20 months agotest: fix a copy-paste error
Frantisek Sumsal [Wed, 28 Sep 2022 09:30:13 +0000 (11:30 +0200)] 
test: fix a copy-paste error

20 months agoMerge pull request #24837 from yuwata/kernel-install
Daan De Meyer [Wed, 28 Sep 2022 08:50:55 +0000 (10:50 +0200)] 
Merge pull request #24837 from yuwata/kernel-install

kernel-install: two fixlets

20 months agofuzz: tighten acceptable data size
Yu Watanabe [Wed, 28 Sep 2022 04:42:01 +0000 (13:42 +0900)] 
fuzz: tighten acceptable data size

Fixes oss-fuzz#51887 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51887).
Fixes #24833.

20 months agodocs/NETWORK_ONLINE: systemd.network hyperlink fix
Sarah Brofeldt [Wed, 28 Sep 2022 06:43:30 +0000 (08:43 +0200)] 
docs/NETWORK_ONLINE: systemd.network hyperlink fix

20 months agokernel-install: do not fail if a plugin exits with 77 24837/head
Yu Watanabe [Wed, 28 Sep 2022 04:35:49 +0000 (13:35 +0900)] 
kernel-install: do not fail if a plugin exits with 77

20 months agokernel-install: do not fail if $layout is not "bls"
Yu Watanabe [Wed, 28 Sep 2022 04:27:19 +0000 (13:27 +0900)] 
kernel-install: do not fail if $layout is not "bls"

Fixes #24836.

20 months agoresolve: persist DNSOverTLS configuration in state file
msizanoen1 [Tue, 27 Sep 2022 14:48:48 +0000 (21:48 +0700)] 
resolve: persist DNSOverTLS configuration in state file

Currently, NetworkManager will set DNSOverTLS according to its
`connection.dnsovertls` configuration only once during connection,
instead of every single restart of systemd-resolved, causing resolved to
lose the configuration on restart.

Fix this by persisting DNSOverTLS in the runtime state file, which will
also make it more consistent with other interface-specific settings.

20 months agohwdb: fix Positivo-vaio FE14 V2 key toggle touchpad #24822 (#24825)
Edson Juliano Drosdeck [Tue, 27 Sep 2022 23:06:34 +0000 (19:06 -0400)] 
hwdb: fix Positivo-vaio FE14 V2 key toggle touchpad #24822  (#24825)

20 months agoresolved notifications: follow-up fixes
Luca Boccassi [Mon, 26 Sep 2022 14:33:35 +0000 (15:33 +0100)] 
resolved notifications: follow-up fixes

Further review comments from: https://github.com/systemd/systemd/pull/22845

20 months agoMerge pull request #24832 from mrc0mmand/more-TEST-64-tweaks
Yu Watanabe [Tue, 27 Sep 2022 17:26:55 +0000 (02:26 +0900)] 
Merge pull request #24832 from mrc0mmand/more-TEST-64-tweaks

A couple of performance tweaks for TEST-64 under QEMU

20 months agotest: use fewer partitions/LVs when running with plain QEMU 24832/head
Frantisek Sumsal [Tue, 27 Sep 2022 11:57:04 +0000 (13:57 +0200)] 
test: use fewer partitions/LVs when running with plain QEMU

20 months agotest: make the symlink helpers a bit more quiet
Frantisek Sumsal [Tue, 27 Sep 2022 11:47:59 +0000 (13:47 +0200)] 
test: make the symlink helpers a bit more quiet

and show only errors/warnings.

20 months agotest: ignore tty* devices when checking device units
Frantisek Sumsal [Tue, 27 Sep 2022 11:06:27 +0000 (13:06 +0200)] 
test: ignore tty* devices when checking device units

This lower the runtime of `check_device_units()` in a plain QEMU VM from
~45 seconds to ~25 seconds.

20 months agotest: lower the # of iterations when running with plain QEMU
Frantisek Sumsal [Tue, 27 Sep 2022 11:05:43 +0000 (13:05 +0200)] 
test: lower the # of iterations when running with plain QEMU

20 months agotest: support open-iscsi >= 2.1.2
Frantisek Sumsal [Mon, 26 Sep 2022 21:14:18 +0000 (23:14 +0200)] 
test: support open-iscsi >= 2.1.2

Since open-iscsi 2.1.2 [0] the initiator name should be generated via
a one-time service instead of distro package's post-install scripts.
However, some distros still use this approach even after this patch,
so prefer the already existing initiatorname.iscsi file if it exists.

[0] https://github.com/open-iscsi/open-iscsi/commit/f37d5b653f9f251845db3f29b1a3dcb90ec89731

20 months agoMerge pull request #24805 from yuwata/sd-network
Lennart Poettering [Tue, 27 Sep 2022 09:28:25 +0000 (11:28 +0200)] 
Merge pull request #24805 from yuwata/sd-network

sd-network: several cleanups

20 months agosystemctl: add support for --image option
Richard Phibel [Wed, 7 Sep 2022 10:53:09 +0000 (03:53 -0700)] 
systemctl: add support for --image option

All tools that support --root= should also learn --image=
so that they can operate on disk images directly.

20 months agoMerge pull request #24812 from yuwata/udev-drop-netlink
Yu Watanabe [Tue, 27 Sep 2022 05:10:02 +0000 (14:10 +0900)] 
Merge pull request #24812 from yuwata/udev-drop-netlink

udev: drop workaround for slow read of phys_port_name sysattr

20 months agosd-network: make sd_network_link_get_dns() or friends return -ENODATA 24805/head
Yu Watanabe [Sat, 24 Sep 2022 00:31:00 +0000 (09:31 +0900)] 
sd-network: make sd_network_link_get_dns() or friends return -ENODATA

To make them consistent with other functions.

20 months agosd-network: drop fallback values
Yu Watanabe [Sat, 24 Sep 2022 00:22:03 +0000 (09:22 +0900)] 
sd-network: drop fallback values

This drops spurious lines in `networkctl status` for unmanaged interfaces.
Before:
```
$ networkctl status --lines 0 lo
● 1: lo
                     Link File: n/a
                  Network File: n/a
                          Type: loopback
                         State: carrier (unmanaged)
                  Online state: unknown
                    HW Address: 00:00:00:00:00:00
                           MTU: 65536
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
                       Address: 127.0.0.1
                                ::1
             Activation Policy: up
           Required For Online: yes
```
After:
```
$ networkctl status --lines 0 lo
● 1: lo
                     Link File: n/a
                  Network File: n/a
                         State: carrier (unmanaged)
                  Online state: unknown
                          Type: loopback
              Hardware Address: 00:00:00:00:00:00
                           MTU: 65536
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
      Number of Queues (Tx/Rx): 1/1
                       Address: 127.0.0.1
                                ::1
```

That is, the lines for Activation Policy and Required For Online are
dropped.

20 months agosd-network: introduce network_link_get_boolean() helper function
Yu Watanabe [Sat, 24 Sep 2022 00:20:36 +0000 (09:20 +0900)] 
sd-network: introduce network_link_get_boolean() helper function

20 months agosd-network: accept all space-like separators
Yu Watanabe [Sat, 24 Sep 2022 00:05:05 +0000 (09:05 +0900)] 
sd-network: accept all space-like separators

20 months agosd-network: propagate -ENOENT
Yu Watanabe [Sat, 24 Sep 2022 00:01:58 +0000 (09:01 +0900)] 
sd-network: propagate -ENOENT

On -ENOENT, it suggests that network-manager is not running, and
interfaces are not unmanaged. Such information may be useful for
callers.

20 months agosd-network: rename function arguments for storing return value
Yu Watanabe [Fri, 23 Sep 2022 22:50:18 +0000 (07:50 +0900)] 
sd-network: rename function arguments for storing return value

20 months agonetworkctl: use table_add_string_line() at one more place
Yu Watanabe [Fri, 23 Sep 2022 22:47:14 +0000 (07:47 +0900)] 
networkctl: use table_add_string_line() at one more place

20 months agonetworkctl: handle all errors in sd_network_link_get_setup_state() as "unmanaged"
Yu Watanabe [Fri, 23 Sep 2022 22:46:31 +0000 (07:46 +0900)] 
networkctl: handle all errors in sd_network_link_get_setup_state() as "unmanaged"

We have already ignored all errors in other fields.

20 months agoudev: drop workaround for slow read of phys_port_name sysattr 24812/head
Yu Watanabe [Sun, 25 Sep 2022 04:18:24 +0000 (13:18 +0900)] 
udev: drop workaround for slow read of phys_port_name sysattr

TL;DR
This effectively reverts 8327fd1b11c5fb6529d46dfb40e2af981ffa8545,
eaba9bb3e69635d2c490c5e1b0d262b763753e1d, and its follow-ups, as the
original issue was already fixed by the kernel side.

The original issue that the above commits tried to 'fix' is that reading
phys_port_name triggers a lock in the kernel, hence processing multiple
interfaces at the same time causes extreme slow down.
To workaround the issue, the above commits made several necessary
information retrieved through netlink instead of sysfs attributes.

A patch set for the kernel was proposed as a fix for the issue:
https://lore.kernel.org/all/20210928125500.167943-1-atenart@kernel.org/
and some of them were merged to v5.16:
https://github.com/torvalds/linux/commit/146e5e733310379f51924111068f08a3af0db830,
It has been already backported to 5.4.160, 5.10.80, 5.14.19, and 5.15.3.

When these commits were proposed, it is already claimed that such issue
should be fixed by the kernel side, and udevd should not workaround it.
Neverthless the feature was introduced, as these have theoretical
performance improvement, even if phys_port_name sysattr does not have the
above issue, as in that way udevd can obtain multiple information about
the interface with a single netlink socket operation. See the discussion
in #20744.

However, in reality, only `iflink`, `type`, `address`, and `phys_port_name`
attributes from netlink are used in the udev net_id builtin command. Hence,
after the original issue being fixed in the kernel side, there should be
almost no performance improvement for udevd.
Furthermore, combining attributes from netlink and sysfs makes hard to
test net_id builtin. See #21725.

Let's drop mostly meaningless code, and make net_id builtin easily testable.

Closes #21725.

20 months agoman: document that setting Storage= in namespaces journald menas LogDirectory= in...
Lennart Poettering [Mon, 26 Sep 2022 14:13:20 +0000 (16:13 +0200)] 
man: document that setting Storage= in namespaces journald menas LogDirectory= in unit file needs setting too

Replaces: #24789

20 months agoMerge pull request #24757 from yuwata/sd-device-get-child-first
Lennart Poettering [Mon, 26 Sep 2022 17:03:15 +0000 (19:03 +0200)] 
Merge pull request #24757 from yuwata/sd-device-get-child-first

sd-device: introduce sd_device_get_child_first() and _next()

20 months agoMerge pull request #24808 from medhefgo/fuzz
Lennart Poettering [Mon, 26 Sep 2022 16:37:08 +0000 (18:37 +0200)] 
Merge pull request #24808 from medhefgo/fuzz

fuzz: Add fuzzer for some efi string functions

20 months agounits: udev: partially emulate ProtectClock=
Topi Miettinen [Sun, 25 Sep 2022 17:47:53 +0000 (20:47 +0300)] 
units: udev: partially emulate ProtectClock=

Drop CAP_SYS_TIME and CAP_WAKE_ALARM capabilities and block clock-related
system calls. Update TODO.

20 months agoupdate TODO
Lennart Poettering [Mon, 26 Sep 2022 08:06:11 +0000 (10:06 +0200)] 
update TODO

20 months agoboot: Make efi_fnmatch non-backtracking 24808/head
Jan Janssen [Sat, 24 Sep 2022 11:33:10 +0000 (13:33 +0200)] 
boot: Make efi_fnmatch non-backtracking

20 months agofuzz: Add fuzzer for some efi string functions
Jan Janssen [Fri, 23 Sep 2022 08:07:25 +0000 (10:07 +0200)] 
fuzz: Add fuzzer for some efi string functions

20 months agofuzz: Introduce DO_NOT_OPTIMIZE
Jan Janssen [Fri, 23 Sep 2022 07:54:03 +0000 (09:54 +0200)] 
fuzz: Introduce DO_NOT_OPTIMIZE

The compiler may decide computations like these are not doing anything
and decide to optimize them away. This would defeat the whole fuzzing
exercise. This macro will force the compiler to materialize the value
no matter what. It should be less prone to accidents compared to using
log functions, which would either slow things down or still optimize the
value away (or simply move it into the if branch the log macros create).

The benefit over assert_se would be that no requirement is made on the
value itself. If we are fine getting a string of any size (including
zero), an assert_se would either create a noisy compiler warning about
conditions that would alawys be met or yet again optimize the whole
thing away.

20 months agofuzz-bcd: Do not include bcd.c
Jan Janssen [Fri, 23 Sep 2022 07:47:26 +0000 (09:47 +0200)] 
fuzz-bcd: Do not include bcd.c

This is not needed anymore, so do it the proper way now.

20 months agoAdd Asus G14 GA402 to hwdb
Albert Mikaelyan [Sat, 24 Sep 2022 22:18:26 +0000 (01:18 +0300)] 
Add Asus G14 GA402 to hwdb

20 months agoMerge pull request #24811 from yuwata/build-without-openssl
Luca Boccassi [Sun, 25 Sep 2022 09:51:45 +0000 (10:51 +0100)] 
Merge pull request #24811 from yuwata/build-without-openssl

meson,tpm2: fix build without openssl

20 months agosd-device: introduce device_get_sysattr_int()
Yu Watanabe [Sun, 25 Sep 2022 04:17:20 +0000 (13:17 +0900)] 
sd-device: introduce device_get_sysattr_int()

20 months agotpm2-util: fix build with -Dopenssl=false 24811/head
Yu Watanabe [Sat, 24 Sep 2022 22:41:07 +0000 (07:41 +0900)] 
tpm2-util: fix build with -Dopenssl=false

Fixes #24800.

20 months agomeson: libfido2 requires openssl
Yu Watanabe [Sat, 24 Sep 2022 22:33:52 +0000 (07:33 +0900)] 
meson: libfido2 requires openssl

Fixes compile error with -Dopenssl=false.
```
In file included from ../../home/watanabe/git/systemd/src/shared/pkcs11-util.h:12,
                 from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll.c:24:
../../home/watanabe/git/systemd/src/shared/openssl-util.h:56:21: error: conflicting types for ‘X509’; have ‘struct X509’
   56 | typedef struct X509 X509;
      |                     ^~~~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /usr/include/openssl/ec.h:17,
                 from /usr/include/fido.h:10,
                 from ../../home/watanabe/git/systemd/src/shared/libfido2-util.h:18,
                 from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll-fido2.h:7,
                 from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll.c:6:
/usr/include/openssl/ossl_typ.h:123:24: note: previous declaration of ‘X509’ with type ‘X509’ {aka ‘struct x509_st’}
  123 | typedef struct x509_st X509;
      |                        ^~~~
```

20 months agotmpfiles: fix wrong return value
Yu Watanabe [Sat, 24 Sep 2022 01:10:51 +0000 (10:10 +0900)] 
tmpfiles: fix wrong return value

Follow-up for 27f6aa0b7112024c1236957abd909071b06869a8.

21 months agocore: respect SELinuxContext= for socket creation
Christian Göttsche [Fri, 23 Sep 2022 17:00:22 +0000 (19:00 +0200)] 
core: respect SELinuxContext= for socket creation

On socket creation respect the SELinuxContext= setting of the associated
service, such that the initial created socket has the same label as the
future process accepting the connection (since w.r.t SELinux sockets
normally have the same label as the owning process).

Triggered by #24702

21 months agotree-wide: fix typo
Yu Watanabe [Sat, 24 Sep 2022 01:43:58 +0000 (10:43 +0900)] 
tree-wide: fix typo

21 months agoMerge pull request #24799 from poettering/initrd-ftw
Luca Boccassi [Fri, 23 Sep 2022 19:43:15 +0000 (20:43 +0100)] 
Merge pull request #24799 from poettering/initrd-ftw

use "initrd" rather than "initial RAM disk" or "initramfs" to refernce the concept

21 months agoMerge pull request #24635 from DaanDeMeyer/repart-verity-sig
Daan De Meyer [Fri, 23 Sep 2022 16:53:04 +0000 (18:53 +0200)] 
Merge pull request #24635 from DaanDeMeyer/repart-verity-sig

repart: Add support for generating verity sig partitions

21 months agorepart: Add support for generating verity sig partitions 24635/head
Daan De Meyer [Sun, 11 Sep 2022 08:49:24 +0000 (10:49 +0200)] 
repart: Add support for generating verity sig partitions

21 months agoopenssl-util: Add x509_fingerprint()
Daan De Meyer [Fri, 23 Sep 2022 13:01:15 +0000 (15:01 +0200)] 
openssl-util: Add x509_fingerprint()

21 months agoopenssl-util: Allow declaring openssl struct pointers without openssl
Daan De Meyer [Fri, 23 Sep 2022 12:17:20 +0000 (14:17 +0200)] 
openssl-util: Allow declaring openssl struct pointers without openssl

21 months agoTODO
Lennart Poettering [Fri, 23 Sep 2022 14:12:54 +0000 (16:12 +0200)] 
TODO

21 months agoMerge pull request #24700 from poettering/ssh-creds
Lennart Poettering [Fri, 23 Sep 2022 14:01:09 +0000 (16:01 +0200)] 
Merge pull request #24700 from poettering/ssh-creds

support easy provisioning for SSH key of root user

21 months agoMerge pull request #24628 from medhefgo/boot-sections
Lennart Poettering [Fri, 23 Sep 2022 13:45:28 +0000 (15:45 +0200)] 
Merge pull request #24628 from medhefgo/boot-sections

boot: Try to detect overlapping PE sections

21 months agoMerge pull request #24796 from yuwata/doc-update
Lennart Poettering [Fri, 23 Sep 2022 13:13:18 +0000 (15:13 +0200)] 
Merge pull request #24796 from yuwata/doc-update

documentation updates

21 months agoMerge pull request #24794 from DaanDeMeyer/repart-follow-ups
Lennart Poettering [Fri, 23 Sep 2022 13:12:56 +0000 (15:12 +0200)] 
Merge pull request #24794 from DaanDeMeyer/repart-follow-ups

repart: Extend squashfs logic to all read-only filesystems

21 months agotree-wide: also settle on "initrd" instead of "initial RAM disk" 24799/head
Lennart Poettering [Fri, 23 Sep 2022 13:10:06 +0000 (15:10 +0200)] 
tree-wide: also settle on "initrd" instead of "initial RAM disk"

With this the concept is now called the same way everywhere except where
historical info is relevant or where the other names are API.

21 months agotree-wide: use the term "initrd" at most places we so far used "initramfs"
Lennart Poettering [Fri, 23 Sep 2022 12:59:02 +0000 (14:59 +0200)] 
tree-wide: use the term "initrd" at most places we so far used "initramfs"

In most cases we refernced the concept as "initrd". Let's convert most
remaining uses of "initramfs" to "initrd" too, to stay internally
consistent.

This leaves "initramfs" only where it's relevant to explain historical
concepts or where "initramfs" is part of the API (i.e. in
/run/initramfs).

Follow-up for: b66a6e1a5838b874b789820c090dd6850cf10513

21 months agodocs: Mention that "certificateFingerprint" source should be in DER
Daan De Meyer [Fri, 23 Sep 2022 12:08:40 +0000 (14:08 +0200)] 
docs: Mention that "certificateFingerprint" source should be in DER

21 months agobasic: Add strgrowpad0()
Daan De Meyer [Fri, 23 Sep 2022 10:40:13 +0000 (12:40 +0200)] 
basic: Add strgrowpad0()

21 months agoMerge pull request #24686 from d4nuu8/delta_output
Lennart Poettering [Fri, 23 Sep 2022 11:33:55 +0000 (13:33 +0200)] 
Merge pull request #24686 from d4nuu8/delta_output

shared/logs-show: add new --output= format "short-delta"

21 months agodissect: Process verity sig partitions if a root hash is specified
Daan De Meyer [Sun, 18 Sep 2022 13:36:59 +0000 (15:36 +0200)] 
dissect: Process verity sig partitions if a root hash is specified

If a root hash is specified, we should be checking that it matches
the root hash in the verity signature partition, so let's not skip
processing of the verity signature partitions if a root hash is
specified.

21 months agotest: Install openssl 3 extra library dependencies
Daan De Meyer [Sat, 17 Sep 2022 20:35:19 +0000 (22:35 +0200)] 
test: Install openssl 3 extra library dependencies

21 months agodissect: Log when we fail to load the verity signature partition
Daan De Meyer [Sat, 17 Sep 2022 20:34:56 +0000 (22:34 +0200)] 
dissect: Log when we fail to load the verity signature partition

21 months agorepart: Rename verity integration test definition files
Daan De Meyer [Sun, 11 Sep 2022 11:43:17 +0000 (13:43 +0200)] 
repart: Rename verity integration test definition files

21 months agorepart: Improve missing libcryptsetup error message
Daan De Meyer [Sun, 11 Sep 2022 08:47:18 +0000 (10:47 +0200)] 
repart: Improve missing libcryptsetup error message

21 months agorepart: Rename context_verity() to context_verity_hash()
Daan De Meyer [Sat, 10 Sep 2022 20:12:57 +0000 (22:12 +0200)] 
repart: Rename context_verity() to context_verity_hash()

21 months agoupdate TODO
Lennart Poettering [Fri, 23 Sep 2022 09:43:53 +0000 (11:43 +0200)] 
update TODO

21 months agoREADME: drop graphs counting issues or PRs 24796/head
Yu Watanabe [Thu, 22 Sep 2022 22:55:50 +0000 (07:55 +0900)] 
README: drop graphs counting issues or PRs

These cannot be accessible anymore.

21 months agodoc: drop remaining references to LGTM.com
Yu Watanabe [Thu, 22 Sep 2022 22:54:12 +0000 (07:54 +0900)] 
doc: drop remaining references to LGTM.com

21 months agoUpdated Lenovo ThinkPad T440p/T440 touchpad fuzz (#24779)
Avamander [Fri, 23 Sep 2022 09:26:01 +0000 (12:26 +0300)] 
Updated Lenovo ThinkPad T440p/T440 touchpad fuzz (#24779)

21 months agoshared/logs-show: add new --output= format "short-delta" 24686/head
Daniel Braunwarth [Thu, 22 Sep 2022 16:35:19 +0000 (18:35 +0200)] 
shared/logs-show: add new --output= format "short-delta"

This new output formatting option is similar to "short-monotonic" but
also shows the time delta between two messages.

This fixes #24641.

21 months agologs-show: move timestamp reading into show_journal_entry()
Daniel Braunwarth [Tue, 20 Sep 2022 17:51:36 +0000 (19:51 +0200)] 
logs-show: move timestamp reading into show_journal_entry()

21 months agoshared: Don't try to generate read-only filesystem that we don't support 24794/head
Daan De Meyer [Fri, 23 Sep 2022 07:55:26 +0000 (09:55 +0200)] 
shared: Don't try to generate read-only filesystem that we don't support

We need explicit support to generate read-only filesystems, since we
always need to pass a source tree to the mkfs binary to populate the
filesystem. As such, let's add an explicit check to return a
recognizable error when users try to generate a read-only filesystem
that we don't support.

21 months agorepart: Extend squashfs logic to all read-only filesystems
Daan De Meyer [Thu, 22 Sep 2022 19:28:58 +0000 (21:28 +0200)] 
repart: Extend squashfs logic to all read-only filesystems

The same logic will apply to every read-only filesystem that we
might add support for in the future, so let's make this a bit more
future proof.

21 months agoupdate TODO 24700/head
Lennart Poettering [Fri, 16 Sep 2022 15:33:54 +0000 (16:33 +0100)] 
update TODO

(let's also merge all TODO items about adding creds support to various
tools into one item)

21 months agoman: add man page decribing well known system credentials
Lennart Poettering [Fri, 16 Sep 2022 14:58:00 +0000 (15:58 +0100)] 
man: add man page decribing well known system credentials

21 months agotest: add test case for new ':' uid/gid/access modifier in tmpfiles.d
Lennart Poettering [Fri, 16 Sep 2022 14:12:14 +0000 (15:12 +0100)] 
test: add test case for new ':' uid/gid/access modifier in tmpfiles.d

21 months agoman: document new : modified for uid/gid/access mode in tmpfiles.d
Lennart Poettering [Fri, 16 Sep 2022 13:59:05 +0000 (14:59 +0100)] 
man: document new : modified for uid/gid/access mode in tmpfiles.d

21 months agotmpfiles: add lines for provisioning ssh keys for root by default
Lennart Poettering [Thu, 15 Sep 2022 18:35:36 +0000 (19:35 +0100)] 
tmpfiles: add lines for provisioning ssh keys for root by default

With this, I can now easily do:

    systemd-nspawn --load-credential=ssh.authorized_keys.root:/home/lennart/.ssh/authorized_keys --image=… --boot

To boot into an image with my SSH key copied in. Yay!

21 months agotmpfiles: rework empty_directory() to also use chase_symlinks()
Lennart Poettering [Thu, 15 Sep 2022 18:35:04 +0000 (19:35 +0100)] 
tmpfiles: rework empty_directory() to also use chase_symlinks()

21 months agotmpfiles: move symlink creation into its own function, and modernize
Lennart Poettering [Tue, 13 Sep 2022 10:34:18 +0000 (11:34 +0100)] 
tmpfiles: move symlink creation into its own function, and modernize

Let's ensure it also operates based on O_PATH, like fifo/device node/…
creation.

21 months agotmpfiles: whenever creating an inode, immediately O_PATH open it to pin it
Lennart Poettering [Tue, 13 Sep 2022 09:46:23 +0000 (10:46 +0100)] 
tmpfiles: whenever creating an inode, immediately O_PATH open it to pin it

let's make things a bit less racy: whenever we create an inode,
immediately open it via O_PATH, compare type and continue operations
with the acquired fd.

21 months agofs-util: add mknodat_atomic()
Lennart Poettering [Fri, 16 Sep 2022 11:45:02 +0000 (12:45 +0100)] 
fs-util: add mknodat_atomic()

21 months agofs-util: make mkfifo_atomic() just a shortcut for mkfifoat_atomic()
Lennart Poettering [Thu, 15 Sep 2022 19:37:52 +0000 (20:37 +0100)] 
fs-util: make mkfifo_atomic() just a shortcut for mkfifoat_atomic()

21 months agofs-util: replace symlink_atomic() by symlinkat_atomic()
Lennart Poettering [Tue, 13 Sep 2022 10:33:24 +0000 (11:33 +0100)] 
fs-util: replace symlink_atomic() by symlinkat_atomic()

21 months agotmpfiles: allow prefixing uid/gid/mode with ":" to only apply on creation
Lennart Poettering [Sun, 11 Sep 2022 10:23:23 +0000 (12:23 +0200)] 
tmpfiles: allow prefixing uid/gid/mode with ":" to only apply on creation

In some cases it is useful to specify the access mode/uid/gid for inodes
we create without also enforcing them on existing inodes. Let's add a
new flag for that: if the uid/gid/mode specificaitons are prefixed with
":", then they only apply to creation, not otherwise.

This is specifically useful for provisioning SSH keys later. Those we'd
like to provision like this:

<snip>
d /root :0700 root root -
d /root/.ssh :0700 root root -
f^ /root/.ssh/authorized_keys - - - - ssh.authorized_keys
</snip>

While /root/ + /root/.ssh/ being owned by root is pretty uncontroversial
the access mode of /root/ and /root/.ssh/ might not be. Hence we should
only have a default mode defined that is used when we create the dir,
but not otherwise.

21 months agotmpfiles: generalize CreationMode and pass it everywhere
Lennart Poettering [Sun, 11 Sep 2022 10:21:58 +0000 (12:21 +0200)] 
tmpfiles: generalize CreationMode and pass it everywhere

For some purposes we had CreationMode which indicates whether an inode
was created by us, or is pre-existing. Let's generalize that for *all*
operations. This is later useful to conditionalize certain operations on
that (and makes the codebase more systematic)

21 months agotmpfiles: rebreak some comments
Lennart Poettering [Sun, 11 Sep 2022 10:17:57 +0000 (12:17 +0200)] 
tmpfiles: rebreak some comments

21 months agoMerge pull request #24797 from yuwata/networkctl
Daan De Meyer [Fri, 23 Sep 2022 06:45:47 +0000 (08:45 +0200)] 
Merge pull request #24797 from yuwata/networkctl

networkctl: several table format updates

21 months agonetworkctl: re-order entries in status command 24797/head
Yu Watanabe [Fri, 23 Sep 2022 02:18:30 +0000 (11:18 +0900)] 
networkctl: re-order entries in status command

Also fixes "Speed:" field, which may show empty value.

21 months agotest-network: fix matching string
Yu Watanabe [Fri, 23 Sep 2022 01:43:10 +0000 (10:43 +0900)] 
test-network: fix matching string

This partially reverts 5515f2169cb5980996044eabb5f1b35e00fd81eb.
As the commit changes 'networkctl list', not 'networkctl status'.