diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-05 14:42:40 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-10 11:12:05 +0100 |
commit | 0cec6107d870ba2e67859b824306cde0686691cb (patch) | |
tree | b68aeda09c4fefe426e37803ae9a2a95fe8952ea /source4/dsdb/samdb/ldb_modules | |
parent | 68fbfa2237a570a48d2ae3a5421cdcacae6e6d34 (diff) | |
download | samba-0cec6107d870ba2e67859b824306cde0686691cb.tar.gz samba-0cec6107d870ba2e67859b824306cde0686691cb.tar.bz2 samba-0cec6107d870ba2e67859b824306cde0686691cb.zip |
s4:repl_meta_data LDB module - always ask manually for the current partition control
Otherwise the "partition" LDB module doesn't give it back anymore.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 81b06fd6ba..b38f45fa13 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -993,6 +993,17 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req) return ret; } + /* current partition control is needed by "replmd_op_callback" */ + if (ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID) == NULL) { + ret = ldb_request_add_control(down_req, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, NULL); + if (ret != LDB_SUCCESS) { + talloc_free(ac); + return ret; + } + } + if (functional_level == DS_DOMAIN_FUNCTION_2000) { ret = ldb_request_add_control(down_req, DSDB_CONTROL_APPLY_LINKS, false, NULL); if (ret != LDB_SUCCESS) { @@ -2246,6 +2257,17 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) return ret; } + /* current partition control is needed by "replmd_op_callback" */ + if (ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID) == NULL) { + ret = ldb_request_add_control(down_req, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, NULL); + if (ret != LDB_SUCCESS) { + talloc_free(ac); + return ret; + } + } + /* If we are in functional level 2000, then * replmd_modify_handle_linked_attribs will have done * nothing */ @@ -2378,6 +2400,18 @@ static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *are talloc_free(ac); return ret; } + + /* current partition control is needed by "replmd_op_callback" */ + if (ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID) == NULL) { + ret = ldb_request_add_control(down_req, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, NULL); + if (ret != LDB_SUCCESS) { + talloc_free(ac); + return ret; + } + } + talloc_steal(down_req, msg); ret = add_time_element(msg, "whenChanged", t); @@ -2949,6 +2983,12 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) LDB_REQ_SET_LOCATION(change_req); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + /* current partition control needed by "repmd_op_callback" */ + ret = ldb_request_add_control(change_req, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, NULL); + if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + return ldb_next_request(ar->module, change_req); } @@ -3237,6 +3277,12 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) LDB_REQ_SET_LOCATION(change_req); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + /* current partition control needed by "repmd_op_callback" */ + ret = ldb_request_add_control(change_req, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, NULL); + if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + return ldb_next_request(ar->module, change_req); } |