summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-01 06:21:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:01 -0500
commita06d66a3a669c3a0a0f816438e2b3e91e208f398 (patch)
tree0a80e63dad3f00cd584263e56df6f751b46de58e /source4/lib/ldb/common/ldb.c
parent8ab3f59a10d00357cb129a2051fd0f694b5c8081 (diff)
downloadsamba-a06d66a3a669c3a0a0f816438e2b3e91e208f398.tar.gz
samba-a06d66a3a669c3a0a0f816438e2b3e91e208f398.tar.bz2
samba-a06d66a3a669c3a0a0f816438e2b3e91e208f398.zip
r8037: a fairly major update to the internals of ldb. Changes are:
- moved the knowledge of attribute types out of ldb_tdb and into the generic ldb code. This allows the ldb_match() message match logic to be generic, so it can be used by other backend - added the generic ability to load attribute handlers, for canonicalisation, compare, ldif read and ldif write. In the future this will be used by the schema module to allow us to correctly obey the attributetype schema elements - added attribute handlers for some of the core ldap attribute types, Integer, DirectoryString, DN, ObjectClass etc - added automatic registration of attribute handlers for well-known attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass' - converted the objectSid special handlers for Samba to the new system - added more correct handling of indexing in tdb backend based on the attribute canonicalisation function - added generic support for subclasses, moving it out of the tdb backend. This will be used in future by the schema module - fixed several bugs in the dn_explode code. It still needs more work, but doesn't corrupt ldb dbs any more. (This used to be commit 944c5844ab441b96d8e5d7b2d151982139d1fab9)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 63526dfe2e..aa5b58c252 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -43,6 +43,14 @@
struct ldb_context *ldb_init(void *mem_ctx)
{
struct ldb_context *ldb = talloc_zero(mem_ctx, struct ldb_context);
+ int ret;
+
+ ret = ldb_setup_wellknown_attributes(ldb);
+ if (ret != 0) {
+ talloc_free(ldb);
+ return NULL;
+ }
+
return ldb;
}