If I run this application from my home developer directory, it doesn't have a problem. When, however, I copy it to /Library/Application Support/Fidelis..., then I immediately get "killed -9"
./protect_am
Killed: 9
I have this code structure:
ProtectOnAccess.app/
ProtectOnAccess.app//Contents
ProtectOnAccess.app//Contents/_CodeSignature
ProtectOnAccess.app//Contents/_CodeSignature/CodeResources
ProtectOnAccess.app//Contents/_CodeSignature/CodeDirectory
ProtectOnAccess.app//Contents/_CodeSignature/CodeRequirements-1
ProtectOnAccess.app//Contents/_CodeSignature/CodeSignature
ProtectOnAccess.app//Contents/_CodeSignature/CodeRequirements
ProtectOnAccess.app//Contents/MacOS
ProtectOnAccess.app//Contents/MacOS/protect_am
ProtectOnAccess.app//Contents/Resources
ProtectOnAccess.app//Contents/Resources/Info.plist
ProtectOnAccess.app//Contents/embedded.provisionprofile
ProtectOnAccess.app//Contents/Info.plist
ProtectOnAccess.app//Contents/PkgInfo
and ./protect_am is a symbolic link as follows:
lrwxr-xr-x 1 root wheel 45B Apr 27 14:52 protect_am -> ProtectOnAccess.app/Contents/MacOS/protect_am
The thing is, I have had this work at times. No idea what the problem is. Log stream isn't helping
codesign -vvvv protect_am
protect_am: valid on disk
protect_am: satisfies its Designated Requirement
codesign -vvvv ProtectOnAccess.app/
--prepared:/Library/Application Support/Fidelis/Endpoint/Platform/services/protect/ProtectOnAccess.app/Contents/MacOS/protect_am
--validated:/Library/Application Support/Fidelis/Endpoint/Platform/services/protect/ProtectOnAccess.app/Contents/MacOS/protect_am
ProtectOnAccess.app/: valid on disk
ProtectOnAccess.app/: satisfies its Designated Requirement
Now, I do have entitlements added only to the executable, not to the .app.
codesign -d --entitlements :- ProtectOnAccess.app/Contents/MacOS/protect_am
Executable=/Library/Application Support/Fidelis/Endpoint/Platform/services/protect/ProtectOnAccess.app/Contents/MacOS/protect_am
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>AMLU******.Fidelis.protect-am</string>
<key>com.apple.developer.endpoint-security.client</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>AMLU******</string>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>
I would like to know what I'm doing wrong, and what I have accidentally done right from time to time to have it work.