When is propagating mounts back into the source bad? Because you are
not preventing it.
You are preventing future propagation back into the user's own mounts,
but not into mounts not owned by the user.
It's not right.
Well that's what I've been saying...
Because it's not a change in propagation among existing mounts, instead
it's defining propagation for the new user mounts. And since user
mounts don't currently exist, we're in no position to talk about
exceptions to existing behavior.
I'm willing to accept that if we simply leave the patchset as it was
before, but your new check just adds inconsistencies for absolutely zero
security gain.
We still have the original problem.
When root does
mount -bind /mnt /mnt
mount --make-rshared /mnt
mount --bind -o user=hallyn /mnt /home/hallyn/mnt
and hallyn does
mount --bind /usr /home/hallyn/mnt/usr
then the kernel happily propagates the mount to /mnt/usr.
Now if hallyn does
mount --bind /home/hallyn/mnt/usr /home/hallyn/mnt/usr2
THAT gives him a -EPERM.
To what end?
-serge
--