Created
July 2, 2024 03:29
-
-
Save mistydemeo/9fc80773854bb800b6ff56b2823fd91d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sshd-session.c b/sshd-session.c | |
index fe6ae7f..683cf01 100644 | |
--- a/sshd-session.c | |
+++ b/sshd-session.c | |
@@ -376,10 +376,18 @@ privsep_preauth(struct ssh *ssh) | |
/* 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment