summaryrefslogtreecommitdiff
path: root/source/rpcclient/display.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
commit2331aa32ab36c3ee5fd8cfbe972e57299939e33d (patch)
tree06fc60d51e017c48f89fd48961f8d5b8fd120488 /source/rpcclient/display.c
parent50f7bd8a9c47d073bbde66ae26e9f71f030afc4c (diff)
downloadsamba-2331aa32ab36c3ee5fd8cfbe972e57299939e33d.tar.gz
BDC support.
Diffstat (limited to 'source/rpcclient/display.c')
-rw-r--r--source/rpcclient/display.c88
1 files changed, 88 insertions, 0 deletions
diff --git a/source/rpcclient/display.c b/source/rpcclient/display.c
index dc801805c68..97e1cc83444 100644
--- a/source/rpcclient/display.c
+++ b/source/rpcclient/display.c
@@ -1903,6 +1903,94 @@ void display_eventlog_eventrecord(FILE *out_hnd, enum action_type action, EVENTL
}
}
+/****************************************************************************
+ display sam sync structure
+ ****************************************************************************/
+void display_sam_sync_ctr(FILE *out_hnd, enum action_type action,
+ SAM_DELTA_HDR *delta,
+ SAM_DELTA_CTR *ctr)
+{
+ fstring name;
+
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ switch (delta->type)
+ {
+ case 1:
+ {
+ unistr2_to_ascii(name, &(ctr->domain_info.uni_dom_name), sizeof(name)-1);
+ fprintf(out_hnd, "Domain: %s\n", name);
+ break;
+ }
+ case 2:
+ {
+ unistr2_to_ascii(name, &(ctr->group_info.uni_grp_name), sizeof(name)-1);
+ fprintf(out_hnd, "Group: %s\n", name);
+ break;
+ }
+ case 5:
+ {
+ unistr2_to_ascii(name, &(ctr->account_info.uni_acct_name), sizeof(name)-1);
+ fprintf(out_hnd, "Account: %s\n", name);
+
+ out_struct(out_hnd,
+ ctr->account_info.pass.buf_lm_pwd, 16, 8);
+ out_struct(out_hnd,
+ ctr->account_info.pass.buf_nt_pwd, 16, 8);
+
+ }
+ }
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ break;
+ }
+ }
+}
+
+/****************************************************************************
+ display sam sync structure
+ ****************************************************************************/
+void display_sam_sync(FILE *out_hnd, enum action_type action,
+ SAM_DELTA_HDR *deltas,
+ SAM_DELTA_CTR *ctr,
+ uint32 num)
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ fprintf(out_hnd, "\tSAM Database Sync\n");
+ fprintf(out_hnd, "\t-----------------\n");
+
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ int i;
+ for (i = 0; i < num; i++)
+ {
+ display_sam_sync_ctr(out_hnd, ACTION_HEADER , &deltas[i], &ctr[i]);
+ display_sam_sync_ctr(out_hnd, ACTION_ENUMERATE, &deltas[i], &ctr[i]);
+ display_sam_sync_ctr(out_hnd, ACTION_FOOTER , &deltas[i], &ctr[i]);
+ }
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ fprintf(out_hnd, "\n");
+ break;
+ }
+ }
+}
+
#if COPY_THIS_TEMPLATE
/****************************************************************************