The branch, master has been updated
       via  18f3e51... s4:dsdb Allow renames with (now removed) linked 
attributes
      from  0687a0c... s4:selftest Change domain name for functional level 2000 
DC

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 18f3e5113ae18e120770ba93b0d36a7b176b0c52
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jun 16 12:01:10 2010 +1000

    s4:dsdb Allow renames with (now removed) linked attributes
    
    It is important to allow the rename, even if we just have one-way
    links, as this happens on deleted objects, which have the backlinks
    alredy removed by repl_meta_data.
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c 
b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index d2a435e..c21fda5 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -641,9 +641,17 @@ static int linked_attributes_fix_links(struct ldb_module 
*module,
                }
                msg = res->msgs[0];
 
-               if (msg->num_elements != 1 ||
-                   ldb_attr_cmp(msg->elements[0].name, 
target->lDAPDisplayName) != 0) {
-                       ldb_set_errstring(ldb, "Bad msg elements in 
linked_attributes_fix_links");
+               if (msg->num_elements == 0) {
+                       /* Forward link without backlink remaining - nothing to 
do here */
+                       continue;
+               } else if (msg->num_elements != 1) {
+                       ldb_asprintf_errstring(ldb, "Bad msg elements - got %u 
elements, expected one element to be returned in linked_attributes_fix_links 
for %s", 
+                                              msg->num_elements, 
ldb_dn_get_linearized(msg->dn));
+                       talloc_free(tmp_ctx);
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
+               if (ldb_attr_cmp(msg->elements[0].name, 
target->lDAPDisplayName) != 0) {
+                       ldb_asprintf_errstring(ldb, "Bad returned attribute in 
linked_attributes_fix_links: got %s, expected %s for %s", 
msg->elements[0].name, target->lDAPDisplayName, ldb_dn_get_linearized(msg->dn));
                        talloc_free(tmp_ctx);
                        return LDB_ERR_OPERATIONS_ERROR;
                }


-- 
Samba Shared Repository

Reply via email to