diff --git a/sandbox-darwin.c b/sandbox-darwin.c index b1206a0..3b5a9ff 100644 --- a/sandbox-darwin.c +++ b/sandbox-darwin.c @@ -63,8 +63,16 @@ ssh_sandbox_child(struct ssh_sandbox *box) struct rlimit rl_zero; debug3_f("starting Darwin sandbox"); +#ifdef __APPLE_SANDBOX_NAMED_EXTERNAL__ +#ifndef SANDBOX_NAMED_EXTERNAL +#define SANDBOX_NAMED_EXTERNAL (0x3) +#endif + if (sandbox_init("@PREFIX@/share/pkixssh/info.roumenpetrov.sshd.sb", + SANDBOX_NAMED_EXTERNAL, &errmsg) == -1) +#else if (sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED, &errmsg) == -1) +#endif fatal_f("sandbox_init: %s", errmsg); /*