summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-09-25 22:55:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:20 -0500
commit460679fd53dd47841b685907a586721f01a38b6f (patch)
tree30f268e84af06cd3dd8b740f863adac378475719
parent7a1c1a1fd88d907c3ed4b336ac50ba06896593b4 (diff)
downloadsamba-460679fd53dd47841b685907a586721f01a38b6f.tar.gz
samba-460679fd53dd47841b685907a586721f01a38b6f.tar.bz2
samba-460679fd53dd47841b685907a586721f01a38b6f.zip
r18909: use newer functions that were introduced after this code was made
(This used to be commit 3ce1796eb4cca7fd78366ee540a998a1ca377866)
-rw-r--r--source4/ldap_server/ldap_server.c9
1 files changed, 2 insertions, 7 deletions
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;
}