mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
netapi: fix add_GROUP_USERS_INFO_X_buffer.
Guenther
This commit is contained in:
@ -2787,15 +2787,23 @@ NTSTATUS add_GROUP_USERS_INFO_X_buffer(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 0:
|
case 0:
|
||||||
|
if (group_name) {
|
||||||
u0.grui0_name = talloc_strdup(mem_ctx, group_name);
|
u0.grui0_name = talloc_strdup(mem_ctx, group_name);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
|
NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
|
||||||
|
} else {
|
||||||
|
u0.grui0_name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ADD_TO_ARRAY(mem_ctx, struct GROUP_USERS_INFO_0, u0,
|
ADD_TO_ARRAY(mem_ctx, struct GROUP_USERS_INFO_0, u0,
|
||||||
(struct GROUP_USERS_INFO_0 **)buffer, num_entries);
|
(struct GROUP_USERS_INFO_0 **)buffer, num_entries);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
if (group_name) {
|
||||||
u1.grui1_name = talloc_strdup(mem_ctx, group_name);
|
u1.grui1_name = talloc_strdup(mem_ctx, group_name);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
|
NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
|
||||||
|
} else {
|
||||||
|
u1.grui1_name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
u1.grui1_attributes = attributes;
|
u1.grui1_attributes = attributes;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user