diff options
author | Nadezhda Ivanova <nadezhda.ivanova@postpath.com> | 2009-11-20 13:22:38 +0200 |
---|---|---|
committer | Nadezhda Ivanova <nadezhda.ivanova@postpath.com> | 2009-11-20 13:22:38 +0200 |
commit | a760f169f4936d7e2677db9229181e2c5ac23bcd (patch) | |
tree | 545c9c43890aa7d1d8cf810eb1d70e85cfd695c5 /source4/lib/ldb/common | |
parent | 07e971f1c169387af806af05aa60b6d021feb898 (diff) | |
download | samba-a760f169f4936d7e2677db9229181e2c5ac23bcd.tar.gz samba-a760f169f4936d7e2677db9229181e2c5ac23bcd.tar.bz2 samba-a760f169f4936d7e2677db9229181e2c5ac23bcd.zip |
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.
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 17 |
1 files changed, 13 insertions, 4 deletions
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); +} /* |