summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/subtree_rename.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-04-29 11:38:56 +0200
committerMatthieu Patou <mat@samba.org>2011-08-10 01:05:19 +0200
commit4a5e9cf0ed909faef1325efff4581a4c5ee8d736 (patch)
treee7249f5efbc815d9747501fab58a9f80f79dd2d2 /source4/dsdb/samdb/ldb_modules/subtree_rename.c
parent4659b07eb9608acaf5b49d8919c98e224d2b805c (diff)
downloadsamba-4a5e9cf0ed909faef1325efff4581a4c5ee8d736.tar.gz
samba-4a5e9cf0ed909faef1325efff4581a4c5ee8d736.tar.bz2
samba-4a5e9cf0ed909faef1325efff4581a4c5ee8d736.zip
s4:subtree_rename LDB module - fix the move/rename constraints
s4:subtree_rename LDB module - fix the move/rename constraints By the inspiration of an email request by ekacnet I have rechecked the move/rename constraints and re-read the chapter 3.1.1.5.4.1 located in the MS-ADTS technical documentation. It really turns out that the constraint checking is only performed on the root object of a request. In addition add my copyright notice (I've written these constraint checks). Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Aug 10 01:05:19 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/subtree_rename.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index f26a99ed09..a4714acb61 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -3,6 +3,7 @@
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2006-2007
Copyright (C) Stefan Metzmacher <metze@samba.org> 2007
+ Copyright (C) Matthias Dieter Wallnöfer <mdw@samba.org> 2010-2011
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -319,9 +320,12 @@ static int subtree_rename_search_callback(struct ldb_request *req,
switch (ares->type) {
case LDB_REPLY_ENTRY:
if (ldb_dn_compare(ares->message->dn, ac->list->olddn) == 0) {
- /* this was already stored by the
- * subtree_rename_search() */
-
+ /*
+ * This is the root entry of the originating move
+ * respectively rename request. It has been already
+ * stored in the list using "subtree_rename_search()".
+ * Only this one is subject to constraint checking.
+ */
ret = check_constraints(ares->message, ac,
ac->list->olddn,
ac->list->newdn);
@@ -356,13 +360,6 @@ static int subtree_rename_search_callback(struct ldb_request *req,
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
-
- ret = check_constraints(ares->message, ac,
- store->olddn, store->newdn);
- if (ret != LDB_SUCCESS) {
- return ldb_module_done(ac->req, NULL, NULL, ret);
- }
-
break;
case LDB_REPLY_REFERRAL: