]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agotpm2: move policy calculation out of tpm2_seal()
Dan Streetman [Wed, 12 Jul 2023 21:35:54 +0000 (17:35 -0400)] 
tpm2: move policy calculation out of tpm2_seal()

Move the calculation of the sealed object policy hash out of the tpm2_seal()
function. Instead, callers of tpm2_seal() can directly call
tpm2_calculate_sealing_policy() and then provide the policy hash to
tpm2_seal().

2 years agotpm2: add functions to convert TPM2B_PUBLIC to/from openssl pkey or PEM
Dan Streetman [Tue, 27 Jun 2023 19:03:08 +0000 (15:03 -0400)] 
tpm2: add functions to convert TPM2B_PUBLIC to/from openssl pkey or PEM

Add functions to convert a PEM or pkey to TPM2B_PUBLIC, and functions to
convert TPM2B_PUBLIC to pkey or fingerprint.

Supports both RSA and ECC keys.

Add ECC support to some test-tpm2 tests, and tests to cover the newly added functions.

2 years agoopenssl: add test-openssl
Dan Streetman [Thu, 6 Jul 2023 15:21:29 +0000 (11:21 -0400)] 
openssl: add test-openssl

Add openssl unit tests.

2 years agotest: add DEFINE_HEX_PTR() helper function
Dan Streetman [Thu, 6 Jul 2023 15:21:29 +0000 (11:21 -0400)] 
test: add DEFINE_HEX_PTR() helper function

Use function in test-tpm2 to convert hex strings to void* and len vars.

2 years agoopenssl: add ecc_pkey_new(), ecc_pkey_from_curve_x_y(), ecc_pkey_to_curve_x_y()
Dan Streetman [Tue, 4 Jul 2023 22:52:59 +0000 (18:52 -0400)] 
openssl: add ecc_pkey_new(), ecc_pkey_from_curve_x_y(), ecc_pkey_to_curve_x_y()

Add function to create openssl pkey from ECC curve and point, and function to
get curve id and x/y point from existing ECC pkey. Also add function to create
new ECC key for specified curve.

Also add DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO() to handle case when func() is
a macro, not a function symbol; specifically in this case it is used for
OPENSSL_free() which is a macro.

2 years agoopenssl: add rsa_pkey_new(), rsa_pkey_from_n_e(), rsa_pkey_to_n_e()
Dan Streetman [Tue, 27 Jun 2023 18:53:46 +0000 (14:53 -0400)] 
openssl: add rsa_pkey_new(), rsa_pkey_from_n_e(), rsa_pkey_to_n_e()

Add function to generate an EVP_PKEY for a specific 'n' and 'e', and function
to get 'n' and 'e' values from existing RSA public key. Also add a function to
generate a new RSA key with a specified number of bits.

2 years agoopenssl: add openssl_pkey_from_pem()
Dan Streetman [Wed, 19 Jul 2023 02:48:34 +0000 (22:48 -0400)] 
openssl: add openssl_pkey_from_pem()

Add function to create EVP_PKEY from PEM buffer.

2 years agotpm2: add tpm2_pcr_read_missing_values()
Dan Streetman [Tue, 18 Jul 2023 16:56:25 +0000 (12:56 -0400)] 
tpm2: add tpm2_pcr_read_missing_values()

Add function to read all unset values in an array of Tpm2PCRValue entries.

Also publish tpm2_pcr_read() in header.

2 years agotpm2: add TPM2B_*_MAKE(), TPM2B_*_CHECK_SIZE() macros
Dan Streetman [Wed, 19 Jul 2023 11:49:07 +0000 (07:49 -0400)] 
tpm2: add TPM2B_*_MAKE(), TPM2B_*_CHECK_SIZE() macros

The tpm2-tss library has many structs with only an array and size; these macros
make it easy to assign to these structs.

2 years agotpm2: change tpm2_parse_pcr_argument() parameters to parse to Tpm2PCRValue array
Dan Streetman [Thu, 13 Jul 2023 02:36:37 +0000 (22:36 -0400)] 
tpm2: change tpm2_parse_pcr_argument() parameters to parse to Tpm2PCRValue array

In order to allow users to specify expected PCR values, change the
tpm2_parse_pcr_argument() to parse the text argument into an array of
Tpm2PCRValue objects, which provide not only the selected PCR indexes, but also
(optionally) the hash algorithm and hash value for each PCR index.

2 years agotpm2: change tpm2_calculate_policy_pcr(), tpm2_calculate_sealing_policy() to use...
Dan Streetman [Thu, 13 Jul 2023 02:14:18 +0000 (22:14 -0400)] 
tpm2: change tpm2_calculate_policy_pcr(), tpm2_calculate_sealing_policy() to use Tpm2PCRValue array

