summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 12:43:49 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 18:52:29 +0200
commit87d0f636320b3b6818c1703d99b94648f00d0af7 (patch)
tree3e7646d77def0a700d72293a9bb377f1a885f496 /source4/dsdb/common
parentad5e19f29e3d716579607e706b42a4e7d2ed11c4 (diff)
downloadsamba-87d0f636320b3b6818c1703d99b94648f00d0af7.tar.gz
samba-87d0f636320b3b6818c1703d99b94648f00d0af7.tar.bz2
samba-87d0f636320b3b6818c1703d99b94648f00d0af7.zip
s4:dsdb - add a new dsdb delete function which understands the tree delete control
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c7
-rw-r--r--source4/dsdb/common/util.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index d644d2d0dd..28061f3231 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3479,6 +3479,13 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ if (dsdb_flags & DSDB_TREE_DELETE) {
+ ret = ldb_request_add_control(req, LDB_CONTROL_TREE_DELETE_OID, false, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
return LDB_SUCCESS;
}
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index 0b6ef3d0a1..edada70d81 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -31,5 +31,5 @@
#define DSDB_MODIFY_RELAX 0x0020
#define DSDB_MODIFY_PERMISSIVE 0x0040
#define DSDB_FLAG_AS_SYSTEM 0x0080
-
-#define DSDB_SEARCH_ONE_ONLY 0x0020 /* give an error unless 1 record */
+#define DSDB_TREE_DELETE 0x0100
+#define DSDB_SEARCH_ONE_ONLY 0x0200 /* give an error unless 1 record */