winbind: winbind_messaging_context -> server_messaging_context
authorVolker Lendecke <vl@samba.org>
Fri, 17 Nov 2017 10:42:34 +0000 (11:42 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 17 Nov 2017 23:09:16 +0000 (00:09 +0100)
commitd8a01d09c13728f36107f6eb94ecb7653706a4db
treee95f7f5e3f8f4ead32248553cd24d4515161f275
parente1f12acc13a3cc004518ac3460c6000ea0b95115
winbind: winbind_messaging_context -> server_messaging_context

Don't use winbind_messaging_context anymore.

This fixes a bug analysed by Peter Somogyi <PSOMOGYI@hu.ibm.com>: If a
parent winbind forks, it only called reinit_after_fork on
winbind_messaging_context. On the other hand, deep in dbwrap_open we use
server_messaging_context(). This is not reinitialized by
winbind_reinit_after fork, so the parent and child share a ctdb
connection. This is invalid, because replies from ctdb end up in the
wrong process.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13150

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd.c
source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_dual.c
source3/winbindd/winbindd_dual_srv.c