diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-31 10:15:25 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-31 12:08:59 +0200 |
commit | 11e2608ba97018987b0143521248a83b2dab07e6 (patch) | |
tree | df609f415883cad648362cd93eb82914560339ba /source3/rpcclient/cmd_netlogon.c | |
parent | 0eec33417eb56d1352fd66565f55162c62d86fcd (diff) | |
download | samba-11e2608ba97018987b0143521248a83b2dab07e6.tar.gz |
s3/s4:netrEnumerateTrustedDomains - this call returns a "NTSTATUS" result
See MS-NRPC 3.5.5.6.3.
Diffstat (limited to 'source3/rpcclient/cmd_netlogon.c')
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 262975bc94c..faa2bfff3ef 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -938,19 +938,18 @@ static WERROR cmd_netlogon_dsr_getforesttrustinfo(struct rpc_pipe_client *cli, return werr; } -static WERROR cmd_netlogon_enumtrusteddomains(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, int argc, - const char **argv) +static NTSTATUS cmd_netlogon_enumtrusteddomains(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { NTSTATUS status = NT_STATUS_UNSUCCESSFUL; - WERROR werr = WERR_GENERAL_FAILURE; const char *server_name = cli->desthost; struct netr_Blob blob; if (argc < 1 || argc > 3) { fprintf(stderr, "Usage: %s <server_name>\n", argv[0]); - return WERR_OK; + return NT_STATUS_OK; } if (argc >= 2) { @@ -959,18 +958,15 @@ static WERROR cmd_netlogon_enumtrusteddomains(struct rpc_pipe_client *cli, status = rpccli_netr_NetrEnumerateTrustedDomains(cli, mem_ctx, server_name, - &blob, - &werr); + &blob); if (!NT_STATUS_IS_OK(status)) { goto done; } - if (W_ERROR_IS_OK(werr)) { - printf("success\n"); - dump_data(1, blob.data, blob.length); - } + printf("success\n"); + dump_data(1, blob.data, blob.length); done: - return werr; + return status; } static WERROR cmd_netlogon_enumtrusteddomainsex(struct rpc_pipe_client *cli, @@ -1175,7 +1171,7 @@ struct cmd_set netlogon_commands[] = { { "dsr_enumtrustdom", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, &ndr_table_netlogon.syntax_id, NULL, "Enumerate trusted domains", "" }, { "dsenumdomtrusts", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, &ndr_table_netlogon.syntax_id, NULL, "Enumerate all trusted domains in an AD forest", "" }, { "deregisterdnsrecords", RPC_RTYPE_WERROR, NULL, cmd_netlogon_deregisterdnsrecords, &ndr_table_netlogon.syntax_id, NULL, "Deregister DNS records", "" }, - { "netrenumtrusteddomains", RPC_RTYPE_WERROR, NULL, cmd_netlogon_enumtrusteddomains, &ndr_table_netlogon.syntax_id, NULL, "Enumerate trusted domains", "" }, + { "netrenumtrusteddomains", RPC_RTYPE_NTSTATUS, cmd_netlogon_enumtrusteddomains, NULL, &ndr_table_netlogon.syntax_id, NULL, "Enumerate trusted domains", "" }, { "netrenumtrusteddomainsex", RPC_RTYPE_WERROR, NULL, cmd_netlogon_enumtrusteddomainsex, &ndr_table_netlogon.syntax_id, NULL, "Enumerate trusted domains", "" }, { "getdcsitecoverage", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getdcsitecoverage, &ndr_table_netlogon.syntax_id, NULL, "Get the Site-Coverage from a DC", "" }, { "database_redo", RPC_RTYPE_NTSTATUS, cmd_netlogon_database_redo, NULL, &ndr_table_netlogon.syntax_id, NULL, "Replicate single object from a DC", "" }, |