mount: sanity check mount flags for MS_PROPAGATION
mount(8) reuses mount flags from fstab/mtab, the problem is that for
MS_PROPAGATION operations kernel incorrectly evaluates mount flags if
the flags contains any non-propagation stuff (e.g. MS_RDONLY). For
example --make-shared on read-only FS:
# strace -e mount mount --make-shared /mnt/test
mount("/dev/sda1", "/mnt/test", "none", MS_RDONLY|MS_SHARED, NULL) = 0
must be:
# strace -e mount mount --make-shared /mnt/test
mount("/dev/sda1", "/mnt/test", "none", MS_SHARED, NULL) = 0
Reported-by: Valerie Aurora <vaurora@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>