diff options
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema.h | 9 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_inferiors.c | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h index 289fd4276c..13cc31ca87 100644 --- a/source4/dsdb/schema/schema.h +++ b/source4/dsdb/schema/schema.h @@ -24,6 +24,14 @@ #include "prefixmap.h" +enum dsdb_dn_format { + DSDB_NORMAL_DN, + DSDB_BINARY_DN, + DSDB_STRING_DN, + DSDB_INVALID_DN +}; + + struct dsdb_attribute; struct dsdb_class; struct dsdb_schema; @@ -108,6 +116,7 @@ struct dsdb_attribute { bool systemOnly; bool one_way_link; + enum dsdb_dn_format dn_format; /* internal stuff */ const struct dsdb_syntax *syntax; 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; } |