summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-09-10 01:59:21 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-10 13:08:23 +0300
commitd08439d42b4a04279e74bc3625cb672eb22007fe (patch)
tree14f76d3680d179e2a1ac2a6ac7a0be51bd2eb89d
parent750300aedf0bd59b704e222f82ff1d114d2b5da7 (diff)
downloadsamba-d08439d42b4a04279e74bc3625cb672eb22007fe.tar.gz
samba-d08439d42b4a04279e74bc3625cb672eb22007fe.tar.bz2
samba-d08439d42b4a04279e74bc3625cb672eb22007fe.zip
s4-dreplsrv: fix 'dn' for partition object being created
-rw-r--r--source4/dsdb/repl/drepl_ridalloc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/dsdb/repl/drepl_ridalloc.c b/source4/dsdb/repl/drepl_ridalloc.c
index 5cac09bc80..e394071c61 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",