summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-06-06 19:54:43 +0000
committerRoland McGrath <roland@gnu.org>2001-06-06 19:54:43 +0000
commitcfa167bdff7ba03430402fea611f08649b239801 (patch)
tree77a63990aed78d6e4060d8a978661a6cace3e0b5 /utils
parent2596becea57bdcf1c16a083b7d2bc9b962e2edb7 (diff)
2001-06-06 Roland McGrath <roland@frob.com>
* rpctrace.c (trace_and_forward): Assert that INFO has the same port right type as the right we looked up. Don't consider a message a reply unless its receiver is a send-once right.
Diffstat (limited to 'utils')
-rw-r--r--utils/rpctrace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index c64b467a..450e4246 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -519,6 +519,7 @@ trace_and_forward (mach_msg_header_t *inp, mach_msg_header_t *outp)
ports (traced_class). */
info = ports_lookup_port (traced_bucket, inp->msgh_local_port, 0);
assert (info);
+ assert (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) == info->type);
if (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) == MACH_MSG_TYPE_MOVE_SEND_ONCE)
{
@@ -598,6 +599,7 @@ trace_and_forward (mach_msg_header_t *inp, mach_msg_header_t *outp)
It is ready to be resent. */
if (inp->msgh_local_port == MACH_PORT_NULL
+ && info->type == MACH_MSG_TYPE_MOVE_SEND_ONCE
&& inp->msgh_size >= sizeof (mig_reply_header_t)
&& (*(int *) &((mig_reply_header_t *) inp)->RetCodeType
== *(int *)&RetCodeType))