From bcdaa23798f74cdec8973201a849f562929ea416 Mon Sep 17 00:00:00 2001 From: Anatoliy Atanasov Date: Tue, 4 May 2010 11:48:18 +0200 Subject: s4/rodc: Fix the callbacks up the stack to handle referrals on modify requests --- source4/lib/ldb/modules/rdn_name.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c index a473f251af..f1c167cc39 100644 --- a/source4/lib/ldb/modules/rdn_name.c +++ b/source4/lib/ldb/modules/rdn_name.c @@ -70,6 +70,11 @@ static int rdn_name_add_callback(struct ldb_request *req, return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } + + if (ares->type == LDB_REPLY_REFERRAL) { + return ldb_module_send_referral(ac->req, ares->referral); + } + if (ares->error != LDB_SUCCESS) { return ldb_module_done(ac->req, ares->controls, ares->response, ares->error); @@ -193,6 +198,11 @@ static int rdn_modify_callback(struct ldb_request *req, struct ldb_reply *ares) return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } + + if (ares->type == LDB_REPLY_REFERRAL) { + return ldb_module_send_referral(ac->req, ares->referral); + } + if (ares->error != LDB_SUCCESS) { return ldb_module_done(ac->req, ares->controls, ares->response, ares->error); @@ -225,6 +235,11 @@ static int rdn_rename_callback(struct ldb_request *req, struct ldb_reply *ares) if (!ares) { goto error; } + + if (ares->type == LDB_REPLY_REFERRAL) { + return ldb_module_send_referral(ac->req, ares->referral); + } + if (ares->error != LDB_SUCCESS) { return ldb_module_done(ac->req, ares->controls, ares->response, ares->error); -- cgit