提交 f374ada5 编写于 作者: E Eric W. Biederman 提交者: Linus Torvalds

pid: fix solaris_procids

Use task_pgrp_vnr not task_pgrp_nr so we return the process id the processes
pid namespace and not in the initial pid namespace.
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 69440e76
...@@ -415,7 +415,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) ...@@ -415,7 +415,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)
switch (cmd) { switch (cmd) {
case 0: /* getpgrp */ case 0: /* getpgrp */
return task_pgrp_nr(current); return task_pgrp_vnr(current);
case 1: /* setpgrp */ case 1: /* setpgrp */
{ {
int (*sys_setpgid)(pid_t,pid_t) = int (*sys_setpgid)(pid_t,pid_t) =
...@@ -426,7 +426,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) ...@@ -426,7 +426,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)
ret = sys_setpgid(0, 0); ret = sys_setpgid(0, 0);
if (ret) return ret; if (ret) return ret;
proc_clear_tty(current); proc_clear_tty(current);
return task_pgrp_nr(current); return task_pgrp_vnr(current);
} }
case 2: /* getsid */ case 2: /* getsid */
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册