diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-02-07 20:08:58 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-02-09 23:50:11 +0100 |
commit | e2e50a2471af7c8708d49323a3f000042a032b59 (patch) | |
tree | 05cf4b7abec488d81546ff9f4a9e7dabfd0c6630 /type.c | |
parent | c01a23d17a84fc42caba4031241c050e4a533d3f (diff) | |
download | mig-e2e50a2471af7c8708d49323a3f000042a032b59.tar.gz mig-e2e50a2471af7c8708d49323a3f000042a032b59.tar.bz2 mig-e2e50a2471af7c8708d49323a3f000042a032b59.zip |
Cast kernel server port arguments to the correct type.
* server.c: Add cast for ipc_port_t arguments that are handled differently.
* type.c: Set itKernelPort when the mach_port_t is treated as a ipc_port_t.
* type.h: Add itKernelPort to struct ipc_type.
Diffstat (limited to 'type.c')
-rw-r--r-- | type.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -219,16 +219,19 @@ itCalculateNameInfo(ipc_type_t *it) (((it->itInName == MACH_MSG_TYPE_POLYMORPHIC) && (it->itOutName == MACH_MSG_TYPE_POLYMORPHIC)) || MACH_MSG_TYPE_PORT_ANY(it->itInName) || - MACH_MSG_TYPE_PORT_ANY(it->itOutName))) + MACH_MSG_TYPE_PORT_ANY(it->itOutName))) { it->itServerType = "ipc_port_t"; - - if (IsKernelUser && + it->itKernelPort = TRUE; + } else if (IsKernelUser && streql(it->itUserType, "mach_port_t") && (((it->itInName == MACH_MSG_TYPE_POLYMORPHIC) && (it->itOutName == MACH_MSG_TYPE_POLYMORPHIC)) || MACH_MSG_TYPE_PORT_ANY(it->itInName) || - MACH_MSG_TYPE_PORT_ANY(it->itOutName))) + MACH_MSG_TYPE_PORT_ANY(it->itOutName))) { it->itUserType = "ipc_port_t"; + it->itKernelPort = TRUE; + } else + it->itKernelPort = FALSE; if (it->itTransType == strNULL) it->itTransType = it->itServerType; |