]> git.saurik.com Git - ldid.git/commitdiff
Support entitlement merges with unentitled binary. v2.1.1
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 20 Feb 2019 02:49:40 +0000 (18:49 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 20 Feb 2019 02:49:40 +0000 (18:49 -0800)
ldid.cpp

index 38b9343d86e50a08c0e8f6a83fc8862626cf56b6..799b8d8cfd081ac4138d7f47869a98d2d38205ac 100644 (file)
--- 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);