summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_dn.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-06-01 12:58:48 +1000
committerAndrew Tridgell <tridge@samba.org>2009-06-01 12:58:48 +1000
commit7f16c29f1001b98fd1bdc66978a2c16f8e18d19d (patch)
tree68e0cb0d05deb5e6f71e2cb628227456a2c5ef19 /source4/lib/ldb/common/ldb_dn.c
parentba95882155db4f8c10725f47f70ae482d5343f9a (diff)
downloadsamba-7f16c29f1001b98fd1bdc66978a2c16f8e18d19d.tar.gz
samba-7f16c29f1001b98fd1bdc66978a2c16f8e18d19d.tar.bz2
samba-7f16c29f1001b98fd1bdc66978a2c16f8e18d19d.zip
when comp_num is zero, the case folded DN is always ""
This fixes a bug where we would look at an uninitialised dn->linearized
Diffstat (limited to 'source4/lib/ldb/common/ldb_dn.c')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 402d629501..6f462ddd82 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 */