svn commit: samba r9451 - in
branches/SAMBA_4_0/source/lib/ldb/tools: .
idra at samba.org
idra at samba.org
Sun Aug 21 17:20:35 GMT 2005
Author: idra
Date: 2005-08-21 17:20:34 +0000 (Sun, 21 Aug 2005)
New Revision: 9451
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9451
Log:
some fixes now core.schema and cosine.schema are also read properly
Modified:
branches/SAMBA_4_0/source/lib/ldb/tools/oLschema2ldif.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/oLschema2ldif.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/oLschema2ldif.c 2005-08-21 17:19:14 UTC (rev 9450)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/oLschema2ldif.c 2005-08-21 17:20:34 UTC (rev 9451)
@@ -53,9 +53,10 @@
#define SCHEMA_MAY 7
#define SCHEMA_SINGLE_VALUE 8
#define SCHEMA_EQUALITY 9
-#define SCHEMA_SUBSTR 10
-#define SCHEMA_SYNTAX 11
-#define SCHEMA_DESC 12
+#define SCHEMA_ORDERING 10
+#define SCHEMA_SUBSTR 11
+#define SCHEMA_SYNTAX 12
+#define SCHEMA_DESC 13
struct schema_conv {
@@ -181,7 +182,15 @@
talloc_free(type);
token->type = SCHEMA_SUP;
- token->value = get_def_value(ctx, &c);
+ if (*c == '(') {
+ c++;
+ n = strcspn(c, ")");
+ token->value = talloc_strndup(ctx, c, n);
+ c += n;
+ c++;
+ } else {
+ token->value = get_def_value(ctx, &c);
+ }
c = skip_spaces(c);
*string = c;
@@ -265,6 +274,17 @@
return token;
}
+ if (strcasecmp("ORDERING", type) == 0) {
+ talloc_free(type);
+ token->type = SCHEMA_ORDERING;
+
+ token->value = get_def_value(ctx, &c);
+
+ c = skip_spaces(c);
+ *string = c;
+ return token;
+ }
+
if (strcasecmp("SUBSTR", type) == 0) {
talloc_free(type);
token->type = SCHEMA_SUBSTR;
@@ -381,7 +401,7 @@
break;
case SCHEMA_SUP:
- MSG_ADD_STRING("subClassOf", token->value);
+ MSG_ADD_M_STRING("subClassOf", token->value);
break;
case SCHEMA_STRUCTURAL:
@@ -412,6 +432,10 @@
/* TODO */
break;
+ case SCHEMA_ORDERING:
+ /* TODO */
+ break;
+
case SCHEMA_SUBSTR:
/* TODO */
break;
More information about the samba-cvs
mailing list