summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-22 09:50:57 +1000
committerAndrew Tridgell <tridge@samba.org>2011-09-22 10:00:49 +1000
commit8c3d77d84c9627c9ed4e1164d4844f83345fdbd6 (patch)
tree9035c7e3512e56bfafdcf78783c55fdc9f7618d5 /source4/dsdb/repl
parent783ff68628fee6d5681b3a9abd80b74a78588926 (diff)
downloadsamba-8c3d77d84c9627c9ed4e1164d4844f83345fdbd6.tar.gz
samba-8c3d77d84c9627c9ed4e1164d4844f83345fdbd6.tar.bz2
samba-8c3d77d84c9627c9ed4e1164d4844f83345fdbd6.zip
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
Diffstat (limited to 'source4/dsdb/repl')
-rw-r--r--source4/dsdb/repl/drepl_partitions.c11
1 files changed, 9 insertions, 2 deletions
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;
}