Skip to content

Commit

Permalink
Add MacOS program for setting entitlements
Browse files Browse the repository at this point in the history
This will make it a big easier to set a program so it can be debugged
and take coredumps.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Oct 31, 2024
1 parent 1d432b7 commit ff1715f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions macos-entitle
Original file line number Diff line number Diff line change
@@ -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 <executable>

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" $*

0 comments on commit ff1715f

Please sign in to comment.