From 027d976bb32f29dbb7d24272c70d4244d54f68c2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 20 Jan 2005 16:55:55 +0000 Subject: r4869: Display sam_user_info_7 in rpcclient. Guenther (This used to be commit 30e808ca07bec66d5ecd81cc8c86bb4a98874bc4) --- source3/rpcclient/cmd_samr.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 224d40ea74..a69a0cb73a 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -27,6 +27,17 @@ extern DOM_SID domain_sid; +/**************************************************************************** + display sam_user_info_7 structure + ****************************************************************************/ +static void display_sam_user_info_7(SAM_USER_INFO_7 *usr) +{ + fstring temp; + + unistr2_to_ascii(temp, &usr->uni_name, sizeof(temp)-1); + printf("\tUser Name :\t%s\n", temp); +} + /**************************************************************************** display sam_user_info_21 structure ****************************************************************************/ @@ -336,7 +347,17 @@ static NTSTATUS cmd_samr_query_user(struct cli_state *cli, if (!NT_STATUS_IS_OK(result)) goto done; - display_sam_user_info_21(user_ctr->info.id21); + switch (user_ctr->switch_value) { + case 21: + display_sam_user_info_21(user_ctr->info.id21); + break; + case 7: + display_sam_user_info_7(user_ctr->info.id7); + break; + default: + printf("Unsupported infolevel: %d\n", info_level); + break; + } done: return result; -- cgit