diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-08-11 15:38:26 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-11-20 07:18:15 -0500 |
commit | e9f238c3041e2582a710e75910c8cbf2a98e51b2 (patch) | |
tree | 240f7aedaac495dbc17364c6318eedf2ae8ed5c2 /fs/proc | |
parent | b2e0d98705e60e45bbb3c0032c48824ad7ae0704 (diff) |
procfs: Print task uids and gids in the userns that opened the proc file
Instead of using current_userns() use the userns of the opener
of the file so that if the file is passed between processes
the contents of the file do not change.
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index c1c207c36cae..554434265613 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -162,7 +162,7 @@ static inline const char *get_task_state(struct task_struct *tsk) | |||
162 | static inline void task_state(struct seq_file *m, struct pid_namespace *ns, | 162 | static inline void task_state(struct seq_file *m, struct pid_namespace *ns, |
163 | struct pid *pid, struct task_struct *p) | 163 | struct pid *pid, struct task_struct *p) |
164 | { | 164 | { |
165 | struct user_namespace *user_ns = current_user_ns(); | 165 | struct user_namespace *user_ns = seq_user_ns(m); |
166 | struct group_info *group_info; | 166 | struct group_info *group_info; |
167 | int g; | 167 | int g; |
168 | struct fdtable *fdt = NULL; | 168 | struct fdtable *fdt = NULL; |