summaryrefslogtreecommitdiffstats
path: root/source3/rpcclient/display.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-01 21:09:24 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-01 21:09:24 +0000
commitde573ca8916bbe5d67bc1f38cf23c98f43ad0aaa (patch)
tree96113f61a94dbf1cd4d094495211532379ea9ddd /source3/rpcclient/display.c
parent92892c014e8b5bf42e36b60b4479dbda6e20b990 (diff)
downloadsamba-de573ca8916bbe5d67bc1f38cf23c98f43ad0aaa.tar.gz
samba-de573ca8916bbe5d67bc1f38cf23c98f43ad0aaa.tar.xz
samba-de573ca8916bbe5d67bc1f38cf23c98f43ad0aaa.zip
rewrote rpcclient enumaliases command.
(This used to be commit 492fdaaf2009e7d7e840323357a333fdf9c4d2e1)
Diffstat (limited to 'source3/rpcclient/display.c')
-rw-r--r--source3/rpcclient/display.c71
1 files changed, 69 insertions, 2 deletions
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c
index c8e69101ea7..bb99769201e 100644
--- a/source3/rpcclient/display.c
+++ b/source3/rpcclient/display.c
@@ -1201,7 +1201,8 @@ void display_name(FILE *out_hnd, enum action_type action,
display alias members
****************************************************************************/
void display_alias_members(FILE *out_hnd, enum action_type action,
- uint32 num_mem, char **sid_mem)
+ uint32 num_mem, char **sid_mem,
+ uint8 *type)
{
switch (action)
{
@@ -1226,7 +1227,9 @@ void display_alias_members(FILE *out_hnd, enum action_type action,
{
if (sid_mem[i] != NULL)
{
- fprintf(out_hnd, "\tMember Name:\t%s\n", sid_mem[i]);
+ fprintf(out_hnd, "\tMember Name:\t%s\tType:\t%s\n",
+ sid_mem[i],
+ get_sid_name_use_str(type[i]));
}
}
@@ -1512,6 +1515,70 @@ void display_alias_name_info(FILE *out_hnd, enum action_type action,
}
}
+/****************************************************************************
+ display alias info
+ ****************************************************************************/
+void display_alias_info3(FILE *out_hnd, enum action_type action, ALIAS_INFO3 *info3)
+
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ fstring temp;
+
+ unistr2_to_ascii(temp, &info3->uni_acct_desc, sizeof(temp)-1);
+ fprintf(out_hnd, "\tDescription:\t%s\n", temp);
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ break;
+ }
+ }
+}
+
+/****************************************************************************
+ display sam sync structure
+ ****************************************************************************/
+void display_alias_info_ctr(FILE *out_hnd, enum action_type action,
+ ALIAS_INFO_CTR *ctr)
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ fprintf(out_hnd, "\tSAM Group Info\n");
+ fprintf(out_hnd, "\t--------------\n");
+
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ switch (ctr->switch_value1)
+ {
+ case 3:
+ {
+ display_alias_info3(out_hnd, ACTION_HEADER , &ctr->alias.info3);
+ display_alias_info3(out_hnd, ACTION_ENUMERATE, &ctr->alias.info3);
+ display_alias_info3(out_hnd, ACTION_FOOTER , &ctr->alias.info3);
+ break;
+ }
+ }
+ break;
+ }
+ case ACTION_FOOTER:
+ {
+ fprintf(out_hnd, "\n");
+ break;
+ }
+ }
+}
+
/****************************************************************************
display sam_user_info_21 structure