• Eric W. Biederman's avatar
    mnt: Modify fs_fully_visible to deal with locked ro nodev and atime · 8454a8e4
    Eric W. Biederman authored
    commit 8c6cf9cc upstream.
    
    Ignore an existing mount if the locked readonly, nodev or atime
    attributes are less permissive than the desired attributes
    of the new mount.
    
    On success ensure the new mount locks all of the same readonly, nodev and
    atime attributes as the old mount.
    
    The nosuid and noexec attributes are not checked here as this change
    is destined for stable and enforcing those attributes causes a
    regression in lxc and libvirt-lxc where those applications will not
    start and there are no known executables on sysfs or proc and no known
    way to create exectuables without code modifications
    
    Fixes: e51db735 ("userns: Better restrictions on when proc and sysfs can be mounted")
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    8454a8e4
namespace.c 76.2 KB