An array of Tpm2PCRValue objects effectively replaces a TPML_PCR_SELECTION
object combined with an array of (properly ordered) TPM2B_DIGEST objects.

Also update tpm2_calculate_sealing_policy() pin parameter to boolean use_pin,
since the function does not need to know the pin value, only if a pin is being
used.

2 years agotpm2: declare tpm2_log_debug_*() functions in tpm2_util.h
Dan Streetman [Fri, 14 Jul 2023 11:23:55 +0000 (07:23 -0400)] 
tpm2: declare tpm2_log_debug_*() functions in tpm2_util.h

Allow other code to use the log debug functions; e.g. they are useful in test
code.

2 years agotpm2: move declared functions in header lower down
Dan Streetman [Fri, 14 Jul 2023 15:38:11 +0000 (11:38 -0400)] 
tpm2: move declared functions in header lower down

Move some function declarations lower down, below the Tpm2Context and
Tpm2Handle typedefs; later commits will reference the typedefs in some of the
functions, so the typedefs need to come first in the header.

This only moves the declarations, none of the declarations are modified.

2 years agotpm2: add Tpm2PCRValue struct and associated functions
Dan Streetman [Wed, 12 Jul 2023 01:23:36 +0000 (21:23 -0400)] 
tpm2: add Tpm2PCRValue struct and associated functions

Add a new struct that can represent a PCR index, hash, and value all
together. This replaces code (e.g. the tpm2_pcr_read() parameters) that
required using both a TPML_PCR_SELECTION as well as array of TPM2B_DIGEST
entries, which was difficult to correlate the selection hash/index to each
digest.

2 years agotpm2: add more helper functions for managing TPML_PCR_SELECTION and TPMS_PCR_SELECTION
Dan Streetman [Wed, 19 Jul 2023 12:50:06 +0000 (08:50 -0400)] 
tpm2: add more helper functions for managing TPML_PCR_SELECTION and TPMS_PCR_SELECTION

Add more functions to help manage these objects.

2 years agotpm2: change tpm2_tpm*_pcr_selection_to_mask() to return mask
Dan Streetman [Tue, 1 Aug 2023 16:55:17 +0000 (12:55 -0400)] 
tpm2: change tpm2_tpm*_pcr_selection_to_mask() to return mask

This simplifies use of the functions, as well as avoiding the use of -ENOENT
from tpm2_tpml_pcr_selection_to_mask().

2 years agotpm2: add tpm2_hash_alg_to_size()
Dan Streetman [Tue, 11 Jul 2023 15:11:59 +0000 (11:11 -0400)] 
tpm2: add tpm2_hash_alg_to_size()

Add function to get the hash size for a hash algorithm

2 years agotpm2: add debug logging to functions converting hash or asym algs to/from strings...
Dan Streetman [Tue, 1 Aug 2023 18:09:04 +0000 (14:09 -0400)] 
tpm2: add debug logging to functions converting hash or asym algs to/from strings or ids

Add debug log message if the algorithm name or id is not known.

2 years agotimesyncd: emit signal when timesyncd NTPServers property changes
Kingbom Dou [Wed, 7 Jun 2023 06:57:21 +0000 (14:57 +0800)] 
timesyncd: emit signal when timesyncd NTPServers property changes

Emit signal when timesyncd LinkNTPServers property changes

Tested:
```
 Monitoring bus message stream.
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=21  Timestamp="Fri 2023-05-19 07:50:47.427051 UT"
  Sender=:1.623  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.623
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                          STRING "10.8.8.19";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=28  Timestamp="Fri 2023-05-19 07:53:22.609416 UT"
  Sender=:1.623  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.623
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                          STRING "10.8.8.20";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=6  Timestamp="Fri 2023-05-19 08:12:26.964666 UTC"
  Sender=:1.627  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.627
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=162  Timestamp="Mon 2023-07-10 09:06:18.865654 UTC"
  Sender=:1.1  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Member=PropertiesChanged
  UniqueName=:1.1
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "RuntimeNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.2.16.10";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```

Signed-off-by: Kingbom Dou <doujinbao@bytedance.com>
2 years agoman/systemd-fsck@.service: clarify passno and noauto combination in /etc/fstab
Antonio Alvarez Feijoo [Fri, 4 Aug 2023 09:16:02 +0000 (11:16 +0200)] 
man/systemd-fsck@.service: clarify passno and noauto combination in /etc/fstab

Fixes #28657

2 years agodebug-generator: Use generator_add_symlink()
Daan De Meyer [Fri, 4 Aug 2023 06:25:53 +0000 (08:25 +0200)] 
debug-generator: Use generator_add_symlink()

