ldap.c won't compile under ubuntu 18
There's an error in ldap.c which Ubuntu 18 catches. srvaddr[0] is a pointer. You can't validly compare it to '\0'. Here's my fix, but it really depends upon what the author actually intended the code to do.
Here's how srvaddr is iniitialized:
char srvaddr[2][64] = {"\0", "\0"};
I'm pretty sure this means we don't need to test for the srvaddr[0] being null, but rather for them pointing to a string containing two bytes of 0.
@@ -925,7 +926,7 @@ ldap_parse_failover (struct ldap_config_stack *item, struct parse *cfile)
ldap_value_free_len (tempbv);
- if (primary == -1 || srvaddr[0] == '\0' || srvaddr[1] == '\0')
+ if (primary == -1 || srvaddr[0][0] == '\0' || srvaddr[1][0] == '\0')
{
log_error("Could not decide if the server type is primary"
" or secondary for failover peering '%s'.", peername[0]->bv_val);