diff options
Diffstat (limited to 'fs/proc/namespaces.c')
-rw-r--r-- | fs/proc/namespaces.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index 1dece8781f91..276f12431dbf 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c | |||
@@ -46,7 +46,7 @@ static const char *proc_ns_get_link(struct dentry *dentry, | |||
46 | if (!task) | 46 | if (!task) |
47 | return error; | 47 | return error; |
48 | 48 | ||
49 | if (ptrace_may_access(task, PTRACE_MODE_READ)) { | 49 | if (ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS)) { |
50 | error = ns_get_path(&ns_path, task, ns_ops); | 50 | error = ns_get_path(&ns_path, task, ns_ops); |
51 | if (!error) | 51 | if (!error) |
52 | nd_jump_link(&ns_path); | 52 | nd_jump_link(&ns_path); |
@@ -67,7 +67,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl | |||
67 | if (!task) | 67 | if (!task) |
68 | return res; | 68 | return res; |
69 | 69 | ||
70 | if (ptrace_may_access(task, PTRACE_MODE_READ)) { | 70 | if (ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS)) { |
71 | res = ns_get_name(name, sizeof(name), task, ns_ops); | 71 | res = ns_get_name(name, sizeof(name), task, ns_ops); |
72 | if (res >= 0) | 72 | if (res >= 0) |
73 | res = readlink_copy(buffer, buflen, name); | 73 | res = readlink_copy(buffer, buflen, name); |