]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agoMerge pull request #28233 from mrc0mmand/append-to-corrupted-journals
Yu Watanabe [Fri, 7 Jul 2023 02:51:02 +0000 (11:51 +0900)] 
Merge pull request #28233 from mrc0mmand/append-to-corrupted-journals

test: append to corrupted journals

10 months agoMerge pull request #28286 from yuwata/network-dhcp4-classless-static-routes
Yu Watanabe [Fri, 7 Jul 2023 01:12:06 +0000 (10:12 +0900)] 
Merge pull request #28286 from yuwata/network-dhcp4-classless-static-routes

network,dhcp4: do not ignore gateway in classless static routes option

10 months agonetwork,ndisc: use ndisc_captive_portal_free() at one more place
Yu Watanabe [Thu, 6 Jul 2023 21:18:36 +0000 (06:18 +0900)] 
network,ndisc: use ndisc_captive_portal_free() at one more place

Fixes another memleak introduced by 64de00c49fde341d09b817164fe8cc8f7da46268.
Fixes #28283.

10 months agotest-network: add one more testcase for DHCPv4 classless route 28286/head
Yu Watanabe [Thu, 6 Jul 2023 21:57:04 +0000 (06:57 +0900)] 
test-network: add one more testcase for DHCPv4 classless route

For issue #28280.

10 months agonetwork/dhcp4: do not ignore the gateway even if the destination is in the same network
Yu Watanabe [Thu, 6 Jul 2023 21:31:04 +0000 (06:31 +0900)] 
network/dhcp4: do not ignore the gateway even if the destination is in the same network

Fixes #28280.

10 months agotest: append to corrupted journals 28233/head
Frantisek Sumsal [Sat, 13 May 2023 15:39:35 +0000 (17:39 +0200)] 
test: append to corrupted journals

Introduce a manual test tool that creates a journal, corrupts it by
flipping bits at given offsets, and then attempts to write to the journal.
In ideal case we should handle this gracefully without any crash or
memory corruption.

10 months agopo: Update translation files
Weblate [Thu, 6 Jul 2023 19:57:22 +0000 (21:57 +0200)] 
po: Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/
Translation: systemd/main

10 months agoNEWS: finalize for 254-rc1 v254-rc1
Luca Boccassi [Thu, 6 Jul 2023 19:53:04 +0000 (20:53 +0100)] 
NEWS: finalize for 254-rc1

10 months agomeson: bump versions for v254-rc1
Luca Boccassi [Thu, 6 Jul 2023 19:44:22 +0000 (20:44 +0100)] 
meson: bump versions for v254-rc1

10 months agoUpdate translation files
Luca Boccassi [Thu, 6 Jul 2023 19:49:08 +0000 (20:49 +0100)] 
Update translation files

10 months agoNEWS: update contributors list
Luca Boccassi [Thu, 6 Jul 2023 19:38:52 +0000 (20:38 +0100)] 
NEWS: update contributors list

10 months agoUpdate NEWS for latest changes
Luca Boccassi [Thu, 6 Jul 2023 14:42:29 +0000 (15:42 +0100)] 
Update NEWS for latest changes

10 months agoNEWS: rearrange deprecation notices from more imminent to less imminent
Luca Boccassi [Thu, 6 Jul 2023 13:45:59 +0000 (14:45 +0100)] 
NEWS: rearrange deprecation notices from more imminent to less imminent

10 months agoMerge pull request #27584 from rphibel/add-restartquick-option
Luca Boccassi [Thu, 6 Jul 2023 19:37:31 +0000 (20:37 +0100)] 
Merge pull request #27584 from rphibel/add-restartquick-option

service: add new RestartMode option

10 months agoMerge pull request #20425 from Blarse/passwdqc-pr
Luca Boccassi [Thu, 6 Jul 2023 19:36:04 +0000 (20:36 +0100)] 
Merge pull request #20425 from Blarse/passwdqc-pr

Add passwdqc support

10 months agonetwork,ndisc: use correct free function for captive portal
Yu Watanabe [Thu, 6 Jul 2023 12:04:47 +0000 (21:04 +0900)] 
network,ndisc: use correct free function for captive portal

Fixes memleak introduced by 64de00c49fde341d09b817164fe8cc8f7da46268.
Fixes #28277.

