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

localhost, openldap 2.0+SASL+GSI(GSSAPI) (ITS#660)



Full_Name: mei-hui su
Version: 2.0 latest
OS: sun solaris 2.7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.9.64.206)


Hi,

  While trying to figure out why my 'ldapsearch -h localhost -p 9009' works
with -x but not -Y GSSAPI. I think I might have found the problem.

  I am using openldap the latest, cyrus-sasl 1.5.24 and globus gsi(GSSAPI)
and I have sent in a message to developer mailing list (200008/msg00062).

1) In libraries/libldap/init.c line #433, shouldn't hostbuf be declared
static char ?

void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
{
        if ( gopts->ldo_valid == LDAP_INITIALIZED ) {
                return;
        }

#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \
        || defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
        {
                char hostbuf[MAXHOSTNAMELEN+1];          
<<<--------------------
                if( gethostname( hostbuf, MAXHOSTNAMELEN ) == 0 ) {


2) In libraries/libldap/os-ip.c line #465, should INADDR_ANY be INADDR_LOOPBACK
instead ??

        case AF_INET:
                addr = (char *) &((struct sockaddr_in *)&sa)->sin_addr;
                len = sizeof( struct in_addr );

                {
                        struct sockaddr_in localhost;
                        localhost.sin_addr.s_addr = htonl( INADDR_ANY );
<<<-----

                        if( memcmp ( &localhost.sin_addr,


mei