summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-05 16:41:17 +0200
committerMatthias Dieter Wallnöfer <mdw@sn-devel-104.sn.samba.org>2010-10-05 16:48:19 +0000
commitaabfb7162c1e87ebfec1829488a2cd20af18ae0e (patch)
treef5d78ae0ca16e66a20c4d5ed5bf1c1a663058ff0
parent0fb9671a01475d9c79c99ab8ae0f08c2f198097d (diff)
downloadsamba-aabfb7162c1e87ebfec1829488a2cd20af18ae0e.tar.gz
samba-aabfb7162c1e87ebfec1829488a2cd20af18ae0e.tar.bz2
samba-aabfb7162c1e87ebfec1829488a2cd20af18ae0e.zip
s4:subtree_delete LDB module - remove the DN from an error message
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 <mdw@samba.org> Autobuild-Date: Tue Oct 5 16:48:19 UTC 2010 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_delete.c9
1 files changed, 6 insertions, 3 deletions
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;