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];
}
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);
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); \
APPEND_ATTRS(sys_must);
schema_entry = talloc_asprintf_append(schema_entry,
- ")\n");
+ " )\n");
IF_NULL_FAIL_RET(schema_entry);
}
}
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;