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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user