]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/lib/singlediskrep.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / lib / singlediskrep.cpp
index 0e63bde8ae73b98d030b1d6ef64242d828ab1de0..c475d78c1554e020327093fbe2383f0109722562 100644 (file)
@@ -82,6 +82,14 @@ size_t SingleDiskRep::signingLimit()
        return fd().fileSize();
 }
 
+//
+// No executable segment in non-machO files.
+//
+size_t SingleDiskRep::execSegLimit(const Architecture *)
+{
+       return 0;
+}
+
 //
 // A lazily opened read-only file descriptor for the path.
 //
@@ -100,6 +108,12 @@ void SingleDiskRep::flush()
        mFd.close();
 }
 
+//Check the magic darwinup xattr
+bool SingleDiskRep::appleInternalForcePlatform() const
+{
+       return mFd.hasExtendedAttribute("com.apple.root.installed");
+}
+
 //
 // The recommended identifier of a SingleDiskRep is, absent any better clue,
 // the basename of its path.