mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s3 winbindd: Return number of groups in data.num_entries for WINBINDD_LIST_GROUPS
This allows to test if there's something wrong with the group list in extra_data or if there's simply no groups in the database. Volker, please check.
This commit is contained in:
parent
a4f21d5dc8
commit
932d4a874b
@ -153,7 +153,7 @@ NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
|
||||
NTSTATUS status;
|
||||
char *result;
|
||||
int i;
|
||||
uint32_t j;
|
||||
uint32_t j, num_entries = 0;
|
||||
size_t len;
|
||||
|
||||
if (tevent_req_is_nterror(req, &status)) {
|
||||
@ -193,10 +193,12 @@ NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
|
||||
len += this_len;
|
||||
result[len] = ',';
|
||||
len += 1;
|
||||
num_entries++;
|
||||
}
|
||||
}
|
||||
result[len-1] = '\0';
|
||||
|
||||
response->data.num_entries = num_entries;
|
||||
response->extra_data.data = result;
|
||||
response->length += len;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user