s3: Fix tldap_make_mod_blob_int() debug messages
[rusty/samba.git] / source3 / lib / tldap_util.c
index 52bacfd8436624b49febf88e8272f487d832889f..0c22d6564e52ded619fede71c166ae5da7ddf18d 100644 (file)
@@ -21,6 +21,8 @@
 #include "tldap.h"
 #include "tldap_util.h"
 #include "../libcli/security/security.h"
+#include "../lib/util/asn1.h"
+#include "../librpc/ndr/libndr.h"
 
 bool tldap_entry_values(struct tldap_message *msg, const char *attribute,
                        DATA_BLOB **values, int *num_values)
@@ -77,7 +79,7 @@ char *tldap_talloc_single_attribute(struct tldap_message *msg,
        }
        if (!convert_string_talloc(mem_ctx, CH_UTF8, CH_UNIX,
                                   val.data, val.length,
-                                  &result, &len, false)) {
+                                  &result, &len)) {
                return NULL;
        }
        return result;
@@ -196,8 +198,7 @@ bool tldap_add_mod_str(TALLOC_CTX *mem_ctx,
        bool ret;
 
        if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_UTF8, str,
-                                  strlen(str), &utf8.data, &utf8.length,
-                                  false)) {
+                                  strlen(str), &utf8.data, &utf8.length)) {
                return false;
        }
 
@@ -235,7 +236,7 @@ static bool tldap_make_mod_blob_int(struct tldap_message *existing,
                /* Believe it or not, but LDAP will deny a delete and
                   an add at the same time if the values are the
                   same... */
-               DEBUG(10,("smbldap_make_mod_blob: attribute |%s| not "
+               DEBUG(10,("tldap_make_mod_blob_int: attribute |%s| not "
                          "changed.\n", attrib));
                return true;
        }
@@ -249,7 +250,7 @@ static bool tldap_make_mod_blob_int(struct tldap_message *existing,
                 * Novell NDS. In NDS you have to first remove attribute and
                 * then you could add new value */
 
-               DEBUG(10, ("smbldap_make_mod_blob: deleting attribute |%s|\n",
+               DEBUG(10, ("tldap_make_mod_blob_int: deleting attribute |%s|\n",
                           attrib));
                if (!tldap_add_mod_blobs(mem_ctx, pmods, pnum_mods,
                                         TLDAP_MOD_DELETE,
@@ -263,7 +264,7 @@ static bool tldap_make_mod_blob_int(struct tldap_message *existing,
           the old value, should it exist. */
 
        if (newval.data != NULL) {
-               DEBUG(10, ("smbldap_make_mod: adding attribute |%s| value len "
+               DEBUG(10, ("tldap_make_mod_blob_int: adding attribute |%s| value len "
                           "%d\n", attrib, (int)newval.length));
                if (!tldap_add_mod_blobs(mem_ctx, pmods, pnum_mods,
                                         TLDAP_MOD_ADD,
@@ -289,12 +290,12 @@ static int compare_utf8_blobs(const DATA_BLOB *d1, const DATA_BLOB *d2)
        int ret;
 
        if (!convert_string_talloc(talloc_tos(), CH_UTF8, CH_UNIX, d1->data,
-                                  d1->length, &s1, &s1len, false)) {
+                                  d1->length, &s1, &s1len)) {
                /* can't do much here */
                return 0;
        }
        if (!convert_string_talloc(talloc_tos(), CH_UTF8, CH_UNIX, d2->data,
-                                  d2->length, &s2, &s2len, false)) {
+                                  d2->length, &s2, &s2len)) {
                /* can't do much here */
                TALLOC_FREE(s1);
                return 0;