From 8c3d77d84c9627c9ed4e1164d4844f83345fdbd6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 Sep 2011 09:50:57 +1000 Subject: s4-repl: fill in GUID and SID from partition information when we find a NC via a DN string, fill in the GUID and SID so the caller can properly report them --- source4/dsdb/repl/drepl_partitions.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index bc4ba9eeee..f9bb3f0df4 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -333,8 +333,8 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s, } WERROR dreplsrv_partition_find_for_nc(struct dreplsrv_service *s, - const struct GUID *nc_guid, - const struct dom_sid *nc_sid, + struct GUID *nc_guid, + struct dom_sid *nc_sid, const char *nc_dn_str, struct dreplsrv_partition **_p) { @@ -357,6 +357,13 @@ WERROR dreplsrv_partition_find_for_nc(struct dreplsrv_service *s, || strequal(p->nc.dn, nc_dn_str) || (valid_sid && dom_sid_equal(&p->nc.sid, nc_sid))) { + /* fill in he right guid and sid if possible */ + if (nc_guid && !valid_guid) { + dsdb_get_extended_dn_guid(p->dn, nc_guid, "GUID"); + } + if (nc_sid && !valid_sid) { + dsdb_get_extended_dn_sid(p->dn, nc_sid, "SID"); + } *_p = p; return WERR_OK; } -- cgit