+ if (child->have_ldap_url) {
+ conf->have_ldap_url = child->have_ldap_url;
+ conf->url = child->url;
+ conf->host = child->host;
+ conf->port = child->port;
+ conf->basedn = child->basedn;
+ conf->scope = child->scope;
+ conf->filter = child->filter;
+ conf->secure = child->secure;
+ } else {
+ conf->have_ldap_url = parent->have_ldap_url;
+ conf->url = parent->url;
+ conf->host = parent->host;
+ conf->port = parent->port;
+ conf->basedn = parent->basedn;
+ conf->scope = parent->scope;
+ conf->filter = parent->filter;
+ conf->secure = parent->secure;
+ }
+ if (child->have_deref) {
+ conf->have_deref = child->have_deref;
+ conf->deref = child->deref;
+ } else {
+ conf->have_deref = parent->have_deref;
+ conf->deref = parent->deref;
+ }
+
+ conf->binddn = (child->binddn ? child->binddn : parent->binddn);
+ conf->bindpw = (child->bindpw ? child->bindpw : parent->bindpw);
+
+ return conf;