summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2016-07-06 11:54:25 +1200
committerGarming Sam <garming@samba.org>2016-07-15 10:01:28 +0200
commit5ce969d0c70afc1f14a9b223edbaec7a847c64de (patch)
tree7780387d021ad953ecbbce1871f2968c75c65910 /source4/dsdb/common
parentb7b229a424cfe6a2bbe7b091c93a6f09b2132975 (diff)
downloadsamba-5ce969d0c70afc1f14a9b223edbaec7a847c64de.tar.gz
dsdb: add vanish links control
Normally linked attributes are deleted by marking them as with RMD flags, but sometimes we want them to vanish without trace. At those times we set the DSDB_CONTROL_REPLMD_VANISH_LINKS control. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c7
-rw-r--r--source4/dsdb/common/util.h33
2 files changed, 24 insertions, 16 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index bd0b5a33e19..0bbf4022523 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -4288,6 +4288,13 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ if (dsdb_flags & DSDB_REPLMD_VANISH_LINKS) {
+ ret = ldb_request_add_control(req, DSDB_CONTROL_REPLMD_VANISH_LINKS, true, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
if (dsdb_flags & DSDB_MODIFY_PARTIAL_REPLICA) {
ret = ldb_request_add_control(req, DSDB_CONTROL_PARTIAL_REPLICA, false, NULL);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index 10850736e7d..f2867a2e7d7 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -26,22 +26,23 @@
flags for dsdb_request_add_controls(). For the module functions,
the upper 16 bits are in dsdb/samdb/ldb_modules/util.h
*/
-#define DSDB_SEARCH_SEARCH_ALL_PARTITIONS 0x0001
-#define DSDB_SEARCH_SHOW_DELETED 0x0002
-#define DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT 0x0004
-#define DSDB_SEARCH_REVEAL_INTERNALS 0x0008
-#define DSDB_SEARCH_SHOW_EXTENDED_DN 0x0010
-#define DSDB_MODIFY_RELAX 0x0020
-#define DSDB_MODIFY_PERMISSIVE 0x0040
-#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
-#define DSDB_PROVISION 0x0800
-#define DSDB_BYPASS_PASSWORD_HASH 0x1000
-#define DSDB_SEARCH_NO_GLOBAL_CATALOG 0x2000
-#define DSDB_MODIFY_PARTIAL_REPLICA 0x4000
-#define DSDB_PASSWORD_BYPASS_LAST_SET 0x8000
+#define DSDB_SEARCH_SEARCH_ALL_PARTITIONS 0x00001
+#define DSDB_SEARCH_SHOW_DELETED 0x00002
+#define DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT 0x00004
+#define DSDB_SEARCH_REVEAL_INTERNALS 0x00008
+#define DSDB_SEARCH_SHOW_EXTENDED_DN 0x00010
+#define DSDB_MODIFY_RELAX 0x00020
+#define DSDB_MODIFY_PERMISSIVE 0x00040
+#define DSDB_FLAG_AS_SYSTEM 0x00080
+#define DSDB_TREE_DELETE 0x00100
+#define DSDB_SEARCH_ONE_ONLY 0x00200 /* give an error unless 1 record */
+#define DSDB_SEARCH_SHOW_RECYCLED 0x00400
+#define DSDB_PROVISION 0x00800
+#define DSDB_BYPASS_PASSWORD_HASH 0x01000
+#define DSDB_SEARCH_NO_GLOBAL_CATALOG 0x02000
+#define DSDB_MODIFY_PARTIAL_REPLICA 0x04000
+#define DSDB_PASSWORD_BYPASS_LAST_SET 0x08000
+#define DSDB_REPLMD_VANISH_LINKS 0x10000
bool is_attr_in_list(const char * const * attrs, const char *attr);