summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-03-17 15:05:21 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-03-17 15:05:21 +0100
commit062743d2a9aaf2ae6c26e90e1c3492fc38df07b3 (patch)
treefb01da3556bacf75b2bb6748356acf30218d263b /debian/patches
parent16153ea8727a7265202086967eae850876144b52 (diff)
update protected_payload.patch
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/protected_payload.patch16
1 files changed, 9 insertions, 7 deletions
diff --git a/debian/patches/protected_payload.patch b/debian/patches/protected_payload.patch
index 1ccabe2..a91dc91 100644
--- a/debian/patches/protected_payload.patch
+++ b/debian/patches/protected_payload.patch
@@ -174,7 +174,7 @@ index f78e978..0a7297e 100644
/*
* A dummy value. Mostly used to indicate that the actual value
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
-index 0e43410..2190e30 100644
+index 0e43410..3d79866 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -1802,9 +1802,17 @@ ipc_kmsg_copyout_header(msg, space, notify)
@@ -243,22 +243,24 @@ index 0e43410..2190e30 100644
msg->msgh_remote_port = MACH_PORT_NULL;
return MACH_MSG_SUCCESS;
}
-@@ -2227,9 +2252,16 @@ ipc_kmsg_copyout_header(msg, space, notify)
+@@ -2227,9 +2252,18 @@ ipc_kmsg_copyout_header(msg, space, notify)
if (IP_VALID(reply))
ipc_port_release(reply);
- msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) |
- MACH_MSGH_BITS(reply_type, dest_type));
- msg->msgh_local_port = dest_name;
-+ if (! ipc_port_flag_protected_payload(dest)) {
-+ msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) |
-+ MACH_MSGH_BITS(reply_type, dest_type));
-+ msg->msgh_local_port = dest_name;
-+ } else {
++ if (ipc_port_flag_protected_payload(dest)
++ && (dest_type == MACH_MSG_TYPE_PORT_SEND
++ || dest_type == MACH_MSG_TYPE_PORT_SEND_ONCE)) {
+ msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) |
+ MACH_MSGH_BITS(reply_type,
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD));
+ msg->msgh_protected_payload = dest->ip_protected_payload;
++ } else {
++ msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) |
++ MACH_MSGH_BITS(reply_type, dest_type));
++ msg->msgh_local_port = dest_name;
+ }
msg->msgh_remote_port = reply_name;
}