nspawn: mkdir selinux mount point once, but not twice
authorLennart Poettering <lennart@poettering.net>
Tue, 16 Jun 2020 14:50:46 +0000 (16:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Jun 2020 08:17:36 +0000 (10:17 +0200)
commit6fe01ced0e081a9a1d9d484b4bd87a9ae567ae19
tree3301f0be30ca49c2e6f466d73b3f01fb58321e2e
parent75ae672bb2bad6db00cbba2a18790b3928a67aab
nspawn: mkdir selinux mount point once, but not twice

Since #15533 we didn't create the mount point for selinuxfs anymore.

Before it we created it twice because we mount selinuxfs twice: once the
superblock, and once we remount its bind mound read-only. The second
mkdir would mean we'd chown() the host version of selinuxfs (since
there's only one selinuxfs superblock kernel-wide).

The right time to create mount point point is once: before we mount the
selinuxfs. But not a second time for the remount.

Fixes: #16032
src/nspawn/nspawn-mount.c