tdb_expand: limit the expansion with huge records
authorSimo Sorce <idra@samba.org>
Mon, 18 Apr 2011 12:45:11 +0000 (22:15 +0930)
committerKarolin Seeger <kseeger@samba.org>
Wed, 18 May 2011 18:28:55 +0000 (20:28 +0200)
commitc8ba5d41f3c2ab25cb9b9d0fa78b4f884d4b9721
treeb804be97477f69d07532d289646b706d3bad6730
parent392d6b2ab8dcde4176a6e872699a5a076ab92068
tdb_expand: limit the expansion with huge records

ldb can create huge records when saving indexes.
Limit the tdb expansion to avoid consuming a lot of memory for
no good reason if the record being saved is huge.

Fix bug #7610 (winbindd_cache.tdb grows too large when scaled).
lib/tdb/common/io.c