[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Failed assertion in sockbuf.c



> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Howard Chu
 
> After studying the trace and the pam_ldap source code it is apparent that
> this is a bug in pam_ldap.c:_open_session; it is trying to use the
> ldap_start_tls_s function on an LDAP handle but there is no LDAP session
> established yet. You should pursue this further on a pam_ldap mailing list.

On second thought, this could also be fixed in OpenLDAP. There's no reason
it should behave this way. Try this patch on libldap/tls.c:

===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/tls.c,v
retrieving revision 1.8.2.29
diff -u -r1.8.2.29 tls.c
--- tls.c       2001/12/04 18:31:13     1.8.2.29
+++ tls.c       2002/01/12 01:03:18
@@ -1296,7 +1296,7 @@

        /* XXYYZ: this initiates operation only on default connection! */

-       if ( ldap_pvt_tls_inplace( ld->ld_sb ) != 0 ) {
+       if ( ld->ld_sb != NULL && ldap_pvt_tls_inplace( ld->ld_sb ) != 0 ) {
                return LDAP_LOCAL_ERROR;
        }

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc  
  Symas: Premier OpenSource Development and Support