From d08439d42b4a04279e74bc3625cb672eb22007fe Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 10 Sep 2010 01:59:21 +0300 Subject: s4-dreplsrv: fix 'dn' for partition object being created --- source4/dsdb/repl/drepl_ridalloc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/dsdb/repl/drepl_ridalloc.c b/source4/dsdb/repl/drepl_ridalloc.c index 5cac09bc808..e394071c610 100644 --- a/source4/dsdb/repl/drepl_ridalloc.c +++ b/source4/dsdb/repl/drepl_ridalloc.c @@ -52,8 +52,16 @@ WERROR drepl_create_role_owner_source_dsa(struct dreplsrv_service *service, return WERR_NOMEM; } - sdsa->partition->dn = ldb_get_default_basedn(ldb); + sdsa->partition->dn = ldb_dn_copy(sdsa->partition, role_owner_dn); + if (!sdsa->partition->dn) { + talloc_free(sdsa); + return WERR_NOMEM; + } sdsa->partition->nc.dn = ldb_dn_alloc_linearized(sdsa->partition, role_owner_dn); + if (!sdsa->partition->nc.dn) { + talloc_free(sdsa); + return WERR_NOMEM; + } ret = dsdb_find_guid_by_dn(ldb, role_owner_dn, &sdsa->partition->nc.guid); if (ret != LDB_SUCCESS) { DEBUG(0,(__location__ ": Failed to find GUID for %s\n", -- cgit