Hi,
Here is the description of use of the current version of the "x-dnssrv"
extension through some examples:
CONTEXT OF EXAMPLE :
/etc/resolv.conf:
search gov.pf
nameserver localhost
/var/named/pz/gov.pf:
$ORIGIN gov.pf.
...
_ldap._tcp IN SRV 0 1 389 ldap
IN SRV 1 1 389 ldap1.backup.gov.pf.
IN SRV 1 1 390 ldap2.backup.gov.pf.
...
and /var/named/pz/backup.gov.pf:
$ORIGIN backup.gov.pf.
...
_ldap._tcp IN SRV 0 1 389 ldap0
IN SRV 0 1 389 ldap1
...
LDAP URI EXAMPLES FOR THE "x-dnssrv" EXTENSION:
For: "ldap:///ou=person,dc=gov,dc=pf??sub??x-dnssrv=dc=gov%2cdc=pf"
-> the result URI will be:
"ldap://ldap.gov.pf.:389/ou=person,dc=gov,dc=pf??sub \
ldap://ldap1.backup.gov.pf.:389/ou=person,dc=gov,dc=pf??sub \
ldap://ldap2.backup.gov.pf.:390/ou=person,dc=gov,dc=pf??sub"
For: "ldap:///????x-dnsSRV=gov.pf."
-> the result URI will be:
"ldap://ldap.gov.pf.:389 ldap://ldap2.backup.gov.pf.:390 /
ldap://ldap1.backup.gov.pf.:389"
For: "ldap:///dc=gov%2cdc=pf????x-dnssrv"
-> the result URI will be:
"ldap://ldap.gov.pf.:389/dc=gov%2cdc=pf \
ldap://ldap1.backup.gov.pf.:389/dc=gov%2cdc=pf \
ldap://ldap2.backup.gov.pf.:390/dc=gov%2cdc=pf"
For: "ldap://gov.pf.:389/????x-dnssrv"
-> the result URI will be:
"ldap://ldap.gov.pf.:389 ldap://ldap1.backup.gov.pf.:389"
For: "ldap:///????x-dnssrv[,extension]*"
-> because of resolv.conf, the result URI will be:
"ldap://ldap.gov.pf.:389/????[extension[,extension]*]* \
ldap://ldap1.backup.gov.pf.:389/????[extension[,extension]*]* \
ldap://ldap2.backup.gov.pf.:390/????[extension[,extension]*]*"
WARNING:
"ldap://goov.pf./????x-dnssrv"
-> give: ""
"ldap://gov.pf./????x-dnssrv,x-dnssrv=dc=backup%2cdc=gov%2cdc=pf"
-> give:
"ldap://ldap.gov.pf.:389/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap2.backup.gov.pf.:389/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap1.backup.gov.pf.:390/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf"
"ldap:///dc=gov%2cdc=pf???sub?x-dnssrv=dc=backup%2cdc=gov%2cdc=pf"
-> give:
"ldap://ldap0.backup.gov.pf.:389/dc=gov,dc=pf???sub \
ldap://ldap1.backup.gov.pf.:389/dc=gov,dc=pf???sub"
"ldap://ldap.gov.pf/dc=backup%2cdc=gov%2cdc=pf????x-dnssrv"
-> give:
"ldap://ldap.gov.pf.:389/dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap2.backup.gov.pf.:389/dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap1.backup.gov.pf.:390/dc=backup%2cdc=gov%2cdc=pf"
"ldap:///o=gov%2cc=pf????x-dnssrv" correct, but because of default the
domain research ...
-> give:
"ldap://ldap.gov.pf.:389/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap1.backup.gov.pf.:390/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf \
ldap://ldap2.backup.gov.pf.:389/????x-dnssrv=dc=backup%2cdc=gov%2cdc=pf"
SYNTAX ERROR (the resultant URI will remain unchanged):
"ldap://ldap.gov.pf/dc=gov%2cdc=pf????x-dnssrv=dc=gov%2cdc=pf"
"ldap://ldap.gov.pf/????x-dnssrv=dc=gov%2cdc=pf"
"ldap://ldap.gov.pf/????x-dnssrv=gov.pf."
"ldap://dc=gov%2cdc=pf/????x-dnssrv"
"ldap://gov.pf[/[?[?[?[?]]]]]"
etc ...
I proceed in the last check of sources and I post patchs (open.c & dnssrv.c)
...
--
PE