summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r--source3/lib/dbwrap/dbwrap.c15
-rw-r--r--source3/lib/dbwrap/dbwrap.h4
2 files changed, 19 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index 361c786880..75d38b5920 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -98,6 +98,21 @@ int dbwrap_fallback_wipe(struct db_context *db)
* Wrapper functions for the backend methods
*/
+TDB_DATA dbwrap_record_get_key(const struct db_record *rec)
+{
+ return rec->key;
+}
+
+TDB_DATA dbwrap_record_get_value(const struct db_record *rec)
+{
+ return rec->value;
+}
+
+void *dbwrap_record_get_private_data(const struct db_record *rec)
+{
+ return rec->private_data;
+}
+
TDB_DATA dbwrap_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
TDB_DATA key)
{
diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h
index 5120210399..cf2a41f309 100644
--- a/source3/lib/dbwrap/dbwrap.h
+++ b/source3/lib/dbwrap/dbwrap.h
@@ -60,6 +60,10 @@ struct db_context {
/* The following definitions come from lib/dbwrap.c */
+TDB_DATA dbwrap_record_get_key(const struct db_record *rec);
+TDB_DATA dbwrap_record_get_value(const struct db_record *rec);
+void *dbwrap_record_get_private_data(const struct db_record *rec);
+
NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key);
NTSTATUS dbwrap_store(struct db_context *db, TDB_DATA key,
TDB_DATA data, int flags);