2 years agotpm2: use CreatePrimary() to create primary keys instead of Create()
Dan Streetman [Thu, 3 Aug 2023 18:44:57 +0000 (14:44 -0400)] 
tpm2: use CreatePrimary() to create primary keys instead of Create()

Older versions used CreatePrimary() to create a transient primary key to use
when creating a sealed data object. That was changed in v254 to use Create()
instead, which should result in the same transient key, but it seems some
hardware TPMs refuse to allow using Create() to generate primary keys.

This reverts to using CreatePrimary() to create primary key.

Fixes: #28654
2 years agoMerge pull request #28648 from yuwata/shutdown-skip-recursive-mount-run
Mike Yuan [Fri, 4 Aug 2023 04:45:32 +0000 (12:45 +0800)] 
Merge pull request #28648 from yuwata/shutdown-skip-recursive-mount-run

shutdown: several fixlets

2 years agotree-wide: Fix -Wmaybe-uninitialized compilation warnings
Daan De Meyer [Thu, 3 Aug 2023 20:38:10 +0000 (22:38 +0200)] 
tree-wide: Fix -Wmaybe-uninitialized compilation warnings

2 years agoAdd tool to display emergency log message full-screen on boot failure.
OMOJOLA JOSHUA [Mon, 19 Jun 2023 14:16:23 +0000 (15:16 +0100)] 
Add tool to display emergency log message full-screen on boot failure.

2 years agoswitch-root: reopen target directory after it is mounted 28648/head
Yu Watanabe [Thu, 3 Aug 2023 19:03:29 +0000 (04:03 +0900)] 
switch-root: reopen target directory after it is mounted

Fixes a bug introduced by f717d7a40a696b351415976f22a4f498c401de41.

2 years agoshutdown: do not umount recursively before MS_MOVE
Yu Watanabe [Wed, 2 Aug 2023 19:19:14 +0000 (04:19 +0900)] 
shutdown: do not umount recursively before MS_MOVE

Unmounting filesystem will be done gracefully by shutdown itself.

Follow-up for f2c1d491a539035d6cc1fa53a7cef0cbc8d52902 and
268d1244e87a35ff8dff56c92ef375ebf69d462e.

2 years agoshutdown: disable recursive mount of /run/ on switching root
Yu Watanabe [Wed, 2 Aug 2023 17:50:09 +0000 (02:50 +0900)] 
shutdown: disable recursive mount of /run/ on switching root

Mounting /run/ recursively may be harmless, but not necessary on
shutdown as the new root is /run/initramfs.

Follow-up for b12d41a8bb7c99f7d7a1c7821a886d98b42d9ce0.

2 years agopo: Translated using Weblate (Turkish)
Oğuz Ersen [Thu, 3 Aug 2023 17:21:04 +0000 (19:21 +0200)] 
po: Translated using Weblate (Turkish)

