From nobody@FreeBSD.org  Tue Nov 30 17:36:01 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 99D2A16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Nov 2004 17:36:01 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8531143D48
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Nov 2004 17:36:01 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iAUHa037025070
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Nov 2004 17:36:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iAUHa0MD025058;
	Tue, 30 Nov 2004 17:36:00 GMT
	(envelope-from nobody)
Message-Id: <200411301736.iAUHa0MD025058@www.freebsd.org>
Date: Tue, 30 Nov 2004 17:36:00 GMT
From: Cat Okita <cat@reptiles.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Ports openldap22-* library compilation order causes {crypt}md5 authentication to fail
X-Send-Pr-Version: www-2.3

>Number:         74560
>Category:       ports
>Synopsis:       Ports openldap22-* library compilation order causes {crypt}md5 authentication to fail
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    eik
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 30 17:40:23 GMT 2004
>Closed-Date:    Thu Feb 03 03:47:42 GMT 2005
>Last-Modified:  Thu Feb 03 03:47:42 GMT 2005
>Originator:     Cat Okita
>Release:        5.3-BETA5
>Organization:
Earthworks
>Environment:
FreeBSD rei.example.com 5.3-BETA5 FreeBSD 5.3-BETA5 #0: Wed Nov 10 15:27:06 EST 2004     root@rei.example.com:/usr/src/sys/i386/compile/REI  i386

>Description:
     Openldap uses the first available crypt() function when comparing passwords stored as {crypt}<foo>.  As currently compiled (-lssl -lcrypto), the first available crypt() function is selected from openssl, which doesn't support md5 - and thus passwords will never match.  Changing the compile order to (-lcrypto -lssl) resolves this isssue, and doesn't have any other affect.
>How-To-Repeat:
      Compile openldap22-server 'out of the box' and import user passwords from FreeBSD's password file (the PADL scripts work), using "userPassword={CRYPT}[md5 hash]", which is the  default setting.  Anonymous bind and root bind searches will work - user-bound searches will fail with a "ldap_bind: Invalid credentials (49)" error.
>Fix:
      Reverse the order of "-lssl -lcrypto" in the main Makefile.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->eik 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Dec 2 07:37:47 GMT 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74560 

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: Cat Okita <cat@reptiles.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/74560: Ports openldap22-* library compilation order causes {crypt}md5 authentication to fail
Date: Thu, 2 Dec 2004 12:14:37 +0100

 Cat Okita wrote:
 
 >      Openldap uses the first available crypt() function when comparing 
 > passwords stored as {crypt}<foo>.  As currently compiled (-lssl 
 > -lcrypto), the first available crypt() function is selected from 
 > openssl, which doesn't support md5 - and thus passwords will never 
 > match.  Changing the compile order to (-lcrypto -lssl) resolves this 
 > isssue, and doesn't have any other affect.
 
 are you happy with:
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/net/openldap22-server/Makefile,v
 retrieving revision 1.101
 diff -u -u -r1.101 Makefile
 --- Makefile	30 Nov 2004 14:27:00 -0000	1.101
 +++ Makefile	2 Dec 2004 11:09:56 -0000
 @@ -126,6 +126,8 @@
   CONFIGURE_ARGS+=	--without-cyrus-sasl
   .endif
 
 +CONFIGURE_SED+=		-e 's,(-lssl) +(-lcrypto),\2 \1,'
 +
   .if defined(CLIENT_ONLY)
   # client specific configuration
 
 
 ?
 -Oliver
 

From: Cat Okita <cat@skink.reptiles.org>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/74560: Ports openldap22-* library compilation order causes
 {crypt}md5 authentication to fail
Date: Thu, 2 Dec 2004 08:15:29 -0500 (EST)

 On Thu, 2 Dec 2004, Oliver Eikemeier wrote:
 > Cat Okita wrote:
 >>      Openldap uses the first available crypt() function when comparing 
 >> passwords stored as {crypt}<foo>.  As currently compiled (-lssl -lcrypto), 
 >> the first available crypt() function is selected from openssl, which 
 >> doesn't support md5 - and thus passwords will never match.  Changing the 
 >> compile order to (-lcrypto -lssl) resolves this isssue, and doesn't have 
 >> any other affect.
 >
 > are you happy with:
 
 Looks good to me, thanks!
 
 cheers!
 
 > Index: Makefile
 > ===================================================================
 > RCS file: /home/ncvs/ports/net/openldap22-server/Makefile,v
 > retrieving revision 1.101
 > diff -u -u -r1.101 Makefile
 > --- Makefile	30 Nov 2004 14:27:00 -0000	1.101
 > +++ Makefile	2 Dec 2004 11:09:56 -0000
 > @@ -126,6 +126,8 @@
 > CONFIGURE_ARGS+=	--without-cyrus-sasl
 > .endif
 >
 > +CONFIGURE_SED+=		-e 's,(-lssl) +(-lcrypto),\2 \1,'
 > +
 > .if defined(CLIENT_ONLY)
 > # client specific configuration
 >
 >
 > ?
 > -Oliver
 >
 
 ==========================================================================
 "A cat spends her life conflicted between a deep, passionate and profound
 desire for fish and an equally deep, passionate and profound desire to
 avoid getting wet.  This is the defining metaphor of my life right now."
State-Changed-From-To: open->closed 
State-Changed-By: eik 
State-Changed-When: Thu Feb 3 04:44:37 CET 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74560 
>Unformatted:
