[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Fwd: Re: getting bindDN in perl script
- To: openldap-technical <openldap-technical@openldap.org>
- Subject: Fwd: Re: getting bindDN in perl script
- From: Benin Technologies <benintechnologies@yahoo.fr>
- Date: Thu, 16 May 2013 10:14:14 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1368695662; bh=lB1usB3rLrAAjFH2Bh/3UB2uJNo7B23YJhQNkkfZUEw=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:X-Forwarded-Message-Id:Content-Type:Content-Transfer-Encoding; b=KyK5TzK9HNnGCbSCLZJh/3ERN6i1P2L4Z9LqBTzi2zbFE86wMRujcbsVX8CES+FPq63fDnGdU93xvZe2jfanRhkvyMYpRPLSMovDYB06BayW+rlXjfUN4LQQSUwJ8UASnJcLqGI3tPYXJOihhaSH8aOA+G+7sGWF/Jrs3eWzOlU=
- In-reply-to: <51948905.6040406@yahoo.fr>
- References: <51948905.6040406@yahoo.fr>
- User-agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
by the way you're right there IS a call to bind() in bind.c on line 57
count = call_method("bind", G_SCALAR);
it just seems that if I define a bind() function in SampleLDAP.pm, it's
never called, despite of that call
strange
I'm sorry, but I've only been working with openldap for a few months,
and I'm not exactly a C expert neither...
However, I had the idea at the beginning to write my own bind() function
in SampleLDAP.pm, hoping it would somehow be called, but it wasn't :
I wrote :
sub bind {
print {*STDERR} "Here in bind\n";
return 0;
}
It's never called : when I start slapd I can see that new() and init()
are called, then when I do a search I can see that search() is called,
but apparently the bind() function I wrote in SampleLDAP.pm is never called
root@ldap:/# /usr/local/libexec/slapd -u openldap -g openldap -h
"ldap:/// ldapi:///" -d 0
Here in new
Here in init
Here in search
Le 16/05/2013 06:24, Pierangelo Masarati a Ãcrit :
servers/slapd/back-perl/bind.c calls a method "bind" as much as
servers/slapd/back-perl/search.c calls a method "search". Apparently,
who wrote "SampleLDAP.pm" did not provide a "bind" example. Note that
I've been working for 15 years with OpenLDAP and I never used
back-perl; I discovered all of this last night by opening 2 files and
reading about 10 lines of code. You should probably try to do
something like this yourself.
p.
Le 15/05/2013 22:20, Pierangelo Masarati a Ãcrit :
binddn and bindpw are the first two parameters of the perl function
called for binds.