summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-11-23 09:15:25 +0100
committerMichael Adam <obnox@samba.org>2012-11-30 17:17:20 +0100
commitb3486f4e1a2108bd3af7ce760c8410a560c5237d (patch)
treec4f5fabdd39a72ede02445a7bc8d57cbeae1c832 /source4/dsdb
parent74e3f0ea0aa0352bf15e92c70256fa9b4d291cd9 (diff)
downloadsamba-b3486f4e1a2108bd3af7ce760c8410a560c5237d.tar.gz
samba-b3486f4e1a2108bd3af7ce760c8410a560c5237d.tar.bz2
samba-b3486f4e1a2108bd3af7ce760c8410a560c5237d.zip
s4:dsdb/descriptor: remove support for unused LDB_CONTROL_RECALCULATE_SD_OID
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/descriptor.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index d6d83fcf22..fb99ab3c23 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -607,7 +607,6 @@ static int descriptor_add(struct ldb_module *module, struct ldb_request *req)
static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
{
struct ldb_context *ldb = ldb_module_get_ctx(module);
- struct ldb_control *sd_recalculate_control;
struct ldb_request *mod_req;
struct ldb_message *msg;
struct ldb_result *current_res, *parent_res;
@@ -634,11 +633,7 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
}
user_sd = ldb_msg_find_ldb_val(req->op.mod.message, "nTSecurityDescriptor");
- /* This control forces the recalculation of the SD also when
- * no modification is performed. */
- sd_recalculate_control = ldb_request_get_control(req,
- LDB_CONTROL_RECALCULATE_SD_OID);
- if (!user_sd && !sd_recalculate_control) {
+ if (!user_sd) {
return ldb_next_request(module, req);
}
@@ -708,29 +703,9 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
sd_element = ldb_msg_find_element(msg,
"nTSecurityDescriptor");
sd_element->values[0] = *sd;
- } else if (sd_recalculate_control != NULL) {
- /* In this branch we really do force the recalculation
- * of the SD */
- ldb_msg_remove_attr(msg, "nTSecurityDescriptor");
-
- ret = ldb_msg_add_steal_value(msg,
- "nTSecurityDescriptor",
- sd);
- if (ret != LDB_SUCCESS) {
- return ldb_error(ldb, ret,
- "descriptor_modify: Could not replace SD value in message.");
- }
- sd_element = ldb_msg_find_element(msg,
- "nTSecurityDescriptor");
- sd_element->flags = LDB_FLAG_MOD_REPLACE;
}
}
- /* mark the controls as non-critical since we've handled them */
- if (sd_recalculate_control != NULL) {
- sd_recalculate_control->critical = 0;
- }
-
ret = ldb_build_mod_req(&mod_req, ldb, req,
msg,
req->controls,