]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
fix sandbox on OSX Lion
authorDamien Miller <djm@mindrot.org>
Tue, 23 Feb 2016 01:56:59 +0000 (12:56 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 23 Feb 2016 01:58:53 +0000 (12:58 +1100)
sshd was failing with:

ssh_sandbox_child: sandbox_init: dlopen(/usr/lib/libsandbox.1.dylib, 261):cw
  image not found [preauth]

caused by chroot before sandboxing. Avoid by explicitly linking libsandbox
to sshd. Spotted by Darren.

configure.ac

index e36b0494230541dcb03baedeafaa41dbd57abf68..7258cc0e53970876dd8730190cc08d526003b8e8 100644 (file)
@@ -644,6 +644,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
                supported by bsd-setproctitle.c])
        AC_CHECK_FUNCS([sandbox_init])
        AC_CHECK_HEADERS([sandbox.h])
+       AC_CHECK_LIB([sandbox], [sandbox_apply], [
+           SSHDLIBS="$SSHDLIBS -lsandbox"
+       ])
        ;;
 *-*-dragonfly*)
        SSHDLIBS="$SSHDLIBS -lcrypt"