summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_rbt.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-15 14:57:01 +0100
committerVolker Lendecke <vl@samba.org>2012-04-20 13:42:40 +0200
commit0f20ffbcbd41895dd073051539411f7194ae8224 (patch)
tree15494f3657fbbcb12ea60df0ed9255a0bb7e8fd6 /source3/lib/dbwrap/dbwrap_rbt.c
parente3de5e4fb6703976d7592b4dd8a52495a7deb951 (diff)
downloadsamba-0f20ffbcbd41895dd073051539411f7194ae8224.tar.gz
samba-0f20ffbcbd41895dd073051539411f7194ae8224.tar.bz2
samba-0f20ffbcbd41895dd073051539411f7194ae8224.zip
s3-dbwrap: Add dbwrap_db_id
This returns a blob uniquely identifying the database
Diffstat (limited to 'source3/lib/dbwrap/dbwrap_rbt.c')
-rw-r--r--source3/lib/dbwrap/dbwrap_rbt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap_rbt.c b/source3/lib/dbwrap/dbwrap_rbt.c
index 95cd3e82e8..453efca799 100644
--- a/source3/lib/dbwrap/dbwrap_rbt.c
+++ b/source3/lib/dbwrap/dbwrap_rbt.c
@@ -408,6 +408,12 @@ static int db_rbt_trans_dummy(struct db_context *db)
return 0;
}
+static void db_rbt_id(struct db_context *db, const uint8_t **id, size_t *idlen)
+{
+ *id = (uint8_t *)db;
+ *idlen = sizeof(db);
+}
+
struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
{
struct db_context *result;
@@ -437,6 +443,7 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
result->wipe = db_rbt_wipe;
result->parse_record = db_rbt_parse_record;
result->lock_order = 0;
+ result->id = db_rbt_id;
return result;
}