Fix sequence number generation against OpenLDAP
[kai/samba.git] / source4 / dsdb / samdb / ldb_modules / partition.c
index 2a321e29c50d0c713117cc6aab8e5554b839c6da..5500c75a928e5fb7179be747f131f4d06d4944ed 100644 (file)
@@ -895,6 +895,14 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
                                return ret;
                        }
 
+                       ret = ldb_request_add_control(treq,
+                                                     DSDB_CONTROL_CURRENT_PARTITION_OID,
+                                                     false, data->partitions[i]);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
+                       }
+
                        ret = partition_request(data->partitions[i]->module, treq);
                        if (ret != LDB_SUCCESS) {
                                talloc_free(res);