diff options
author | Michael Adam <obnox@samba.org> | 2013-09-21 10:35:57 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-11-13 11:40:28 +0100 |
commit | fdf28f0898de9372dde58735e4af8e15e3536d99 (patch) | |
tree | 20089530828a612f9f4f6b3e402b819a824b2058 /nsswitch/wbinfo.c | |
parent | f23fbbf73574d9cf0891751d57a33e5fdfa6abcf (diff) | |
download | samba-fdf28f0898de9372dde58735e4af8e15e3536d99.tar.gz |
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>
Diffstat (limited to 'nsswitch/wbinfo.c')
-rw-r--r-- | nsswitch/wbinfo.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index c3e3ad32743..0a7fa965be4 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<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); |