]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: do not fail if no key/cert provided and verity-sig is deferred
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 3 Feb 2025 09:38:00 +0000 (10:38 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 9 Feb 2025 00:09:25 +0000 (00:09 +0000)
src/repart/repart.c

index 1a5b485d5a1a59578e408a6128e339eb62332aec..fe98893f39731cbf41d1d7771968ac2b3253147c 100644 (file)
@@ -2487,11 +2487,11 @@ static int partition_read_definition(Partition *p, const char *path, const char
                 return log_syntax(NULL, LOG_ERR, path, 1, SYNTHETIC_ERRNO(EINVAL),
                                   "Encrypting verity hash/data partitions is not supported.");
 
-        if (p->verity == VERITY_SIG && !arg_private_key)
+        if (p->verity == VERITY_SIG && !arg_private_key && !partition_type_defer(&p->type))
                 return log_syntax(NULL, LOG_ERR, path, 1, SYNTHETIC_ERRNO(EINVAL),
                                   "Verity signature partition requested but no private key provided (--private-key=).");
 
-        if (p->verity == VERITY_SIG && !arg_certificate)
+        if (p->verity == VERITY_SIG && !arg_certificate && !partition_type_defer(&p->type))
                 return log_syntax(NULL, LOG_ERR, path, 1, SYNTHETIC_ERRNO(EINVAL),
                                   "Verity signature partition requested but no PEM certificate provided (--certificate=).");