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

s3:rpcclient: Use C99 initializer for cmd_set in rpcclient

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andreas Schneider 2019-01-11 14:16:11 +01:00 committed by Andreas Schneider
parent bbc4d8c52a
commit 05afe9624f

View File

@ -608,30 +608,174 @@ static NTSTATUS cmd_choose_transport(struct rpc_pipe_client *cli, TALLOC_CTX *me
static struct cmd_set rpcclient_commands[] = {
{ "GENERAL OPTIONS" },
{
.name = "GENERAL OPTIONS",
},
{ "help", RPC_RTYPE_NTSTATUS, cmd_help, NULL, NULL, NULL, "Get help on commands", "[command]" },
{ "?", RPC_RTYPE_NTSTATUS, cmd_help, NULL, NULL, NULL, "Get help on commands", "[command]" },
{ "debuglevel", RPC_RTYPE_NTSTATUS, cmd_debuglevel, NULL, NULL, NULL, "Set debug level", "level" },
{ "debug", RPC_RTYPE_NTSTATUS, cmd_debuglevel, NULL, NULL, NULL, "Set debug level", "level" },
{ "list", RPC_RTYPE_NTSTATUS, cmd_listcommands, NULL, NULL, NULL, "List available commands on <pipe>", "pipe" },
{ "exit", RPC_RTYPE_NTSTATUS, cmd_quit, NULL, NULL, NULL, "Exit program", "" },
{ "quit", RPC_RTYPE_NTSTATUS, cmd_quit, NULL, NULL, NULL, "Exit program", "" },
{ "sign", RPC_RTYPE_NTSTATUS, cmd_sign, NULL, NULL, NULL, "Force RPC pipe connections to be signed", "" },
{ "seal", RPC_RTYPE_NTSTATUS, cmd_seal, NULL, NULL, NULL, "Force RPC pipe connections to be sealed", "" },
{ "packet", RPC_RTYPE_NTSTATUS, cmd_packet, NULL, NULL, NULL, "Force RPC pipe connections with packet authentication level", "" },
{ "schannel", RPC_RTYPE_NTSTATUS, cmd_schannel, NULL, NULL, NULL, "Force RPC pipe connections to be sealed with 'schannel'. Assumes valid machine account to this domain controller.", "" },
{ "schannelsign", RPC_RTYPE_NTSTATUS, cmd_schannel_sign, NULL, NULL, NULL, "Force RPC pipe connections to be signed (not sealed) with 'schannel'. Assumes valid machine account to this domain controller.", "" },
{ "timeout", RPC_RTYPE_NTSTATUS, cmd_timeout, NULL, NULL, NULL, "Set timeout (in milliseconds) for RPC operations", "" },
{ "transport", RPC_RTYPE_NTSTATUS, cmd_choose_transport, NULL, NULL, NULL, "Choose ncacn transport for RPC operations", "" },
{ "none", RPC_RTYPE_NTSTATUS, cmd_none, NULL, NULL, NULL, "Force RPC pipe connections to have no special properties", "" },
{
.name = "help",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_help,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Get help on commands",
.usage = "[command]",
},
{
.name = "?",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_help,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Get help on commands",
.usage = "[command]",
},
{
.name = "debuglevel",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_debuglevel,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Set debug level",
.usage = "level",
},
{
.name = "debug",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_debuglevel,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Set debug level",
.usage = "level",
},
{
.name = "list",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_listcommands,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "List available commands on <pipe>",
.usage = "pipe",
},
{
.name = "exit",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_quit,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Exit program",
.usage = "",
},
{
.name = "quit",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_quit,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Exit program",
.usage = "",
},
{
.name = "sign",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_sign,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections to be signed",
.usage = "",
},
{
.name = "seal",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_seal,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections to be sealed",
.usage = "",
},
{
.name = "packet",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_packet,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections with packet authentication level",
.usage = "",
},
{
.name = "schannel",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_schannel,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections to be sealed with 'schannel'. "
"Assumes valid machine account to this domain controller.",
.usage = "",
},
{
.name = "schannelsign",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_schannel_sign,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections to be signed (not sealed) with "
"'schannel'. Assumes valid machine account to this domain "
"controller.",
.usage = "",
},
{
.name = "timeout",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_timeout,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Set timeout (in milliseconds) for RPC operations",
.usage = "",
},
{
.name = "transport",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_choose_transport,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Choose ncacn transport for RPC operations",
.usage = "",
},
{
.name = "none",
.returntype = RPC_RTYPE_NTSTATUS,
.ntfn = cmd_none,
.wfn = NULL,
.table = NULL,
.rpc_pipe = NULL,
.description = "Force RPC pipe connections to have no special properties",
.usage = "",
},
{ NULL }
{ .name = NULL, },
};
static struct cmd_set separator_command[] = {
{ "---------------", MAX_RPC_RETURN_TYPE, NULL, NULL, NULL, NULL, "----------------------" },
{ NULL }
{
.name = "---------------",
.returntype = MAX_RPC_RETURN_TYPE,
.description = "----------------------"
},
{ .name = NULL, },
};