From: Jay Freeman (saurik) Date: Wed, 20 Feb 2019 02:49:40 +0000 (-0800) Subject: Support entitlement merges with unentitled binary. X-Git-Tag: v2.1.1^0 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/f8e0d186cd58d38b4097dd5d8917d639c3678fca?ds=inline Support entitlement merges with unentitled binary. --- diff --git a/ldid.cpp b/ldid.cpp index 38b9343..799b8d8 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -1889,7 +1889,9 @@ Hash Sign(const void *idata, size_t isize, std::streambuf &output, const std::st baton.entitlements_.assign(data, size); })); - if (!entitlements.empty()) { + if (baton.entitlements_.empty()) + baton.entitlements_ = entitlements; + else if (!entitlements.empty()) { auto combined(plist(baton.entitlements_)); _scope({ plist_free(combined); }); _assert(plist_get_node_type(combined) == PLIST_DICT);