Commit 6189cd3d authored by Seth Forshee's avatar Seth Forshee

UBUNTU: SAUCE: (namespace) autofs4: Use real_cred for requestor's ids

BugLink: http://bugs.launchpad.net/bugs/1629204

autofs passes the uid and gid of the user requesting a mount to
userspace, taking them from current->cred. ca6fe334 "fs: Call
d_automount with the filesystems creds" causes a regression as
current->cred is now the credentials of real root during automount
and not the credentials of the user. Fix this by taking the ids
from current->real_cred instead.
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent a1211379
......@@ -427,8 +427,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
memcpy(&wq->name, &qstr, sizeof(struct qstr));
wq->dev = autofs4_get_dev(sbi);
wq->ino = autofs4_get_ino(sbi);
wq->uid = current_uid();
wq->gid = current_gid();
wq->uid = current_real_cred()->uid;
wq->gid = current_real_cred()->gid;
wq->pid = pid;
wq->tgid = tgid;
wq->status = -EINTR; /* Status return if interrupted */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment