mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
dsdb: Provide shortcuut for repl_meta_data avoiding search of link targets
This makes processing of large numbers of linked attributes much faster, as we never care about the names during that processing Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
947996b7cb
commit
2aeae27cb4
@ -472,6 +472,20 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
|
||||
}
|
||||
}
|
||||
|
||||
if (!checked_reveal_control) {
|
||||
have_reveal_control =
|
||||
ldb_request_get_control(req, LDB_CONTROL_REVEAL_INTERNALS) != NULL;
|
||||
checked_reveal_control = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Shortcut for repl_meta_data. We asked for the data
|
||||
* 'as-is', so stop processing here!
|
||||
*/
|
||||
if (have_reveal_control && p->normalise == false && ac->inject == true) {
|
||||
return ldb_module_send_entry(ac->req, msg, ares->controls);
|
||||
}
|
||||
|
||||
/* Walk the returned elements (but only if we have a schema to
|
||||
* interpret the list with) */
|
||||
for (i = 0; ac->schema && i < msg->num_elements; i++) {
|
||||
@ -518,12 +532,6 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
|
||||
struct ldb_val *plain_dn = &msg->elements[i].values[j];
|
||||
bool is_deleted_objects = false;
|
||||
|
||||
if (!checked_reveal_control) {
|
||||
have_reveal_control =
|
||||
ldb_request_get_control(req, LDB_CONTROL_REVEAL_INTERNALS) != NULL;
|
||||
checked_reveal_control = true;
|
||||
}
|
||||
|
||||
/* this is a fast method for detecting deleted
|
||||
linked attributes, working on the unparsed
|
||||
ldb_val */
|
||||
|
Loading…
Reference in New Issue
Block a user