s4-dsdb Reorganise and clarify the LSA objectClass check (forbidden on LDAP)
authorAndrew Bartlett <abartlet@samba.org>
Thu, 25 Nov 2010 23:11:30 +0000 (10:11 +1100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 26 Nov 2010 12:10:00 +0000 (13:10 +0100)
commit7048ad11f518b88897a73fb5e0a46520b703a7d6
tree730271cc221f395edc75b90487801c295824c2ee
parent439a2d69831aea4a737e5e0e35226a551b11ad29
s4-dsdb Reorganise and clarify the LSA objectClass check (forbidden on LDAP)

This arranged the check to avoid talloc_strdup() (the schema pointers
are constant, and can be relied upon), and checks the untrusted bit
first (it is faster), before the ldb_attr_cmp().

The strcmp() here was valid, if unusual, because the ldapDisplayName
values are already in the correct case, but strcasecmp() is more
correct, as for the small extra cost, we avoid a difficult to diagnose
bug later.

Andrew Bartlett

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
source4/dsdb/samdb/ldb_modules/objectclass.c