--- a/src/server/daemon/config.c Sun Mar 12 11:42:17 2023 +0100 +++ b/src/server/daemon/config.c Sun Mar 12 20:02:04 2023 +0100 @@ -602,21 +602,7 @@ AuthDB *authdb = NULL; if(!cx_strcmp(type, cx_str("ldap"))) { - LDAPConfig conf; - - cxstring host = serverconfig_object_directive_value(obj, cx_str("Host")); - cxstring port = serverconfig_object_directive_value( obj, cx_str("Port")); - cxstring basedn = serverconfig_object_directive_value(obj, cx_str("BaseDN")); - cxstring binddn = serverconfig_object_directive_value(obj, cx_str("BindDN")); - cxstring basepw = serverconfig_object_directive_value(obj, cx_str("BindPW")); - - conf.hostname = cx_strdup_a(cfg->a, host).ptr; - conf.port = atoi(port.ptr); - conf.basedn = cx_strdup_a(cfg->a, basedn).ptr; - conf.binddn = cx_strdup_a(cfg->a, binddn).ptr; - conf.bindpw = cx_strdup_a(cfg->a, basepw).ptr; - - authdb = create_ldap_authdb(cfg, name.ptr, &conf); + authdb = create_ldap_authdb(cfg, name.ptr, obj); } else if(!cx_strcmp(type, cx_str("keyfile"))) { // we only need the file parameter cxstring file = serverconfig_object_directive_value(obj, cx_str("File"));