From 00c674985fda152eea366d6b94712ba183527f9a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 21 Sep 2013 21:02:00 +0200 Subject: wbinfo: fix output of wbinfo --sid-to-name 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nsswitch/wbinfo.c') diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index 04478a7551..61acd1aa9e 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -1222,8 +1222,12 @@ static bool wbinfo_lookupsid(const char *sid_str) /* Display response */ - d_printf("%s%c%s %d\n", - domain, winbind_separator(), name, type); + if (type == WBC_SID_NAME_DOMAIN) { + d_printf("%s %d\n", domain, type); + } else { + d_printf("%s%c%s %d\n", + domain, winbind_separator(), name, type); + } wbcFreeMemory(domain); wbcFreeMemory(name); -- cgit