[Midnightbsd-cvs] src [6925] trunk/secure/usr.sbin/sshd/Makefile: fix order that the threading library is included to stop a possible denial of service against sshd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Nov 4 22:37:39 EST 2014


Revision: 6925
          http://svnweb.midnightbsd.org/src/?rev=6925
Author:   laffer1
Date:     2014-11-04 22:37:38 -0500 (Tue, 04 Nov 2014)
Log Message:
-----------
fix order that the threading library is included to stop a possible denial of service against sshd

Modified Paths:
--------------
    trunk/secure/usr.sbin/sshd/Makefile

Modified: trunk/secure/usr.sbin/sshd/Makefile
===================================================================
--- trunk/secure/usr.sbin/sshd/Makefile	2014-11-03 02:13:14 UTC (rev 6924)
+++ trunk/secure/usr.sbin/sshd/Makefile	2014-11-05 03:37:38 UTC (rev 6925)
@@ -42,6 +42,16 @@
 DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
 LDADD+=	-lcrypto -lcrypt
 
+# 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



More information about the Midnightbsd-cvs mailing list