summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-08-05 11:28:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-09 11:56:23 +0200
commit8ce8107a5bcd821585138fd6e7c690547b783bbf (patch)
treeb0b85ef921e58a30c664cc23e4ba696003a17ee0
parentd994ef20567c1368f6bdea163d12ed3837f79a03 (diff)
downloadsamba-8ce8107a5bcd821585138fd6e7c690547b783bbf.tar.gz
samba-8ce8107a5bcd821585138fd6e7c690547b783bbf.tar.bz2
samba-8ce8107a5bcd821585138fd6e7c690547b783bbf.zip
s4-dsdb: use dn_format shortcut to find DN format
this saves some string comparisons
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn_out.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn_store.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 3333a37644..0f37bbebd4 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -76,7 +76,7 @@ static int extended_dn_out_dereference_setup_control(struct ldb_context *ldb, st
}
for (cur = schema->attributes; cur; cur = cur->next) {
- if (dsdb_dn_oid_to_format(cur->syntax->ldap_oid) != DSDB_NORMAL_DN) {
+ if (cur->dn_format != DSDB_NORMAL_DN) {
continue;
}
dereference_control->dereference
@@ -508,7 +508,7 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
}
/* Look to see if this attributeSyntax is a DN */
- if (dsdb_dn_oid_to_format(attribute->syntax->ldap_oid) == DSDB_INVALID_DN) {
+ if (attribute->dn_format == DSDB_INVALID_DN) {
continue;
}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
index c4235201d9..57dc88330d 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
@@ -325,7 +325,7 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req)
}
/* We only setup an extended DN GUID on DN elements */
- if (dsdb_dn_oid_to_format(schema_attr->syntax->ldap_oid) == DSDB_INVALID_DN) {
+ if (schema_attr->dn_format == DSDB_INVALID_DN) {
continue;
}
@@ -400,7 +400,7 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req
}
/* We only setup an extended DN GUID on these particular DN objects */
- if (dsdb_dn_oid_to_format(schema_attr->syntax->ldap_oid) == DSDB_INVALID_DN) {
+ if (schema_attr->dn_format == DSDB_INVALID_DN) {
continue;
}