|
@@ -63,6 +63,8 @@ kern_return_t bootstrap_look_up(mach_port_t port, const char *service, mach_port
|
|
|
|
|
|
mach_port_t jbd_port;
|
|
|
|
|
|
+dispatch_queue_t queue = NULL;
|
|
|
+
|
|
|
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
|
|
|
|
|
|
#define PSPAWN_HOOK_DYLIB "/usr/lib/pspawn_hook.dylib"
|
|
@@ -79,6 +81,7 @@ const char* xpcproxy_blacklist[] = {
|
|
|
"jailbreakd", // don't inject into jbd since we'd have to call to it
|
|
|
"debugserver", // keeps xcode debugging from working
|
|
|
"reboot",
|
|
|
+ "sshd",
|
|
|
NULL
|
|
|
};
|
|
|
|
|
@@ -199,11 +202,12 @@ int fake_posix_spawn_common(pid_t *pid, const char *path, const posix_spawn_file
|
|
|
|
|
|
if (origret == 0) {
|
|
|
if (pid != NULL) *pid = gotpid;
|
|
|
-
|
|
|
+ dispatch_async(queue, ^{
|
|
|
kern_return_t ret = jbd_call(jbd_port, JAILBREAKD_COMMAND_ENTITLE_AND_SIGCONT, gotpid);
|
|
|
if (ret != KERN_SUCCESS) {
|
|
|
DEBUGLOG("err: got %x from jbd_call(sigcont, %d)", ret, gotpid);
|
|
|
}
|
|
|
+ });
|
|
|
}
|
|
|
} else if (current_process == PROCESS_XPCPROXY) {
|
|
|
kern_return_t ret = jbd_call(jbd_port, JAILBREAKD_COMMAND_ENTITLE_AND_SIGCONT_FROM_XPCPROXY, getpid());
|
|
@@ -237,6 +241,9 @@ void rebind_pspawns(void) {
|
|
|
|
|
|
__attribute__ ((constructor))
|
|
|
static void ctor(void) {
|
|
|
+
|
|
|
+ queue = dispatch_queue_create("pspawn.queue", NULL);
|
|
|
+
|
|
|
bzero(pathbuf, sizeof(pathbuf));
|
|
|
proc_pidpath(getpid(), pathbuf, sizeof(pathbuf));
|
|
|
|