diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2009-04-02 19:58:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:04:58 -0400 |
commit | 6588c1e3ff01418acafd938db0740e3477dc8cb7 (patch) | |
tree | b58beed5813667619be47c5d064f8f78804e92d1 /kernel/signal.c | |
parent | b3bfa0cba867f23365b81658b47efd906830879b (diff) |
signals: SI_USER: Masquerade si_pid when crossing pid ns boundary
When sending a signal to a descendant namespace, set ->si_pid to 0 since
the sender does not have a pid in the receiver's namespace.
Note:
- If rt_sigqueueinfo() sets si_code to SI_USER when sending a
signal across a pid namespace boundary, the value in ->si_pid
will be cleared to 0.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index ba3da25f0eea..d8034737db4c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -883,6 +883,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
883 | break; | 883 | break; |
884 | default: | 884 | default: |
885 | copy_siginfo(&q->info, info); | 885 | copy_siginfo(&q->info, info); |
886 | if (from_ancestor_ns) | ||
887 | q->info.si_pid = 0; | ||
886 | break; | 888 | break; |
887 | } | 889 | } |
888 | } else if (!is_si_special(info)) { | 890 | } else if (!is_si_special(info)) { |