nspawn: replace strextend_with_separator() -> strextendf_with_separator()

Fixes a bug introduced by cfea7618f2.

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.
This commit is contained in:
Yu Watanabe
2021-06-21 21:14:20 +09:00
parent f75817172f
commit d3d1559435
+1 -1
View File
@@ -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