s4-dsdb: when replacing linked attribute take always the new dn as the old dn might...
authorMatthieu Patou <mat@matws.net>
Sun, 3 Jul 2011 18:21:29 +0000 (22:21 +0400)
committerAndrew Tridgell <tridge@samba.org>
Mon, 11 Jul 2011 04:32:44 +0000 (14:32 +1000)
The usual use case is that you have a not complete linked attribute (ie.
without the SID) if we keep using the old dn, then the SID will never be
added.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index 236326096367e6341aa0b761d84a9098ec23d167..f201ce3b89447eedba11903ef85e1f7680e00dbe 100644 (file)
@@ -2024,7 +2024,7 @@ static int replmd_modify_la_replace(struct ldb_module *module,
                    (old_p = parsed_dn_find(old_dns,
                                            old_num_values, p->guid, NULL)) != NULL) {
                        /* update in place */
-                       ret = replmd_update_la_val(old_el->values, old_p->v, old_p->dsdb_dn,
+                       ret = replmd_update_la_val(old_el->values, old_p->v, p->dsdb_dn,
                                                   old_p->dsdb_dn, invocation_id,
                                                   seq_num, seq_num, now, 0, false);
                        if (ret != LDB_SUCCESS) {