From fea81f9056558a73608acbf5170ace0b7d4c1a8f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 19:26:37 +0200 Subject: netapi: always return correct account name in NetUserGetInfo/NetUserEnum. Guenther (This used to be commit 47768bfb01815f7b6bf687fe04ca7d19385aea59) --- source3/lib/netapi/user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/lib') 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, -- cgit