summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-11-25 08:49:49 -1000
committerSam Bingner <sam@bingner.com>2019-11-25 08:49:49 -1000
commit062556aeb032c1bac0c0859833fbe15d7ec9e514 (patch)
treeb6be560de86a03cf8614518860e4cece48c7706a
parent978d9cd248490cda55c924e66a407bb793aff400 (diff)
Add a package for a debugserver wrapper
-rw-r--r--data/debugserver/_metadata/breaks1
-rw-r--r--data/debugserver/_metadata/description1
-rw-r--r--data/debugserver/_metadata/in.1443.000
l---------data/debugserver/_metadata/maintainer1
-rw-r--r--data/debugserver/_metadata/priority1
-rw-r--r--data/debugserver/_metadata/replaces1
-rw-r--r--data/debugserver/_metadata/role1
-rw-r--r--data/debugserver/_metadata/section1
-rw-r--r--data/debugserver/_metadata/tags1
-rw-r--r--data/debugserver/_metadata/version1
-rwxr-xr-xdata/debugserver/debugserver23
-rw-r--r--data/debugserver/debugserver.xml32
-rw-r--r--data/debugserver/make.sh3
13 files changed, 67 insertions, 0 deletions
diff --git a/data/debugserver/_metadata/breaks b/data/debugserver/_metadata/breaks
new file mode 100644
index 000000000..5cef965d2
--- /dev/null
+++ b/data/debugserver/_metadata/breaks
@@ -0,0 +1 @@
+jailbreak-resources (<< 1.0~b27)
diff --git a/data/debugserver/_metadata/description b/data/debugserver/_metadata/description
new file mode 100644
index 000000000..85f4ff244
--- /dev/null
+++ b/data/debugserver/_metadata/description
@@ -0,0 +1 @@
+Wrapper to make debugserver unsandboxed
diff --git a/data/debugserver/_metadata/in.1443.00 b/data/debugserver/_metadata/in.1443.00
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/data/debugserver/_metadata/in.1443.00
diff --git a/data/debugserver/_metadata/maintainer b/data/debugserver/_metadata/maintainer
new file mode 120000
index 000000000..573d7ebef
--- /dev/null
+++ b/data/debugserver/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/sbingner \ No newline at end of file
diff --git a/data/debugserver/_metadata/priority b/data/debugserver/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/debugserver/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/debugserver/_metadata/replaces b/data/debugserver/_metadata/replaces
new file mode 100644
index 000000000..5cef965d2
--- /dev/null
+++ b/data/debugserver/_metadata/replaces
@@ -0,0 +1 @@
+jailbreak-resources (<< 1.0~b27)
diff --git a/data/debugserver/_metadata/role b/data/debugserver/_metadata/role
new file mode 100644
index 000000000..52b4d7301
--- /dev/null
+++ b/data/debugserver/_metadata/role
@@ -0,0 +1 @@
+hacker
diff --git a/data/debugserver/_metadata/section b/data/debugserver/_metadata/section
new file mode 100644
index 000000000..e0eb96881
--- /dev/null
+++ b/data/debugserver/_metadata/section
@@ -0,0 +1 @@
+Development
diff --git a/data/debugserver/_metadata/tags b/data/debugserver/_metadata/tags
new file mode 100644
index 000000000..ad5d50831
--- /dev/null
+++ b/data/debugserver/_metadata/tags
@@ -0,0 +1 @@
+purpose::console
diff --git a/data/debugserver/_metadata/version b/data/debugserver/_metadata/version
new file mode 100644
index 000000000..49d59571f
--- /dev/null
+++ b/data/debugserver/_metadata/version
@@ -0,0 +1 @@
+0.1
diff --git a/data/debugserver/debugserver b/data/debugserver/debugserver
new file mode 100755
index 000000000..9fee7e900
--- /dev/null
+++ b/data/debugserver/debugserver
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+if [[ -x "/usr/libexec/debugserver" ]]; then
+ set +e
+ /usr/libexec/debugserver > /dev/null 2>&1
+ if [[ $? -ne 1 ]]; then
+ rm -f /usr/libexec/debugserver
+ fi
+ set -e
+fi
+
+if [[ ! -x "/usr/libexec/debugserver" && -x "/Developer/usr/bin/debugserver" ]]; then
+ cp /Developer/usr/bin/debugserver /private/var/tmp/debugserver
+ ldid -S/usr/share/entitlements/debugserver.xml /private/var/tmp/debugserver
+ mv /private/var/tmp/debugserver /usr/libexec/
+fi
+
+if [[ -x "/usr/libexec/debugserver" ]]; then
+ exec /usr/libexec/debugserver "$@"
+else
+ echo "Please mount developer disk image"
+fi
diff --git a/data/debugserver/debugserver.xml b/data/debugserver/debugserver.xml
new file mode 100644
index 000000000..2d4f8ee0c
--- /dev/null
+++ b/data/debugserver/debugserver.xml
@@ -0,0 +1,32 @@
+<?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.backboardd.debugapplications</key>
+ <true/>
+ <key>com.apple.backboardd.launchapplications</key>
+ <true/>
+ <key>com.apple.diagnosticd.diagnostic</key>
+ <true/>
+ <key>com.apple.frontboard.debugapplications</key>
+ <true/>
+ <key>com.apple.frontboard.launchapplications</key>
+ <true/>
+ <key>com.apple.security.network.client</key>
+ <true/>
+ <key>com.apple.security.network.server</key>
+ <true/>
+ <key>com.apple.springboard.debugapplications</key>
+ <true/>
+ <key>com.apple.system-task-ports</key>
+ <true/>
+ <key>get-task-allow</key>
+ <true/>
+ <key>platform-application</key>
+ <true/>
+ <key>run-unsigned-code</key>
+ <true/>
+ <key>task_for_pid-allow</key>
+ <true/>
+</dict>
+</plist>
diff --git a/data/debugserver/make.sh b/data/debugserver/make.sh
new file mode 100644
index 000000000..9f015e92e
--- /dev/null
+++ b/data/debugserver/make.sh
@@ -0,0 +1,3 @@
+pkg: mkdir -p /usr/bin /usr/share/entitlements/
+pkg: cp %/debugserver /usr/bin/
+pkg: cp %/debugserver.xml /usr/share/entitlements/