diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 449b81b98b3d..1b33b05d346b 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1442,7 +1442,6 @@ asmlinkage long sys_times(struct tms __user * tbuf) | |||
1442 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. | 1442 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. |
1443 | * LBT 04.03.94 | 1443 | * LBT 04.03.94 |
1444 | */ | 1444 | */ |
1445 | |||
1446 | asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) | 1445 | asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) |
1447 | { | 1446 | { |
1448 | struct task_struct *p; | 1447 | struct task_struct *p; |
@@ -1470,7 +1469,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) | |||
1470 | if (!thread_group_leader(p)) | 1469 | if (!thread_group_leader(p)) |
1471 | goto out; | 1470 | goto out; |
1472 | 1471 | ||
1473 | if (p->real_parent == group_leader) { | 1472 | if (p->real_parent->tgid == group_leader->tgid) { |
1474 | err = -EPERM; | 1473 | err = -EPERM; |
1475 | if (task_session(p) != task_session(group_leader)) | 1474 | if (task_session(p) != task_session(group_leader)) |
1476 | goto out; | 1475 | goto out; |