return NT_STATUS_OK;
}
-static int ldb_add_with_context(struct ldb_context *ldb,
- const struct ldb_message *message,
- void *context)
+static int ldb_add_with_controls(struct ldb_context *ldb,
+ const struct ldb_message *message,
+ struct ldb_control **controls,
+ void *context)
{
struct ldb_request *req;
int ret;
ret = ldb_build_add_req(&req, ldb, ldb,
message,
- NULL,
+ controls,
context,
ldb_modify_default_callback,
NULL);
return ret;
}
-int ldb_rename_with_context(struct ldb_context *ldb,
- struct ldb_dn *olddn,
- struct ldb_dn *newdn,
- void *context)
+int ldb_rename_with_controls(struct ldb_context *ldb,
+ struct ldb_dn *olddn,
+ struct ldb_dn *newdn,
+ struct ldb_control **controls,
+ void *context)
{
struct ldb_request *req;
int ret;
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ldb_add_with_context(samdb, msg, res);
+ ldb_ret = ldb_add_with_controls(samdb, msg, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ldb_rename_with_context(samdb, olddn, newdn, res);
+ ldb_ret = ldb_rename_with_controls(samdb, olddn, newdn, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}