+static const unsigned char appleReq[] = { // anchor apple
+ 0xfa, 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03,
+};
+
+void MachOEditor::parentAction()
+{
+ if (mHelperOverridden) {
+ secdebug("machoedit", "validating alternate codesign_allocate at %s (pid=%d)", mHelperPath, this->pid());
+ // check code identity of an overridden allocation helper
+ SecPointer<SecStaticCode> code = new SecStaticCode(DiskRep::bestGuess(mHelperPath));
+ code->validateDirectory();
+ code->validateExecutable();
+ code->validateResources();
+ code->validateRequirements((const Requirement *)appleReq, errSecCSReqFailed);
+ }
+}
+