s4/replmd: delete checks flag before laborious search
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 30 Apr 2019 22:35:46 +0000 (10:35 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 1 May 2019 03:12:07 +0000 (03:12 +0000)
commit8488651bdd6e36252bd2edde4683fd0c5c998fe2
treea8ae68aee9af4d62648785d892d55ddf66c11e8d
parent5ac626e7b0565bf880d1b18a3b414bc67d8606df
s4/replmd: delete checks flag before laborious search

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>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c