From 56f04188df598767901ab918e2be1f23a922c531 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Aug 2010 20:15:28 +1000 Subject: s4-ldb: ensure element flags are zero in ldb search return the distinguishedName element was getting an uninitialised flags value --- source4/lib/ldb/ldb_tdb/ldb_search.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4') diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 08ccc7933d..9ebec90233 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -78,6 +78,7 @@ static int msg_add_element(struct ldb_message *ret, } elnew->num_values = el->num_values; + elnew->flags = el->flags; ret->num_elements++; @@ -97,6 +98,7 @@ static int msg_add_distinguished_name(struct ldb_message *msg) el.name = "distinguishedName"; el.num_values = 1; el.values = &val; + el.flags = 0; val.data = (uint8_t *)ldb_dn_alloc_linearized(msg, msg->dn); val.length = strlen((char *)val.data); -- cgit