1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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>
This commit is contained in:
Michael Adam 2013-09-21 21:02:00 +02:00 committed by Andreas Schneider
parent f7240932af
commit 00c674985f

View File

@ -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);