summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-05-08 10:19:14 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-05-10 23:45:20 +0300
commit1f3faea0463782d16bdbfd34b3b51624aca2bc90 (patch)
tree39e3aa332ee0643b79965c0d05ee3a1832f8b94e /source4/lib
parent7cf1a2986fcc1654f254f22edf29bcde1e393c1d (diff)
downloadsamba-1f3faea0463782d16bdbfd34b3b51624aca2bc90.tar.gz
samba-1f3faea0463782d16bdbfd34b3b51624aca2bc90.tar.bz2
samba-1f3faea0463782d16bdbfd34b3b51624aca2bc90.zip
s4/dn: handle case 'base' dn has no components
This could if the 'base' dn is special for example.
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index d91e9d9fa9..00646f6ba5 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -1065,7 +1065,7 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn)
return (dn->comp_num - base->comp_num);
}
- if (dn->comp_num == 0) {
+ if ((dn->comp_num == 0) || (base->comp_num == 0)) {
if (dn->special && base->special) {
return strcmp(base->linearized, dn->linearized);
} else if (dn->special) {