diff options
author | Simo Sorce <idra@samba.org> | 2008-10-30 08:28:07 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-10-30 08:28:07 -0400 |
commit | 9da4c3f8309c8a89311493b014db6eba0b2fa827 (patch) | |
tree | fa56b4e151e9e95860fb3de944068e2cb79ce884 | |
parent | b1b58a1dcff56665714d7b20c58ab166e26fd512 (diff) | |
download | samba-9da4c3f8309c8a89311493b014db6eba0b2fa827.tar.gz samba-9da4c3f8309c8a89311493b014db6eba0b2fa827.tar.bz2 samba-9da4c3f8309c8a89311493b014db6eba0b2fa827.zip |
Revert "Length comparison of the linearized version is not correct."
This reverts commit 753af36a3e194f645ec0b68a033199035e71c909.
-rw-r--r-- | source4/lib/ldb/common/ldb_dn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index 5e6fb96457..e36aea4e69 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -749,6 +749,9 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn) if (base->linearized && dn->linearized) { /* try with a normal compare first, if we are lucky * we will avoid exploding and casfolding */ + int dif; + dif = strlen(dn->linearized) - strlen(base->linearized); + if (dif < 0) return dif; if (strcmp(base->linearized, &dn->linearized[dif]) == 0) return 0; } |