diff options
author | Günther Deschner <gd@samba.org> | 2008-10-23 03:32:38 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-23 11:46:18 +0200 |
commit | b7c38abe27e7f5a0823f8dacff51b1724426314c (patch) | |
tree | 249ee5785b0be71e33aa885295280950adc4574b /source3/lib | |
parent | fafa60844151c60e02f5b50e98e2e6e973e56d1d (diff) | |
download | samba-b7c38abe27e7f5a0823f8dacff51b1724426314c.tar.gz samba-b7c38abe27e7f5a0823f8dacff51b1724426314c.tar.bz2 samba-b7c38abe27e7f5a0823f8dacff51b1724426314c.zip |
netapi: fix add_GROUP_USERS_INFO_X_buffer.
Guenther
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/user.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 98c96ac450..2abc25d681 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -2787,15 +2787,23 @@ NTSTATUS add_GROUP_USERS_INFO_X_buffer(TALLOC_CTX *mem_ctx, switch (level) { case 0: - u0.grui0_name = talloc_strdup(mem_ctx, group_name); - NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name); + if (group_name) { + u0.grui0_name = talloc_strdup(mem_ctx, group_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, (struct GROUP_USERS_INFO_0 **)buffer, num_entries); break; case 1: - u1.grui1_name = talloc_strdup(mem_ctx, group_name); - NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name); + if (group_name) { + u1.grui1_name = talloc_strdup(mem_ctx, group_name); + NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name); + } else { + u1.grui1_name = NULL; + } u1.grui1_attributes = attributes; |