Ensure we catch an error in the query_user() reply in the receive function.
authorGerald (Jerry) Carter <jerry@samba.org>
Wed, 31 Oct 2007 02:21:49 +0000 (22:21 -0400)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 31 Oct 2007 02:21:49 +0000 (22:21 -0400)
backport of v3-2-test patch from Dmitry Butskoy <buc@odusz.so-cdu.ru>.

source/nsswitch/winbindd_async.c

index eb8631ab8689fb3878331e821af136bed2ebde1a..32d4e66b0a9ce341ef49fa062ccf5a5b4f1cc64b 100644 (file)
@@ -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,