summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_ds.c26
-rw-r--r--source3/rpcclient/cmd_netlogon.c1
2 files changed, 1 insertions, 26 deletions
diff --git a/source3/rpcclient/cmd_ds.c b/source3/rpcclient/cmd_ds.c
index 477ff863dd..1be3b228a4 100644
--- a/source3/rpcclient/cmd_ds.c
+++ b/source3/rpcclient/cmd_ds.c
@@ -57,31 +57,6 @@ static WERROR cmd_ds_dsrole_getprimarydominfo(struct rpc_pipe_client *cli,
return werr;
}
-static NTSTATUS cmd_ds_enum_domain_trusts(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
- const char **argv)
-{
- NTSTATUS result;
- uint32 flags = DS_DOMAIN_IN_FOREST;
- struct ds_domain_trust *trusts = NULL;
- unsigned int num_domains = 0;
- int i;
-
- if (argc > 1) {
- flags = atoi(argv[1]);
- }
-
- result = rpccli_ds_enum_domain_trusts( cli, mem_ctx, cli->cli->desthost, flags,
- &trusts, &num_domains );
-
- printf( "%d domains returned\n", num_domains );
-
- for (i=0; i<num_domains; i++ )
- printf("%s (%s)\n", trusts[i].dns_domain, trusts[i].netbios_domain);
-
- return result;
-}
-
/* List of commands exported by this module */
struct cmd_set ds_commands[] = {
@@ -89,7 +64,6 @@ struct cmd_set ds_commands[] = {
{ "LSARPC-DS" },
{ "dsroledominfo", RPC_RTYPE_WERROR, NULL, cmd_ds_dsrole_getprimarydominfo, PI_DSSETUP, NULL, "Get Primary Domain Information", "" },
- { "dsenumdomtrusts", RPC_RTYPE_NTSTATUS, cmd_ds_enum_domain_trusts, NULL, PI_NETLOGON, NULL, "Enumerate all trusted domains in an AD forest", "" },
{ NULL }
};
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 731c3de268..38df7c1660 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -761,6 +761,7 @@ struct cmd_set netlogon_commands[] = {
{ "change_trust_pw", RPC_RTYPE_NTSTATUS, cmd_netlogon_change_trust_pw, NULL, PI_NETLOGON, NULL, "Change Trust Account Password", "" },
{ "gettrustrid", RPC_RTYPE_WERROR, NULL, cmd_netlogon_gettrustrid, PI_NETLOGON, NULL, "Get trust rid", "" },
{ "dsr_enumtrustdom", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, PI_NETLOGON, NULL, "Enumerate trusted domains", "" },
+ { "dsenumdomtrusts", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_enumtrustdom, PI_NETLOGON, NULL, "Enumerate all trusted domains in an AD forest", "" },
{ "deregisterdnsrecords", RPC_RTYPE_WERROR, NULL, cmd_netlogon_deregisterdnsrecords, PI_NETLOGON, NULL, "Deregister DNS records", "" },
{ NULL }