svn commit: samba r17707 - in
branches/SAMBA_4_0/source/lib/ldb/tools: .
abartlet at samba.org
abartlet at samba.org
Tue Aug 22 10:49:54 GMT 2006
Author: abartlet
Date: 2006-08-22 10:49:54 +0000 (Tue, 22 Aug 2006)
New Revision: 17707
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17707
Log:
Match the output (aside from dividers) the output of
ol-schema-migrate.pl in the schema output.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c 2006-08-22 10:46:23 UTC (rev 17706)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c 2006-08-22 10:49:54 UTC (rev 17707)
@@ -312,6 +312,14 @@
return ret;
}
+ switch (target) {
+ case TARGET_OPENLDAP:
+ break;
+ case TARGET_FEDORA_DS:
+ fprintf(out, "dn: cn=schema\n");
+ break;
+ }
+
for (i=0; i < attrs_res->count; i++) {
struct ldb_message *msg = attrs_res->msgs[i];
@@ -396,9 +404,16 @@
}
schema_entry = talloc_asprintf_append(schema_entry,
- " )\n\n");
+ " )");
- fprintf(out, "%s", schema_entry);
+ switch (target) {
+ case TARGET_OPENLDAP:
+ fprintf(out, "%s\n\n", schema_entry);
+ break;
+ case TARGET_FEDORA_DS:
+ fprintf(out, "%s\n", schema_entry);
+ break;
+ }
}
ldb_ret = fetch_objectclass_schema(ldb, schemadn, mem_ctx, &objectclasses_res);
@@ -502,7 +517,7 @@
schema_entry = talloc_asprintf_append(schema_entry, \
" $"); \
IF_NULL_FAIL_RET(schema_entry); \
- if ((k+1)%5 == 0) { \
+ if (target == TARGET_OPENLDAP && ((k+1)%5 == 0)) { \
schema_entry = talloc_asprintf_append(schema_entry, \
"\n "); \
IF_NULL_FAIL_RET(schema_entry); \
@@ -524,7 +539,7 @@
APPEND_ATTRS(sys_must);
schema_entry = talloc_asprintf_append(schema_entry,
- ")\n");
+ " )\n");
IF_NULL_FAIL_RET(schema_entry);
}
@@ -546,9 +561,16 @@
}
schema_entry = talloc_asprintf_append(schema_entry,
- " )\n\n");
+ " )");
- fprintf(out, "%s", schema_entry);
+ switch (target) {
+ case TARGET_OPENLDAP:
+ fprintf(out, "%s\n\n", schema_entry);
+ break;
+ case TARGET_FEDORA_DS:
+ fprintf(out, "%s\n", schema_entry);
+ break;
+ }
}
return ret;
More information about the samba-cvs
mailing list