From: Yu Watanabe Date: Sun, 20 Jun 2021 10:40:55 +0000 (+0900) Subject: nspawn: replace strextend_with_separator() -> strextendf_with_separator() X-Git-Tag: v249-rc2~33^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3d1559435f12447cbf9158721323bdf11a0ec34;p=thirdparty%2Fsystemd.git nspawn: replace strextend_with_separator() -> strextendf_with_separator() Fixes a bug introduced by cfea7618f28562c053a1ee194108feaa502081ff. Before this commit: mode=1777,size=10%,nr_inodes=400k,uid=496107520,gid=496107520,context=,sys.id:sys.role:systemd.nspawn.container.fs:s0, After this commit: mode=1777,size=10%,nr_inodes=400k,uid=496107520,gid=496107520,context=sys.id:sys.role:systemd.nspawn.container.fs:s0 Fixes #19976. --- diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index c28e4299352..60f956da0f6 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -398,7 +398,7 @@ int tmpfs_patch_options( #if HAVE_SELINUX if (selinux_apifs_context) - if (!strextend_with_separator(&buf, ",", "context=\"", selinux_apifs_context, "\"")) + if (strextendf_with_separator(&buf, ",", "context=\"%s\"", selinux_apifs_context) < 0) return -ENOMEM; #endif