If people use nspawn in their $HOME we should allow this inodes owned by
this special UID to be created temporarily, so that UID mapped nspawn
containers just work.
if (r < 0)
return log_oom();
+ /* Map nspawn's mapped root UID as identity mapping so that people can run nspawn uidmap mounted
+ * containers off $HOME, if they want. */
+ r = strextendf(&text, UID_FMT " " UID_FMT " " UID_FMT "\n", UID_MAPPED_ROOT, UID_MAPPED_ROOT, 1);
+ if (r < 0)
+ return log_oom();
+
/* Leave everything else unmapped, starting from UID_NOBODY itself. Specifically, this means the
* whole space outside of 16bit remains unmapped */