s4:dsdb/common/util.c - introduce "DSDB_SEARCH_SHOW_RECYCLED" flag
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 19 Sep 2010 20:12:23 +0000 (22:12 +0200)
committerMatthias Dieter Wallnöfer <mdw@sn-devel-104.sn.samba.org>
Sun, 3 Oct 2010 15:23:18 +0000 (15:23 +0000)
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>
source4/dsdb/common/util.c
source4/dsdb/common/util.h

index 4e6fe034e1cb089d77ebe8fb320de7c062bb5bb5..7bfb99581f085a5cbf544eff6a1cb6a804595415 100644 (file)
@@ -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) {
index edada70d81a62ba6c97e6e42dcbd56d227637791..7ae46ae887c9a1b1ee6220b276f960d21a1521b3 100644 (file)
@@ -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