winbindd: disconnect child process if request is cancelled at main process
authorUri Simchoni <urisimchoni@gmail.com>
Wed, 24 Jun 2015 07:55:06 +0000 (10:55 +0300)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 29 Jun 2015 12:00:24 +0000 (14:00 +0200)
commiteaf99203093cabc3069f1c69345d38d739b0663d
treec892b473d4eb7c3ca7cd3e12db50b832dc0079a5
parente3373e9d1463fc26f52dfea18fca4739578e482e
winbindd: disconnect child process if request is cancelled at main process

When cancelling a request at the main winbindd process, that is currently
being served by a child winbindd process, just freeing all objects related
to the request is not enough, as the next bytes to come through the pipe
from the child process are the response to the cancelled request, and the
object reading those bytes will be the next request. This breaks the protocol.

This change, upon canceling a request that is being served, closes the
connection to the child process, causing the next request to be served
by a new child process (and the detached child to die eventually).

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

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun 29 14:00:24 CEST 2015 on sn-devel-104
source3/winbindd/winbindd_dual.c