winbindd: call reinit_after_fork() in the child processes
authorStefan Metzmacher <metze@samba.org>
Mon, 14 Apr 2008 23:02:42 +0000 (01:02 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 21 Apr 2008 06:40:41 +0000 (08:40 +0200)
metze
(cherry picked from commit 8e9fdef792e612e414444e7714a2fd4513892248)

source/winbindd/winbindd_cm.c
source/winbindd/winbindd_dual.c

index 8e275b22698f7ebe813bac5ace7516986cc4dcb8..579edcf4fbd284a4a0f656f28427e4436259fbfe 100644 (file)
@@ -199,9 +199,8 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
 
        /* Leave messages blocked - we will never process one. */
 
-       /* tdb needs special fork handling */
-       if (tdb_reopen_all(1) == -1) {
-               DEBUG(0,("tdb_reopen_all failed.\n"));
+       if (!reinit_after_fork(winbind_messaging_context())) {
+               DEBUG(0,("reinit_after_fork() failed\n"));
                _exit(0);
        }
 
index 3c342e54a4753be874af18a656f66365a75f4b13..77fbe3c0ed401b4dbcc6e830a65fd155d53bbf74 100644 (file)
@@ -1005,9 +1005,8 @@ static bool fork_domain_child(struct winbindd_child *child)
        state.sock = fdpair[0];
        close(fdpair[1]);
 
-       /* tdb needs special fork handling */
-       if (tdb_reopen_all(1) == -1) {
-               DEBUG(0,("tdb_reopen_all failed.\n"));
+       if (!reinit_after_fork(winbind_messaging_context())) {
+               DEBUG(0,("reinit_after_fork() failed\n"));
                _exit(0);
        }