aboutsummaryrefslogtreecommitdiff
path: root/darwin-bootstrap/substituted.m
diff options
context:
space:
mode:
authorcomex2015-07-18 00:56:33 -0400
committercomex2015-07-18 00:57:01 -0400
commitcc1ccdfdadcc25e14f2760c55791b712e9eb3a54 (patch)
tree76a3cf775e46507cbd889c30e53173647043844b /darwin-bootstrap/substituted.m
parentformatting (diff)
downloadsubstitute-cc1ccdfdadcc25e14f2760c55791b712e9eb3a54.tar.gz
future proofing
Diffstat (limited to '')
-rw-r--r--darwin-bootstrap/substituted.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/darwin-bootstrap/substituted.m b/darwin-bootstrap/substituted.m
index 560d1ac..710a268 100644
--- a/darwin-bootstrap/substituted.m
+++ b/darwin-bootstrap/substituted.m
@@ -346,6 +346,14 @@ enum convert_filters_ret {
if (_argv0 != NULL)
goto bad;
+ int64_t version = xxpc_dictionary_get_int64(request, "proto-version");
+ if (version != 1) {
+ /* in the future there will be a proper unloading mechanism, but here's
+ * a bit of future proofing */
+ NSLog(@"request received from wrong version of bundle-loader: %@", request);
+ xxpc_connection_cancel(_connection);
+ }
+
const char *argv0 = xxpc_dictionary_get_string(request, "argv0");
if (!argv0)
goto bad;