diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-17 03:58:26 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-19 03:34:01 +0300 |
commit | ca809186137e259060032ef61d9d3e93cddad298 (patch) | |
tree | 6af2255ab3de7c5a0d36e10f58f7c02c7cec352d /source4/dsdb/samdb/ldb_modules | |
parent | b7d1586ccd05a78a4fae512c54fa39dda408e08b (diff) | |
download | samba-ca809186137e259060032ef61d9d3e93cddad298.tar.gz samba-ca809186137e259060032ef61d9d3e93cddad298.tar.bz2 samba-ca809186137e259060032ef61d9d3e93cddad298.zip |
s4-dsdb: Use dsdb_syntax_ctx in *_validate_ldb functions
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c index 070d8585ae..3c22eed7f8 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c @@ -79,6 +79,7 @@ static int attr_handler(struct oc_context *ac) unsigned int i; int ret; WERROR werr; + struct dsdb_syntax_ctx syntax_ctx; ldb = ldb_module_get_ctx(ac->module); @@ -91,6 +92,9 @@ static int attr_handler(struct oc_context *ac) return ldb_oom(ldb); } + /* initialize syntax checking context */ + dsdb_syntax_ctx_init(&syntax_ctx, ldb, ac->schema); + /* Check if attributes exist in the schema, if the values match, * if they're not operational and fix the names to the match the schema * case */ @@ -114,7 +118,7 @@ static int attr_handler(struct oc_context *ac) } if (!(msg->elements[i].flags & LDB_FLAG_INTERNAL_DISABLE_VALIDATION)) { - werr = attr->syntax->validate_ldb(ldb, ac->schema, attr, + werr = attr->syntax->validate_ldb(&syntax_ctx, attr, &msg->elements[i]); if (!W_ERROR_IS_OK(werr)) { ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' contains at least one invalid value!", |