summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-04-30 08:15:34 +0200
committerKai Blin <kai@samba.org>2008-06-20 13:15:40 +0200
commit1dca64e26a1d79ec0311d340df1f07d9158fbbae (patch)
tree0e3c3dbe467af3984a66ef9991d6f9db56e3c3c6
parent197c25487e73bc9641877a2fc4100d39a0962d56 (diff)
downloadsamba-1dca64e26a1d79ec0311d340df1f07d9158fbbae.tar.gz
samba-1dca64e26a1d79ec0311d340df1f07d9158fbbae.tar.bz2
samba-1dca64e26a1d79ec0311d340df1f07d9158fbbae.zip
wbinfo: Output string for sid type in lookupsid.
(This used to be commit 8b4c7fb200598b7f747fc681f76d464760f693ee)
-rw-r--r--source4/nsswitch/wbinfo.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source4/nsswitch/wbinfo.c b/source4/nsswitch/wbinfo.c
index 21c178cc7b..150d9a68ee 100644
--- a/source4/nsswitch/wbinfo.c
+++ b/source4/nsswitch/wbinfo.c
@@ -614,6 +614,23 @@ static bool wbinfo_sid_to_gid(char *sid)
return true;
}
+static const char *sid_type_lookup(enum lsa_SidType r)
+{
+ switch (r) {
+ case SID_NAME_USE_NONE: return "SID_NAME_USE_NONE"; break;
+ case SID_NAME_USER: return "SID_NAME_USER"; break;
+ case SID_NAME_DOM_GRP: return "SID_NAME_DOM_GRP"; break;
+ case SID_NAME_DOMAIN: return "SID_NAME_DOMAIN"; break;
+ case SID_NAME_ALIAS: return "SID_NAME_ALIAS"; break;
+ case SID_NAME_WKN_GRP: return "SID_NAME_WKN_GRP"; break;
+ case SID_NAME_DELETED: return "SID_NAME_DELETED"; break;
+ case SID_NAME_INVALID: return "SID_NAME_INVALID"; break;
+ case SID_NAME_UNKNOWN: return "SID_NAME_UNKNOWN"; break;
+ case SID_NAME_COMPUTER: return "SID_NAME_COMPUTER"; break;
+ }
+ return "Invalid sid type\n";
+}
+
/* Convert sid to string */
static bool wbinfo_lookupsid(char *sid)
@@ -634,30 +651,13 @@ static bool wbinfo_lookupsid(char *sid)
/* Display response */
- d_printf("%s%c%s %d\n", response.data.name.dom_name,
- winbind_separator(), response.data.name.name,
- response.data.name.type);
+ d_printf("%s%c%s %s\n", response.data.name.dom_name,
+ winbind_separator(), response.data.name.name,
+ sid_type_lookup(response.data.name.type));
return true;
}
-static const char *sid_type_lookup(enum lsa_SidType r)
-{
- switch (r) {
- case SID_NAME_USE_NONE: return "SID_NAME_USE_NONE"; break;
- case SID_NAME_USER: return "SID_NAME_USER"; break;
- case SID_NAME_DOM_GRP: return "SID_NAME_DOM_GRP"; break;
- case SID_NAME_DOMAIN: return "SID_NAME_DOMAIN"; break;
- case SID_NAME_ALIAS: return "SID_NAME_ALIAS"; break;
- case SID_NAME_WKN_GRP: return "SID_NAME_WKN_GRP"; break;
- case SID_NAME_DELETED: return "SID_NAME_DELETED"; break;
- case SID_NAME_INVALID: return "SID_NAME_INVALID"; break;
- case SID_NAME_UNKNOWN: return "SID_NAME_UNKNOWN"; break;
- case SID_NAME_COMPUTER: return "SID_NAME_COMPUTER"; break;
- }
- return "Invalid sid type\n";
-}
-
/* Convert string to sid */
static bool wbinfo_lookupname(char *name)