From a760f169f4936d7e2677db9229181e2c5ac23bcd Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Fri, 20 Nov 2009 13:22:38 +0200 Subject: Some changes to allow processing of ldap controls on modify requests. ldap_backend used to filter out ldap controls on modify. Also, modified python binding for ldap_modify to allow writing tests for such controls. --- source4/lib/ldb/common/ldb.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 20e32064ec..3a8023ac93 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -1378,10 +1378,11 @@ int ldb_add(struct ldb_context *ldb, } /* - modify the specified attributes of a record + same as ldb_modify, but accepts controls */ -int ldb_modify(struct ldb_context *ldb, - const struct ldb_message *message) +int ldb_modify_ctrl(struct ldb_context *ldb, + const struct ldb_message *message, + struct ldb_control **controls) { struct ldb_request *req; int ret; @@ -1393,7 +1394,7 @@ int ldb_modify(struct ldb_context *ldb, ret = ldb_build_mod_req(&req, ldb, ldb, message, - NULL, + controls, NULL, ldb_op_default_callback, NULL); @@ -1406,6 +1407,14 @@ int ldb_modify(struct ldb_context *ldb, talloc_free(req); return ret; } +/* + modify the specified attributes of a record +*/ +int ldb_modify(struct ldb_context *ldb, + const struct ldb_message *message) +{ + return ldb_modify_ctrl(ldb, message, NULL); +} /* -- cgit