From aabfb7162c1e87ebfec1829488a2cd20af18ae0e Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 5 Oct 2010 16:41:17 +0200 Subject: s4:subtree_delete LDB module - remove the DN from an error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It may looks funny but the DN output prevents older ADUC versions (tested with release 2000) to perform subtree deletes properly. Version 2008 has this fixed. Additionally some smaller changes ("%u" for printing unsigned integers, module name prefix, nicer line-wrap). Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Tue Oct 5 16:48:19 UTC 2010 on sn-devel-104 --- source4/dsdb/samdb/ldb_modules/subtree_delete.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/subtree_delete.c b/source4/dsdb/samdb/ldb_modules/subtree_delete.c index 34914d27b6..3817d225a8 100644 --- a/source4/dsdb/samdb/ldb_modules/subtree_delete.c +++ b/source4/dsdb/samdb/ldb_modules/subtree_delete.c @@ -61,10 +61,13 @@ static int subtree_delete(struct ldb_module *module, struct ldb_request *req) } if (res->count > 0) { if (ldb_request_get_control(req, LDB_CONTROL_TREE_DELETE_OID) == NULL) { + /* Do not add any DN outputs to this error string! + * Some MMC consoles (eg release 2000) have a strange + * bug and prevent subtree deletes afterwards. */ ldb_asprintf_errstring(ldb_module_get_ctx(module), - "Cannot delete %s, not a leaf node " - "(has %d children)\n", - ldb_dn_get_linearized(req->op.del.dn), + "subtree_delete: Unable to " + "delete a non-leaf node " + "(it has %u children)!", res->count); talloc_free(res); return LDB_ERR_NOT_ALLOWED_ON_NON_LEAF; -- cgit