summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-27 19:26:37 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:58:00 +0200
commitfea81f9056558a73608acbf5170ace0b7d4c1a8f (patch)
tree6ae925e912c211f3544003f9a24040279f3d8f0b /source3/lib
parente96a99f3e2b33525cf87eff3d2a13118f21c5186 (diff)
downloadsamba-fea81f9056558a73608acbf5170ace0b7d4c1a8f.tar.gz
samba-fea81f9056558a73608acbf5170ace0b7d4c1a8f.tar.bz2
samba-fea81f9056558a73608acbf5170ace0b7d4c1a8f.zip
netapi: always return correct account name in NetUserGetInfo/NetUserEnum.
Guenther (This used to be commit 47768bfb01815f7b6bf687fe04ca7d19385aea59)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/user.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 3c42f8b931..887ab94002 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -748,7 +748,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx,
switch (level) {
case 10:
- info10.usri10_name = talloc_strdup(mem_ctx, user_name);
+ info10.usri10_name = talloc_strdup(mem_ctx,
+ info21->account_name.string);
NT_STATUS_HAVE_NO_MEMORY(info10.usri10_name);
info10.usri10_comment = talloc_strdup(mem_ctx,
@@ -766,7 +767,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx,
break;
case 20:
- info20.usri20_name = talloc_strdup(mem_ctx, user_name);
+ info20.usri20_name = talloc_strdup(mem_ctx,
+ info21->account_name.string);
NT_STATUS_HAVE_NO_MEMORY(info20.usri20_name);
info20.usri20_comment = talloc_strdup(mem_ctx,
@@ -784,7 +786,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx,
break;
case 23:
- info23.usri23_name = talloc_strdup(mem_ctx, user_name);
+ info23.usri23_name = talloc_strdup(mem_ctx,
+ info21->account_name.string);
NT_STATUS_HAVE_NO_MEMORY(info23.usri23_name);
info23.usri23_comment = talloc_strdup(mem_ctx,