summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/display.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c
index 0bfed9eba3..ce464a72e6 100644
--- a/source3/rpcclient/display.c
+++ b/source3/rpcclient/display.c
@@ -23,27 +23,25 @@
#include "includes.h"
+struct field_info sid_name_info[] =
+{
+ { SID_NAME_UNKNOWN, "UNKNOWN" }, /* default */
+ { SID_NAME_USER , "User" },
+ { SID_NAME_DOM_GRP, "Domain Group" },
+ { SID_NAME_DOMAIN , "Domain" },
+ { SID_NAME_ALIAS , "Local Group" },
+ { SID_NAME_WKN_GRP, "Well-known Group"},
+ { SID_NAME_DELETED, "Deleted" },
+ { SID_NAME_INVALID, "Invalid" },
+ { 0 , NULL }
+};
+
/****************************************************************************
convert a SID_NAME_USE to a string
****************************************************************************/
char *get_sid_name_use_str(uint8 sid_name_use)
{
- static fstring type;
-
- switch (sid_name_use)
- {
- case SID_NAME_USER : fstrcpy(type, "User" ); break;
- case SID_NAME_DOM_GRP : fstrcpy(type, "Domain Group" ); break;
- case SID_NAME_DOMAIN : fstrcpy(type, "Domain" ); break;
- case SID_NAME_ALIAS : fstrcpy(type, "Local Group" ); break;
- case SID_NAME_WKN_GRP : fstrcpy(type, "Well-known Group"); break;
- case SID_NAME_DELETED : fstrcpy(type, "Deleted" ); break;
- case SID_NAME_INVALID : fstrcpy(type, "Invalid" ); break;
- case SID_NAME_UNKNOWN :
- default : fstrcpy(type, "UNKNOWN" ); break;
- }
-
- return type;
+ return enum_field_to_str((uint32)sid_name_use, sid_name_info, True);
}
/****************************************************************************