summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2019-02-19 18:49:40 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2019-02-19 18:49:40 -0800
commitf8e0d186cd58d38b4097dd5d8917d639c3678fca (patch)
tree3cda29d686bd313de10e1b99c1dfdaa23cfc5b32
parentec3af45e12e60355d13d2caed08070b4ccb64e3b (diff)
downloadldid-f8e0d186cd58d38b4097dd5d8917d639c3678fca.tar.gz
ldid-f8e0d186cd58d38b4097dd5d8917d639c3678fca.tar.zst
ldid-f8e0d186cd58d38b4097dd5d8917d639c3678fca.zip
Support entitlement merges with unentitled binary.v2.1.1
-rw-r--r--ldid.cpp4
1 files changed, 3 insertions, 1 deletions
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);