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 @@ -687,6 +687,8 @@ .long SYMBOL_NAME(sys_ni_syscall) /* 240 reserved for futex */ .long SYMBOL_NAME(sys_ni_syscall) /* reserved for sched_setaffinity */ .long SYMBOL_NAME(sys_ni_syscall) /* reserved for sched_getaffinity */ + .long SYMBOL_NAME(sys_new_s_context) /* for vservers */ + .long SYMBOL_NAME(sys_set_ipv4root) /* 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 @@ -247,6 +247,9 @@ #define __NR_futex 240 #define __NR_sched_setaffinity 241 #define __NR_sched_getaffinity 242 +#define __NR_new_s_context 243 +#define __NR_set_ipv4root 244 + /* 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)