From: Gerald (Jerry) Carter Date: Wed, 31 Oct 2007 02:21:49 +0000 (-0400) Subject: Ensure we catch an error in the query_user() reply in the receive function. X-Git-Tag: samba-3.0.27a~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8cb09fe2d923fabbb6a7b909cc245c08128c0b67;p=thirdparty%2Fsamba.git Ensure we catch an error in the query_user() reply in the receive function. backport of v3-2-test patch from Dmitry Butskoy . --- diff --git a/source/nsswitch/winbindd_async.c b/source/nsswitch/winbindd_async.c index eb8631ab868..32d4e66b0a9 100644 --- a/source/nsswitch/winbindd_async.c +++ b/source/nsswitch/winbindd_async.c @@ -1413,6 +1413,12 @@ static void query_user_recv(TALLOC_CTX *mem_ctx, BOOL success, return; } + if (response->result != WINBINDD_OK) { + DEBUG(5, ("query_user returned an error\n")); + cont(private_data, False, NULL, NULL, NULL, NULL, -1, -1); + return; + } + cont(private_data, True, response->data.user_info.acct_name, response->data.user_info.full_name, response->data.user_info.homedir,