diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-06-05 20:44:17 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-06-11 09:50:05 +0200 |
commit | 5263f0a626dac3ac1fc48ece2324438279f187f0 (patch) | |
tree | 8841d28c8ec6b104da10db06c76bc1dedbf2dd09 /source4 | |
parent | 424a990e34278fae4888b00affb530ed1fbcb354 (diff) | |
download | samba-5263f0a626dac3ac1fc48ece2324438279f187f0.tar.gz samba-5263f0a626dac3ac1fc48ece2324438279f187f0.tar.xz samba-5263f0a626dac3ac1fc48ece2324438279f187f0.zip |
Revert "s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sort"
This reverts commit d799b25dd3ed0f72ee03949225ba241c5538d7d6.
Sometimes the schema just isn't right. A segfault is not the correct
answer in those cases.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 98e60d7a8b..24dcc6f04d 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -663,6 +663,13 @@ static int replmd_ldb_message_element_attid_sort(const struct ldb_message_elemen a1 = dsdb_attribute_by_lDAPDisplayName(schema, e1->name); a2 = dsdb_attribute_by_lDAPDisplayName(schema, e2->name); + /* + * TODO: remove this check, we should rely on e1 and e2 having valid attribute names + * in the schema + */ + if (!a1 || !a2) { + return strcasecmp(e1->name, e2->name); + } if (a1->attributeID_id == a2->attributeID_id) { return 0; } |