s3: fix the fix for bug #6195 - dont let smbd child processes panic
commitaf0163fdfc774f3a032610aadbc1203a770970dc
authorMichael Adam <obnox@samba.org>
Wed, 1 Apr 2009 10:23:07 +0000 (1 12:23 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 1 Apr 2009 11:20:22 +0000 (1 13:20 +0200)
treee470658f6a5690d94e0018bdb7f40327179ffc03
parentebd468e96843d64f5078624764c230328d69197c
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
(cherry picked from commit 1ab40fbca806f1136dd1d65edd688beb5ec592c7)
source/passdb/pdb_tdb.c