summaryrefslogtreecommitdiff
path: root/trans/fakeroot.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-11-23 19:24:49 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-07 15:38:18 +0100
commitecb7f7c08ecc57863e606c553d7ea3477e6d2126 (patch)
tree61173fdf0adfa7a993b44ac3db0d36de50a55c58 /trans/fakeroot.c
parent73624addcafebb767622cfd086ef7a7ebe67761b (diff)
trans/fakeroot: make the demuxer payload-aware
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware.
Diffstat (limited to 'trans/fakeroot.c')
-rw-r--r--trans/fakeroot.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index df2de646..12173bdb 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -964,9 +964,16 @@ netfs_demuxer (mach_msg_header_t *inp,
{
/* We didn't recognize the message ID, so pass the message through
unchanged to the underlying file. */
- struct protid *cred = ports_lookup_port (netfs_port_bucket,
- inp->msgh_local_port,
- netfs_protid_class);
+ struct protid *cred;
+ if (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) ==
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD)
+ cred = ports_lookup_payload (netfs_port_bucket,
+ inp->msgh_protected_payload,
+ netfs_protid_class);
+ else
+ cred = ports_lookup_port (netfs_port_bucket,
+ inp->msgh_local_port,
+ netfs_protid_class);
if (cred == 0)
/* This must be an unknown message on our fsys control port. */
return 0;
@@ -974,7 +981,9 @@ netfs_demuxer (mach_msg_header_t *inp,
{
error_t err;
assert (MACH_MSGH_BITS_LOCAL (inp->msgh_bits)
- == MACH_MSG_TYPE_MOVE_SEND);
+ == MACH_MSG_TYPE_MOVE_SEND
+ || MACH_MSGH_BITS_LOCAL (inp->msgh_bits)
+ == MACH_MSG_TYPE_PROTECTED_PAYLOAD);
inp->msgh_bits = (inp->msgh_bits & MACH_MSGH_BITS_COMPLEX)
| MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND,
MACH_MSGH_BITS_REMOTE (inp->msgh_bits));