#ifndef _H_PIDDISKREP
#define _H_PIDDISKREP
+#include <memory>
+
#include "diskrep.h"
namespace Security {
namespace CodeSigning {
-//
-// A KernelDiskRep represents a (the) kernel on disk.
-// It has no write support, so we can't sign the kernel,
-// which is fine since we unconditionally trust it anyway.
-//
class PidDiskRep : public DiskRep {
public:
- PidDiskRep(pid_t pid, CFDataRef infoPlist);
+ PidDiskRep(pid_t pid, audit_token_t *audit, CFDataRef infoPlist);
~PidDiskRep();
CFDataRef component(CodeDirectory::SpecialSlot slot);
std::string mainExecutablePath();
CFURLRef copyCanonicalPath();
size_t signingLimit();
+ size_t execSegLimit(const Architecture *arch);
std::string format();
UnixPlusPlus::FileDesc &fd();
void setCredentials(const CodeDirectory* cd);
+ bool appleInternalForcePlatform() const;
+
private:
const BlobCore *blob() { return (const BlobCore *)mBuffer; }
void fetchData(void);
pid_t mPid;
+ std::unique_ptr<audit_token_t> mAudit;
uint8_t *mBuffer;
CFRef<CFDataRef> mInfoPlistHash;
CFRef<CFDataRef> mInfoPlist;