]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: ignore invalid password-cache= fully 43135/head
authordongshengyuan <545258830@qq.com>
Fri, 24 Jul 2026 08:38:19 +0000 (16:38 +0800)
committerdongshengyuan <545258830@qq.com>
Fri, 24 Jul 2026 08:38:19 +0000 (16:38 +0800)
commit33d9f3840b25a13b6fb8b188cb80ec32055197c1
treeca6ff7fe0e26e45e5c6157f846e8695c0060dfe0
parent89ad7187624f2d1f0ef9d0acda2eb36b8a8d8b16
cryptsetup: ignore invalid password-cache= fully

password-cache= tracks both the cache mode and whether the option was
configured explicitly. The parser set arg_password_cache_set before
validating the value, so an invalid value was logged as ignored but
still blocked the PKCS#11 default no-cache policy.

Only mark password-cache= as configured after accepting read-only or a
valid boolean.

Repro:
build/systemd-cryptsetup attach sdscan /dev/null - \
    pkcs11-uri=auto,password-cache=bogus

Before: warned ignored, then failed with the PKCS#11 cache error.
After: warned ignored, then continued to the device check.

Follow-up for: fd8ed7f26b5e365c27599bb6b223caaaa20dd2ca
src/cryptsetup/cryptsetup.c