Article View: es.comp.os.linux.programacion
Article #23Re: Problemas con libldap
From: Claudio
Date: Sat, 15 Oct 2005 23:53
Date: Sat, 15 Oct 2005 23:53
37 lines
2130 bytes
2130 bytes
On 2005-10-15, Trauma <trauma@calambre.homeip.net> wrote:
>
> Holas
>
> Estoy tonteando con libldap, y estoy atascado en la funci�n ldap_bind_s
>
> � Alguna idea sobre donde estoy metiendo la pata ?
Pues sin c�digo es dificil. Muy dificil. No solo hay que saber C, hay
que saber ldap y ser adivino. Te cuento, a mi me funciona esto:
$ cat ml.c
#include <stdio.h>
#include <stdlib.h>
#include <ldap.h>
main()
{
LDAP *p;
int i;
p = ldap_init("localhost",389);
if (p== NULL) { exit((int)3);};
i = ldap_bind_s(p,"cn=micommonname,dc=midominio,dc=tld","lapassquemeinvente",LDAP_AUTH_SIMPLE);
if (i!=LDAP_SUCCESS) ldap_perror(p,"ldap");
else puts("lo hice, lo hice!\n");
}
$ ./ml
lo hice, lo hice!
> Gracias por adelantado.
Ya, gracias, gracias... con eso crees que lo arreglas todo... que sepas
que por haberlo puesto tan dificil, si te vale te cobrar� el doble de lo
que es costumbre por estos lares.
Un saludo.
--claduio--
Technical Details
Message-ID:
<slrndl35iv.5ml.claudio@example.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!news-15.escomposlinux.org!not-for-mailReferences:
<20051016003601.46f9726b.trauma@calambre.homeip.net>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,98eb576eea54a68d X-Google-Thread: 10f58f,98eb576eea54a68d X-Google-Attributes: gidf86c8,gid10f58f,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!news-15.escomposlinux.org!not-for-mail From: Claudio <claudio@example.org> Newsgroups: es.comp.os.linux.programacion,es.comp.lenguajes.c Subject: Re: Problemas con libldap Date: Sat, 15 Oct 2005 23:53:03 +0000 (UTC) Organization: ninguna Lines: 38 Message-ID: <slrndl35iv.5ml.claudio@example.org> References: <20051016003601.46f9726b.trauma@calambre.homeip.net> NNTP-Posting-Host: localhost.escomposlinux.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: huron.algomas.org 1129420383 7106 127.0.0.1 (15 Oct 2005 23:53:03 GMT) X-Complaints-To: netnews@news-15.escomposlinux.org NNTP-Posting-Date: Sat, 15 Oct 2005 23:53:03 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Debian)