From: Günther Deschner Date: Thu, 23 Oct 2008 01:32:15 +0000 (+0200) Subject: netapi: fix NetUserGetGroups_r returning partial results. X-Git-Tag: samba-4.0.0alpha6~727 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fafa60844151c60e02f5b50e98e2e6e973e56d1d;p=thirdparty%2Fsamba.git netapi: fix NetUserGetGroups_r returning partial results. Guenther --- diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index fcb87b77bef..98c96ac450c 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -2916,12 +2916,13 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx, rids, &names, &types); - if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status) && + !NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) { werr = ntstatus_to_werror(status); goto done; } - for (i=0; i < rid_array->count; i++) { + for (i=0; i < names.count; i++) { status = add_GROUP_USERS_INFO_X_buffer(ctx, r->in.level, names.names[i].string,