/* 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)
{
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) {
return -1;
}
+ if (!msg->dn) {
+ msg->dn = ldb_dn_new(msg, ldb,
+ (char *)key.dptr + 3);
+ if (msg->dn == NULL) {
+ talloc_free(msg);
+ return -1;
+ }
+ }
+
/* see if it matches the given expression */
if (!ldb_match_msg(ldb, msg,
ac->tree, ac->base, ac->scope)) {