diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-08 12:24:06 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-08 13:12:15 +0100 |
commit | 53f2a1595e76db9fe1b42db65b51895b73365993 (patch) | |
tree | 704c28e54e7a3cb069de5d88c5e80f56194f4b8a /source3/utils/net_rpc_shell.c | |
parent | 494b2aff8826947e3bd556aecb175746163da485 (diff) | |
download | samba-53f2a1595e76db9fe1b42db65b51895b73365993.tar.gz samba-53f2a1595e76db9fe1b42db65b51895b73365993.tar.bz2 samba-53f2a1595e76db9fe1b42db65b51895b73365993.zip |
s3: Make run_rpc_command take strings instead of a ndr_interface_table
Diffstat (limited to 'source3/utils/net_rpc_shell.c')
-rw-r--r-- | source3/utils/net_rpc_shell.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c index 5e0f150371..5b94fac145 100644 --- a/source3/utils/net_rpc_shell.c +++ b/source3/utils/net_rpc_shell.c @@ -70,16 +70,21 @@ static NTSTATUS net_sh_run(struct net_context *c, { TALLOC_CTX *mem_ctx; struct rpc_pipe_client *pipe_hnd; + struct ndr_syntax_id syntax; NTSTATUS status; + if (!ndr_syntax_from_string(cmd->interface, cmd->interface_version, + &syntax)) { + return NT_STATUS_INVALID_PARAMETER; + } + mem_ctx = talloc_new(ctx); if (mem_ctx == NULL) { d_fprintf(stderr, _("talloc_new failed\n")); return NT_STATUS_NO_MEMORY; } - status = cli_rpc_pipe_open_noauth(ctx->cli, cmd->interface, - &pipe_hnd); + status = cli_rpc_pipe_open_noauth(ctx->cli, &syntax, &pipe_hnd); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, _("Could not open pipe: %s\n"), nt_errstr(status)); @@ -190,22 +195,22 @@ static bool net_sh_process(struct net_context *c, static struct rpc_sh_cmd sh_cmds[6] = { - { "info", NULL, &ndr_table_samr.syntax_id, rpc_sh_info, + { "info", NULL, NDR_SAMR_UUID, NDR_SAMR_VERSION, rpc_sh_info, N_("Print information about the domain connected to") }, - { "rights", net_rpc_rights_cmds, 0, NULL, + { "rights", net_rpc_rights_cmds, NULL, 0, NULL, N_("List/Grant/Revoke user rights") }, - { "share", net_rpc_share_cmds, 0, NULL, + { "share", net_rpc_share_cmds, NULL, 0, NULL, N_("List/Add/Remove etc shares") }, - { "user", net_rpc_user_cmds, 0, NULL, + { "user", net_rpc_user_cmds, NULL, 0, NULL, N_("List/Add/Remove user info") }, - { "account", net_rpc_acct_cmds, 0, NULL, + { "account", net_rpc_acct_cmds, NULL, 0, NULL, N_("Show/Change account policy settings") }, - { NULL, NULL, 0, NULL, NULL } + { NULL, NULL, NULL, 0, NULL, NULL } }; int net_rpc_shell(struct net_context *c, int argc, const char **argv) |