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.