ldapi:// with path

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Jul 1 07:12:07 CEST 2015


> On 30 Jun 2015, at 22:43, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
> 
> 
>> On 30 Jun 2015, at 19:12, Alan DeKok <aland at deployingradius.com> wrote:
>> 
>> On Jun 30, 2015, at 5:55 PM, Michael Ströder <michael at 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/libldap/url.c;h=dd1fa21f6363a681b418a5e0ff0797d8fa845b4a;hb=HEAD#l943
> 
> 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 at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150701/0f508c9c/attachment.sig>


More information about the Freeradius-Users mailing list