Skip to content

Commit

Permalink
pid: fix solaris_procids
Browse files Browse the repository at this point in the history
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: Eric 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 8, 2008
1 parent 69440e7 commit f374ada
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc64/solaris/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)

switch (cmd) {
case 0: /* getpgrp */
return task_pgrp_nr(current);
return task_pgrp_vnr(current);
case 1: /* setpgrp */
{
int (*sys_setpgid)(pid_t,pid_t) =
Expand All @@ -426,7 +426,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)
ret = sys_setpgid(0, 0);
if (ret) return ret;
proc_clear_tty(current);
return task_pgrp_nr(current);
return task_pgrp_vnr(current);
}
case 2: /* getsid */
{
Expand Down

0 comments on commit f374ada

Please sign in to comment.