summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_pack.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_pack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_pack.c b/source4/lib/ldb/ldb_tdb/ldb_pack.c
index 7fe61c020a..e7aeb47e72 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_pack.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_pack.c
@@ -36,6 +36,9 @@
/* change this if the data format ever changes */
#define LTDB_PACKING_FORMAT 0x26011967
+/* old packing formats */
+#define LTDB_PACKING_FORMAT_NODN 0x26011966
+
/* use a portable integer format */
static void put_uint32(uint8_t *p, int ofs, unsigned int val)
{
@@ -180,6 +183,10 @@ int ltdb_unpack_data(struct ldb_module *module,
remaining = data->dsize - 8;
switch (format) {
+ case LTDB_PACKING_FORMAT_NODN:
+ message->dn = NULL;
+ break;
+
case LTDB_PACKING_FORMAT:
len = strnlen((char *)p, remaining);
if (len == remaining) {