From: Andrew Bartlett Date: Wed, 2 Jul 2008 11:30:08 +0000 (+1000) Subject: Move ad2oLschema and oLschema2ldif into Samba4, out of LDB X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=c7704805b9a3541e4c8768278c8289b0aa6ed5e3 Move ad2oLschema and oLschema2ldif into Samba4, out of LDB LDB does not know about nor process the AD schema, so it makes no sense to have this tool there. I've been changing it anyway, to use a common schema manipulation library, and will enhance these links in the future. Andrew Bartlett --- diff --git a/source/dsdb/samdb/ldb_modules/schema_fsmo.c b/source/dsdb/samdb/ldb_modules/schema_fsmo.c index 01108605ec5..6f65c199baf 100644 --- a/source/dsdb/samdb/ldb_modules/schema_fsmo.c +++ b/source/dsdb/samdb/ldb_modules/schema_fsmo.c @@ -34,17 +34,13 @@ static int schema_fsmo_init(struct ldb_module *module) { - WERROR status; TALLOC_CTX *mem_ctx; struct ldb_dn *schema_dn; struct dsdb_schema *schema; struct ldb_result *schema_res; - const struct ldb_val *prefix_val; - const struct ldb_val *info_val; - struct ldb_val info_val_default; struct ldb_result *a_res; struct ldb_result *c_res; - uint32_t i; + char *error_string = NULL; int ret; static const char *schema_attrs[] = { "prefixMap", @@ -71,12 +67,6 @@ static int schema_fsmo_init(struct ldb_module *module) return LDB_ERR_OPERATIONS_ERROR; } - schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(ldb_get_opaque(module->ldb, "loadparm"))); - if (!schema) { - ldb_oom(module->ldb); - return LDB_ERR_OPERATIONS_ERROR; - } - /* * setup the prefix mappings and schema info */ @@ -111,33 +101,6 @@ static int schema_fsmo_init(struct ldb_module *module) return LDB_ERR_CONSTRAINT_VIOLATION; } - prefix_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "prefixMap"); - if (!prefix_val) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: no prefixMap attribute found"); - talloc_free(mem_ctx); - return LDB_ERR_CONSTRAINT_VIOLATION; - } - info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo"); - if (!info_val) { - info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000"); - if (!info_val_default.data) { - ldb_oom(module->ldb); - return LDB_ERR_OPERATIONS_ERROR; - } - talloc_steal(mem_ctx, info_val_default.data); - info_val = &info_val_default; - } - - status = dsdb_load_oid_mappings_ldb(schema, prefix_val, info_val); - if (!W_ERROR_IS_OK(status)) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load oid mappings: %s", - win_errstr(status)); - talloc_free(mem_ctx); - return LDB_ERR_CONSTRAINT_VIOLATION; - } - /* * load the attribute definitions */ @@ -154,29 +117,6 @@ static int schema_fsmo_init(struct ldb_module *module) } talloc_steal(mem_ctx, a_res); - for (i=0; i < a_res->count; i++) { - struct dsdb_attribute *sa; - - sa = talloc_zero(schema, struct dsdb_attribute); - if (!sa) { - ldb_oom(module->ldb); - return LDB_ERR_OPERATIONS_ERROR; - } - - status = dsdb_attribute_from_ldb(schema, a_res->msgs[i], sa, sa); - if (!W_ERROR_IS_OK(status)) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load attriute definition: %s:%s", - ldb_dn_get_linearized(a_res->msgs[i]->dn), - win_errstr(status)); - talloc_free(mem_ctx); - return LDB_ERR_CONSTRAINT_VIOLATION; - } - - DLIST_ADD_END(schema->attributes, sa, struct dsdb_attribute *); - } - talloc_free(a_res); - /* * load the objectClass definitions */ @@ -193,36 +133,17 @@ static int schema_fsmo_init(struct ldb_module *module) } talloc_steal(mem_ctx, c_res); - for (i=0; i < c_res->count; i++) { - struct dsdb_class *sc; - - sc = talloc_zero(schema, struct dsdb_class); - if (!sc) { - ldb_oom(module->ldb); - return LDB_ERR_OPERATIONS_ERROR; - } - - status = dsdb_class_from_ldb(schema, c_res->msgs[i], sc, sc); - if (!W_ERROR_IS_OK(status)) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load class definition: %s:%s", - ldb_dn_get_linearized(c_res->msgs[i]->dn), - win_errstr(status)); - talloc_free(mem_ctx); - return LDB_ERR_CONSTRAINT_VIOLATION; - } - - DLIST_ADD_END(schema->classes, sc, struct dsdb_class *); - } - talloc_free(c_res); - - schema->fsmo.master_dn = ldb_msg_find_attr_as_dn(module->ldb, schema, schema_res->msgs[0], "fSMORoleOwner"); - if (ldb_dn_compare(samdb_ntds_settings_dn(module->ldb), schema->fsmo.master_dn) == 0) { - schema->fsmo.we_are_master = true; - } else { - schema->fsmo.we_are_master = false; + ret = dsdb_schema_from_ldb_results(mem_ctx, module->ldb, + lp_iconv_convenience(ldb_get_opaque(module->ldb, "loadparm")), + schema_res, a_res, c_res, &schema, &error_string); + if (ret != LDB_SUCCESS) { + ldb_asprintf_errstring(module->ldb, + "schema_fsmo_init: dsdb_schema load failed: %s", + error_string); + talloc_free(mem_ctx); + return ret; } - + /* dsdb_set_schema() steal schema into the ldb_context */ ret = dsdb_set_schema(module->ldb, schema); if (ret != LDB_SUCCESS) { @@ -233,10 +154,6 @@ static int schema_fsmo_init(struct ldb_module *module) return ret; } - ldb_debug(module->ldb, LDB_DEBUG_TRACE, - "schema_fsmo_init: we are master: %s\n", - (schema->fsmo.we_are_master?"yes":"no")); - talloc_free(mem_ctx); return ldb_next_init(module); } diff --git a/source/dsdb/schema/schema_init.c b/source/dsdb/schema/schema_init.c index f71c14a95dc..826f91b5f0d 100644 --- a/source/dsdb/schema/schema_init.c +++ b/source/dsdb/schema/schema_init.c @@ -563,6 +563,114 @@ WERROR dsdb_class_from_ldb(const struct dsdb_schema *schema, return WERR_OK; } +#define dsdb_oom(error_string, mem_ctx) *error_string = talloc_asprintf(mem_ctx, "dsdb out of memory at %s:%d\n", __FILE__, __LINE__) + +int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, + struct smb_iconv_convenience *iconv_convenience, + struct ldb_result *schema_res, + struct ldb_result *attrs_res, struct ldb_result *objectclass_res, + struct dsdb_schema **schema_out, + char **error_string) +{ + WERROR status; + uint32_t i; + const struct ldb_val *prefix_val; + const struct ldb_val *info_val; + struct ldb_val info_val_default; + struct dsdb_schema *schema; + + schema = dsdb_new_schema(mem_ctx, iconv_convenience); + if (!schema) { + dsdb_oom(error_string, mem_ctx); + return LDB_ERR_OPERATIONS_ERROR; + } + + prefix_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "prefixMap"); + if (!prefix_val) { + *error_string = talloc_asprintf(mem_ctx, + "schema_fsmo_init: no prefixMap attribute found"); + talloc_free(mem_ctx); + return LDB_ERR_CONSTRAINT_VIOLATION; + } + info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo"); + if (!info_val) { + info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000"); + if (!info_val_default.data) { + dsdb_oom(error_string, mem_ctx); + return LDB_ERR_OPERATIONS_ERROR; + } + talloc_steal(mem_ctx, info_val_default.data); + info_val = &info_val_default; + } + + status = dsdb_load_oid_mappings_ldb(schema, prefix_val, info_val); + if (!W_ERROR_IS_OK(status)) { + *error_string = talloc_asprintf(mem_ctx, + "schema_fsmo_init: failed to load oid mappings: %s", + win_errstr(status)); + talloc_free(mem_ctx); + return LDB_ERR_CONSTRAINT_VIOLATION; + } + + for (i=0; i < attrs_res->count; i++) { + struct dsdb_attribute *sa; + + sa = talloc_zero(schema, struct dsdb_attribute); + if (!sa) { + dsdb_oom(error_string, mem_ctx); + return LDB_ERR_OPERATIONS_ERROR; + } + + status = dsdb_attribute_from_ldb(schema, attrs_res->msgs[i], sa, sa); + if (!W_ERROR_IS_OK(status)) { + *error_string = talloc_asprintf(mem_ctx, + "schema_fsmo_init: failed to load attriute definition: %s:%s", + ldb_dn_get_linearized(attrs_res->msgs[i]->dn), + win_errstr(status)); + talloc_free(mem_ctx); + return LDB_ERR_CONSTRAINT_VIOLATION; + } + + DLIST_ADD_END(schema->attributes, sa, struct dsdb_attribute *); + } + + for (i=0; i < objectclass_res->count; i++) { + struct dsdb_class *sc; + + sc = talloc_zero(schema, struct dsdb_class); + if (!sc) { + dsdb_oom(error_string, mem_ctx); + return LDB_ERR_OPERATIONS_ERROR; + } + + status = dsdb_class_from_ldb(schema, objectclass_res->msgs[i], sc, sc); + if (!W_ERROR_IS_OK(status)) { + *error_string = talloc_asprintf(mem_ctx, + "schema_fsmo_init: failed to load class definition: %s:%s", + ldb_dn_get_linearized(objectclass_res->msgs[i]->dn), + win_errstr(status)); + talloc_free(mem_ctx); + return LDB_ERR_CONSTRAINT_VIOLATION; + } + + DLIST_ADD_END(schema->classes, sc, struct dsdb_class *); + } + + schema->fsmo.master_dn = ldb_msg_find_attr_as_dn(ldb, schema, schema_res->msgs[0], "fSMORoleOwner"); + if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), schema->fsmo.master_dn) == 0) { + schema->fsmo.we_are_master = true; + } else { + schema->fsmo.we_are_master = false; + } + + DEBUG(5, ("schema_fsmo_init: we are master: %s\n", + (schema->fsmo.we_are_master?"yes":"no"))); + + *schema_out = schema; + return LDB_SUCCESS; +} + + static const struct { const char *name; const char *oid; diff --git a/source/lib/ldb/config.mk b/source/lib/ldb/config.mk index 6821c058f2f..fe3b71d1d54 100644 --- a/source/lib/ldb/config.mk +++ b/source/lib/ldb/config.mk @@ -147,32 +147,5 @@ PRIVATE_DEPENDENCIES = \ ldbtest_OBJ_FILES = $(ldbsrcdir)/tools/ldbtest.o -################################################ -# Start BINARY oLschema2ldif -[BINARY::oLschema2ldif] -INSTALLDIR = BINDIR -PRIVATE_DEPENDENCIES = \ - LIBLDB_CMDLINE -# End BINARY oLschema2ldif -################################################ - - -oLschema2ldif_OBJ_FILES = $(addprefix $(ldbsrcdir)/tools/, convert.o oLschema2ldif.o) - -MANPAGES += $(ldbsrcdir)/man/oLschema2ldif.1 - -################################################ -# Start BINARY ad2oLschema -[BINARY::ad2oLschema] -INSTALLDIR = BINDIR -PRIVATE_DEPENDENCIES = \ - LIBLDB_CMDLINE -# End BINARY ad2oLschema -################################################ - -ad2oLschema_OBJ_FILES = $(addprefix $(ldbsrcdir)/tools/, convert.o ad2oLschema.o) - -MANPAGES += $(ldbsrcdir)/man/ad2oLschema.1 - mkinclude tools/config.mk mkinclude ldb_ildap/config.mk diff --git a/source/utils/ad2oLschema.1.xml b/source/utils/ad2oLschema.1.xml new file mode 100644 index 00000000000..6ae89964775 --- /dev/null +++ b/source/utils/ad2oLschema.1.xml @@ -0,0 +1,87 @@ + + + + + + ad2oLschema + 1 + + + + + ad2oLschema + Converts AC-like LDAP schemas to OpenLDAP + compatible schema files + + + + + ad2oLschema + -I INPUT-FILE + -O OUTPUT-FILE + + + + + DESCRIPTION + + ad2oLschema is a simple tool that converts AD-like LDIF + schema files into OpenLDAP schema files. + + + + + OPTIONS + + + + -H url + URL to an LDB or LDAP server with an AD schema to read. + + + + -I input-file AD schema + to read. If neither this nor -H is specified, the + schema file will be read from standard input. + + + + + -O output-file + File to write OpenLDAP version of schema to. + + + + + + + VERSION + + This man page is correct for version 4.0 of the Samba suite. + + + + SEE ALSO + + ldb(7), ldbmodify, ldbdel, ldif(5) + + + + + AUTHOR + + ldb was written by + Andrew Tridgell. + ad2oLschema was written by Andrew Bartlett. + + + +If you wish to report a problem or make a suggestion then please see +the web site for +current contact and maintainer information. + + + + + diff --git a/source/lib/ldb/tools/ad2oLschema.c b/source/utils/ad2oLschema.c similarity index 94% rename from source/lib/ldb/tools/ad2oLschema.c rename to source/utils/ad2oLschema.c index df6fc91688d..879b1a7213f 100644 --- a/source/lib/ldb/tools/ad2oLschema.c +++ b/source/utils/ad2oLschema.c @@ -34,10 +34,11 @@ #include "includes.h" #include "ldb_includes.h" #include "system/locale.h" -#include "tools/cmdline.h" -#include "tools/convert.h" +#include "lib/ldb/tools/cmdline.h" +#include "utils/schema_convert.h" #include "param/param.h" #include "lib/cmdline/popt_common.h" +#include "dsdb/samdb/samdb.h" struct schema_conv { int count; @@ -70,25 +71,12 @@ static int fetch_attrs_schema(struct ldb_context *ldb, struct ldb_dn *schemadn, TALLOC_CTX *mem_ctx, struct ldb_result **attrs_res) { - TALLOC_CTX *local_ctx = talloc_new(mem_ctx); int ret; - const char *attrs[] = { - "lDAPDisplayName", - "isSingleValued", - "attributeID", - "attributeSyntax", - "description", - NULL - }; - if (!local_ctx) { - return LDB_ERR_OPERATIONS_ERROR; - } - /* Downlaod schema */ ret = ldb_search(ldb, schemadn, LDB_SCOPE_SUBTREE, "objectClass=attributeSchema", - attrs, attrs_res); + NULL, attrs_res); if (ret != LDB_SUCCESS) { printf("Search failed: %s\n", ldb_errstring(ldb)); return LDB_ERR_OPERATIONS_ERROR; @@ -97,21 +85,6 @@ static int fetch_attrs_schema(struct ldb_context *ldb, struct ldb_dn *schemadn, return ret; } -static const char *oc_attrs[] = { - "lDAPDisplayName", - "mayContain", - "mustContain", - "systemMayContain", - "systemMustContain", - "objectClassCategory", - "governsID", - "description", - "subClassOf", - "systemAuxiliaryClass", - "auxiliaryClass", - NULL -}; - static int fetch_oc_recursive(struct ldb_context *ldb, struct ldb_dn *schemadn, TALLOC_CTX *mem_ctx, struct ldb_result *search_from, @@ -125,7 +98,7 @@ static int fetch_oc_recursive(struct ldb_context *ldb, struct ldb_dn *schemadn, "lDAPDisplayname", NULL); ret = ldb_search_exp_fmt(ldb, mem_ctx, &res, - schemadn, LDB_SCOPE_SUBTREE, oc_attrs, + schemadn, LDB_SCOPE_SUBTREE, NULL, "(&(&(objectClass=classSchema)(subClassOf=%s))(!(lDAPDisplayName=%s)))", name, name); if (ret != LDB_SUCCESS) { @@ -167,7 +140,7 @@ static int fetch_objectclass_schema(struct ldb_context *ldb, struct ldb_dn *sche /* Downlaod 'top' */ ret = ldb_search(ldb, schemadn, LDB_SCOPE_SUBTREE, "(&(objectClass=classSchema)(lDAPDisplayName=top))", - oc_attrs, &top_res); + NULL, &top_res); if (ret != LDB_SUCCESS) { printf("Search failed: %s\n", ldb_errstring(ldb)); return LDB_ERR_OPERATIONS_ERROR; @@ -195,15 +168,15 @@ static int fetch_objectclass_schema(struct ldb_context *ldb, struct ldb_dn *sche return ret; } -static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) +static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, + struct ldb_result **schema_res) { const char *rootdse_attrs[] = {"schemaNamingContext", NULL}; - const char *no_attrs[] = { NULL }; struct ldb_dn *schemadn; struct ldb_dn *basedn = ldb_dn_new(mem_ctx, ldb, NULL); struct ldb_result *rootdse_res; - struct ldb_result *schema_res; int ldb_ret; + if (!basedn) { return NULL; } @@ -213,21 +186,20 @@ static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ct if (ldb_ret != LDB_SUCCESS) { ldb_ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, "(&(objectClass=dMD)(cn=Schema))", - no_attrs, &schema_res); + NULL, schema_res); if (ldb_ret) { printf("cn=Schema Search failed: %s\n", ldb_errstring(ldb)); return NULL; } - talloc_steal(mem_ctx, schema_res); + talloc_steal(mem_ctx, *schema_res); - if (schema_res->count != 1) { + if ((*schema_res)->count != 1) { printf("Failed to find rootDSE"); return NULL; } - schemadn = talloc_steal(mem_ctx, schema_res->msgs[0]->dn); - talloc_free(schema_res); + schemadn = talloc_steal(mem_ctx, (*schema_res)->msgs[0]->dn); return schemadn; } @@ -245,6 +217,20 @@ static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ct return NULL; } + ldb_ret = ldb_search(ldb, schemadn, LDB_SCOPE_BASE, + "(&(objectClass=dMD)(cn=Schema))", + NULL, schema_res); + if (ldb_ret) { + printf("cn=Schema Search failed: %s\n", ldb_errstring(ldb)); + return NULL; + } + + talloc_steal(mem_ctx, *schema_res); + + if ((*schema_res)->count != 1) { + printf("Failed to find rootDSE"); + return NULL; + } talloc_free(rootdse_res); return schemadn; } @@ -281,7 +267,7 @@ static bool find_aux_classes(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struc for (i=0; aux_class && i < aux_class->num_values; i++) { ret = ldb_search_exp_fmt(ldb, mem_ctx, &res, - schema_dn, LDB_SCOPE_SUBTREE, oc_attrs, + schema_dn, LDB_SCOPE_SUBTREE, NULL, "(&(objectClass=classSchema)(lDAPDisplayName=%s))", aux_class->values[i].data); if (ret != LDB_SUCCESS) { @@ -346,9 +332,11 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_ char *new_attr; } *attr_map = NULL; int num_attr_maps = 0; - struct ldb_result *attrs_res, *objectclasses_res; + struct ldb_result *schema_res, *attrs_res, *objectclasses_res; struct ldb_dn *schemadn; struct schema_conv ret; + struct dsdb_schema *schema; + char *error_string; int ldb_ret, i; @@ -401,7 +389,7 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_ } } - schemadn = find_schema_dn(ldb, mem_ctx); + schemadn = find_schema_dn(ldb, mem_ctx, &schema_res); if (!schemadn) { printf("Failed to find schema DN: %s\n", ldb_errstring(ldb)); ret.failures = 1; @@ -414,7 +402,24 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_ ret.failures = 1; return ret; } + + + ldb_ret = fetch_objectclass_schema(ldb, schemadn, mem_ctx, &objectclasses_res); + if (ldb_ret != LDB_SUCCESS) { + printf("Failed to fetch objectClass schema elements: %s\n", ldb_errstring(ldb)); + ret.failures = 1; + return ret; + } + ldb_ret = dsdb_schema_from_ldb_results(mem_ctx, ldb, + lp_iconv_convenience(cmdline_lp_ctx), + schema_res, attrs_res, objectclasses_res, &schema, &error_string); + if (ldb_ret != LDB_SUCCESS) { + printf("Failed to load schema: %s\n", error_string); + ret.failures = 1; + return ret; + } + switch (target) { case TARGET_OPENLDAP: break; @@ -534,13 +539,6 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_ ret.count++; } - ldb_ret = fetch_objectclass_schema(ldb, schemadn, mem_ctx, &objectclasses_res); - if (ldb_ret != LDB_SUCCESS) { - printf("Failed to fetch objectClass schema elements: %s\n", ldb_errstring(ldb)); - ret.failures = 1; - return ret; - } - for (i=0; i < objectclasses_res->count; i++) { struct ldb_message *msg = objectclasses_res->msgs[i]; const char *name = ldb_msg_find_attr_as_string(msg, "lDAPDisplayName", NULL); diff --git a/source/utils/config.mk b/source/utils/config.mk index d47b36ea7ca..61565807d2e 100644 --- a/source/utils/config.mk +++ b/source/utils/config.mk @@ -94,3 +94,31 @@ PRIVATE_DEPENDENCIES = \ ################################# testparm_OBJ_FILES = $(utilssrcdir)/testparm.o + +################################################ +# Start BINARY oLschema2ldif +[BINARY::oLschema2ldif] +INSTALLDIR = BINDIR +PRIVATE_DEPENDENCIES = \ + LIBLDB_CMDLINE +# End BINARY oLschema2ldif +################################################ + + +oLschema2ldif_OBJ_FILES = $(addprefix $(utilssrcdir)/, schema_convert.o oLschema2ldif.o) + +MANPAGES += $(utilssrcdir)/man/oLschema2ldif.1 + +################################################ +# Start BINARY ad2oLschema +[BINARY::ad2oLschema] +INSTALLDIR = BINDIR +PRIVATE_DEPENDENCIES = \ + LIBLDB_CMDLINE SAMDB +# End BINARY ad2oLschema +################################################ + +ad2oLschema_OBJ_FILES = $(addprefix $(utilssrcdir)/, schema_convert.o ad2oLschema.o) + +MANPAGES += $(utilssrcdir)/man/ad2oLschema.1 + diff --git a/source/utils/oLschema2ldif.1.xml b/source/utils/oLschema2ldif.1.xml new file mode 100644 index 00000000000..b1e681be4e4 --- /dev/null +++ b/source/utils/oLschema2ldif.1.xml @@ -0,0 +1,79 @@ + + + + + + oLschema2ldif + 1 + + + + + oLschema2ldif + Converts LDAP schema's to LDB-compatible LDIF + + + + + oLschema2ldif + -I INPUT-FILE + -O OUTPUT-FILE + + + + + DESCRIPTION + + oLschema2ldif is a simple tool that converts standard OpenLDAP schema files to a LDIF format that is understood by LDB. + + + + + OPTIONS + + + + -I input-file + OpenLDAP schema to read. If none are specified, +the schema file will be read from standard input. + + + + + -O output-file + File to write ldif version of schema to. + + + + + + + VERSION + + This man page is correct for version 4.0 of the Samba suite. + + + + SEE ALSO + + ldb(7), ldbmodify, ldbdel, ldif(5) + + + + + AUTHOR + + ldb was written by + Andrew Tridgell. + oLschema2ldif was written by Simo Sorce. + + + +If you wish to report a problem or make a suggestion then please see +the web site for +current contact and maintainer information. + + + + + diff --git a/source/lib/ldb/tools/oLschema2ldif.c b/source/utils/oLschema2ldif.c similarity index 99% rename from source/lib/ldb/tools/oLschema2ldif.c rename to source/utils/oLschema2ldif.c index 3c31f37c553..b501b75529e 100644 --- a/source/lib/ldb/tools/oLschema2ldif.c +++ b/source/utils/oLschema2ldif.c @@ -33,7 +33,7 @@ #include "ldb_includes.h" #include "tools/cmdline.h" -#include "tools/convert.h" +#include "utils/schema_convert.h" #define SCHEMA_UNKNOWN 0 #define SCHEMA_NAME 1 diff --git a/source/lib/ldb/tools/convert.c b/source/utils/schema_convert.c similarity index 99% rename from source/lib/ldb/tools/convert.c rename to source/utils/schema_convert.c index 5a5cf2a94c5..a5d38451d41 100644 --- a/source/lib/ldb/tools/convert.c +++ b/source/utils/schema_convert.c @@ -21,7 +21,7 @@ License along with this library; if not, see . */ -#include "convert.h" +#include "schema_convert.h" #include "ldb_includes.h" /* Shared map for converting syntax between formats */ diff --git a/source/lib/ldb/tools/convert.h b/source/utils/schema_convert.h similarity index 100% rename from source/lib/ldb/tools/convert.h rename to source/utils/schema_convert.h