From cc1ccdfdadcc25e14f2760c55791b712e9eb3a54 Mon Sep 17 00:00:00 2001 From: comex Date: Sat, 18 Jul 2015 00:56:33 -0400 Subject: future proofing --- darwin-bootstrap/substituted.m | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'darwin-bootstrap/substituted.m') 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; -- cgit v1.2.3