1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

net: Remove rpc samdump

This uses the NT4 replication commands. Samba does not have a server
for this, no tests, and whoever needs to migrate a native domain can
use an old Samba version

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2017-09-19 15:02:09 -07:00 committed by Jeremy Allison
parent fe736f246b
commit 4e9877d304
3 changed files with 0 additions and 77 deletions

View File

@ -317,14 +317,6 @@ struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ct
/* The following definitions come from utils/net_rpc_samsync.c */
NTSTATUS rpc_samdump_internals(struct net_context *c,
const struct dom_sid *domain_sid,
const char *domain_name,
struct cli_state *cli,
struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int argc,
const char **argv);
int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv);

View File

@ -7438,22 +7438,6 @@ bool net_rpc_check(struct net_context *c, unsigned flags)
return ret;
}
/* dump sam database via samsync rpc calls */
static int rpc_samdump(struct net_context *c, int argc, const char **argv) {
if (c->display_usage) {
d_printf( "%s\n"
"net rpc samdump\n"
" %s\n",
_("Usage:"),
_("Dump remote SAM database"));
return 0;
}
return run_rpc_command(c, NULL, &ndr_table_netlogon,
NET_FLAGS_ANONYMOUS,
rpc_samdump_internals, argc, argv);
}
/* syncronise sam database via samsync rpc calls */
static int rpc_vampire(struct net_context *c, int argc, const char **argv)
{
@ -8267,14 +8251,6 @@ int net_rpc(struct net_context *c, int argc, const char **argv)
N_("net rpc shutdown\n"
" Shutdown a remote server")
},
{
"samdump",
rpc_samdump,
NET_TRANSPORT_RPC,
N_("Dump SAM data of remote NT PDC"),
N_("net rpc samdump\n"
" Dump SAM data of remote NT PDC")
},
{
"vampire",
rpc_vampire,

View File

@ -107,51 +107,6 @@ static void parse_samsync_partial_replication_objects(TALLOC_CTX *mem_ctx,
}
}
/* dump sam database via samsync rpc calls */
NTSTATUS rpc_samdump_internals(struct net_context *c,
const struct dom_sid *domain_sid,
const char *domain_name,
struct cli_state *cli,
struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int argc,
const char **argv)
{
struct samsync_context *ctx = NULL;
NTSTATUS status;
status = libnet_samsync_init_context(mem_ctx,
domain_sid,
&ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
ctx->mode = NET_SAMSYNC_MODE_DUMP;
ctx->cli = pipe_hnd;
ctx->netlogon_creds = c->netlogon_creds;
ctx->ops = &libnet_samsync_display_ops;
ctx->domain_name = domain_name;
ctx->force_full_replication = c->opt_force_full_repl ? true : false;
ctx->clean_old_entries = c->opt_clean_old_entries ? true : false;
parse_samsync_partial_replication_objects(ctx, argc, argv,
&ctx->single_object_replication,
&ctx->objects,
&ctx->num_objects);
libnet_samsync(SAM_DATABASE_DOMAIN, ctx);
libnet_samsync(SAM_DATABASE_BUILTIN, ctx);
libnet_samsync(SAM_DATABASE_PRIVS, ctx);
TALLOC_FREE(ctx);
return NT_STATUS_OK;
}
/**
* Basic usage function for 'net rpc vampire'
*