From ff1715f5ee3680725778782bec49f1a5a1e482ae Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Tue, 17 Sep 2024 15:36:12 -0500 Subject: [PATCH] Add MacOS program for setting entitlements This will make it a big easier to set a program so it can be debugged and take coredumps. Signed-off-by: Corey Minyard --- macos-entitle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 macos-entitle diff --git a/macos-entitle b/macos-entitle new file mode 100755 index 00000000..7cd925b6 --- /dev/null +++ b/macos-entitle @@ -0,0 +1,15 @@ +#!/bin/sh + +# This sets the entitlements on the programs passed in so they can be +# debugged and generate core dumps. +# +# To run this in a libtool environment, do: +# +# ./libtool execute ../macos-entitle + +ENTITLEMENTS=tmp.entitlements +if [ ! -e "$ENTITLEMENTS" ]; then + /usr/libexec/PlistBuddy -c \ + "Add :com.apple.security.get-task-allow bool true" tmp.entitlements +fi +codesign -s - -f --entitlements "$ENTITLEMENTS" $*