summaryrefslogtreecommitdiffstats
path: root/secure/usr.sbin
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-05-04 07:28:26 +0000
committerkib <kib@FreeBSD.org>2014-05-04 07:28:26 +0000
commit9fc9efdfd5143009a748e6e05cd6ec6b81c51e94 (patch)
tree8b63fbd2723dcb28c3e6bb9e1ee96cc9e8e8e8a3 /secure/usr.sbin
parent2dee5cfb7666ad9a0a43fe70857ecaab4c6c1a36 (diff)
downloadFreeBSD-src-9fc9efdfd5143009a748e6e05cd6ec6b81c51e94.zip
FreeBSD-src-9fc9efdfd5143009a748e6e05cd6ec6b81c51e94.tar.gz
MFC r265003:
Fix order of libthr and libc in the global dso list for sshd.
Diffstat (limited to 'secure/usr.sbin')
-rw-r--r--secure/usr.sbin/sshd/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 4f730a9..e1c71a3 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED
DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
LDADD+= -lcrypt -lcrypto -lz
+# Fix the order of NEEDED entries for libthr and libc. The libthr
+# needs to interpose libc symbols, leaving the libthr loading as
+# dependency of krb causes reversed order and broken interposing. Put
+# the threading library last on the linker command line, just before
+# the -lc added by a compiler driver.
+.if ${MK_KERBEROS_SUPPORT} != "no"
+DPADD+= ${LIBPTHREAD}
+LDADD+= -lpthread
+.endif
+
.if defined(LOCALBASE)
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
.endif
OpenPOWER on IntegriCloud