summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/dbwrap/dbwrap.c12
-rw-r--r--source3/lib/dbwrap/dbwrap.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index 9ec7a3e59a..5908e1ecb0 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -173,3 +173,15 @@ NTSTATUS dbwrap_traverse_read(struct db_context *db,
return NT_STATUS_OK;
}
+
+int dbwrap_parse_record(struct db_context *db, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data)
+{
+ if (db->parse_record) {
+ return db->parse_record(db, key, parser, private_data);
+ } else {
+ return dbwrap_fallback_parse_record(db, key, parser, private_data);
+ }
+}
diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h
index 9ff47c4285..0672de1f50 100644
--- a/source3/lib/dbwrap/dbwrap.h
+++ b/source3/lib/dbwrap/dbwrap.h
@@ -73,6 +73,10 @@ NTSTATUS dbwrap_traverse_read(struct db_context *db,
int (*f)(struct db_record*, void*),
void *private_data,
int *count);
+int dbwrap_parse_record(struct db_context *db, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data);
/* The following definitions come from lib/dbwrap_util.c */