From f8e0d186cd58d38b4097dd5d8917d639c3678fca Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 19 Feb 2019 18:49:40 -0800 Subject: Support entitlement merges with unentitled binary. --- ldid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-56-ge451