From 7f16c29f1001b98fd1bdc66978a2c16f8e18d19d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Jun 2009 12:58:48 +1000 Subject: when comp_num is zero, the case folded DN is always "" This fixes a bug where we would look at an uninitialised dn->linearized --- source4/lib/ldb/common/ldb_dn.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index 402d6295015..6f462ddd826 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -846,14 +846,8 @@ const char *ldb_dn_get_casefold(struct ldb_dn *dn) } if (dn->comp_num == 0) { - if (dn->linearized && dn->linearized[0] == '\0') { - /* hmm a NULL dn, should we faild casefolding ? */ - dn->casefold = talloc_strdup(dn, ""); - return dn->casefold; - } - /* A DN must be NULL, special, or have components */ - dn->invalid = true; - return NULL; + dn->casefold = talloc_strdup(dn, ""); + return dn->casefold; } /* calculate maximum possible length of DN */ -- cgit