[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8158) cldap broken for aix and solaris



On tor, 2015-06-04 at 23:06 +0200, Hallvard Breien Furuseth wrote:
> On 03/06/15 08:47, goran.hammarback@foxt.com wrote:
> > Hmm, my fingers thought it was still february. Now I have uploaded a
> > file with the correct name, goran-hammarback-150603.ext.
> 
> The date is probably just for disambiguation anyway.
> 
> Tweaked it a bit, I expect it should look like this:
> ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-150604.diff
> 
> Is there a reason you switched to sizeof(struct sockaddr) from
> sockaddr_storage as the fallback?  Otherwise sockaddr_storage
> seems better, since that has presumably worked on most hosts.
> Should only matter if people play tricks like using ldap_init_fd()
> to create an unsupported connection type, e.g. "UDP ldapi://".

Yeah, the fallback... I really did not know what to use there. I knew
sizeof(struct sockaddr_storage) would work on Linux but most likely not
on Solaris and AIX, so I used sizeof(struct sockaddr). Unfortunately I
have no way of testing if that really works at all for any platform so I
guess your way is probably better...

> 
> Anyway, please test (or protest if it should be sockaddr).
> The change from your patch may be trivial, but that doesn't
> mean I couldn't have managed to break it:-)
> 
> Note that OpenLDAP should be edited with editor tab width =
> indentation = 4.  Though some code has been written with
> tab width = 8, so it looks messy either way.
> 
Your patch looks fine. I will not have time to test it until next week
earliest. My patch was meant only as an example, so I did not really
think about indentation. 


Regards,

/Göran