Currently translated at 88.1% (200 of 227 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main

2 years agovconsole: support KEYMAP=kernel for preserving kernel keymap
Mike Yuan [Thu, 3 Aug 2023 13:42:00 +0000 (21:42 +0800)] 
vconsole: support KEYMAP=kernel for preserving kernel keymap

Follow-up for #26089 and #28505

Currently, if default-keymap is not empty, there's no way
to ask vconsole-setup to retain the kernel keymap. Let's
accept a special value "kernel" for that purpose.

Addresses the problem mentioned in https://github.com/systemd/systemd/pull/28505#issuecomment-1663681665

2 years agohwdb: Mute SW rfkill keys on MSI Wind U100
Maxim Mikityanskiy [Thu, 3 Aug 2023 14:40:15 +0000 (17:40 +0300)] 
hwdb: Mute SW rfkill keys on MSI Wind U100

Kernel patch [1] fixed bugs in rfkill handling on MSI Wind U100. Now
that the HW rfkill reports the correct state, and the SW rfkill is
controllable from userspace, it's necessary to mute KEY_WLAN and
KEY_BLUETOOTH generated on HW rfkill state changes. Otherwise, the
userspace will react to these keys and toggle the SW rfkill as well,
which is not desired, because the user may end up with non-functional
radios if HW and SW rfkills are out of sync.

Blocking these keycodes doesn't impair user experience, because the
desktop environment can still react to HW rfkill events and act
accordingly (for example, show notifications).

While at it, use "unknown" instead of "reserved" to mute keys, to avoid
the "atkbd serio0: Unknown key pressed" flood in dmesg.

[1]: https://lore.kernel.org/all/20230721145423.161057-1-maxtram95@gmail.com/

2 years agoMerge pull request #28628 from yuwata/meson-use-template-part6
Yu Watanabe [Thu, 3 Aug 2023 17:16:07 +0000 (02:16 +0900)] 
Merge pull request #28628 from yuwata/meson-use-template-part6

meson: use template to declare executables (part 6)

2 years agomkosi: Update to latest
Daan De Meyer [Thu, 3 Aug 2023 13:33:40 +0000 (15:33 +0200)] 
mkosi: Update to latest

We modify all our scripts to execute in the image instead of on the
hosts. In the future we can adapt them to run on the host.

2 years agoMerge pull request #28632 from DaanDeMeyer/repart-synthesize
Daan De Meyer [Thu, 3 Aug 2023 11:49:31 +0000 (13:49 +0200)] 
Merge pull request #28632 from DaanDeMeyer/repart-synthesize

repart: Add --copy-from option

2 years agomeson: set suite for all tests, and adjust suite for some tests 28628/head
Yu Watanabe [Mon, 26 Jun 2023 16:28:32 +0000 (01:28 +0900)] 
meson: set suite for all tests, and adjust suite for some tests

2 years agomeson: also merge declarations of fuzzers with other executables
Yu Watanabe [Mon, 26 Jun 2023 16:07:25 +0000 (01:07 +0900)] 
meson: also merge declarations of fuzzers with other executables

2 years agomeson: merge declarations of normal and test executables
Yu Watanabe [Sun, 25 Jun 2023 23:52:26 +0000 (08:52 +0900)] 
meson: merge declarations of normal and test executables

2 years agotest: rename udev-rule-runner -> test-udev-rule-runner
Yu Watanabe [Thu, 3 Aug 2023 10:57:41 +0000 (19:57 +0900)] 
test: rename udev-rule-runner -> test-udev-rule-runner

This partially revert 0454cf05d38d289474ca65c1917d414b2958f6b5.
The executable actually does not work with itself, but needs to be
combined with test-udev.py. But, even so, the executable is for testing.

In the next commit, test and normal executables are declared in the same
way, and naming of the executable becomes essential to classify them.
Let's rename the executable and prefix with 'test-'.

2 years agomeson: use template to declare udev plugins
Yu Watanabe [Sun, 25 Jun 2023 20:01:03 +0000 (05:01 +0900)] 
meson: use template to declare udev plugins

2 years agomeson: introduce HAVE_DMI flag
Yu Watanabe [Sat, 29 Jul 2023 21:32:53 +0000 (06:32 +0900)] 
meson: introduce HAVE_DMI flag

The condition is used at several places. Let's introduce a simple flag
for that.

2 years agotest: fix test executable name
Yu Watanabe [Thu, 3 Aug 2023 11:36:51 +0000 (20:36 +0900)] 
test: fix test executable name

Follow-up for 82a1d6d09625b656c991f25e82b5651c74a55945.

2 years agomeson: move several test declarations
Yu Watanabe [Sun, 25 Jun 2023 18:46:05 +0000 (03:46 +0900)] 
meson: move several test declarations

One of the notable change is that previously test-sysusers.sh was installed
unconditionally, but now it is installed only when sysusers is enabled.

Another change is that test-sysv-generator is now re-introduced which
was mistakenly dropped by 6c713961ab0831fe744a2df9c4e9e258b6ba3105.

2 years agorepart: Add --copy-from option 28632/head
Daan De Meyer [Tue, 1 Aug 2023 19:38:39 +0000 (21:38 +0200)] 
repart: Add --copy-from option

--copy-from synthesizes partition definitions from the given image
which are then applied to the repart algorithm. In its most basic
form, this allows copying an image to another device but it can
also be combined with --definitions to copy + add partitions in the
same call to repart.

2 years agoMerge pull request #28651 from kraj/kraj/include-fixes
Luca Boccassi [Wed, 2 Aug 2023 23:12:05 +0000 (00:12 +0100)] 
Merge pull request #28651 from kraj/kraj/include-fixes

Add missing system includes for `LOCK_EX` and `struct timex`

2 years agoinclude missing sys/file.h for LOCK_EX 28651/head
Khem Raj [Wed, 2 Aug 2023 19:18:24 +0000 (12:18 -0700)] 
include missing sys/file.h for LOCK_EX

2 years agotest/test-sizeof: Include sys/timex.h for struct timex
Khem Raj [Wed, 2 Aug 2023 19:14:56 +0000 (12:14 -0700)] 
test/test-sizeof: Include sys/timex.h for struct timex

Fixes

../git/src/test/test-sizeof.c:64:41: error: incomplete definition of type 'struct timex'
   64 |         check(typeof(((struct timex *)0)->freq), SIZEOF_TIMEX_MEMBER);
      |                      ~~~~~~~~~~~~~~~~~~~^

2 years agoMerge pull request #28640 from medhefgo/boot-count
Yu Watanabe [Wed, 2 Aug 2023 21:45:09 +0000 (06:45 +0900)] 
Merge pull request #28640 from medhefgo/boot-count

bless-boot: Actually return successfully

2 years agojournalctl: do not add io event source for stdout if it is a file
Yu Watanabe [Wed, 2 Aug 2023 15:53:48 +0000 (00:53 +0900)] 
journalctl: do not add io event source for stdout if it is a file

Fixes a bug introduced by 713342d9b09d717e9942ed08bd620c9159a98fb8.

Fixes #28636.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2228089.

2 years agovarlink: allocate the buffer for varlink FDs on the heap
Frantisek Sumsal [Wed, 2 Aug 2023 12:55:50 +0000 (14:55 +0200)] 
varlink: allocate the buffer for varlink FDs on the heap

Since it's ~16K, which might cause issues in environments with limited
stack space.

Resolves: #28635

2 years agoudev: decrease devlink priority for encrypted partitions
Yu Watanabe [Wed, 2 Aug 2023 14:33:14 +0000 (23:33 +0900)] 
udev: decrease devlink priority for encrypted partitions

Decrease devlink priority for encrypted partitions, and make the priority for
decrypted DM devices relatively higher. This is for the case that an encrypted
partition and its decrypted DM device have the same label.

2 years agoMerge pull request #28646 from yuwata/network-generator-ip-dhcp
Yu Watanabe [Wed, 2 Aug 2023 20:48:58 +0000 (05:48 +0900)] 
Merge pull request #28646 from yuwata/network-generator-ip-dhcp

network-generator: make ip=dhcp works with container manager

2 years agoinclude sys/file.h for LOCK_EX
Khem Raj [Wed, 2 Aug 2023 17:33:48 +0000 (10:33 -0700)] 
include sys/file.h for LOCK_EX

Fixes
| ../git/src/basic/user-util.c:708:30: error: use of undeclared identifier 'LOCK_EX'; did you mean 'LOCK_BSD'?
|   708 |         r = unposix_lock(fd, LOCK_EX);
|       |                              ^~~~~~~
|       |                              LOCK_BSD

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 years agoNEWS: PrivateNetwork implies PrivateMounts
Etienne Dechamps [Wed, 2 Aug 2023 17:52:41 +0000 (18:52 +0100)] 
NEWS: PrivateNetwork implies PrivateMounts

This is clearly a change that can break existing units, and broke my
system in at least two different ways. For this reason this should have
been added to NEWS in #26458, specifically c2da3bf, but wasn't.

2 years agonetwork-generator: make network file generated from ip=dhcp matches only physical... 28646/head
Yu Watanabe [Wed, 2 Aug 2023 17:12:10 +0000 (02:12 +0900)] 
network-generator: make network file generated from ip=dhcp matches only physical interfaces

Otherwise, it also matches later created virtual devices, and that
breaks networks generated and managed by container management services,
like docker.

Closes #28626.

2 years agomeson: fix name of test-network-generator
Yu Watanabe [Wed, 2 Aug 2023 17:20:57 +0000 (02:20 +0900)] 
meson: fix name of test-network-generator

As the test executable is named based on the first source file.

2 years agoboot: Make file info size a constant 28640/head
Jan Janssen [Wed, 2 Aug 2023 14:21:51 +0000 (16:21 +0200)] 
boot: Make file info size a constant

2 years agoboot: Fix boot counting for XBOOTLDR entries
Jan Janssen [Wed, 2 Aug 2023 14:00:07 +0000 (16:00 +0200)] 
boot: Fix boot counting for XBOOTLDR entries

We were passing the dir handle for the ESP to
config_entry_bump_counters(), which will obviously fail if the entry
actually resides on the XBOOTLDR partition.

Fixes: #28637
2 years agobless-boot: Actually return successfully
Jan Janssen [Wed, 2 Aug 2023 13:16:33 +0000 (15:16 +0200)] 
bless-boot: Actually return successfully

$ journalctl -u systemd-bless-boot.service
systemd[1]: Starting Mark the Current Boot Loader Entry as Good...
systemd-bless-boot[536]: Marked boot as 'good'. (Boot attempt counter is at 2.)
systemd-bless-boot[536]: Can't find boot counter source file for '/loader/entries/arch.conf': Device or resource busy
systemd[1]: Finished Mark the Current Boot Loader Entry as Good.

2 years agoMerge pull request #28623 from yuwata/udev-builtin-net_id-cleanups
Luca Boccassi [Tue, 1 Aug 2023 21:09:32 +0000 (22:09 +0100)] 
Merge pull request #28623 from yuwata/udev-builtin-net_id-cleanups

udev: several cleanups for net_id builtin (part 4)

2 years agoMerge pull request #28630 from fbuihuu/update-testsuite-for-opensuse
Luca Boccassi [Tue, 1 Aug 2023 21:08:52 +0000 (22:08 +0100)] 
Merge pull request #28630 from fbuihuu/update-testsuite-for-opensuse

Update testsuite for opensuse

2 years agosysupdate: Move fdisk partition flags helpers to fdisk-util.c
Daan De Meyer [Tue, 1 Aug 2023 19:38:11 +0000 (21:38 +0200)] 
sysupdate: Move fdisk partition flags helpers to fdisk-util.c

2 years agorepart: Rename partition_exclude/defer() to partition_type_exclude/defer()
Daan De Meyer [Tue, 1 Aug 2023 19:20:05 +0000 (21:20 +0200)] 
repart: Rename partition_exclude/defer() to partition_type_exclude/defer()

2 years agobuild(deps): bump systemd/mkosi
dependabot[bot] [Tue, 1 Aug 2023 09:03:17 +0000 (09:03 +0000)] 
build(deps): bump systemd/mkosi

Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 5866c0ff3b36d350c943016e5a3b115f7a95d37f to c6dd95b6eae0386579071cbf44fd838ce28b7237.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/5866c0ff3b36d350c943016e5a3b115f7a95d37f...c6dd95b6eae0386579071cbf44fd838ce28b7237)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoukify: Only run systemd-measure after adding all sections
Daan De Meyer [Mon, 31 Jul 2023 19:35:02 +0000 (21:35 +0200)] 
ukify: Only run systemd-measure after adding all sections

