diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-01 17:47:34 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-08-04 16:17:25 +1000 |
commit | d4a1f6a42b06a5d63a789cad438cfde693df24a7 (patch) | |
tree | 2d9cd75e891e0e038097d20ef535b3ca6970be97 /source4/dsdb/schema/schema_inferiors.c | |
parent | d669e83857600ec59afc5b11c0286f28fceb0d0a (diff) | |
download | samba-d4a1f6a42b06a5d63a789cad438cfde693df24a7.tar.gz samba-d4a1f6a42b06a5d63a789cad438cfde693df24a7.tar.bz2 samba-d4a1f6a42b06a5d63a789cad438cfde693df24a7.zip |
s4-dsdb: added dn_format attribute of a dsdb_attribute
this is faster than string comparisons during searches at runtime
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'source4/dsdb/schema/schema_inferiors.c')
-rw-r--r-- | source4/dsdb/schema/schema_inferiors.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema_inferiors.c b/source4/dsdb/schema/schema_inferiors.c index 7b80c20a60..fe456412d1 100644 --- a/source4/dsdb/schema/schema_inferiors.c +++ b/source4/dsdb/schema/schema_inferiors.c @@ -354,9 +354,11 @@ int schema_fill_constructed(const struct dsdb_schema *schema) schema_class->posssuperiors = NULL; } - /* setup fast access to one_way_link */ + /* setup fast access to one_way_link and DN format */ for (attribute=schema->attributes; attribute; attribute=attribute->next) { - if (dsdb_dn_oid_to_format(attribute->syntax->ldap_oid) == DSDB_INVALID_DN) { + attribute->dn_format = dsdb_dn_oid_to_format(attribute->syntax->ldap_oid); + + if (attribute->dn_format == DSDB_INVALID_DN) { attribute->one_way_link = false; continue; } @@ -381,5 +383,6 @@ int schema_fill_constructed(const struct dsdb_schema *schema) attribute->one_way_link = false; } + return LDB_SUCCESS; } |