Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Jan 2018 22:43:12 +0000 (14:43 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Jan 2018 22:43:12 +0000 (14:43 -0800)
Pull userns updates from Eric Biederman:
 "Between the holidays and other distractions only a small amount of
  namespace work made it into my tree this time.

  Just a final cleanup from a revert several kernels ago and a small
  typo fix from Wolffhardt Schwabe"

* 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  fix typo in assignment of fs default overflow gid
  autofs4: Modify autofs_wait to use current_uid() and current_gid()
  userns: Don't fail follow_automount based on s_user_ns

1  2 
fs/autofs4/waitq.c
fs/namei.c

Simple merge
diff --cc fs/namei.c
@@@ -1129,13 -1129,19 +1129,10 @@@ static int follow_automount(struct pat
         * of the daemon to instantiate them before they can be used.
         */
        if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
 -                         LOOKUP_OPEN | LOOKUP_CREATE |
 -                         LOOKUP_AUTOMOUNT))) {
 -              /* Positive dentry that isn't meant to trigger an
 -               * automount, EISDIR will allow it to be used,
 -               * otherwise there's no mount here "now" so return
 -               * ENOENT.
 -               */
 -              if (path->dentry->d_inode)
 -                      return -EISDIR;
 -              else
 -                      return -ENOENT;
 -      }
 +                         LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) &&
 +          path->dentry->d_inode)
 +              return -EISDIR;
  
-       if (path->dentry->d_sb->s_user_ns != &init_user_ns)
-               return -EACCES;
        nd->total_link_count++;
        if (nd->total_link_count >= 40)
                return -ELOOP;