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

(ITS#6921) bind failure with LDAP_OPT_NETWORK_TIMEOUT

Full_Name: Pravat Singh
Version: 2.4.23
OS: solaris 5.10
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

I am facing problem while in ldap_simple_bind () while setting
LDAP_OPT_NETWORK_TIMEOUT. Can anybody let me know if I am missing something.
Just to add some information that I have compiled the openldap-2.4.23 version on
solaris 10 with sun studio compiler.  The bind api ?ldap_simple_bind()? is
successful if don?t use  LDAP_OPT_NETWORK_TIMEOUT  but fails if I use.

>From my application bind() method I am using the following apis

struct timeval tempTime;
tempTime.tv_usec = 0;
tempTime.tv_sec = 10;

ldap_init((char*)theHost.c_str(), thePort);
ldap_set_option(theLDAP, LDAP_OPT_PROTOCOL_VERSION, &desired_version);
ldap_set_option(theLDAP, LDAP_OPT_DEREF, &desired_deref);
ldap_set_option( theLDAP, LDAP_OPT_NETWORK_TIMEOUT, (void *)&tempTime );
ldap_simple_bind(theLDAP, (char*)theUserDN, (char*)theUserPW);

here I am getting a bind failure and from openldap library in ldap_sasl_bind(?)
of libldap_r/sasl.c where the following code fails and ld->ld_errno returns -1

/* send the message */
        *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );

Where ber_sockbuf_ctrl( Sockbuf *sb, int opt, void *arg ) function with
opt=LBER_SB_OPT_GET_FD fails with sb->sb_fd is AC_SOCKET_INVALID.

Could anybody help me to know if I am missing anything here or it is required to
set any other ldap options or any compilation flag is required to be used for