Date: Mon, 28 Apr 2014 16:33:17 +0400 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: Konstantin Belousov <kib@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140428123317.GA38996@zxy.spb.ru> In-Reply-To: <201404270528.s3R5SEIm054377@svn.freebsd.org> References: <201404270528.s3R5SEIm054377@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 27, 2014 at 05:28:14AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun Apr 27 05:28:14 2014 > New Revision: 265003 > URL: http://svnweb.freebsd.org/changeset/base/265003 > > Log: > Fix order of libthr and libc in the global dso list for sshd, by > explicitely linking main binary with -lpthread. Before, libthr > appeared in the list due to dependency of one of the kerberos libs. > Due to the change in ld(1) behaviour of not copying NEEDED entries > from direct dependencies into the link results, the order becomes > reversed. > > The libthr must appear before libc to properly interpose libc symbols > and provide working rtld locks implementation. The symptom was sshd > hanging on rtld bind lock during nested symbol binding from a signal > handler. What about define CFLAGS += -DUNSUPPORTED_POSIX_THREADS_HACK for realy working kerberos SSO? > Approved by: des (openssh maintainer) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > Modified: > head/secure/usr.sbin/sshd/Makefile > > Modified: head/secure/usr.sbin/sshd/Makefile > ============================================================================== > --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r265002) > +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r265003) > @@ -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 > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140428123317.GA38996>