aboutsummaryrefslogtreecommitdiff
path: root/darwin-bootstrap/posixspawn-hook.c
diff options
context:
space:
mode:
authorcomex2015-02-28 21:54:23 -0500
committercomex2015-02-28 21:54:23 -0500
commita976efe67c5f936eb553a0d61b78a311da7224d9 (patch)
tree759de2adb9ad10a80b0373b5dbefdacbc04c9c18 /darwin-bootstrap/posixspawn-hook.c
parentfix accidental usage of panic() from mach/mach.h instead of substitute_panic (diff)
downloadsubstitute-a976efe67c5f936eb553a0d61b78a311da7224d9.tar.gz
Add extra argument to substitute_hook_functions and interpose_imports for use with unhooking.
I think we'll need to explicitly record trampoline locations to avoid the possibility of stomping on someone else's stuff if the function was re-patched... Also, document substitute_hook_functions.
Diffstat (limited to 'darwin-bootstrap/posixspawn-hook.c')
-rw-r--r--darwin-bootstrap/posixspawn-hook.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/darwin-bootstrap/posixspawn-hook.c b/darwin-bootstrap/posixspawn-hook.c
index b467ca5..51ab5b3 100644
--- a/darwin-bootstrap/posixspawn-hook.c
+++ b/darwin-bootstrap/posixspawn-hook.c
@@ -425,7 +425,8 @@ static void init() {
{"_sandbox_check", hook_sandbox_check, &old_sandbox_check},
};
- int err = substitute_interpose_imports(im, hooks, sizeof(hooks)/sizeof(*hooks), 0);
+ int err = substitute_interpose_imports(im, hooks, sizeof(hooks)/sizeof(*hooks),
+ NULL, 0);
if (err) {
ib_log("posixspawn-hook: substitute_interpose_imports failed: %s",
substitute_strerror(err));