We were running systemd-measure before adding the sbat section,
let's fix that.

Also make sure we only pass --linux to systemd-measure once instead
of twice.

2 years agotest: install systemd-homed for openSUSE 28630/head
Franck Bui [Tue, 1 Aug 2023 17:40:34 +0000 (19:40 +0200)] 
test: install systemd-homed for openSUSE

This new sub-package has been recently introduced.

2 years agotest: console fonts are located in /usr/share on openSUSE
Franck Bui [Tue, 1 Aug 2023 17:38:13 +0000 (19:38 +0200)] 
test: console fonts are located in /usr/share on openSUSE

2 years agotest: skip tests earlier when we do not have enough privileges
Yu Watanabe [Tue, 1 Aug 2023 15:44:51 +0000 (00:44 +0900)] 
test: skip tests earlier when we do not have enough privileges

Hopefully fixes #28624.

2 years agoMerge pull request #28620 from yuwata/meson-use-template-part5
Daan De Meyer [Tue, 1 Aug 2023 16:10:52 +0000 (18:10 +0200)] 
Merge pull request #28620 from yuwata/meson-use-template-part5

meson: use template to declare executables (part 5)

2 years agoudev-builtin-net_id: first parse USB or BCMA identifier, then parse PCI properties 28623/head
Yu Watanabe [Tue, 1 Aug 2023 13:30:57 +0000 (22:30 +0900)] 
udev-builtin-net_id: first parse USB or BCMA identifier, then parse PCI properties

