s4-wbclient: Cope with winbind returning an error
authorAndrew Bartlett <abartlet@samba.org>
Mon, 7 Apr 2014 02:06:21 +0000 (14:06 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Apr 2014 10:53:13 +0000 (12:53 +0200)
Change-Id: I8eaf858f9e9e55eec20aa2c585db5459fb73b887
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Apr  8 12:53:13 CEST 2014 on sn-devel-104

source4/libcli/wbclient/wbclient.c

index 165333a6b587494fa0ecb8ae207af8a3efdf3a7b..b5183be121b409d228b25e9aff535e3d6d4c578e 100644 (file)
@@ -155,6 +155,10 @@ NTSTATUS wbc_sids_to_xids(struct tevent_context *ev, struct id_map *ids,
 
        close(fd);
 
+       if (resp->result != WINBINDD_OK || p == NULL) {
+               return NT_STATUS_INTERNAL_ERROR;
+       }
+
        p = resp->extra_data.data;
 
        for (i=0; i<count; i++) {