aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 17:43:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 17:43:12 -0500
commit2afe738fc070bf681227c0c9d95b9cd0c4782b0f (patch)
tree7828986318aef18865e70e9d160855f47ccb1b54
parentd4173023e63cb85ec02eda02d1789bf078719f00 (diff)
parent8b2770a4e1c7a837e1889d4f00026e999da5faa0 (diff)
Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
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
-rw-r--r--fs/autofs4/waitq.c4
-rw-r--r--fs/namei.c3
-rw-r--r--kernel/sys.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 961a12dc6dc8..a0c57c37fa21 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -442,8 +442,8 @@ int autofs4_wait(struct autofs_sb_info *sbi,
442 memcpy(&wq->name, &qstr, sizeof(struct qstr)); 442 memcpy(&wq->name, &qstr, sizeof(struct qstr));
443 wq->dev = autofs4_get_dev(sbi); 443 wq->dev = autofs4_get_dev(sbi);
444 wq->ino = autofs4_get_ino(sbi); 444 wq->ino = autofs4_get_ino(sbi);
445 wq->uid = current_cred()->uid; 445 wq->uid = current_uid();
446 wq->gid = current_cred()->gid; 446 wq->gid = current_gid();
447 wq->pid = pid; 447 wq->pid = pid;
448 wq->tgid = tgid; 448 wq->tgid = tgid;
449 wq->status = -EINTR; /* Status return if interrupted */ 449 wq->status = -EINTR; /* Status return if interrupted */
diff --git a/fs/namei.c b/fs/namei.c
index 9cc91fb7f156..4e3fc58dae72 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1133,9 +1133,6 @@ static int follow_automount(struct path *path, struct nameidata *nd,
1133 path->dentry->d_inode) 1133 path->dentry->d_inode)
1134 return -EISDIR; 1134 return -EISDIR;
1135 1135
1136 if (path->dentry->d_sb->s_user_ns != &init_user_ns)
1137 return -EACCES;
1138
1139 nd->total_link_count++; 1136 nd->total_link_count++;
1140 if (nd->total_link_count >= 40) 1137 if (nd->total_link_count >= 40)
1141 return -ELOOP; 1138 return -ELOOP;
diff --git a/kernel/sys.c b/kernel/sys.c
index 83ffd7dccf23..f2289de20e19 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(overflowgid);
135 */ 135 */
136 136
137int fs_overflowuid = DEFAULT_FS_OVERFLOWUID; 137int fs_overflowuid = DEFAULT_FS_OVERFLOWUID;
138int fs_overflowgid = DEFAULT_FS_OVERFLOWUID; 138int fs_overflowgid = DEFAULT_FS_OVERFLOWGID;
139 139
140EXPORT_SYMBOL(fs_overflowuid); 140EXPORT_SYMBOL(fs_overflowuid);
141EXPORT_SYMBOL(fs_overflowgid); 141EXPORT_SYMBOL(fs_overflowgid);