diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-12-11 21:59:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:48 -0500 |
commit | db6eea0fb4fe1665120306689ace3fa2f8b9dea7 (patch) | |
tree | 53d2d4ba236e407da37672d4a14c5806c9f3988f | |
parent | 4d03fc55df2a3253f5b5b3086264439b6a174340 (diff) | |
download | samba-db6eea0fb4fe1665120306689ace3fa2f8b9dea7.tar.gz samba-db6eea0fb4fe1665120306689ace3fa2f8b9dea7.tar.bz2 samba-db6eea0fb4fe1665120306689ace3fa2f8b9dea7.zip |
r12185: Cosmetic cleanup
(This used to be commit d1e8f9afffecf986a428bfac29b22dcbce610016)
-rw-r--r-- | source3/groupdb/mapping.c | 35 | ||||
-rw-r--r-- | source3/utils/net_groupmap.c | 2 |
2 files changed, 4 insertions, 33 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 9e547aa69c..97a3d6ab0e 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -35,36 +35,6 @@ static TDB_CONTEXT *tdb; /* used for driver files */ */ #define MEMBEROF_PREFIX "MEMBEROF/" -static struct sid_name_mapping { - enum SID_NAME_USE type; - const char *name; -} sid_name_use_strings[] = { - { SID_NAME_USE_NONE, "Not initialized" }, - { SID_NAME_USER, "User" }, - { SID_NAME_DOM_GRP, "Domain group" }, - { SID_NAME_DOMAIN, "Domain" }, - { SID_NAME_ALIAS, "Local group" }, - { SID_NAME_WKN_GRP, "Builtin group" }, - { SID_NAME_DELETED, "Deleted" }, - { SID_NAME_INVALID, "Invalid" }, - { 0, NULL } -}; - -/**************************************************************************** -dump the mapping group mapping to a text file -****************************************************************************/ -const char *decode_sid_name_use(enum SID_NAME_USE name_use) -{ - struct sid_name_mapping *m; - - for (m = sid_name_use_strings; m->name != NULL; m++) { - if (m->type == name_use) - return m->name; - } - - return "Unknown type"; -} - /**************************************************************************** initialise first time the mapping list - called from init_group_mapping() ****************************************************************************/ @@ -445,8 +415,9 @@ static BOOL enum_group_mapping(enum SID_NAME_USE sid_name_use, GROUP_MAP **pp_rm string_to_sid(&map.sid, string_sid); - DEBUG(11,("enum_group_mapping: returning group %s of type %s\n", - map.nt_name, decode_sid_name_use(map.sid_name_use))); + DEBUG(11,("enum_group_mapping: returning group %s of " + "type %s\n", map.nt_name, + sid_type_lookup(map.sid_name_use))); mapt= SMB_REALLOC_ARRAY((*pp_rmap), GROUP_MAP, entries+1); if (!mapt) { diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index f12668a85a..89bad6ea51 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -95,7 +95,7 @@ static void print_map_entry ( GROUP_MAP map, BOOL long_list ) d_printf("\tSID : %s\n", sid_string_static(&map.sid)); d_printf("\tUnix group: %s\n", gidtoname(map.gid)); d_printf("\tGroup type: %s\n", - decode_sid_name_use(map.sid_name_use)); + sid_type_lookup(map.sid_name_use)); d_printf("\tComment : %s\n", map.comment); } |