diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-12-15 13:08:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:29:19 -0500 |
commit | b97b8f5dcbce006f005e53ca79df3330e62f117b (patch) | |
tree | b4e3b2e41a8c0c3d76f8965748b0322b68ad0320 /source/lib/ldb/modules/operational.c | |
parent | 1f67433914bfab83bf1950263809c9e152ad6dcc (diff) | |
download | samba-b97b8f5dcbce006f005e53ca79df3330e62f117b.tar.gz |
r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.
the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.
ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name
we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.
metze
Diffstat (limited to 'source/lib/ldb/modules/operational.c')
-rw-r--r-- | source/lib/ldb/modules/operational.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/lib/ldb/modules/operational.c b/source/lib/ldb/modules/operational.c index c327a96f90b..764ce76294e 100644 --- a/source/lib/ldb/modules/operational.c +++ b/source/lib/ldb/modules/operational.c @@ -291,11 +291,17 @@ static int operational_search(struct ldb_module *module, struct ldb_request *req static int operational_init(struct ldb_module *ctx) { + int ret = 0; + /* setup some standard attribute handlers */ - ldb_set_attrib_handler_syntax(ctx->ldb, "whenCreated", LDB_SYNTAX_UTC_TIME); - ldb_set_attrib_handler_syntax(ctx->ldb, "whenChanged", LDB_SYNTAX_UTC_TIME); - ldb_set_attrib_handler_syntax(ctx->ldb, "subschemaSubentry", LDB_SYNTAX_DN); - ldb_set_attrib_handler_syntax(ctx->ldb, "structuralObjectClass", LDB_SYNTAX_OBJECTCLASS); + ret |= ldb_schema_attribute_add(ctx->ldb, "whenCreated", 0, LDB_SYNTAX_UTC_TIME); + ret |= ldb_schema_attribute_add(ctx->ldb, "whenChanged", 0, LDB_SYNTAX_UTC_TIME); + ret |= ldb_schema_attribute_add(ctx->ldb, "subschemaSubentry", 0, LDB_SYNTAX_DN); + ret |= ldb_schema_attribute_add(ctx->ldb, "structuralObjectClass", 0, LDB_SYNTAX_OBJECTCLASS); + + if (ret != 0) { + return ret; + } return ldb_next_init(ctx); } |