switchroot: Ensure /sysroot is set to "private" propagation
authorColin Walters <walters@verbum.org>
Mon, 29 Jan 2018 12:48:02 +0000 (13:48 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 30 Jan 2018 15:05:37 +0000 (15:05 +0000)
commit2b8d586c5a10e9574acd1ae49a60cbf11cf22830
tree8ade902506884c211bf6cf46027096c0b8203ecb
parent785da8d5a632b12f94c93e78f2751c14e6a777ba
switchroot: Ensure /sysroot is set to "private" propagation

Downstream BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1498281

This came up as a problem with `oci-umount` which was trying to ensure some host
mounts like `/var/lib/containers` don't leak into privileged containers.  But
since our `/sysroot` mount wasn't private we also got a copy there.

We should have done this from the very start - it makes `findmnt` way, way less
ugly and is just the obviously right thing to do, will possibly create world
peace etc.

Closes: #1438
Approved by: rhvgoyal
src/switchroot/ostree-prepare-root.c
src/switchroot/ostree-remount.c