ptrace: use fsuid, fsgid, effective creds for fs access checks
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / proc / namespaces.c
index 54bdc6701e9fd785ddc14c277a48ff455683d773..ac49a8d4aaf8b4a5d1a4b63e73dd242a079f5b78 100644 (file)
@@ -125,7 +125,7 @@ static void *proc_ns_follow_link(struct dentry *dentry, struct nameidata *nd)
        if (!task)
                goto out;
 
-       if (!ptrace_may_access(task, PTRACE_MODE_READ))
+       if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
                goto out_put_task;
 
        ns_path.dentry = proc_ns_get_dentry(sb, task, ei->ns.ns_ops);
@@ -158,7 +158,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl
        if (!task)
                goto out;
 
-       if (!ptrace_may_access(task, PTRACE_MODE_READ))
+       if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
                goto out_put_task;
 
        len = -ENOENT;