diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-06 13:23:05 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-10-06 13:23:41 +0200 |
commit | 37fd93194db10fc832ed3fa1ec880ebc26be904b (patch) | |
tree | 6ee8e6ef1d15123fc4775cc687c872f6d77ea842 /lib/tdb/pytdb.c | |
parent | 828793852f3785c620f2716c60f8b1640880ee50 (diff) | |
download | samba-37fd93194db10fc832ed3fa1ec880ebc26be904b.tar.gz samba-37fd93194db10fc832ed3fa1ec880ebc26be904b.tar.bz2 samba-37fd93194db10fc832ed3fa1ec880ebc26be904b.zip |
tdb: Make robust against shrinking tdbs
When probing for a size change (eg. just before tdb_expand, tdb_check,
tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1). Unfortunately
this does nothing if the tdb has actually shrunk, which as Volker
demonstrated, can actually happen if a "longlived" parent crashes.
So move the map/update size/remap before the limit check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/pytdb.c')
0 files changed, 0 insertions, 0 deletions