[Date Prev][Date Next]
Re: slapd socket file name and location
On Tue, 15 Dec 2009, Dieter Kluenter wrote:
> DT Piotr Wadas <firstname.lastname@example.org> writes:
> > On Tue, 15 Dec 2009, Dieter Kluenter wrote:
> >> If you want to specify a path, you only should use two slashes prior
> >> to the path specification.
> >> -h ldapi://var/run/slapd/foobar/
> > Nope :/ None of these worked as expected
> > slapd -h 'ldapi://test//' -u root -g root -d16384 -f slapd-1.conf
> All I can say is that it works for me as the output of ps may show:
> 10352 pts/1 Sl+ 0:00 ./slapd -d-1 -h ldapi://temp/slapd/ -F /opt/openldap/
> A search requires LDAPURL like this
> ldapsearch -x -H ldapi://2%Ftmp2%Fslapd -b "" -s base +
The same thing with ldap_url_parse in C code (2.4.17 version), in my
application - the problem starts from ldap_url_parse function.
int connection_res = ldap_initialize(&ldx,"ldapi://%2Ftest%2Fldapsock");
And this doesn't work:
int connection_res = ldap_initialize(&ldx,"ldapi:///test/ldapsock");
ldap_err2string(connection_res) is "Can't contact LDAP server"
When I use ldap_url_parse function, returned urld ( urld->lud_host to be
exact ) is wrong - taken string with '%2F' ( "ldapi://%2Ftest%2Fldapsock"
), it returns "ldapi:///test/ldapsock". So next ldap_initialize call
failed ldap_initialize works only if I use "ldapi://%2Ftest%2Fldapsock"
directly. For now I'm going to "fix" returned ruld->lud_host in my app,
I'm still not sure whether it's debian/openldap build related issue,
or openldap bug, anyway there IS something WRONG with this.
Regards, merry christmas
http://dtpw.pl/buell [ 25th anniversary of Buell - American Motorcycles ]
Linux aleft 220.127.116.11-0.1_lustre.18.104.22.168-default #1 SMP