]> Git Repo - linux.git/commitdiff
Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
authorLinus Torvalds <[email protected]>
Tue, 30 Jan 2018 22:43:12 +0000 (14:43 -0800)
committerLinus Torvalds <[email protected]>
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

diff --combined fs/autofs4/waitq.c
index 961a12dc6dc81f369a71c36e62fbd604886ebf2c,9908ecf7fce094b6b2cbea57f3790e0b371d45aa..a0c57c37fa21917826cfd85f59b8c929a75c8f6d
@@@ -170,6 -170,7 +170,6 @@@ static void autofs4_notify_daemon(struc
  
        mutex_unlock(&sbi->wq_mutex);
  
 -      if (autofs4_write(sbi, pipe, &pkt, pktsz))
        switch (ret = autofs4_write(sbi, pipe, &pkt, pktsz)) {
        case 0:
                break;
@@@ -442,8 -443,8 +442,8 @@@ int autofs4_wait(struct autofs_sb_info 
                memcpy(&wq->name, &qstr, sizeof(struct qstr));
                wq->dev = autofs4_get_dev(sbi);
                wq->ino = autofs4_get_ino(sbi);
-               wq->uid = current_cred()->uid;
-               wq->gid = current_cred()->gid;
+               wq->uid = current_uid();
+               wq->gid = current_gid();
                wq->pid = pid;
                wq->tgid = tgid;
                wq->status = -EINTR; /* Status return if interrupted */
diff --combined fs/namei.c
index 9cc91fb7f156541bd53243b35c2823bbf9ca1133,f47118ed36e753607f9daf5d7b870f2c82cbdb1f..4e3fc58dae7227fbb24ce97b1d4404df31ec9445
@@@ -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;
This page took 0.092684 seconds and 4 git commands to generate.