s4-lsa: Cache sam.ldb handle in lsa_LookupSids3/LookupNames4
authorAndrew Bartlett <abartlet@samba.org>
Wed, 25 Aug 2021 00:03:08 +0000 (12:03 +1200)
committerJeremy Allison <jra@samba.org>
Sun, 5 Sep 2021 03:19:26 +0000 (03:19 +0000)
commitae57d22e45b33537e9fca5969e9b68abd1ad633f
treefa2ed5e94cdb476ce1b20fcfe0641818f836d519
parentb40761b42e889369599c5eb355028ba377c43b49
s4-lsa: Cache sam.ldb handle in lsa_LookupSids3/LookupNames4

Since 5c0345ea9bb34695dcd7be6c913748323bebe937 this
would not have been implicitly cached via the ldb_wrap
cache, due to the recording of the remote IP address
(which is a good thing).

This creates a more explicit and direct correct
cache on the connection.

The common code, including the SCHANNEL check is
placed into a helper function.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14807

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Sep  5 03:19:26 UTC 2021 on sn-devel-184
source4/rpc_server/lsa/lsa_lookup.c