On 30 Jun 2015, at 22:43, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 30 Jun 2015, at 19:12, Alan DeKok <aland@deployingradius.com> wrote:
On Jun 30, 2015, at 5:55 PM, Michael Ströder <michael@stroeder.com> wrote:
Re-tested with 8655446068a7bbec8a6ecc148418926fea9fc2d0:
server = 'ldap://localhost' port = 1390
now results in ldap://localhost:389
I've pushed a fix.
You pushed (helpful) changes for the case where we don't have ldap_initialize.
We know on OPs system he has ldap_initialize because the code is producing URLs, so it'll still be broken in the OPs case.
This says when a port does not exist in the string, don't set it.
http://www.openldap.org/devel//gitweb.cgi?p=openldap.git;a=blob;f=libraries/...
Unless LDAP_PVT_URL_PARSE_DEF_PORT was passed in.
So I have no idea why it's still messed up. I guess i'll run it under lldb and find exactly where libldap is setting the port.
1175 int 1176 ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) 1177 { 1178 return ldap_url_parse_ext( url_in, ludpp, LDAP_PVT_URL_PARSE_HISTORIC ); 1179 } 51 #define LDAP_PVT_URL_PARSE_HISTORIC (LDAP_PVT_URL_PARSE_NODEF_SCOPE | \ 52 LDAP_PVT_URL_PARSE_NOEMPTY_HOST | \ 53 LDAP_PVT_URL_PARSE_DEF_PORT) Well that explains it... Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2