10 months agoMerge pull request #28242 from berrange/cond-sec-cvm
Luca Boccassi [Thu, 6 Jul 2023 18:14:26 +0000 (19:14 +0100)] 
Merge pull request #28242 from berrange/cond-sec-cvm

Detect and expose the confidential virtualization technology in various places

10 months agoMerge pull request #28274 from DaanDeMeyer/dissect-root
Luca Boccassi [Thu, 6 Jul 2023 13:41:48 +0000 (14:41 +0100)] 
Merge pull request #28274 from DaanDeMeyer/dissect-root

dissect: Allow a few verbs to operate on directories as well as image files

10 months agoservice: fix for RestartMode=direct option 27584/head
Richard Phibel [Thu, 6 Jul 2023 12:03:35 +0000 (14:03 +0200)] 
service: fix for RestartMode=direct option

With the fix done in PR28215, the unit restart job is created with type JOB_START.
Because of that, it is not properly merged anymore with the old one: the
merged job has state JOB_RUNNING. It should have state JOB_WAITING.

I think that the old job is not cleaned up because we don't go through the failed state.

With this fix, the merged job is properly created with state JOB_WAITING.

10 months agoservice: add new RestartMode option
Richard Phibel [Thu, 6 Jul 2023 12:33:52 +0000 (14:33 +0200)] 
service: add new RestartMode option

When this option is set to direct, the service restarts without entering a failed
state. Dependent units are not notified of transitory failure.

This is useful for the following use case:

We have a target with Requires=my-service, After=my-service.
my-service.service is a oneshot service and has Restart=on-failure in
its definition.

my-service.service can get stuck for various reasons and time out, in
which case it is restarted. Currently, when it fails the first time, the
target fails, even though my-service is restarted.

The behavior we're looking for is that until my-service is not restarted
anymore, the target stays pending waiting for my-service.service to
start successfully or fail without being restarted anymore.

10 months agoudev: add 'conf-virt' constant for confidential virtualization tech 28242/head
Daniel P. Berrangé [Mon, 3 Jul 2023 09:24:30 +0000 (10:24 +0100)] 
udev: add 'conf-virt' constant for confidential virtualization tech

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agocore: set SYSTEMD_CONFIDENTIAL_VIRTUALIZATION env for generators
Daniel P. Berrangé [Mon, 3 Jul 2023 09:21:07 +0000 (10:21 +0100)] 
core: set SYSTEMD_CONFIDENTIAL_VIRTUALIZATION env for generators

This reports the confidential virtualization type that was detected

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agocore: log detected confidential virtualization type
Daniel P. Berrangé [Mon, 3 Jul 2023 09:20:47 +0000 (10:20 +0100)] 
core: log detected confidential virtualization type

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agodbus: add 'ConfidentialVirtualization' property to manager object
Daniel P. Berrangé [Mon, 3 Jul 2023 08:53:43 +0000 (09:53 +0100)] 
dbus: add 'ConfidentialVirtualization' property to manager object

This property reports whether the system is running inside a confidential
virtual machine.

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agounit: add "cvm" option for ConditionSecurity
Daniel P. Berrangé [Fri, 30 Jun 2023 18:01:17 +0000 (19:01 +0100)] 
unit: add "cvm" option for ConditionSecurity

The "cvm" flag indicates whether the OS is running inside a confidential
virtual machine.

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agodetect-virt: add --list-cvm option
Daniel P. Berrangé [Fri, 30 Jun 2023 18:07:29 +0000 (19:07 +0100)] 
detect-virt: add --list-cvm option

The --list-cvm option reports the known types of confidential virtualization
technology that can be detected.

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agodetect-virt: add --cvm option
Daniel P. Berrangé [Fri, 30 Jun 2023 18:07:29 +0000 (19:07 +0100)] 
detect-virt: add --cvm option

The --cvm option detects whether the OS is running inside a confidential
virtual machine.

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agoadd APIs for detecting confidential virtualization
Daniel P. Berrangé [Fri, 9 Jun 2023 14:37:18 +0000 (15:37 +0100)] 
add APIs for detecting confidential virtualization

This code uses various CPUID checks to be able to identify

 * AMD SEV
 * AMD SEV-ES
 * AMD SEV-SNP
 * Intel TDX

On HyperV/Azure, it has special checks for detecting SEV-SNP
since the normal CPUID is blocked.

