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

Newbie : ldap API.



Hi, I am working on AIX433 with openldap 1.2.11 (and openssl and gdbm).

I have build a simple base.

When I do " ldapsearch -h cash -p 389 -D Admin -w secret 'cn=*Jean*' ", it
works fine but 
when i am executing this code below, it doesn't bind. 

    ld = ldap_open("cash",389);
    if (ld == NULL){
        rc = CTXLDAP_RC_LDAP;
        goto fin;
    }
    
    rc = ldap_simple_bind_s(ld,"Admin","secret");
    if (rc != LDAP_SUCCESS){
----> We enter here each time !
        rc = CTXLDAP_RC_LDAP;
        goto fin;
    }

What's wrong with this code ?
Does anyone got an idee ?
Here is what LDAP give me. I get "errno 9"

ldap_open
ldap_init
ldap_delayed_open
open_ldap_connection
ldap_connect_to_host: cash:389
sd 4 connected to: 192.168.16.41
ldap_open successful, ld_host is (null)
ldap_simple_bind_s
ldap_simple_bind
ldap_send_initial_request
ldap_delayed_open
ldap_send_server_request
ber_flush: 25 bytes to sd 4
         0 17 02 01 01  ` 12 02 01 02 04 05  A  d  m  i
         n 80 06  s  e  c  r  e  t 
ldap_result
wait4msg (infinite timeout)
** Connections:
* host: cash  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue May 29 08:58:53 2001

** Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
do_ldap_select
do_ldap_select returned -1: errno 9


Thanks for your time and your help.
Jerome PERREARD