mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
r4781: the tolower() in schema.c is a premature optimisation. I suspect the
"distinguishedName" checking in that module is incorrect and should be removed, but meanwhile, lets not make it slow down the compile of every other module.
This commit is contained in:
parent
e22bfa8ae2
commit
6534ce650b
@ -53,10 +53,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#ifdef HAVE_CTYPE_H
|
|
||||||
#include <ctype.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "ldb/include/ldb.h"
|
#include "ldb/include/ldb.h"
|
||||||
#include "ldb/include/ldb_private.h"
|
#include "ldb/include/ldb_private.h"
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
struct attribute_syntax {
|
struct attribute_syntax {
|
||||||
const char *name;
|
const char *name;
|
||||||
@ -103,15 +104,13 @@ static int schema_attr_cmp(const char *attr1, const char *attr2)
|
|||||||
|
|
||||||
ret = ldb_attr_cmp(attr1, attr2);
|
ret = ldb_attr_cmp(attr1, attr2);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
if (tolower(*attr1) == 'd' && tolower(*attr2) == 'd') {
|
if ((ldb_attr_cmp("dn", attr1) == 0) &&
|
||||||
if ((ldb_attr_cmp("dn", attr1) == 0) &&
|
(ldb_attr_cmp("distinguishedName", attr2) == 0)) {
|
||||||
(ldb_attr_cmp("distinguishedName", attr2) == 0)) {
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
if ((ldb_attr_cmp("dn", attr2) == 0) &&
|
||||||
if ((ldb_attr_cmp("dn", attr2) == 0) &&
|
(ldb_attr_cmp("distinguishedName", attr1) == 0)) {
|
||||||
(ldb_attr_cmp("distinguishedName", attr1) == 0)) {
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user