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>
Tue, 14 Jun 2011 10:57:53 +0000 (12:57 +0200)
commit0d8e1326f7715def2b0aa6d9e656225685818fd3
tree4a28b8e0e2883ee76b53ed3f236e269e8d2f035b
parent69b4adc4d90b3a7625c090d09b58becfefe550dd
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).
(cherry picked from commit c8ba5d41f3c2ab25cb9b9d0fa78b4f884d4b9721)
lib/tdb/common/io.c