--- a/sandbox-darwin.c 2019-11-08 15:38:15.000000000 +0100 +++ b/sandbox-darwin.c 2019-11-08 15:44:18.000000000 +0100 @@ -63,8 +63,16 @@ ssh_sandbox_child(struct ssh_sandbox *bo struct rlimit rl_zero; debug3("%s: starting Darwin sandbox", __func__); +#ifdef __APPLE_SANDBOX_NAMED_EXTERNAL__ +#ifndef SANDBOX_NAMED_EXTERNAL +#define SANDBOX_NAMED_EXTERNAL (0x3) +#endif + if (sandbox_init("@PREFIX@/share/openssh/com.openssh.sshd.sb", + SANDBOX_NAMED_EXTERNAL, &errmsg) == -1) +#else if (sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED, &errmsg) == -1) +#endif fatal("%s: sandbox_init: %s", __func__, errmsg); /*