+/*
+ *
+ */
+
+ProcessDynamicCode::ProcessDynamicCode(ProcessCode *guest)
+ : SecStaticCode(guest->pidBased()), mGuest(guest)
+{
+}
+
+CFDataRef ProcessDynamicCode::component(CodeDirectory::SpecialSlot slot, OSStatus fail /* = errSecCSSignatureFailed */)
+{
+ if (slot == cdInfoSlot && !mGuest->pidBased()->supportInfoPlist())
+ return NULL;
+ else if (slot == cdResourceDirSlot)
+ return NULL;
+ return SecStaticCode::component(slot, fail);
+}
+
+CFDictionaryRef ProcessDynamicCode::infoDictionary()
+{
+ if (mGuest->pidBased()->supportInfoPlist())
+ return SecStaticCode::infoDictionary();
+ return makeCFDictionary(0);
+}
+
+void ProcessDynamicCode::validateComponent(CodeDirectory::SpecialSlot slot, OSStatus fail /* = errSecCSSignatureFailed */)
+{
+ if (slot == cdInfoSlot && !mGuest->pidBased()->supportInfoPlist())
+ return;
+ else if (slot == cdResourceDirSlot)
+ return;
+ SecStaticCode::validateComponent(slot, fail);
+}
+