diff -urN wt3-ctx9/arch/i386/kernel/entry.S wt3-ctx9-fixed/arch/i386/kernel/entry.S --- wt3-ctx9/arch/i386/kernel/entry.S Thu Mar 28 21:35:46 2002 +++ wt3-ctx9-fixed/arch/i386/kernel/entry.S Thu Mar 28 22:11:59 2002 @@ -682,6 +682,8 @@ .long SYMBOL_NAME(sys_ni_syscall) /* reserved for lremovexattr */ .long SYMBOL_NAME(sys_ni_syscall) /* reserved for fremovexattr */ .long SYMBOL_NAME(sys_tkill) + .long SYMBOL_NAME(sys_new_s_context) /* for vservers */ + .long SYMBOL_NAME(sys_set_ipv4root) /* 240 for vservers */ .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) diff -urN wt3-ctx9/include/asm-i386/unistd.h wt3-ctx9-fixed/include/asm-i386/unistd.h --- wt3-ctx9/include/asm-i386/unistd.h Thu Mar 28 21:35:46 2002 +++ wt3-ctx9-fixed/include/asm-i386/unistd.h Thu Mar 28 22:21:37 2002 @@ -242,10 +242,10 @@ #define __NR_removexattr 235 #define __NR_lremovexattr 236 #define __NR_fremovexattr 237 -#define __NR_new_s_context 238 -#define __NR_set_ipv4root 239 - #define __NR_tkill 238 +#define __NR_new_s_context 239 +#define __NR_set_ipv4root 240 + /* user-visible error numbers are in the range -1 - -124: see */ diff -urN wt3-ctx9/kernel/signal.c wt3-ctx9-fixed/kernel/signal.c --- wt3-ctx9/kernel/signal.c Thu Mar 28 21:35:46 2002 +++ wt3-ctx9-fixed/kernel/signal.c Thu Mar 28 22:20:06 2002 @@ -621,7 +621,9 @@ retval = -ESRCH; read_lock(&tasklist_lock); for_each_task(p) { - if (p->pgrp == pgrp && thread_group_leader(p)) { + if (p->pgrp == pgrp && thread_group_leader(p) + && ((long)info==1 + || p->s_context == current->s_context)) { int err = send_sig_info(sig, info, p); if (retval) retval = err; @@ -668,14 +670,29 @@ read_lock(&tasklist_lock); p = find_task_by_pid(pid); error = -ESRCH; - if (p) { + if (p != NULL) { if (!thread_group_leader(p)) { struct task_struct *tg; tg = find_task_by_pid(p->tgid); if (tg) p = tg; } - error = send_sig_info(sig, info, p); + switch ((unsigned long)info) { + case 0: + if (p->s_context == current->s_context) { + error = send_sig_info(sig, info, p); + } + break; + case 1: + error = send_sig_info(sig, info, p); + break; + default: + if (info->si_code == SI_KERNEL + || p->s_context == current->s_context) { + error = send_sig_info(sig, info, p); + } + break; + } } read_unlock(&tasklist_lock); return error; @@ -699,7 +716,7 @@ read_lock(&tasklist_lock); for_each_task(p) { - if (p->pid > 1 && p != current && thread_group_leader(p)) { + if (p->pid > 1 && p != current && p->s_context == current->s_context && thread_group_leader(p)) { int err = send_sig_info(sig, info, p); ++count; if (err != -EPERM)