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.
ca6fe3344554 "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: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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 */