s3: fix the fix for bug #6195 - dont let smbd child processes panic
authorMichael Adam <obnox@samba.org>
Wed, 1 Apr 2009 10:23:07 +0000 (12:23 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 1 Apr 2009 10:43:40 +0000 (12:43 +0200)
commita7bbe8d10835d813a8d528e6e70f5d944ac0f804
tree71fc3cfa1c68b29f1b0a4ec1ffc696a48ecefd1f
parent864144fc82d49e228a4e1c49dfaf004ba19d1088
s3: fix the fix for bug #6195 - dont let smbd child processes panic

This patch makes sure the original and temporary TDBs are closed
_before_ the rename. Originally, the open TDB was renamed, and so
the name passdb.tdb.tmp stayed around in the db context. Hence
upon client connect, the smbd children died because reinit_after_fork()
calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
existed no longer...

Michael
source3/passdb/pdb_tdb.c