summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/dbwrap/dbwrap.c')
-rw-r--r--source3/lib/dbwrap/dbwrap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index 614251c06f..c2d28b3a0e 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -126,3 +126,21 @@ NTSTATUS dbwrap_traverse(struct db_context *db,
return NT_STATUS_OK;
}
+
+NTSTATUS dbwrap_traverse_read(struct db_context *db,
+ int (*f)(struct db_record*, void*),
+ void *private_data,
+ int *count)
+{
+ int ret = db->traverse_read(db, f, private_data);
+
+ if (ret < 0) {
+ return NT_STATUS_INTERNAL_DB_CORRUPTION;
+ }
+
+ if (count != NULL) {
+ *count = ret;
+ }
+
+ return NT_STATUS_OK;
+}