[PATCH] util_tdb: mark tdb_pack() and friends as deprecated

David Disseldorp ddiss at samba.org
Tue Mar 24 09:11:05 MDT 2015


Following a discussion[1] with Volker, add a note to the tdb_unpack()
and tdb_pack[_append]() prototypes describing them as deprecated.

1. https://lists.samba.org/archive/samba-technical/2015-March/106548.html

Signed-off-by: David Disseldorp <ddiss at samba.org>
---
 source3/include/util_tdb.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source3/include/util_tdb.h b/source3/include/util_tdb.h
index 13bdeab..80a8cac 100644
--- a/source3/include/util_tdb.h
+++ b/source3/include/util_tdb.h
@@ -32,6 +32,10 @@ int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf,
 		    int flag);
 int tdb_trans_delete(struct tdb_context *tdb, TDB_DATA key);
 
+/*
+ * The tdb_unpack() and tdb_pack[_append]() helpers are deprecated. Consider
+ * using idl/ndr for marshalling of complex data types instead.
+ */
 int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...);
 size_t tdb_pack(uint8 *buf, int bufsize, const char *fmt, ...);
 bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
-- 
2.1.4



More information about the samba-technical mailing list