summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-01-11 14:16:11 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-28 10:29:19 +0100
commit05afe9624ff16d716562cc19417f4b4cbef4189b (patch)
tree458fb1ae23ef09b0efb3a5d5c18dade3bcd72d92 /source3/rpcclient
parentbbc4d8c52afba0975d25c001656280a471189b81 (diff)
downloadsamba-05afe9624ff16d716562cc19417f4b4cbef4189b.tar.gz
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>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c186
1 files changed, 165 insertions, 21 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 6cfacb19cfe..4497bb62242 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -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" },
-
- { "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", "" },
-
- { NULL }
+ {
+ .name = "GENERAL OPTIONS",
+ },
+
+ {
+ .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 = "",
+ },
+
+ { .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, },
};