1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-29 02:50:28 +03:00

wbinfo: fix ouptput of --lookup-sids 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 10:35:57 +02:00 committed by Andreas Schneider
parent f23fbbf735
commit fdf28f0898

View File

@ -1393,9 +1393,15 @@ static bool wbinfo_lookup_sids(const char *arg)
for (i=0; i<num_sids; i++) {
wbcSidToStringBuf(&sids[i], sidstr, sizeof(sidstr));
d_printf("%s -> %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);