• Eric W. Biederman's avatar
    userns: Simpilify MNT_NODEV handling. · 4aceccd6
    Eric W. Biederman authored
    - Consolidate the testing if a device node may be opened in a new
      function may_open_dev.
    
    - Move the check for allowing access to device nodes on filesystems
      not mounted in the initial user namespace from mount time to open
      time and include it in may_open_dev.
    
    This set of changes removes the implicit adding of MNT_NODEV which
    simplifies the logic in fs/namespace.c and removes a potentially
    problematic difference in how normal and unprivileged mount
    namespaces work.  This is a user visible change in behavior for
    remount in unpriviliged mount namespaces but is unlikely to cause
    problems for existing software.
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    4aceccd6
namei.c 115 KB