Related: https://github.com/systemd/systemd/issues/27604
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10 months agoshared: add libpasswdqc support 20425/head
Egor Ignatov [Fri, 6 Aug 2021 08:41:01 +0000 (11:41 +0300)] 
shared: add libpasswdqc support

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
Resolves: #15055

10 months agotreewide: fix "an" before consonant U sounds
Joerg Behrmann [Thu, 6 Jul 2023 09:54:02 +0000 (11:54 +0200)] 
treewide: fix "an" before consonant U sounds

The article "a" goes before consonant sounds and "an" goes before vowel
sounds. This commit changes an to a for UKI, UDP, UTF-8, URL, UUID, U-Label, UI
and USB, since they start with the sound /ˌjuː/.

10 months agoshared: add password quality check abstraction layer to support both pwquality and...
Egor Ignatov [Fri, 6 Aug 2021 08:40:34 +0000 (11:40 +0300)] 
shared: add password quality check abstraction layer to support both pwquality and passwdqc

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
10 months agohomed: change user_record_quality_check_password to use quality_check_password
Dmitry V. Levin [Thu, 6 Jul 2023 08:00:00 +0000 (08:00 +0000)] 
homed: change user_record_quality_check_password to use quality_check_password

With this change, the only direct users of libpwquality functions
are those defined in pwquality-util.

10 months agopwquality: add old password argument to quality_check_password
Dmitry V. Levin [Thu, 6 Jul 2023 08:00:00 +0000 (08:00 +0000)] 
pwquality: add old password argument to quality_check_password

This would allow to use quality_check_password() in
user_record_quality_check_password() which still uses
sym_pwquality_check() directly.

10 months agopwquality: do not log password suggestions
Dmitry V. Levin [Wed, 5 Jul 2023 18:00:00 +0000 (18:00 +0000)] 
pwquality: do not log password suggestions

As logging password suggestions might leak sensitive information,
print it instead.

Suggested-by: Yu Watanabe <watanabe.yu+github@gmail.com>
10 months agopwquality: fix quality_check_password return value
Dmitry V. Levin [Wed, 5 Jul 2023 08:00:00 +0000 (08:00 +0000)] 
pwquality: fix quality_check_password return value

quality_check_password() used to return the same value 0 in two
different cases: when pwq_allocate_context() failed with a
ERRNO_IS_NOT_SUPPORTED() code, and when pwquality_check() rejected the
password.  As result, users of quality_check_password() used to report
password weakness also in case when the underlying library was not
available.

Fix this by changing quality_check_password() to forward the
ERRNO_IS_NOT_SUPPORTED() code to its callers, and change the callers
to handle this case gracefully.

10 months agopwquality: fix use of ERRNO_IS_NOT_SUPPORTED
Dmitry V. Levin [Wed, 5 Jul 2023 08:00:00 +0000 (08:00 +0000)] 
pwquality: fix use of ERRNO_IS_NOT_SUPPORTED

Given that ERRNO_IS_*() also match positive values, call
ERRNO_IS_NOT_SUPPORTED() only if the value returned by
pwq_allocate_context() is negative.