Previously, we first generate names based on the PCI slot and ACPI
onboard index, and then append an identifier based on USB or BCMA bus
if it exists in between the PCI bus and the interface.

However, if there exists USB or BCMA bus, the name based on the
ACPI onboard index is not used.

So, let's invert the order; first generate USB or BCMA identifier if the
bus exists, then prepend the name with the PCI slot identifier.

With this change, we can drop Names struct, and each naming logic
becomes self-consistent.

2 years agoudev-builtin-net_id: split out names_pci_onboard_label() from dev_pci_onboard()
Yu Watanabe [Tue, 1 Aug 2023 05:27:25 +0000 (14:27 +0900)] 
udev-builtin-net_id: split out names_pci_onboard_label() from dev_pci_onboard()

Then call it only when it is necessary. The label is used only when the
interface is directly connected to the PCI bus, and it does not have the
SR-IOV feature (or the naming based on SR-IOV is disabled).

2 years agoudev-builtin-net_id: drop redundant copy of BCMA identifier in names_bcma()
Yu Watanabe [Tue, 1 Aug 2023 13:26:21 +0000 (22:26 +0900)] 
udev-builtin-net_id: drop redundant copy of BCMA identifier in names_bcma()

Then, this makes names based on the BCMA and PCI identifiers in
names_bcma().

No functional change, just refactoring.

2 years agoudev-builtin-net_id: split out get_bcma_specifier() from names_bcma()
Yu Watanabe [Tue, 1 Aug 2023 05:08:35 +0000 (14:08 +0900)] 
udev-builtin-net_id: split out get_bcma_specifier() from names_bcma()

