[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware
From: |
Justus Winter |
Subject: |
[PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware |
Date: |
Thu, 27 Nov 2014 14:19:01 +0100 |
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware.
---
trans/fakeroot.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index df2de64..12173bd 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));
--
2.1.3
- [PATCH hurd 10/30] libcons: add a payload-aware intrans function, (continued)
- [PATCH hurd 10/30] libcons: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 12/30] console: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 13/30] console-client: make the demuxer payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 15/30] pfinet: add payload-aware intrans functions, Justus Winter, 2014/11/27
- [PATCH hurd 14/30] exec: add payload-aware intrans functions, Justus Winter, 2014/11/27
- [PATCH hurd 16/30] pfinet: make the demuxers payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 17/30] pflocal: add payload-aware intrans functions, Justus Winter, 2014/11/27
- [PATCH hurd 19/30] startup: disable default payload to port mapping, Justus Winter, 2014/11/27
- [PATCH hurd 18/30] proc: add payload-aware intrans functions, Justus Winter, 2014/11/27
- [PATCH hurd 23/30] trans/password: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware,
Justus Winter <=
- [PATCH hurd 22/30] trans/ifsock: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 20/30] term: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 24/30] trans/streamio: make the translator payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 29/30] libports: Fix build, Justus Winter, 2014/11/27
- [PATCH hurd 25/30] trans/symlink: disable default payload to port mapping, Justus Winter, 2014/11/27
- [PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types, Justus Winter, 2014/11/27
- [PATCH hurd 26/30] utils/rpctrace: make `trace_and_forward' payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 30/30] mach-defpager: fix build, Justus Winter, 2014/11/27
- [PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup, Justus Winter, 2014/11/27
- [PATCH hurd 07/30] libnetfs: add a payload-aware intrans function, Justus Winter, 2014/11/27