From fdf28f0898de9372dde58735e4af8e15e3536d99 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 21 Sep 2013 10:35:57 +0200 Subject: wbinfo: fix ouptput of --lookup-sids for sids of type DOMAIN To print only the domain name and not "DOMIN\". Signed-off-by: Michael Adam Reviewed-by: Andreas Schneider --- nsswitch/wbinfo.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index c3e3ad3274..0a7fa965be 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -1393,9 +1393,15 @@ static bool wbinfo_lookup_sids(const char *arg) for (i=0; i %s\\%s %d\n", sidstr, - domains[names[i].domain_index].short_name, - names[i].name, names[i].type); + if (names[i].type == WBC_SID_NAME_DOMAIN) { + d_printf("%s -> %s %d\n", sidstr, + domains[names[i].domain_index].short_name, + names[i].type); + } else { + d_printf("%s -> %s\\%s %d\n", sidstr, + domains[names[i].domain_index].short_name, + names[i].name, names[i].type); + } } wbcFreeMemory(names); wbcFreeMemory(domains); -- cgit