From cfa167bdff7ba03430402fea611f08649b239801 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 Jun 2001 19:54:43 +0000 Subject: 2001-06-06 Roland McGrath * 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. --- utils/rpctrace.c | 2 ++ 1 file changed, 2 insertions(+) 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)) -- cgit v1.2.3