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)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2008 13:00:20 +0000 (15:00 +0200)
metze
(This used to be commit 8e9fdef792e612e414444e7714a2fd4513892248)

source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_dual.c

index adb631b57b85b930ac6fee5b9c3d2ff9f25e446a..fc1a9cae933705f32727ef95dacf760dbc048fae 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);
        }