summaryrefslogtreecommitdiff
path: root/source4/libnet/userinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet/userinfo.c')
-rw-r--r--source4/libnet/userinfo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index 75c46e477d7..9530f9efdb5 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -90,8 +90,12 @@ static void continue_userinfo_lookup(struct tevent_req *subreq)
/* have we actually got name resolved
- we're looking for only one at the moment */
- if (s->lookup.out.rids->count == 0) {
- composite_error(c, NT_STATUS_NO_SUCH_USER);
+ if (s->lookup.out.rids->count != s->lookup.in.num_names) {
+ composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
+ return;
+ }
+ if (s->lookup.out.types->count != s->lookup.in.num_names) {
+ composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
}