summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-19 22:12:23 +0200
committerMatthias Dieter Wallnöfer <mdw@sn-devel-104.sn.samba.org>2010-10-03 15:23:18 +0000
commit46282da011b411daac052e07a576987d155638b1 (patch)
tree58c9d7e771aa585d71c1b2c772552e820c2cc3c8 /source4/dsdb
parent779b97325a1a60e6c72a334d0134ea5178942f7d (diff)
downloadsamba-46282da011b411daac052e07a576987d155638b1.tar.gz
samba-46282da011b411daac052e07a576987d155638b1.tar.bz2
samba-46282da011b411daac052e07a576987d155638b1.zip
s4:dsdb/common/util.c - introduce "DSDB_SEARCH_SHOW_RECYCLED" flag
This is needed since starting with 2008_R2 function level we get another type of hidden objects which aren't seen by the "show_deleted" control: recycled objects. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c7
-rw-r--r--source4/dsdb/common/util.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 4e6fe034e1..7bfb99581f 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3570,6 +3570,13 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ if (dsdb_flags & DSDB_SEARCH_SHOW_RECYCLED) {
+ ret = ldb_request_add_control(req, LDB_CONTROL_SHOW_RECYCLED_OID, true, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
if (dsdb_flags & DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT) {
ret = ldb_request_add_control(req, DSDB_CONTROL_DN_STORAGE_FORMAT_OID, true, NULL);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index edada70d81..7ae46ae887 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -33,3 +33,4 @@
#define DSDB_FLAG_AS_SYSTEM 0x0080
#define DSDB_TREE_DELETE 0x0100
#define DSDB_SEARCH_ONE_ONLY 0x0200 /* give an error unless 1 record */
+#define DSDB_SEARCH_SHOW_RECYCLED 0x0400