diff options
Diffstat (limited to 'source3/rpcclient/cmd_lsarpc.c')
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 528987d3e2..f6d0569de9 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -80,6 +80,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, DOM_SID *sids; uint32 *types; int num_names, i; + fstring name, domain; if (argc == 1) { printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]); @@ -95,8 +96,10 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, /* Lookup the names */ + split_domain_name(argv[1], domain, name); + result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, - (const char **)&argv[1], &sids, + (const char**)&domain, (const char**)&name, &sids, &types, &num_names); if (!NT_STATUS_IS_OK(result)) @@ -124,6 +127,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_SID *sids; + char **domains; char **names; uint32 *types; int num_names, i; @@ -155,7 +159,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup the SIDs */ result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids, - &names, &types, &num_names); + &domains, &names, &types, &num_names); if (!NT_STATUS_IS_OK(result)) goto done; @@ -166,8 +170,9 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, fstring sid_str; sid_to_string(sid_str, &sids[i]); - printf("%s %s (%d)\n", sid_str, names[i] ? names[i] : - "*unknown*", types[i]); + printf("%s [%s]\\[%s] (%d)\n", sid_str, + domains[i] ? domains[i] : "*unknown*", + names[i] ? names[i] : "*unknown*", types[i]); } done: |