[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: slapd socket file name and location
On Tue, 15 Dec 2009, Dieter Kluenter wrote:
> DT Piotr Wadas <pwadas@dtpw.pl> 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 +
>
> -Dieter
>
>
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.
This works:
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
DT
--
http://dtpw.pl/buell [ 25th anniversary of Buell - American Motorcycles ]
Linux aleft 2.6.27.29-0.1_lustre.1.8.1.1-default #1 SMP
drbd 8.3.6-(api:88/proto:86-91)
pacemaker 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe