From 2ef10ee3f16d90be3e2f836a0a11b212e06b2468 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 15 Jul 2026 15:39:40 +0100 Subject: [PATCH 1/2] nspawn: log at error level before exiting if parsing OCI fails Currently it silently errors out, with nothing at all printed on the console Follow-up for de40a3037af944f6803375f2f5269cffc4247f56 --- src/nspawn/nspawn-oci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index f92e1e416b..e113a6097b 100644 --- a/src/nspawn/nspawn-oci.c +++ b/src/nspawn/nspawn-oci.c @@ -2123,9 +2123,9 @@ int oci_load(FILE *f, const char *bundle, Settings **ret) { if (!s->bundle) return log_oom(); - r = oci_dispatch(oci, table, 0, s); + r = oci_dispatch(oci, table, /* flags= */ 0, s); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse OCI bundle configuration file '%s': %m", path); if (s->properties) { r = sd_bus_message_seal(s->properties, 0, 0); From 15d0b477f0c423e2ba47f9fcc576de8512014933 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 16 Jul 2026 17:41:05 +0100 Subject: [PATCH 2/2] nspawn: use chase() for creating dev nodes Follow-up for de40a3037af944f6803375f2f5269cffc4247f56 --- src/nspawn/nspawn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index f44a61db3f..959aef9b71 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2232,9 +2232,9 @@ static int make_extra_nodes(const char *dest) { FOREACH_ARRAY(node, arg_extra_nodes, arg_n_extra_nodes) { _cleanup_free_ char *path = NULL; - path = path_join(dest, node->path); - if (!path) - return log_oom(); + r = chase(node->path, dest, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT|CHASE_NOFOLLOW, &path, /* ret_fd= */ NULL); + if (r < 0) + return log_error_errno(r, "Failed to resolve device node path '%s': %m", node->path); dev_t dev = S_ISCHR(node->mode) || S_ISBLK(node->mode) ? makedev(node->major, node->minor) : 0; if (mknod(path, node->mode, dev) < 0)