From 460679fd53dd47841b685907a586721f01a38b6f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 25 Sep 2006 22:55:56 +0000 Subject: r18909: use newer functions that were introduced after this code was made (This used to be commit 3ce1796eb4cca7fd78366ee540a998a1ca377866) --- source4/ldap_server/ldap_server.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source4/ldap_server') diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 6282207a52..89f7bf0bfb 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -218,7 +218,6 @@ static int ldapsrv_load_limits(struct ldapsrv_connection *conn) TALLOC_CTX *tmp_ctx; const char *attrs[] = { "configurationNamingContext", NULL }; const char *attrs2[] = { "lDAPAdminLimits", NULL }; - const char *conf_dn_s; struct ldb_message_element *el; struct ldb_result *res = NULL; struct ldb_dn *basedn; @@ -238,7 +237,7 @@ static int ldapsrv_load_limits(struct ldapsrv_connection *conn) return -1; } - basedn = ldb_dn_explode(tmp_ctx, ""); + basedn = ldb_dn_new(tmp_ctx); if (basedn == NULL) { goto failed; } @@ -249,11 +248,7 @@ static int ldapsrv_load_limits(struct ldapsrv_connection *conn) goto failed; } - conf_dn_s = ldb_msg_find_attr_as_string(res->msgs[0], "configurationNamingContext", NULL); - if (conf_dn_s == NULL) { - goto failed; - } - conf_dn = ldb_dn_explode(tmp_ctx, conf_dn_s); + conf_dn = ldb_msg_find_attr_as_dn(tmp_ctx, res->msgs[0], "configurationNamingContext"); if (conf_dn == NULL) { goto failed; } -- cgit