summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-05-04 19:01:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:44 -0500
commit0fe21ac5609940be815148a2f73e1e456b7c3cce (patch)
tree85a765da983a40c7c5ab93a166afec1b11e3dca7 /source3/rpcclient
parent46c35b17a32d479f5780ca6a24e4e9c3b9cc2403 (diff)
downloadsamba-0fe21ac5609940be815148a2f73e1e456b7c3cce.tar.gz
samba-0fe21ac5609940be815148a2f73e1e456b7c3cce.tar.bz2
samba-0fe21ac5609940be815148a2f73e1e456b7c3cce.zip
r15442: Add some more client rpc for the querydominfo calls (from samba4 idl).
Also return the hostname for the level 6 call (to be consistent with the server name in level 2). Guenther (This used to be commit 41b72e77ae70c96de4659af6b4b6bd842dd67981)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index ca0b6e9624..cbf638e7e6 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -208,6 +208,35 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
printf("Unknown 6:\t0x%x\n", info2->unknown_6);
}
+static void display_sam_unk_info_3(SAM_UNK_INFO_3 *info3)
+{
+ printf("Force Logoff:\t%d\n", (int)nt_time_to_unix_abs(&info3->logout));
+}
+
+static void display_sam_unk_info_4(SAM_UNK_INFO_4 *info4)
+{
+ fstring name;
+
+ unistr2_to_ascii(name, &info4->uni_comment, sizeof(name) - 1);
+ printf("Comment:\t%s\n", name);
+}
+
+static void display_sam_unk_info_5(SAM_UNK_INFO_5 *info5)
+{
+ fstring name;
+
+ unistr2_to_ascii(name, &info5->uni_domain, sizeof(name) - 1);
+ printf("Domain:\t\t%s\n", name);
+}
+
+static void display_sam_unk_info_6(SAM_UNK_INFO_6 *info6)
+{
+ fstring name;
+
+ unistr2_to_ascii(name, &info6->uni_server, sizeof(name) - 1);
+ printf("Server:\t\t%s\n", name);
+}
+
static void display_sam_unk_info_7(SAM_UNK_INFO_7 *info7)
{
printf("Server Role:\t%s\n", server_role_str(info7->server_role));
@@ -218,7 +247,11 @@ static void display_sam_unk_info_8(SAM_UNK_INFO_8 *info8)
printf("Sequence No:\t%d\n", info8->seq_num.low);
printf("Domain Create Time:\t%s\n",
http_timestring(nt_time_to_unix(&info8->domain_create_time)));
+}
+static void display_sam_unk_info_9(SAM_UNK_INFO_9 *info9)
+{
+ printf("unknown:\t%d (0x%08x)\n", info9->unknown, info9->unknown);
}
static void display_sam_unk_info_12(SAM_UNK_INFO_12 *info12)
@@ -228,6 +261,16 @@ static void display_sam_unk_info_12(SAM_UNK_INFO_12 *info12)
printf("Lockout after bad attempts: %d\n", info12->bad_attempt_lockout);
}
+static void display_sam_unk_info_13(SAM_UNK_INFO_13 *info13)
+{
+ printf("Sequence No:\t%d\n", info13->seq_num.low);
+ printf("Domain Create Time:\t%s\n",
+ http_timestring(nt_time_to_unix(&info13->domain_create_time)));
+ printf("Unknown1:\t%d\n", info13->unknown1);
+ printf("Unknown2:\t%d\n", info13->unknown2);
+
+}
+
static void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1)
{
fstring tmp;
@@ -1367,15 +1410,34 @@ static NTSTATUS cmd_samr_query_dominfo(struct rpc_pipe_client *cli,
case 2:
display_sam_unk_info_2(&ctr.info.inf2);
break;
+ case 3:
+ display_sam_unk_info_3(&ctr.info.inf3);
+ break;
+ case 4:
+ display_sam_unk_info_4(&ctr.info.inf4);
+ break;
+ case 5:
+ display_sam_unk_info_5(&ctr.info.inf5);
+ break;
+ case 6:
+ display_sam_unk_info_6(&ctr.info.inf6);
+ break;
case 7:
display_sam_unk_info_7(&ctr.info.inf7);
break;
case 8:
display_sam_unk_info_8(&ctr.info.inf8);
break;
+ case 9:
+ display_sam_unk_info_9(&ctr.info.inf9);
+ break;
case 12:
display_sam_unk_info_12(&ctr.info.inf12);
break;
+ case 13:
+ display_sam_unk_info_13(&ctr.info.inf13);
+ break;
+
default:
printf("cannot display domain info for switch value %d\n",
switch_level);