summaryrefslogtreecommitdiffstats
path: root/nsswitch
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-09-21 21:02:00 +0200
committerAndreas Schneider <asn@samba.org>2013-11-13 11:40:28 +0100
commit00c674985fda152eea366d6b94712ba183527f9a (patch)
treed4633e82bc0a9a3e5a9b484a659787b27728bb34 /nsswitch
parentf7240932afdc1a50cdb9f43f8d3752a5717163de (diff)
downloadsamba-00c674985fda152eea366d6b94712ba183527f9a.tar.gz
samba-00c674985fda152eea366d6b94712ba183527f9a.tar.xz
samba-00c674985fda152eea366d6b94712ba183527f9a.zip
wbinfo: fix output of wbinfo --sid-to-name for sids of type DOMAIN
to print only the domain name and not "DOMIN\<SID>". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c8
1 files changed, 6 insertions, 2 deletions
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);