svn commit: samba r20188 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
metze at samba.org
metze at samba.org
Fri Dec 15 18:56:56 GMT 2006
Author: metze
Date: 2006-12-15 18:56:56 +0000 (Fri, 15 Dec 2006)
New Revision: 20188
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20188
Log:
move back to an default attribute handler and not use the '*' attribute
to not conflict with the one that maybe added via the @ATTRIBUTES object
this is just to make the test-tdb-feature.sh torture test happy
There's still a bug when a attribute is registered multiple time
without removing old ldb_schema_attribute instances. But this bug
was there before my changes too and was just triggered by my changes
metze
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c 2006-12-15 17:54:47 UTC (rev 20187)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c 2006-12-15 18:56:56 UTC (rev 20188)
@@ -86,6 +86,20 @@
return 0;
}
+static const struct ldb_schema_syntax ldb_syntax_default = {
+ .name = LDB_SYNTAX_OCTET_STRING,
+ .ldif_read_fn = ldb_handler_copy,
+ .ldif_write_fn = ldb_handler_copy,
+ .canonicalise_fn = ldb_handler_copy,
+ .comparison_fn = ldb_comparison_binary
+};
+
+static const struct ldb_schema_attribute ldb_attribute_default = {
+ .name = NULL,
+ .flags = 0,
+ .syntax = &ldb_syntax_default
+};
+
/*
return the attribute handlers for a given attribute
*/
@@ -93,7 +107,7 @@
const char *name)
{
int i, e, b = 0, r;
- const struct ldb_schema_attribute *def = NULL;
+ const struct ldb_schema_attribute *def = &ldb_attribute_default;
/* as handlers are sorted, '*' must be the first if present */
if (strcmp(ldb->schema.attributes[0].name, "*") == 0) {
@@ -171,7 +185,6 @@
const char *attr;
const char *syntax;
} wellknown[] = {
- { "*", LDB_SYNTAX_OCTET_STRING },
{ "dn", LDB_SYNTAX_DN },
{ "distinguishedName", LDB_SYNTAX_DN },
{ "cn", LDB_SYNTAX_DIRECTORY_STRING },
More information about the samba-cvs
mailing list