10 months agoHwdb: Add Sanwa Direct 400-MA128 external trackpad (#28272)
Andrew Baxter [Thu, 6 Jul 2023 10:42:33 +0000 (19:42 +0900)] 
Hwdb: Add Sanwa Direct 400-MA128 external trackpad (#28272)

* Hwdb: Add Sanwa Direct 400-MA128 external trackpad

```
$ udevadm info /dev/input/by-path/pci-0000:28:00.3-usb-0:1.4.4.1:1.1-event-mouse
P: /devices/pci0000:00/0000:00:07.1/0000:28:00.3/usb5/5-1/5-1.4/5-1.4.4/5-1.4.4.1/5-1.4.4.1:1.1/0003:258A:0501.0097/input/input256/event15
M: event15
R: 15
U: input
D: c 13:79
N: input/event15
L: 0
S: input/by-id/usb-SINO_WEALTH_USB_TOUCHPAD-if01-event-mouse
S: input/by-path/pci-0000:28:00.3-usb-0:1.4.4.1:1.1-event-mouse
E: DEVPATH=/devices/pci0000:00/0000:00:07.1/0000:28:00.3/usb5/5-1/5-1.4/5-1.4.4/5-1.4.4.1/5-1.4.4.1:1.1/0003:258A:0501.0097/input/input256/event15
E: DEVNAME=/dev/input/event15
E: MAJOR=13
E: MINOR=79
E: SUBSYSTEM=input
E: USEC_INITIALIZED=3436890430330
E: ID_INPUT=1
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_WIDTH_MM=106
E: ID_INPUT_HEIGHT_MM=77
E: ID_BUS=usb
E: ID_MODEL=USB_TOUCHPAD
E: ID_MODEL_ENC=USB\x20TOUCHPAD
E: ID_MODEL_ID=0501
E: ID_SERIAL=SINO_WEALTH_USB_TOUCHPAD
E: ID_VENDOR=SINO_WEALTH
E: ID_VENDOR_ENC=SINO\x20WEALTH
E: ID_VENDOR_ID=258a
E: ID_REVISION=0521
E: ID_TYPE=hid
E: ID_USB_MODEL=USB_TOUCHPAD
E: ID_USB_MODEL_ENC=USB\x20TOUCHPAD
E: ID_USB_MODEL_ID=0501
E: ID_USB_SERIAL=SINO_WEALTH_USB_TOUCHPAD
E: ID_USB_VENDOR=SINO_WEALTH
E: ID_USB_VENDOR_ENC=SINO\x20WEALTH
E: ID_USB_VENDOR_ID=258a
E: ID_USB_REVISION=0521
E: ID_USB_TYPE=hid
E: ID_USB_INTERFACES=:030101:030000:
E: ID_USB_INTERFACE_NUM=01
E: ID_USB_DRIVER=usbhid
E: ID_PATH=pci-0000:28:00.3-usb-0:1.4.4.1:1.1
E: ID_PATH_TAG=pci-0000_28_00_3-usb-0_1_4_4_1_1_1
E: ID_INPUT_TOUCHPAD_INTEGRATION=internal
E: LIBINPUT_DEVICE_GROUP=3/258a/501:usb-0000:28:00.3-1.4.4
E: DEVLINKS=/dev/input/by-id/usb-SINO_WEALTH_USB_TOUCHPAD-if01-event-mouse /dev/input/by-path/pci-0000:28:00.3-usb-0:1.4.4.1:1.1-event-mouse
```
Link to product: https://www.amazon.co.jp/gp/product/B07Z5HCMFP

10 months agohwdb: add support for Archos 101 Cesium to 60-sensor.hwdb (#28270)
Thomas Genty [Thu, 6 Jul 2023 10:39:28 +0000 (12:39 +0200)] 
hwdb: add support for Archos 101 Cesium to 60-sensor.hwdb (#28270)

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
10 months agodissect: Add --mtree-hash= option 28274/head
Daan De Meyer [Thu, 6 Jul 2023 09:24:22 +0000 (11:24 +0200)] 
dissect: Add --mtree-hash= option

Let's make including hashes in the mtree output configurable to allow
speeding up the --mtree command in cases where file hashes are not
required.

10 months agodissect: Allow a few verbs to operate on directories as well as image files
Daan De Meyer [Thu, 6 Jul 2023 08:58:44 +0000 (10:58 +0200)] 
dissect: Allow a few verbs to operate on directories as well as image files

--copy-to, --copy-from, --list and --mtree are useful for image directories
as well as image files, so for those verbs, let's check if we were passed
a directory and skip all the image file setup if that's the case.

10 months agotpm2-util: remove unnecessary semicolon
Antonio Alvarez Feijoo [Thu, 6 Jul 2023 08:54:32 +0000 (10:54 +0200)] 
tpm2-util: remove unnecessary semicolon

10 months agonetwork/json: introduce PreferredLifetimeUSec and ValidLifetimeUSec
Yu Watanabe [Thu, 6 Jul 2023 04:26:03 +0000 (13:26 +0900)] 
network/json: introduce PreferredLifetimeUSec and ValidLifetimeUSec

10 months agoMerge pull request #28265 from yuwata/network-captive-portal-follow-ups
Lennart Poettering [Thu, 6 Jul 2023 09:39:24 +0000 (11:39 +0200)] 
Merge pull request #28265 from yuwata/network-captive-portal-follow-ups

network: several follow-ups for captive portal support

10 months agoservice: explicitly cast float to usec_t
Lennart Poettering [Thu, 6 Jul 2023 09:21:32 +0000 (11:21 +0200)] 
service: explicitly cast float to usec_t

Let's cast these floats explicitly to usec_t, since implicit
float-to-integer casts are dangerous business, and we should underline
that there's a cast happening here.

10 months agocore/service: make restart delay increase more smoothly
Yu Watanabe [Thu, 6 Jul 2023 03:48:49 +0000 (12:48 +0900)] 
core/service: make restart delay increase more smoothly

Suggested in https://github.com/systemd/systemd/pull/26902#issuecomment-1620400583.

10 months agoNEWS: more preparation for 254-rc1
Lennart Poettering [Thu, 6 Jul 2023 09:16:16 +0000 (11:16 +0200)] 
NEWS: more preparation for 254-rc1

10 months agoMerge pull request #27713 from ddstreet/tpm2_replace_make_primary
Lennart Poettering [Thu, 6 Jul 2023 08:22:12 +0000 (10:22 +0200)] 
Merge pull request #27713 from ddstreet/tpm2_replace_make_primary

Tpm2 replace make primary

10 months agoMerge pull request #28243 from bluca/sbat_initrd
Lennart Poettering [Thu, 6 Jul 2023 08:21:44 +0000 (10:21 +0200)] 
Merge pull request #28243 from bluca/sbat_initrd

ukify: enable --sbat for UKIs too

10 months agonetworkctl: urlify captive portal entry 28265/head
Yu Watanabe [Thu, 6 Jul 2023 02:48:43 +0000 (11:48 +0900)] 
networkctl: urlify captive portal entry

10 months agotest-network: drop ExecReload= in networkd.service and udevd.service
Yu Watanabe [Thu, 6 Jul 2023 02:33:44 +0000 (11:33 +0900)] 
test-network: drop ExecReload= in networkd.service and udevd.service

Follow-up for 0e07cdb0e77d0322bc866b5e13abbe38e988059d and
f84331539deae28fbeb42d45ad0c8d583b3372a3.

10 months agonetwork/ndisc: downgrade log level
Yu Watanabe [Thu, 6 Jul 2023 02:22:21 +0000 (11:22 +0900)] 
network/ndisc: downgrade log level

The failures may be critical for per-link operation, but not critical
for the service.

10 months agonetwork: handle captive portal with multiple routers
Yu Watanabe [Thu, 6 Jul 2023 02:12:19 +0000 (11:12 +0900)] 
network: handle captive portal with multiple routers

Before this patch, if a network has multiple routers and one of them
provides a captive portal, then the portal was overwritten or cleared
when another RA from another router is received.

This makes captive portals managed in the similar way as DNS servers or
DNS domains. So now captive portal can safely handled even if a network
has multiple routers.

10 months agonetwork: update comment
Yu Watanabe [Thu, 6 Jul 2023 01:34:24 +0000 (10:34 +0900)] 
network: update comment

10 months agonetwork: introduce link_get_captive_portal()
Yu Watanabe [Thu, 6 Jul 2023 01:31:01 +0000 (10:31 +0900)] 
network: introduce link_get_captive_portal()

Then, downgrade log level of the message about mis-match of captive
portals in different protocols.

10 months agoMerge pull request #28262 from YHNdnzj/transaction-followup
Yu Watanabe [Thu, 6 Jul 2023 03:55:25 +0000 (12:55 +0900)] 
Merge pull request #28262 from YHNdnzj/transaction-followup

Follow-ups for PropagatesStopTo= fix

10 months agotpm2: remove tpm2_make_primary() 27713/head
Dan Streetman [Thu, 8 Jun 2023 10:55:45 +0000 (06:55 -0400)] 
tpm2: remove tpm2_make_primary()

Replace use of tpm2_make_primary() with tpm2_create_loaded()

10 months agotpm2: move local vars in tpm2_unseal() to point of use
Dan Streetman [Wed, 14 Jun 2023 16:09:35 +0000 (12:09 -0400)] 
tpm2: move local vars in tpm2_unseal() to point of use

No functional change; cosmetic only.

10 months agotpm2: add tpm2_get_or_create_srk()
Dan Streetman [Wed, 14 Jun 2023 19:49:33 +0000 (15:49 -0400)] 
tpm2: add tpm2_get_or_create_srk()

Add function to simplify getting the TPM SRK; if one exists, it is provided,
otherwise one is created and then the new SRK provided.

This also add tpm2_create_loaded() and updates tpm2_seal() to use the new
functions instead of tpm2_make_primary().

10 months agotpm2: add tpm2_persist_handle()
Dan Streetman [Mon, 2 Jan 2023 04:42:09 +0000 (23:42 -0500)] 
tpm2: add tpm2_persist_handle()

Add function to convert a transient handle in the TPM into a persistent handle
in the TPM.

10 months agotpm2: cache TPM algorithms
Dan Streetman [Wed, 14 Jun 2023 17:17:21 +0000 (13:17 -0400)] 
tpm2: cache TPM algorithms

Cache the supported algorithms when creating a new context.

10 months agotpm2: cache the TPM supported commands, add tpm2_supports_command()
Dan Streetman [Fri, 17 Feb 2023 17:59:18 +0000 (12:59 -0500)] 
tpm2: cache the TPM supported commands, add tpm2_supports_command()

Cache the TPM's supported commands and provide a function to check if a command
is supported.

10 months agobasic/alloc-util: add greedy_realloc_append()
Dan Streetman [Fri, 17 Feb 2023 17:59:18 +0000 (12:59 -0500)] 
basic/alloc-util: add greedy_realloc_append()

Add function to perform greedy realloc as well as copying the new data into the
newly allocated space.

10 months agotpm2: replace tpm2_capability_pcrs() macro with direct c->capaiblity_pcrs use
Dan Streetman [Thu, 8 Jun 2023 17:41:33 +0000 (13:41 -0400)] 
tpm2: replace tpm2_capability_pcrs() macro with direct c->capaiblity_pcrs use

10 months agotpm2: add tpm2_create()
Dan Streetman [Mon, 12 Dec 2022 14:46:04 +0000 (09:46 -0500)] 
tpm2: add tpm2_create()

This allows creating a new object (e.g. sealed secret) or key using the TPM.

Note that the new object/key is not loaded in the TPM after creation.

10 months agotpm2: replace magic number in hmac_sensitive initialization
Dan Streetman [Thu, 8 Jun 2023 18:06:46 +0000 (14:06 -0400)] 
tpm2: replace magic number in hmac_sensitive initialization

Instead of setting hmac_sensitive.sensitive.data.size to '32' use the actual
hash size as set in the hmac_template.

10 months agotpm2: move local vars in tpm2_seal() to point of use
Dan Streetman [Mon, 12 Dec 2022 14:46:04 +0000 (09:46 -0500)] 
tpm2: move local vars in tpm2_seal() to point of use

No functional change; cosmetic only.

10 months agotpm2: add tpm2_load_external()
Dan Streetman [Mon, 19 Dec 2022 13:26:32 +0000 (08:26 -0500)] 
tpm2: add tpm2_load_external()

This allows loading an external object/key (e.g. an openssl public key) into
the TPM.

10 months agotpm2: add tpm2_load()
Dan Streetman [Mon, 19 Dec 2022 13:26:32 +0000 (08:26 -0500)] 
tpm2: add tpm2_load()

This function allows loading an object (e.g. a sealed secret) or key into the
TPM.

10 months agoupdate syscall tables for upcoming v254
Lennart Poettering [Wed, 5 Jul 2023 21:16:48 +0000 (23:16 +0200)] 
update syscall tables for upcoming v254

10 months agoupdate hwdb autosuspend data for v254
Lennart Poettering [Wed, 5 Jul 2023 21:15:09 +0000 (23:15 +0200)] 
update hwdb autosuspend data for v254

10 months agomeson: run forgotten 'update-man-rules'
Lennart Poettering [Wed, 5 Jul 2023 21:14:22 +0000 (23:14 +0200)] 
meson: run forgotten 'update-man-rules'

10 months agoTEST-03-JOBS: test indirect PropagatesStopTo= 28262/head
Mike Yuan [Wed, 5 Jul 2023 18:40:01 +0000 (02:40 +0800)] 
TEST-03-JOBS: test indirect PropagatesStopTo=

10 months agocore/transaction: correctly skip unneeded operations for PropagatesStopTo=
Mike Yuan [Wed, 5 Jul 2023 18:17:36 +0000 (02:17 +0800)] 
core/transaction: correctly skip unneeded operations for PropagatesStopTo=

Follow-up for 48cb073db81fa73f64bc5aa9a1b81ebf627235fa

Break out from LIST_FOREACH correctly if nt == JOB_NOP.
Shouldn't have functional changes, just optimization.

10 months agoMerge pull request #28258 from poettering/boot-feature-catchup
Luca Boccassi [Wed, 5 Jul 2023 20:40:43 +0000 (21:40 +0100)] 
Merge pull request #28258 from poettering/boot-feature-catchup

sd-boot/sd-stub boot feature flag catchup

10 months agoMerge pull request #28255 from yuwata/sd-device-fix-clone
Luca Boccassi [Wed, 5 Jul 2023 20:38:52 +0000 (21:38 +0100)] 
Merge pull request #28255 from yuwata/sd-device-fix-clone

sd-device: fix device_clone_with_db()

10 months agotest: replace readfp() with read_file()
Frantisek Sumsal [Wed, 5 Jul 2023 17:43:43 +0000 (19:43 +0200)] 
test: replace readfp() with read_file()

ConfigParser.readfp() has been deprecated since Python 3.2 and was
dropped completely in Python 3.11.

10 months agoukify: measure sbat section too 28243/head
Luca Boccassi [Tue, 4 Jul 2023 14:55:20 +0000 (15:55 +0100)] 
ukify: measure sbat section too

10 months agoukify: enable --sbat for UKIs too
Luca Boccassi [Mon, 3 Jul 2023 17:33:07 +0000 (18:33 +0100)] 
ukify: enable --sbat for UKIs too

For confidential computing they want to be able to revoke initrds too, so allow
passing a specific --sbat section when building a UKI too, not just an addon.
Merge it with the stub and kernel sections.

10 months agohwdb update for v246-rc1
Lennart Poettering [Wed, 5 Jul 2023 20:00:19 +0000 (22:00 +0200)] 
hwdb update for v246-rc1

10 months agohostname-setup: don't pass "true" to a flags parameter
Lennart Poettering [Wed, 5 Jul 2023 16:02:52 +0000 (18:02 +0200)] 
hostname-setup: don't pass "true" to a flags parameter

10 months agoMerge pull request #28252 from yuwata/journal-open-machine
Mike Yuan [Wed, 5 Jul 2023 19:08:18 +0000 (03:08 +0800)] 
Merge pull request #28252 from yuwata/journal-open-machine

journal: introduce journal_open_machine()

10 months agoboot: make LoaderType enum less special 28258/head
Lennart Poettering [Wed, 5 Jul 2023 13:42:30 +0000 (15:42 +0200)] 
boot: make LoaderType enum less special

Usually (but not always) we use uppercase type naming, and do a typedef
for enums like this. Do so here too.

10 months agoboot: rename entry_count → n_entries
Lennart Poettering [Wed, 5 Jul 2023 13:41:26 +0000 (15:41 +0200)] 
boot: rename entry_count → n_entries

While we don't strictly follow the rule, most of our userspace names
these fields that count entries in some array n_xyz, hence let's do so
in the EFI boot code too, to make things less special.

10 months agoefi: add a bunch of reported EFI loader/stub feature flags
Lennart Poettering [Wed, 5 Jul 2023 13:38:38 +0000 (15:38 +0200)] 
efi: add a bunch of reported EFI loader/stub feature flags

We gained a bunch of new features that deserve reporting to userspace,
hence add matching flags for each.

This allows userspace to determine if installing addons in the ESP even
makes sense.

This is inspired by a similar changes in #28057

10 months agojournal-upload: add missing assertion 28252/head
Yu Watanabe [Wed, 5 Jul 2023 00:59:51 +0000 (09:59 +0900)] 
journal-upload: add missing assertion

10 months agojournal-upload: replace deprecated sd_journal_open_container()
Yu Watanabe [Wed, 5 Jul 2023 00:58:57 +0000 (09:58 +0900)] 
journal-upload: replace deprecated sd_journal_open_container()

10 months agojournal-util: extract journal_open_machine() from journalctl
Yu Watanabe [Wed, 5 Jul 2023 00:53:44 +0000 (09:53 +0900)] 
journal-util: extract journal_open_machine() from journalctl

10 months agosd-journal: introduce SD_JOURNAL_TAKE_DIRECTORY_FD flag for sd_journal_open_directory...
Yu Watanabe [Wed, 5 Jul 2023 00:49:45 +0000 (09:49 +0900)] 
sd-journal: introduce SD_JOURNAL_TAKE_DIRECTORY_FD flag for sd_journal_open_directory_fd()

If it is called with the flag, then the provided file descriptor will be
owned by the sd_journal object, and will be closed in sd_journal_close().

10 months agotest: change partition label to test if the outdated devlinks are removed 28255/head
Yu Watanabe [Wed, 5 Jul 2023 03:05:45 +0000 (12:05 +0900)] 
test: change partition label to test if the outdated devlinks are removed

The change is intended to reproduce the issue #27983, though the
original issue is highly racy, and the test does not reproduce it
reliably. But, anyway, it is better to change the partition label to
test the devlink removal.

10 months agosd-device: do not read uevent file in device_clone_with_db()
Yu Watanabe [Wed, 5 Jul 2023 02:44:00 +0000 (11:44 +0900)] 
sd-device: do not read uevent file in device_clone_with_db()

Follow-up for 381f6d4ba5551898e7ff19189485072b94879281.

When the function is called, the device may be already removed, and
another device has the same syspath. Such situation can occur when a
partition removed and another is created. In that case, the sysfs paths
of the removed and newly created partitions can be same, but their
devnums are different, and thus the database files corresponding to the
devices are also different.

Fixes #27981.

10 months agoMerge pull request #26844 from YHNdnzj/propagate-stop-fixup
Lennart Poettering [Wed, 5 Jul 2023 13:56:21 +0000 (15:56 +0200)] 
Merge pull request #26844 from YHNdnzj/propagate-stop-fixup

core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=

10 months agoMerge pull request #28207 from poettering/initrd-creds
Luca Boccassi [Wed, 5 Jul 2023 09:29:33 +0000 (10:29 +0100)] 
Merge pull request #28207 from poettering/initrd-creds

various credential improvements (including initrd creds, creds in generators, fstab + getty creds)

10 months agoMerge pull request #28253 from yuwata/hwdb-follow-up
Lennart Poettering [Wed, 5 Jul 2023 08:40:44 +0000 (10:40 +0200)] 
Merge pull request #28253 from yuwata/hwdb-follow-up

hwdb: several cleanups

10 months agoMerge pull request #28228 from yuwata/repart-free-area
Yu Watanabe [Wed, 5 Jul 2023 07:36:16 +0000 (16:36 +0900)] 
Merge pull request #28228 from yuwata/repart-free-area

repart: fix free area calculation

10 months agounit: also condition out systemd-backlight in initrd
Yu Watanabe [Wed, 5 Jul 2023 02:00:23 +0000 (11:00 +0900)] 
unit: also condition out systemd-backlight in initrd

Follow-up for 9173d31dfea5c2b05ff08480972c499cb7aac940.

The systemd-backlight@.service also save/restore state but the data
is in /var/.

10 months agounits: condition out a few services in the initrd
Lennart Poettering [Tue, 4 Jul 2023 20:31:11 +0000 (22:31 +0200)] 
units: condition out a few services in the initrd

Let's make our units more robust to being added to an initrd:

1. systemd-boot-update only makes sense if sd-boot is available in /usr/
   to copy into the ESP. This is generally not the case in initrds, and
   even if it was, we shouldn't update the ESP from the initrd, but from
   the host instead.

2. The rfkill services save/restore rfkill state, but that information
   is only available once /var/ is mounted, which generally happens
   after the initrd transition.

3. utmp management is partly in /var/, and legacy anyway, hence don't
   bother with it in the initrd.

10 months agotest: update test for free area calculation in repart 28228/head
Yu Watanabe [Mon, 3 Jul 2023 06:15:27 +0000 (15:15 +0900)] 
test: update test for free area calculation in repart

10 months agorepart: fix free area calculation
Yu Watanabe [Mon, 3 Jul 2023 06:14:14 +0000 (15:14 +0900)] 
repart: fix free area calculation

Like fdisk_get_last_lba(), fdisk_partition_get_end() return the last
sector in the partition.

Fixes #28225.

10 months agotest: add reproducer for issue #28225
Yu Watanabe [Mon, 3 Jul 2023 03:11:50 +0000 (12:11 +0900)] 
test: add reproducer for issue #28225

10 months agohwdb: make matching modalias for Archos 101 Cesium Educ more strict 28253/head
Yu Watanabe [Wed, 5 Jul 2023 01:17:59 +0000 (10:17 +0900)] 
hwdb: make matching modalias for Archos 101 Cesium Educ more strict

Follow-up for 41f34dcf3bc7004aaa9b251480d56bcfe144346d.