--- a/sshd.c 2017-10-02 21:34:26.000000000 +0200 +++ b/sshd.c 2017-10-07 04:35:20.000000000 +0200 @@ -617,10 +617,17 @@ privsep_preauth(Authctxt *authctxt) /* Arrange for logging to be sent to the monitor */ set_log_handler(mm_log_handler, pmonitor); +#ifdef __APPLE_SANDBOX_NAMED_EXTERNAL__ + /* We need to do this before we chroot() so we can read sshd.sb */ + if (box != NULL) + ssh_sandbox_child(box); +#endif privsep_preauth_child(); setproctitle("%s", "[net]"); +#ifndef __APPLE_SANDBOX_NAMED_EXTERNAL__ if (box != NULL) ssh_sandbox_child(box); +#endif return 0; }