]> git.ipfire.org Git - thirdparty/samba.git/commit
python/samba/samdb: Only do caching of well known DNs in dbcheck
authorAndrew Bartlett <abartlet@samba.org>
Fri, 23 Feb 2024 02:32:06 +0000 (15:32 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 27 Feb 2024 01:11:37 +0000 (01:11 +0000)
commit9a5cc120421e5d8b60897a9d49e2eef820eff598
treeae609041340757287fe8cc130131df5900bc38bb
parent5a0fce58650770bc7701d1be72492637c2ced63c
python/samba/samdb: Only do caching of well known DNs in dbcheck

The fact that get_wellknown_dn() returned a cached DN that could
not be modified safely was unexpected, particularly given that
other similar routines did not do that.

The use case given at the time this was written by
Matthieu Patou in 6122acad0f1a7bc23b6f58862c16968e13da979d
was dbcheck, so move the cache there, and name it clearly.

dbcheck is the only case that uses this rotuine in an inner
loop.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
python/samba/dbchecker.py
python/samba/samdb.py