summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/dbwrap_util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 0bafbe6858..550e5c482b 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -195,3 +195,18 @@ int dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
}
return -1;
}
+
+int dbwrap_trans_store_int32(struct db_context *db, const char *keystr, int32_t v)
+{
+ int ret;
+ int32 v_store;
+
+ SIVAL(&v_store, 0, v);
+
+ ret = dbwrap_trans_store(db, string_term_tdb_data(keystr),
+ make_tdb_data((const uint8 *)&v_store,
+ sizeof(v_store)),
+ TDB_REPLACE);
+
+ return ret;
+}