summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_dom.c11
-rw-r--r--source3/utils/net_proto.h2
-rw-r--r--source3/utils/net_rpc.c152
-rw-r--r--source3/utils/net_rpc_audit.c10
-rw-r--r--source3/utils/net_rpc_registry.c18
-rw-r--r--source3/utils/net_rpc_rights.c6
-rw-r--r--source3/utils/net_rpc_samsync.c10
-rw-r--r--source3/utils/net_rpc_service.c12
8 files changed, 116 insertions, 105 deletions
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index 9f6581027f..d76a47b81d 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -94,14 +94,15 @@ static int net_dom_unjoin(struct net_context *c, int argc, const char **argv)
c->opt_reboot = true;
c->opt_timeout = 30;
- ret = run_rpc_command(c, cli, PI_INITSHUTDOWN, 0,
- rpc_init_shutdown_internals,
+ ret = run_rpc_command(c, cli,
+ &ndr_table_initshutdown.syntax_id,
+ 0, rpc_init_shutdown_internals,
argc, argv);
if (ret == 0) {
goto done;
}
- ret = run_rpc_command(c, cli, PI_WINREG, 0,
+ ret = run_rpc_command(c, cli, &ndr_table_winreg.syntax_id, 0,
rpc_reg_shutdown_internals,
argc, argv);
goto done;
@@ -200,14 +201,14 @@ static int net_dom_join(struct net_context *c, int argc, const char **argv)
c->opt_reboot = true;
c->opt_timeout = 30;
- ret = run_rpc_command(c, cli, PI_INITSHUTDOWN, 0,
+ ret = run_rpc_command(c, cli, &ndr_table_initshutdown.syntax_id, 0,
rpc_init_shutdown_internals,
argc, argv);
if (ret == 0) {
goto done;
}
- ret = run_rpc_command(c, cli, PI_WINREG, 0,
+ ret = run_rpc_command(c, cli, &ndr_table_winreg.syntax_id, 0,
rpc_reg_shutdown_internals,
argc, argv);
goto done;
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h
index 10b1e4709a..ae675ed170 100644
--- a/source3/utils/net_proto.h
+++ b/source3/utils/net_proto.h
@@ -158,7 +158,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
const char **domain_name);
int run_rpc_command(struct net_context *c,
struct cli_state *cli_arg,
- const int pipe_idx,
+ const struct ndr_syntax_id *interface,
int conn_flags,
rpc_command_fn fn,
int argc,
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 62ea319904..8c8cc2e955 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -108,7 +108,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
int run_rpc_command(struct net_context *c,
struct cli_state *cli_arg,
- const int pipe_idx,
+ const struct ndr_syntax_id *interface,
int conn_flags,
rpc_command_fn fn,
int argc,
@@ -153,10 +153,12 @@ int run_rpc_command(struct net_context *c,
}
if (!(conn_flags & NET_FLAGS_NO_PIPE)) {
- if (lp_client_schannel() && (pipe_idx == PI_NETLOGON)) {
+ if (lp_client_schannel()
+ && (ndr_syntax_id_equal(interface,
+ &ndr_table_netlogon.syntax_id))) {
/* Always try and create an schannel netlogon pipe. */
nt_status = cli_rpc_pipe_open_schannel(
- cli, cli_get_iface(pipe_idx),
+ cli, interface,
PIPE_AUTH_LEVEL_PRIVACY, domain_name,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -168,18 +170,19 @@ int run_rpc_command(struct net_context *c,
} else {
if (conn_flags & NET_FLAGS_SEAL) {
nt_status = cli_rpc_pipe_open_ntlmssp(
- cli, cli_get_iface(pipe_idx),
+ cli, interface,
PIPE_AUTH_LEVEL_PRIVACY,
lp_workgroup(), c->opt_user_name,
c->opt_password, &pipe_hnd);
} else {
nt_status = cli_rpc_pipe_open_noauth(
- cli, cli_get_iface(pipe_idx),
+ cli, interface,
&pipe_hnd);
}
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise pipe %s. Error was %s\n",
- cli_get_pipe_name(pipe_idx),
+ cli_get_pipe_name_from_iface(
+ debug_ctx(), cli, interface),
nt_errstr(nt_status) ));
cli_shutdown(cli);
return -1;
@@ -258,7 +261,8 @@ int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id,
+ NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
rpc_changetrustpw_internals,
argc, argv);
}
@@ -358,7 +362,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
static int net_rpc_perform_oldjoin(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_NETLOGON,
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id,
NET_FLAGS_NO_PIPE | NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
rpc_oldjoin_internals,
argc, argv);
@@ -529,8 +533,8 @@ int net_rpc_info(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SAMR, NET_FLAGS_PDC,
- rpc_info_internals,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id,
+ NET_FLAGS_PDC, rpc_info_internals,
argc, argv);
}
@@ -589,7 +593,7 @@ int net_rpc_getsid(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SAMR,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id,
NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
rpc_getsid_internals,
argc, argv);
@@ -781,8 +785,8 @@ static NTSTATUS rpc_user_rename_internals(struct net_context *c,
static int rpc_user_rename(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0, rpc_user_rename_internals,
- argc, argv);
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
+ rpc_user_rename_internals, argc, argv);
}
/**
@@ -953,8 +957,8 @@ static NTSTATUS rpc_user_password_internals(struct net_context *c,
static int rpc_user_password(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0, rpc_user_password_internals,
- argc, argv);
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
+ rpc_user_password_internals, argc, argv);
}
/**
@@ -1083,8 +1087,8 @@ static NTSTATUS rpc_user_info_internals(struct net_context *c,
static int rpc_user_info(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0, rpc_user_info_internals,
- argc, argv);
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
+ rpc_user_info_internals, argc, argv);
}
/**
@@ -1250,7 +1254,7 @@ int net_rpc_user(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL,PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_user_list_internals,
argc, argv);
}
@@ -1874,8 +1878,8 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
static int rpc_group_delete(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0, rpc_group_delete_internals,
- argc,argv);
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
+ rpc_group_delete_internals, argc,argv);
}
static int rpc_group_add_internals(struct net_context *c, int argc, const char **argv)
@@ -1984,7 +1988,7 @@ static NTSTATUS rpc_alias_add_internals(struct net_context *c,
static int rpc_group_add(struct net_context *c, int argc, const char **argv)
{
if (c->opt_localgroup)
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_alias_add_internals,
argc, argv);
@@ -2249,7 +2253,7 @@ static NTSTATUS rpc_group_addmem_internals(struct net_context *c,
static int rpc_group_addmem(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_group_addmem_internals,
argc, argv);
}
@@ -2448,7 +2452,7 @@ static NTSTATUS rpc_group_delmem_internals(struct net_context *c,
static int rpc_group_delmem(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_group_delmem_internals,
argc, argv);
}
@@ -2694,7 +2698,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
static int rpc_group_list(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_group_list_internals,
argc, argv);
}
@@ -2980,7 +2984,7 @@ static int rpc_group_members(struct net_context *c, int argc, const char **argv)
return rpc_group_usage(c, argc, argv);
}
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_group_members_internals,
argc, argv);
}
@@ -3111,7 +3115,7 @@ int net_rpc_group(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_group_list_internals,
argc, argv);
}
@@ -3195,7 +3199,7 @@ static int rpc_share_add(struct net_context *c, int argc, const char **argv)
if ((argc < 1) || !strchr(argv[0], '=') || c->display_usage) {
return rpc_share_usage(c, argc, argv);
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_add_internals,
argc, argv);
}
@@ -3248,7 +3252,7 @@ static int rpc_share_delete(struct net_context *c, int argc, const char **argv)
if (argc < 1 || c->display_usage) {
return rpc_share_usage(c, argc, argv);
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_del_internals,
argc, argv);
}
@@ -3432,8 +3436,8 @@ static int rpc_share_list(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0, rpc_share_list_internals,
- argc, argv);
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
+ rpc_share_list_internals, argc, argv);
}
static bool check_share_availability(struct cli_state *cli, const char *netname)
@@ -3591,7 +3595,7 @@ static int rpc_share_migrate_shares(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_shares_internals,
argc, argv);
}
@@ -3915,7 +3919,7 @@ static int rpc_share_migrate_files(struct net_context *c, int argc, const char *
return -1;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_files_internals,
argc, argv);
}
@@ -4037,7 +4041,7 @@ static int rpc_share_migrate_security(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_security_internals,
argc, argv);
}
@@ -4073,17 +4077,17 @@ static int rpc_share_migrate_all(struct net_context *c, int argc,
/* order is important. we don't want to be locked out by the share-acl
* before copying files - gd */
- ret = run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ ret = run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_shares_internals, argc, argv);
if (ret)
return ret;
- ret = run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ ret = run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_files_internals, argc, argv);
if (ret)
return ret;
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_migrate_security_internals, argc,
argv);
}
@@ -4878,19 +4882,19 @@ static int rpc_share_allowedusers(struct net_context *c, int argc,
return 0;
}
- result = run_rpc_command(c, NULL, PI_SAMR, 0,
+ result = run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_aliaslist_internals,
argc, argv);
if (result != 0)
return result;
- result = run_rpc_command(c, NULL, PI_LSARPC, 0,
+ result = run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_aliaslist_dump,
argc, argv);
if (result != 0)
return result;
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_allowedusers_internals,
argc, argv);
}
@@ -4995,7 +4999,7 @@ int net_rpc_share(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_share_list_internals,
argc, argv);
}
@@ -5185,7 +5189,7 @@ static int rpc_file_close(struct net_context *c, int argc, const char **argv)
return rpc_file_usage(c, argc, argv);
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_file_close_internals,
argc, argv);
}
@@ -5288,7 +5292,7 @@ static int rpc_file_user(struct net_context *c, int argc, const char **argv)
return rpc_file_usage(c, argc, argv);
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_file_list_internals,
argc, argv);
}
@@ -5341,7 +5345,7 @@ int net_rpc_file(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SRVSVC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0,
rpc_file_list_internals,
argc, argv);
}
@@ -5449,7 +5453,7 @@ static int rpc_shutdown_abort(struct net_context *c, int argc,
return 0;
}
- rc = run_rpc_command(c, NULL, PI_INITSHUTDOWN, 0,
+ rc = run_rpc_command(c, NULL, &ndr_table_initshutdown.syntax_id, 0,
rpc_shutdown_abort_internals, argc, argv);
if (rc == 0)
@@ -5457,7 +5461,7 @@ static int rpc_shutdown_abort(struct net_context *c, int argc,
DEBUG(1, ("initshutdown pipe didn't work, trying winreg pipe\n"));
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_reg_shutdown_abort_internals,
argc, argv);
}
@@ -5600,12 +5604,12 @@ static int rpc_shutdown(struct net_context *c, int argc, const char **argv)
return 0;
}
- rc = run_rpc_command(c, NULL, PI_INITSHUTDOWN, 0,
+ rc = run_rpc_command(c, NULL, &ndr_table_initshutdown.syntax_id, 0,
rpc_init_shutdown_internals, argc, argv);
if (rc) {
DEBUG(1, ("initshutdown pipe failed, trying winreg pipe\n"));
- rc = run_rpc_command(c, NULL, PI_WINREG, 0,
+ rc = run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_reg_shutdown_internals, argc, argv);
}
@@ -5783,7 +5787,7 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c,
static int rpc_trustdom_add(struct net_context *c, int argc, const char **argv)
{
if (argc > 0 && !c->display_usage) {
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_trustdom_add_internals, argc, argv);
} else {
d_printf("Usage:\n"
@@ -5936,7 +5940,7 @@ static NTSTATUS rpc_trustdom_del_internals(struct net_context *c,
static int rpc_trustdom_del(struct net_context *c, int argc, const char **argv)
{
if (argc > 0 && !c->display_usage) {
- return run_rpc_command(c, NULL, PI_SAMR, 0,
+ return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0,
rpc_trustdom_del_internals, argc, argv);
} else {
d_printf("Usage:\n"
@@ -6692,9 +6696,11 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
&remote_cli);
if (NT_STATUS_IS_OK(nt_status)) {
/* query for domain's sid */
- if (run_rpc_command(c, remote_cli, PI_LSARPC, 0,
- rpc_query_domain_sid, argc,
- argv))
+ if (run_rpc_command(
+ c, remote_cli,
+ &ndr_table_lsarpc.syntax_id, 0,
+ rpc_query_domain_sid, argc,
+ argv))
d_fprintf(stderr, "couldn't get domain's sid\n");
cli_shutdown(remote_cli);
@@ -6842,7 +6848,8 @@ static int rpc_samdump(struct net_context *c, int argc, const char **argv) {
return 0;
}
- return run_rpc_command(c, NULL, PI_NETLOGON, NET_FLAGS_ANONYMOUS,
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id,
+ NET_FLAGS_ANONYMOUS,
rpc_samdump_internals, argc, argv);
}
@@ -6878,7 +6885,8 @@ static int rpc_vampire(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_NETLOGON, NET_FLAGS_ANONYMOUS,
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id,
+ NET_FLAGS_ANONYMOUS,
rpc_vampire_internals,
argc, argv);
}
@@ -6918,30 +6926,30 @@ static int rpc_printer_migrate_all(struct net_context *c, int argc,
return -1;
}
- ret = run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ ret = run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_printers_internals, argc,
argv);
if (ret)
return ret;
- ret = run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ ret = run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_drivers_internals, argc,
argv);
if (ret)
return ret;
- ret = run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ ret = run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_forms_internals, argc, argv);
if (ret)
return ret;
- ret = run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ ret = run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_settings_internals, argc,
argv);
if (ret)
return ret;
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_security_internals, argc,
argv);
@@ -6972,7 +6980,7 @@ static int rpc_printer_migrate_drivers(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_drivers_internals,
argc, argv);
}
@@ -7002,7 +7010,7 @@ static int rpc_printer_migrate_forms(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_forms_internals,
argc, argv);
}
@@ -7032,7 +7040,7 @@ static int rpc_printer_migrate_printers(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_printers_internals,
argc, argv);
}
@@ -7062,7 +7070,7 @@ static int rpc_printer_migrate_security(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_security_internals,
argc, argv);
}
@@ -7092,7 +7100,7 @@ static int rpc_printer_migrate_settings(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_migrate_settings_internals,
argc, argv);
}
@@ -7188,7 +7196,7 @@ static int rpc_printer_list(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_list_internals,
argc, argv);
}
@@ -7213,7 +7221,7 @@ static int rpc_printer_driver_list(struct net_context *c, int argc,
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_driver_list_internals,
argc, argv);
}
@@ -7238,7 +7246,7 @@ static int rpc_printer_publish_publish(struct net_context *c, int argc,
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_publish_publish_internals,
argc, argv);
}
@@ -7262,7 +7270,7 @@ static int rpc_printer_publish_update(struct net_context *c, int argc, const cha
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_publish_update_internals,
argc, argv);
}
@@ -7287,7 +7295,7 @@ static int rpc_printer_publish_unpublish(struct net_context *c, int argc,
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_publish_unpublish_internals,
argc, argv);
}
@@ -7312,7 +7320,7 @@ static int rpc_printer_publish_list(struct net_context *c, int argc,
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_publish_list_internals,
argc, argv);
}
@@ -7377,7 +7385,7 @@ static int rpc_printer_publish(struct net_context *c, int argc,
net_display_usage_from_functable(func);
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_publish_list_internals,
argc, argv);
}
@@ -7480,7 +7488,7 @@ int net_rpc_printer(struct net_context *c, int argc, const char **argv)
net_display_usage_from_functable(func);
return 0;
}
- return run_rpc_command(c, NULL, PI_SPOOLSS, 0,
+ return run_rpc_command(c, NULL, &syntax_spoolss, 0,
rpc_printer_list_internals,
argc, argv);
}
diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c
index 5a5110fadc..dc4c796c17 100644
--- a/source3/utils/net_rpc_audit.c
+++ b/source3/utils/net_rpc_audit.c
@@ -373,7 +373,7 @@ static int rpc_audit_get(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_audit_get_internal, argc, argv);
}
@@ -389,7 +389,7 @@ static int rpc_audit_set(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_audit_set_internal, argc, argv);
}
@@ -405,7 +405,7 @@ static int rpc_audit_enable(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_audit_enable_internal, argc, argv);
}
@@ -421,7 +421,7 @@ static int rpc_audit_disable(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_audit_disable_internal, argc, argv);
}
@@ -437,7 +437,7 @@ static int rpc_audit_list(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_audit_list_internal, argc, argv);
}
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index ff620897e7..124af00b57 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -435,7 +435,7 @@ static int rpc_registry_setvalue(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_setvalue_internal, argc, argv );
}
@@ -488,7 +488,7 @@ static int rpc_registry_deletevalue(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_deletevalue_internal, argc, argv );
}
@@ -603,7 +603,7 @@ static int rpc_registry_getvalue(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_getvalue_full, argc, argv);
}
@@ -630,7 +630,7 @@ static int rpc_registry_getvalueraw(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_getvalue_raw, argc, argv);
}
@@ -702,7 +702,7 @@ static int rpc_registry_createkey(struct net_context *c, int argc,
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_createkey_internal, argc, argv );
}
@@ -751,7 +751,7 @@ static int rpc_registry_deletekey(struct net_context *c, int argc, const char **
return -1;
}
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_deletekey_internal, argc, argv );
}
@@ -826,7 +826,7 @@ static NTSTATUS rpc_registry_enumerate_internal(struct net_context *c,
static int rpc_registry_enumerate(struct net_context *c, int argc,
const char **argv )
{
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_enumerate_internal, argc, argv );
}
@@ -879,7 +879,7 @@ static NTSTATUS rpc_registry_save_internal(struct net_context *c,
static int rpc_registry_save(struct net_context *c, int argc, const char **argv )
{
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_save_internal, argc, argv );
}
@@ -1206,7 +1206,7 @@ static NTSTATUS rpc_registry_getsd_internal(struct net_context *c,
static int rpc_registry_getsd(struct net_context *c, int argc, const char **argv)
{
- return run_rpc_command(c, NULL, PI_WINREG, 0,
+ return run_rpc_command(c, NULL, &ndr_table_winreg.syntax_id, 0,
rpc_registry_getsd_internal, argc, argv);
}
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index 9991043594..81045c6a7d 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -572,7 +572,7 @@ static int rpc_rights_list(struct net_context *c, int argc, const char **argv )
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_rights_list_internal, argc, argv );
}
@@ -593,7 +593,7 @@ static int rpc_rights_grant(struct net_context *c, int argc, const char **argv )
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_rights_grant_internal, argc, argv );
}
@@ -614,7 +614,7 @@ static int rpc_rights_revoke(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_LSARPC, 0,
+ return run_rpc_command(c, NULL, &ndr_table_lsarpc.syntax_id, 0,
rpc_rights_revoke_internal, argc, argv );
}
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 15d15cddb4..c60d441822 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -225,8 +225,8 @@ int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv)
return 0;
}
- return run_rpc_command(c, NULL, PI_NETLOGON, 0, rpc_vampire_ldif_internals,
- argc, argv);
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id, 0,
+ rpc_vampire_ldif_internals, argc, argv);
}
@@ -340,12 +340,14 @@ int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv)
return 0;
}
- ret = run_rpc_command(c, NULL, PI_DRSUAPI, NET_FLAGS_SEAL,
+ ret = run_rpc_command(c, NULL, &ndr_table_drsuapi.syntax_id,
+ NET_FLAGS_SEAL,
rpc_vampire_keytab_ds_internals, argc, argv);
if (ret == 0) {
return 0;
}
- return run_rpc_command(c, NULL, PI_NETLOGON, 0, rpc_vampire_keytab_internals,
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id, 0,
+ rpc_vampire_keytab_internals,
argc, argv);
}
diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c
index 5842c800c3..d1349a903d 100644
--- a/source3/utils/net_rpc_service.c
+++ b/source3/utils/net_rpc_service.c
@@ -580,7 +580,7 @@ static int rpc_service_list(struct net_context *c, int argc, const char **argv )
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_list_internal, argc, argv );
}
@@ -596,7 +596,7 @@ static int rpc_service_start(struct net_context *c, int argc, const char **argv
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_start_internal, argc, argv );
}
@@ -612,7 +612,7 @@ static int rpc_service_stop(struct net_context *c, int argc, const char **argv )
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_stop_internal, argc, argv );
}
@@ -628,7 +628,7 @@ static int rpc_service_resume(struct net_context *c, int argc, const char **argv
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_resume_internal, argc, argv );
}
@@ -644,7 +644,7 @@ static int rpc_service_pause(struct net_context *c, int argc, const char **argv
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_pause_internal, argc, argv );
}
@@ -660,7 +660,7 @@ static int rpc_service_status(struct net_context *c, int argc, const char **argv
return 0;
}
- return run_rpc_command(c, NULL, PI_SVCCTL, 0,
+ return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
rpc_service_status_internal, argc, argv );
}