diff options
author | Luke Leighton <lkcl@samba.org> | 1999-07-21 00:32:09 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-07-21 00:32:09 +0000 |
commit | 6a5a4e818684a616306d2954d1a2612113b314a6 (patch) | |
tree | e1900e634df995f0a1d36c063645cd4997a9529f /source3/rpcclient/display.c | |
parent | 46ce0d4619839f40f910eb4a0d2c3da01436bc88 (diff) | |
download | samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.gz samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.bz2 samba-6a5a4e818684a616306d2954d1a2612113b314a6.zip |
BDC support.
(This used to be commit 2331aa32ab36c3ee5fd8cfbe972e57299939e33d)
Diffstat (limited to 'source3/rpcclient/display.c')
-rw-r--r-- | source3/rpcclient/display.c | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c index dc801805c6..97e1cc8344 100644 --- a/source3/rpcclient/display.c +++ b/source3/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 /**************************************************************************** |