From 4ba8069e3d33dca53780521026c972425c1d66c5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Aug 2011 12:24:13 +1000 Subject: ldb: added ldb_dn_replace_components() this allows you to replace the string part of a DN with the string part from another DN. This is useful when you want to fix a DN that has the right GUID but the wrong string part, because the target object has moved. Pair-Programmed-With: Andrew Bartlett Pair-Programmed-With: Amitay Isaacs --- lib/ldb/include/ldb_module.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/ldb/include') diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h index 6d6fff251c..22d24dbdea 100644 --- a/lib/ldb/include/ldb_module.h +++ b/lib/ldb/include/ldb_module.h @@ -340,5 +340,12 @@ int ldb_module_init_chain(struct ldb_context *ldb, struct ldb_module *module); */ int ldb_init_module(const char *version); +/* replace the components of a DN with those from another DN, without + * touching the extended components + * + * return true if successful and false if not + * if false is returned the dn may be marked invalid + */ +bool ldb_dn_replace_components(struct ldb_dn *dn, struct ldb_dn *new_dn); #endif -- cgit