Most (perhaps all) attributes that are in the "must not remove" list also
have the PRESERVEONDELETE bit set, and checking bits is much cheaper
than a linear search involving strcasecmp. If we check the bit first
we save work.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
dsdb_flags |= DSDB_REPLMD_VANISH_LINKS;
} else if (sa->linkID == 0) {
- if (ldb_attr_in_list(preserved_attrs, el->name)) {
+ if (sa->searchFlags & SEARCH_FLAG_PRESERVEONDELETE) {
continue;
}
- if (sa->searchFlags & SEARCH_FLAG_PRESERVEONDELETE) {
+ if (ldb_attr_in_list(preserved_attrs, el->name)) {
continue;
}
} else {