Fix include paths to new location of libutil.
[samba.git] / source4 / dsdb / repl / replicated_objects.c
index c47108559de28a8d259e815c2a03ab131a44d815..9853a753472c23e1962273b75fe4d31884dd643f 100644 (file)
 #include "includes.h"
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
-#include "lib/crypto/crypto.h"
+#include "../lib/crypto/crypto.h"
 #include "libcli/auth/libcli_auth.h"
+#include "param/param.h"
 
 static WERROR dsdb_decrypt_attribute_value(TALLOC_CTX *mem_ctx,
                                           const DATA_BLOB *gensec_skey,
@@ -322,7 +323,9 @@ static WERROR dsdb_convert_object(struct ldb_context *ldb,
        whenChanged_s = ldb_timestring(msg, whenChanged_t);
        W_ERROR_HAVE_NO_MEMORY(whenChanged_s);
 
-       ndr_err = ndr_push_struct_blob(&guid_value, msg, &in->object.identifier->guid,
+       ndr_err = ndr_push_struct_blob(&guid_value, msg, 
+                                      lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
+                                      &in->object.identifier->guid,
                                         (ndr_push_flags_fn_t)ndr_push_GUID);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -397,8 +400,8 @@ WERROR dsdb_extended_replicated_objects_commit(struct ldb_context *ldb,
 
        ret = ldb_extended(ldb, DSDB_EXTENDED_REPLICATED_OBJECTS_OID, out, &ext_res);
        if (ret != LDB_SUCCESS) {
-               DEBUG(0,("Failed to apply records: %d: %s\n",
-                       ret, ldb_strerror(ret)));
+               DEBUG(0,("Failed to apply records: %s: %s\n",
+                        ldb_errstring(ldb), ldb_strerror(ret)));
                talloc_free(out);
                return WERR_FOOBAR;
        }