summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-01-08 18:01:42 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-28 10:29:17 +0100
commit281c5107b0f902d1e95b1d28dce344751d6ba31f (patch)
tree665d9de99a89f90eee7a77f6d04e07ba3c0a3e9d /source3/rpcclient
parent5b298d30c84348ff1fa6420861205985e32e813d (diff)
downloadsamba-281c5107b0f902d1e95b1d28dce344751d6ba31f.tar.gz
s3:rpcclient: Use C99 initializer for cmd_set in cmd_netlogon
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/cmd_netlogon.c224
1 files changed, 201 insertions, 23 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 631740562c6..39bee441b73 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -928,27 +928,205 @@ static NTSTATUS cmd_netlogon_capabilities(struct rpc_pipe_client *cli,
struct cmd_set netlogon_commands[] = {
- { "NETLOGON" },
-
- { "logonctrl2", RPC_RTYPE_WERROR, NULL, cmd_netlogon_logon_ctrl2, &ndr_table_netlogon, NULL, "Logon Control 2", "" },
- { "getanydcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getanydcname, &ndr_table_netlogon, NULL, "Get trusted DC name", "" },
- { "getdcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getdcname, &ndr_table_netlogon, NULL, "Get trusted PDC name", "" },
- { "dsr_getdcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcname, &ndr_table_netlogon, NULL, "Get trusted DC name", "" },
- { "dsr_getdcnameex", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcnameex, &ndr_table_netlogon, NULL, "Get trusted DC name", "" },
- { "dsr_getdcnameex2", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcnameex2, &ndr_table_netlogon, NULL, "Get trusted DC name", "" },
- { "dsr_getsitename", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getsitename, &ndr_table_netlogon, NULL, "Get sitename", "" },
- { "dsr_getforesttrustinfo", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getforesttrustinfo, &ndr_table_netlogon, NULL, "Get Forest Trust Info", "" },
- { "logonctrl", RPC_RTYPE_WERROR, NULL, cmd_netlogon_logon_ctrl, &ndr_table_netlogon, NULL, "Logon Control", "" },
- { "samlogon", RPC_RTYPE_NTSTATUS, cmd_netlogon_sam_logon, NULL, &ndr_table_netlogon, NULL, "Sam Logon", "", .use_netlogon_creds = true, },
- { "change_trust_pw", RPC_RTYPE_NTSTATUS, cmd_netlogon_change_trust_pw, NULL, &ndr_table_netlogon, NULL, "Change Trust Account Password", "", .use_netlogon_creds = true, },
- { "gettrustrid", RPC_RTYPE_WERROR, NULL, cmd_netlogon_gettrustrid, &ndr_table_netlogon, NULL, "Get trust rid", "" },
- { "dsr_enumtrustdom", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, &ndr_table_netlogon, NULL, "Enumerate trusted domains", "" },
- { "dsenumdomtrusts", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, &ndr_table_netlogon, NULL, "Enumerate all trusted domains in an AD forest", "" },
- { "deregisterdnsrecords", RPC_RTYPE_WERROR, NULL, cmd_netlogon_deregisterdnsrecords, &ndr_table_netlogon, NULL, "Deregister DNS records", "" },
- { "netrenumtrusteddomains", RPC_RTYPE_NTSTATUS, cmd_netlogon_enumtrusteddomains, NULL, &ndr_table_netlogon, NULL, "Enumerate trusted domains", "" },
- { "netrenumtrusteddomainsex", RPC_RTYPE_WERROR, NULL, cmd_netlogon_enumtrusteddomainsex, &ndr_table_netlogon, NULL, "Enumerate trusted domains", "" },
- { "getdcsitecoverage", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getdcsitecoverage, &ndr_table_netlogon, NULL, "Get the Site-Coverage from a DC", "" },
- { "capabilities", RPC_RTYPE_NTSTATUS, cmd_netlogon_capabilities, NULL, &ndr_table_netlogon, NULL, "Return Capabilities", "", .use_netlogon_creds = true, },
-
- { NULL }
+ {
+ .name = "NETLOGON",
+ },
+
+ {
+ .name = "logonctrl2",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_logon_ctrl2,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Logon Control 2",
+ .usage = "",
+ },
+ {
+ .name = "getanydcname",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_getanydcname,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trusted DC name",
+ .usage = "",
+ },
+ {
+ .name = "getdcname",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_getdcname,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trusted PDC name",
+ .usage = "",
+ },
+ {
+ .name = "dsr_getdcname",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_getdcname,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trusted DC name",
+ .usage = "",
+ },
+ {
+ .name = "dsr_getdcnameex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_getdcnameex,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trusted DC name",
+ .usage = "",
+ },
+ {
+ .name = "dsr_getdcnameex2",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_getdcnameex2,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trusted DC name",
+ .usage = "",
+ },
+ {
+ .name = "dsr_getsitename",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_getsitename,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get sitename",
+ .usage = "",
+ },
+ {
+ .name = "dsr_getforesttrustinfo",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_getforesttrustinfo,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get Forest Trust Info",
+ .usage = "",
+ },
+ {
+ .name = "logonctrl",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_logon_ctrl,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Logon Control",
+ .usage = "",
+ },
+ {
+ .name = "samlogon",
+ .returntype = RPC_RTYPE_NTSTATUS,
+ .ntfn = cmd_netlogon_sam_logon,
+ .wfn = NULL,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Sam Logon",
+ .usage = "",
+ .use_netlogon_creds = true,
+ },
+ {
+ .name = "change_trust_pw",
+ .returntype = RPC_RTYPE_NTSTATUS,
+ .ntfn = cmd_netlogon_change_trust_pw,
+ .wfn = NULL,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Change Trust Account Password",
+ .usage = "",
+ .use_netlogon_creds = true,
+ },
+ {
+ .name = "gettrustrid",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_gettrustrid,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get trust rid",
+ .usage = "",
+ },
+ {
+ .name = "dsr_enumtrustdom",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_enumtrustdom,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Enumerate trusted domains",
+ .usage = "",
+ },
+ {
+ .name = "dsenumdomtrusts",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_dsr_enumtrustdom,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Enumerate all trusted domains in an AD forest",
+ .usage = "",
+ },
+ {
+ .name = "deregisterdnsrecords",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_deregisterdnsrecords,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Deregister DNS records",
+ .usage = "",
+ },
+ {
+ .name = "netrenumtrusteddomains",
+ .returntype = RPC_RTYPE_NTSTATUS,
+ .ntfn = cmd_netlogon_enumtrusteddomains,
+ .wfn = NULL,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Enumerate trusted domains",
+ .usage = "",
+ },
+ {
+ .name = "netrenumtrusteddomainsex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_enumtrusteddomainsex,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Enumerate trusted domains",
+ .usage = "",
+ },
+ {
+ .name = "getdcsitecoverage",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_netlogon_getdcsitecoverage,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Get the Site-Coverage from a DC",
+ .usage = "",
+ },
+ {
+ .name = "capabilities",
+ .returntype = RPC_RTYPE_NTSTATUS,
+ .ntfn = cmd_netlogon_capabilities,
+ .wfn = NULL,
+ .table = &ndr_table_netlogon,
+ .rpc_pipe = NULL,
+ .description = "Return Capabilities",
+ .usage = "",
+ .use_netlogon_creds = true,
+ },
+
+ {
+ .name = NULL,
+ }
};