1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

rpcclient: fix output of lsalookupsids for sids of type DOMAIN

For domain sids, don't print NAME\*unknown* but print NAME instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Michael Adam 2013-09-18 09:32:17 +02:00 committed by Andreas Schneider
parent 55b3d87036
commit f23fbbf735

View File

@ -430,9 +430,16 @@ static NTSTATUS cmd_lsa_lookup_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem
fstring sid_str;
sid_to_fstring(sid_str, &sids[i]);
printf("%s %s\\%s (%d)\n", sid_str,
domains[i] ? domains[i] : "*unknown*",
names[i] ? names[i] : "*unknown*", types[i]);
if (types[i] == SID_NAME_DOMAIN) {
printf("%s %s (%d)\n", sid_str,
domains[i] ? domains[i] : "*unknown*",
types[i]);
} else {
printf("%s %s\\%s (%d)\n", sid_str,
domains[i] ? domains[i] : "*unknown*",
names[i] ? names[i] : "*unknown*",
types[i]);
}
}
dcerpc_lsa_Close(b, mem_ctx, &pol, &result);