diff options
author | Luke Leighton <lkcl@samba.org> | 1999-02-16 18:02:50 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-02-16 18:02:50 +0000 |
commit | 78314c2e327ccd67e75dbc92be497ff2852b1817 (patch) | |
tree | f48dab8e76aa4d15912340579aa1c291a7963fa8 /source3/rpcclient | |
parent | 2737f26ad64ee32d6ef7365dcce0a3eb881f99db (diff) | |
download | samba-78314c2e327ccd67e75dbc92be497ff2852b1817.tar.gz samba-78314c2e327ccd67e75dbc92be497ff2852b1817.tar.bz2 samba-78314c2e327ccd67e75dbc92be497ff2852b1817.zip |
bitmap to strings
(This used to be commit ba5919bcaefa792bae503c7ab19d4b7bbf9bb954)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/display.c | 30 |
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); } /**************************************************************************** |