s4-dsdb: Do not assume that all deleted objects have an objectCategory and sAMAccountType
authorAndrew Bartlett <abartlet@samba.org>
Fri, 30 Sep 2011 21:33:38 +0000 (14:33 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Oct 2011 01:43:13 +0000 (03:43 +0200)
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct  6 03:43:13 CEST 2011 on sn-devel-104

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index fa951b57d118f78d495ebe3a0c12e6287de2665b..fff542abca108f65c39a05f102b711a2b653896f 100644 (file)
@@ -2931,14 +2931,14 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
                }
                msg->elements[el_count++].flags = LDB_FLAG_MOD_ADD;
 
                }
                msg->elements[el_count++].flags = LDB_FLAG_MOD_ADD;
 
-               ret = ldb_msg_add_empty(msg, "objectCategory", LDB_FLAG_MOD_DELETE, NULL);
+               ret = ldb_msg_add_empty(msg, "objectCategory", LDB_FLAG_MOD_REPLACE, NULL);
                if (ret != LDB_SUCCESS) {
                        talloc_free(tmp_ctx);
                        ldb_module_oom(module);
                        return ret;
                }
 
                if (ret != LDB_SUCCESS) {
                        talloc_free(tmp_ctx);
                        ldb_module_oom(module);
                        return ret;
                }
 
-               ret = ldb_msg_add_empty(msg, "sAMAccountType", LDB_FLAG_MOD_DELETE, NULL);
+               ret = ldb_msg_add_empty(msg, "sAMAccountType", LDB_FLAG_MOD_REPLACE, NULL);
                if (ret != LDB_SUCCESS) {
                        talloc_free(tmp_ctx);
                        ldb_module_oom(module);
                if (ret != LDB_SUCCESS) {
                        talloc_free(tmp_ctx);
                        ldb_module_oom(module);