This contains redundant copy of BCMA identifier, but that will be
dropped in the next commit.

No functional change, just refactoring and preparation for later
commits.

2 years agoudev-builtin-net_id: drop redundant copy of USB identifier in names_usb()
Yu Watanabe [Tue, 1 Aug 2023 12:50:40 +0000 (21:50 +0900)] 
udev-builtin-net_id: drop redundant copy of USB identifier in names_usb()

This makes the names based on the USB identifier (and possibly with PCI
specifier) built in names_usb()

No functional change, just refactoring.

2 years agoudeb-builtin-net_id: split out get_usb_specifier() from names_usb()
Yu Watanabe [Tue, 1 Aug 2023 04:51:53 +0000 (13:51 +0900)] 
udeb-builtin-net_id: split out get_usb_specifier() from names_usb()

This contains redundant copy of USB identifier, but that will be
dropped in the next commit.

No functional change, just refactoring and preparation for later
commits.

2 years agoMerge pull request #28619 from yuwata/udev-builtin-net_id-cleanups-part3
Yu Watanabe [Tue, 1 Aug 2023 14:35:03 +0000 (23:35 +0900)] 
Merge pull request #28619 from yuwata/udev-builtin-net_id-cleanups-part3

udev: several cleanups and fixlets for net_id builtin (part 3)

2 years agoMerge pull request #28423 from dvdhrm/pr/memfd
Luca Boccassi [Tue, 1 Aug 2023 14:33:24 +0000 (15:33 +0100)] 
Merge pull request #28423 from dvdhrm/pr/memfd

basic/memfd: untangle historic `sealed` property

2 years agoMerge pull request #28621 from DaanDeMeyer/repart-fix
Daan De Meyer [Tue, 1 Aug 2023 14:32:35 +0000 (16:32 +0200)] 
Merge pull request #28621 from DaanDeMeyer/repart-fix

Revert https://github.com/systemd/systemd/pull/28556

2 years agobuild(deps): bump actions/labeler from 4.2.0 to 4.3.0
dependabot[bot] [Tue, 1 Aug 2023 09:03:30 +0000 (09:03 +0000)] 
build(deps): bump actions/labeler from 4.2.0 to 4.3.0

Bumps [actions/labeler](https://github.com/actions/labeler) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/0967ca812e7fdc8f5f71402a1b486d5bd061fe20...ac9175f8a1f3625fd0d4fb234536d26811351594)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump meson from 1.1.1 to 1.2.0 in /.github/workflows
dependabot[bot] [Tue, 1 Aug 2023 09:34:19 +0000 (09:34 +0000)] 
build(deps): bump meson from 1.1.1 to 1.2.0 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.1.1...1.2.0)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoRevert "repart: Allow combining CopyBlocks= and CopyFiles=" 28621/head
Daan De Meyer [Tue, 1 Aug 2023 13:10:40 +0000 (15:10 +0200)] 
Revert "repart: Allow combining CopyBlocks= and CopyFiles="

This reverts commit dea0dc7ba2d779e5b65cb029395216859408931c.

2 years agoRevert "repart: Add --oem and OEM="
Daan De Meyer [Tue, 1 Aug 2023 13:10:24 +0000 (15:10 +0200)] 
Revert "repart: Add --oem and OEM="

This reverts commit 47c7805579bd54f2c149c80b22caed6f71ea01a7.

2 years agoRevert "units: Import all repart credentials in systemd-repart.service"
Daan De Meyer [Tue, 1 Aug 2023 13:10:02 +0000 (15:10 +0200)] 
Revert "units: Import all repart credentials in systemd-repart.service"

This reverts commit ed6b99dbf121f8ad3e68a1eb8e2fff4d4bdf3066.

2 years agomeson: move declarations of kernel-install and sulogin-shell 28620/head
Yu Watanabe [Sun, 25 Jun 2023 18:44:39 +0000 (03:44 +0900)] 
meson: move declarations of kernel-install and sulogin-shell

2 years agomeson: move declarations of networkd and friends
Yu Watanabe [Sun, 25 Jun 2023 18:40:54 +0000 (03:40 +0900)] 
meson: move declarations of networkd and friends

2 years agomeson: move declarations of modules-load, nspawn, update-done, and update-utmp
Yu Watanabe [Sun, 25 Jun 2023 18:38:48 +0000 (03:38 +0900)] 
meson: move declarations of modules-load, nspawn, update-done, and update-utmp

2 years agomeson: move declarations of socket-proxy, udevadm, quotacheck, and shutdown
Yu Watanabe [Sun, 25 Jun 2023 18:35:47 +0000 (03:35 +0900)] 
meson: move declarations of socket-proxy, udevadm, quotacheck, and shutdown

