mirror of https://github.com/opa334/TrollStore.git
Don't defend against executables with no entitlements
This commit is contained in:
parent
913969ac8c
commit
9197bd1652
|
@ -142,17 +142,6 @@ int apply_coretrust_bypass(const char *machoPath)
|
|||
CS_DecodedBlob *mainCodeDirBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_CODEDIRECTORY, NULL);
|
||||
CS_DecodedBlob *alternateCodeDirBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_ALTERNATE_CODEDIRECTORIES, NULL);
|
||||
|
||||
CS_DecodedBlob *entitlementsBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_ENTITLEMENTS, NULL);
|
||||
CS_DecodedBlob *derEntitlementsBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_DER_ENTITLEMENTS, NULL);
|
||||
|
||||
if (!entitlementsBlob && !derEntitlementsBlob && macho->machHeader.filetype == MH_EXECUTE) {
|
||||
printf("Error: Unable to find existing entitlements blobs in executable MachO, please make sure to ad-hoc sign with entitlements before running the bypass.\n");
|
||||
csd_blob_free(mainCodeDirBlob);
|
||||
if (alternateCodeDirBlob) csd_blob_free(alternateCodeDirBlob);
|
||||
macho_free(macho);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!mainCodeDirBlob) {
|
||||
printf("Error: Unable to find code directory, make sure the input binary is ad-hoc signed.\n");
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue