Author: idra
Date: 2006-09-25 22:55:56 +0000 (Mon, 25 Sep 2006)
New Revision: 18909

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18909

Log:

use newer functions that were introduced after this code was made


Modified:
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2006-09-25 22:53:03 UTC 
(rev 18908)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2006-09-25 22:55:56 UTC 
(rev 18909)
@@ -218,7 +218,6 @@
        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 @@
                return -1;
        }
 
-       basedn = ldb_dn_explode(tmp_ctx, "");
+       basedn = ldb_dn_new(tmp_ctx);
        if (basedn == NULL) {
                goto failed;
        }
@@ -249,11 +248,7 @@
                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;
        }

Reply via email to