summaryrefslogtreecommitdiff
path: root/source3/rpcclient/display.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-08-29 16:36:21 +0000
committerLuke Leighton <lkcl@samba.org>1999-08-29 16:36:21 +0000
commit42fdd41b1d3e59f9052a9b382d0369315f77e718 (patch)
tree36f659072199e6bfef3f5ea528e5bc1581cb54da /source3/rpcclient/display.c
parent53b4095d2ceb91ae45efd04ab30626d6c352f72a (diff)
downloadsamba-42fdd41b1d3e59f9052a9b382d0369315f77e718.tar.gz
samba-42fdd41b1d3e59f9052a9b382d0369315f77e718.tar.bz2
samba-42fdd41b1d3e59f9052a9b382d0369315f77e718.zip
improved "dominfo" rpcclient command
(This used to be commit 65a54b6e16c40ec40727547593154b341d98fc83)
Diffstat (limited to 'source3/rpcclient/display.c')
-rw-r--r--source3/rpcclient/display.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c
index 55010390b4..70a9f76f90 100644
--- a/source3/rpcclient/display.c
+++ b/source3/rpcclient/display.c
@@ -2190,6 +2190,88 @@ void display_sam_sync(FILE *out_hnd, enum action_type action,
}
}
+/****************************************************************************
+ display sam sync structure
+ ****************************************************************************/
+void display_sam_unk_info_2(FILE *out_hnd, enum action_type action,
+ SAM_UNK_INFO_2 *info2)
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ fstring name;
+ unistr2_to_ascii(name, &(info2->uni_domain), sizeof(name)-1);
+ fprintf(out_hnd, "Domain:\t%s\n", name);
+
+ unistr2_to_ascii(name, &(info2->uni_server), sizeof(name)-1);
+ fprintf(out_hnd, "Server:\t%s\n", name);
+
+ fprintf(out_hnd, "Total Users:\t%d\n", info2->num_domain_usrs);
+ fprintf(out_hnd, "Total Groups:\t%d\n", info2->num_domain_grps);
+ fprintf(out_hnd, "Total Aliases:\t%d\n", info2->num_local_grps);
+
+ fprintf(out_hnd, "Sequence No:\t%d\n", info2->seq_num);
+
+ fprintf(out_hnd, "Unknown 0:\t0x%x\n", info2->unknown_0);
+ fprintf(out_hnd, "Unknown 1:\t0x%x\n", info2->unknown_1);
+ fprintf(out_hnd, "Unknown 2:\t0x%x\n", info2->unknown_2);
+ fprintf(out_hnd, "Unknown 3:\t0x%x\n", info2->unknown_3);
+ fprintf(out_hnd, "Unknown 4:\t0x%x\n", info2->unknown_4);
+ fprintf(out_hnd, "Unknown 5:\t0x%x\n", info2->unknown_5);
+ fprintf(out_hnd, "Unknown 6:\t0x%x\n", info2->unknown_6);
+
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ fprintf(out_hnd, "\n");
+ break;
+ }
+ }
+}
+
+/****************************************************************************
+ display sam sync structure
+ ****************************************************************************/
+void display_sam_unk_ctr(FILE *out_hnd, enum action_type action,
+ uint32 switch_value, SAM_UNK_CTR *ctr)
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ fprintf(out_hnd, "\tSAM Domain Info\n");
+ fprintf(out_hnd, "\t---------------\n");
+
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ switch (switch_value)
+ {
+ case 2:
+ {
+ display_sam_unk_info_2(out_hnd, ACTION_HEADER , &ctr->info.inf2);
+ display_sam_unk_info_2(out_hnd, ACTION_ENUMERATE, &ctr->info.inf2);
+ display_sam_unk_info_2(out_hnd, ACTION_FOOTER , &ctr->info.inf2);
+ break;
+ }
+ }
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ fprintf(out_hnd, "\n");
+ break;
+ }
+ }
+}
+
#if COPY_THIS_TEMPLATE
/****************************************************************************