2 years agomeson: move declarations of hwdb, sysusers, and tmpfiles
Yu Watanabe [Sun, 25 Jun 2023 18:28:32 +0000 (03:28 +0900)] 
meson: move declarations of hwdb, sysusers, and tmpfiles

2 years agomeson: move declarations of busctl, stdio-bridge, and run
Yu Watanabe [Sun, 25 Jun 2023 18:23:59 +0000 (03:23 +0900)] 
meson: move declarations of busctl, stdio-bridge, and run

2 years agomeson: move declarations of cgls, cgtop, initctl, and systemd-mount
Yu Watanabe [Sun, 25 Jun 2023 18:21:42 +0000 (03:21 +0900)] 
meson: move declarations of cgls, cgtop, initctl, and systemd-mount

2 years agomeson: move declarations of ask-password and friends
Yu Watanabe [Sun, 25 Jun 2023 18:18:38 +0000 (03:18 +0900)] 
meson: move declarations of ask-password and friends

2 years agoudev-builtin-net_id: fix potential buffer overflow 28619/head
Yu Watanabe [Wed, 28 Sep 2022 09:09:29 +0000 (18:09 +0900)] 
udev-builtin-net_id: fix potential buffer overflow

2 years agoudev-builtin-net_id: various coding style cleanups
Yu Watanabe [Wed, 28 Sep 2022 09:12:43 +0000 (18:12 +0900)] 
udev-builtin-net_id: various coding style cleanups

2 years agoudev-builtin-net_id: introduce device_is_stacked() helper function
Yu Watanabe [Tue, 1 Aug 2023 02:09:25 +0000 (11:09 +0900)] 
udev-builtin-net_id: introduce device_is_stacked() helper function

Then, we can drop LinkInfo struct.
No functional change, just refactoring.

2 years agoudev-builtin-net_id: drop unused arguments
Yu Watanabe [Tue, 1 Aug 2023 02:08:43 +0000 (11:08 +0900)] 
udev-builtin-net_id: drop unused arguments

2 years agoMerge pull request #28611 from yuwata/meson-use-template
Yu Watanabe [Tue, 1 Aug 2023 12:32:48 +0000 (21:32 +0900)] 
Merge pull request #28611 from yuwata/meson-use-template

meson: use template (part 4)

2 years agocore: free the strings in the set in other places too
David Tardon [Tue, 1 Aug 2023 08:44:06 +0000 (10:44 +0200)] 
core: free the strings in the set in other places too

Follow-up for #28551.

2 years agoMerge pull request #28609 from yuwata/udev-builtin-net_id-cleanups-part2
Yu Watanabe [Tue, 1 Aug 2023 11:52:47 +0000 (20:52 +0900)] 
Merge pull request #28609 from yuwata/udev-builtin-net_id-cleanups-part2

udev: several cleanups and fixes for net_id builtin (part2)

2 years agowatchdog: Allow the watchdog to be disabled at runtime
Curtis Klein [Fri, 5 May 2023 23:17:13 +0000 (16:17 -0700)] 
watchdog: Allow the watchdog to be disabled at runtime

manager_{get|set|override}_watchdog check the validity of the new
timeout or the overridden timeout values using timestamp_is_set which
does not recognize "0" as a valid value. However since f16890f, "0"
indicates a disabled watchdog and so is a value we should be able to
configure in order to disable the watchdog. A value of USEC_INFINITY is
considered a no-op. The behavior should be the same for all watchdog
timeout configurations (runtime, pretimeout, and shutdown).

2 years agobuild(deps): bump github/codeql-action from 2.20.1 to 2.21.2
dependabot[bot] [Tue, 1 Aug 2023 09:03:25 +0000 (09:03 +0000)] 
build(deps): bump github/codeql-action from 2.20.1 to 2.21.2

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.1 to 2.21.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f6e388ebf0efc915c6c5b165b019ee61a6746a38...0ba4244466797eb048eb91a6cd43d5c03ca8bd05)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobasic/memfd: fix memfd_map() seal test 28423/head
David Rheinsberg [Mon, 17 Jul 2023 10:17:56 +0000 (12:17 +0200)] 
basic/memfd: fix memfd_map() seal test

Private mappings are required when F_SEAL_WRITE is set on a memfd,
because otherwise you could end up with writable mappings through
mprotect() and other calls. This is a limitation of the kernel
implementation, and might be lifted by future extensions.

Regardless, the current code tests for the full `is_sealed()` before
using MAP_PRIVATE. This might end up using MAP_SHARED for write-sealed
memfds, which will be refused by the kernel.

Fix this and make memfd_map() check for exactly `F_SEAL_WRITE`.