}
if (mod_msg->num_elements > 0) {
/*
- * Do the replace with the constructed message,
- * to avoid needing a lock between this search
- * and the replace
+ * Do the replace with the difference, as we
+ * are under the read lock and we wish to do a
+ * delete of any removed/renamed attributes
*/
- ret = dsdb_replace(ldb, msg, 0);
+ ret = dsdb_modify(ldb, mod_msg, 0);
}
talloc_free(mod_msg);
}
* @SAMBA_FEATURES_SUPPORTED
*/
} else if (mod_msg->num_elements > 0) {
+
/*
- * Do the replace with the constructed message,
- * to avoid needing a lock between this search
- * and the replace
+ * Do the replace with the difference, as we
+ * are under the read lock and we wish to do a
+ * delete of any removed/renamed attributes
*/
- ret = dsdb_replace(ldb, msg_idx, 0);
+ ret = dsdb_modify(ldb, mod_msg, 0);
}
talloc_free(mod_msg);
}