summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-05-24 13:29:28 +0200
committerAndreas Schneider <asn@samba.org>2013-08-05 10:30:00 +0200
commit9813fe2b04a5b4abaa95ea1d893b3803edbede4d (patch)
tree6719ea66f7eeaf522730b3974ebbf3650e9618c2 /source3/utils
parent3dc3a6c8483a8de22b483ecf164c81232d4a8d65 (diff)
downloadsamba-9813fe2b04a5b4abaa95ea1d893b3803edbede4d.tar.gz
samba-9813fe2b04a5b4abaa95ea1d893b3803edbede4d.tar.bz2
samba-9813fe2b04a5b4abaa95ea1d893b3803edbede4d.zip
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c2
-rw-r--r--source3/utils/net_rpc.c20
-rw-r--r--source3/utils/net_rpc_join.c6
-rw-r--r--source3/utils/net_rpc_shell.c2
-rw-r--r--source3/utils/net_rpc_trust.c2
-rw-r--r--source3/utils/net_util.c8
-rw-r--r--source3/utils/netlookup.c2
-rw-r--r--source3/utils/smbcacls.c7
-rw-r--r--source3/utils/smbcquotas.c2
-rw-r--r--source3/utils/smbtree.c2
10 files changed, 26 insertions, 27 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 569994362d..89eebf3388 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1957,7 +1957,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
SAFE_FREE(srv_cn_escaped);
SAFE_FREE(printername_escaped);
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_spoolss.syntax_id, &pipe_hnd);
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_spoolss, &pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr, _("Unable to open a connection to the spoolss pipe on %s\n"),
servername);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 1e9d6f0f30..488167cb39 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -82,7 +82,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
union lsa_PolicyInformation *info = NULL;
struct dcerpc_binding_handle *b;
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&lsa_pipe);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
@@ -212,7 +212,7 @@ int run_rpc_command(struct net_context *c,
c->opt_password, &pipe_hnd);
} else {
nt_status = cli_rpc_pipe_open_noauth(
- cli, &table->syntax_id,
+ cli, table,
&pipe_hnd);
}
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -348,7 +348,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
NTSTATUS result;
enum netr_SchannelType sec_channel_type;
- result = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+ result = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
&pipe_hnd);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0,("rpc_oldjoin_internals: netlogon pipe open to machine %s failed. "
@@ -1958,7 +1958,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
NTSTATUS status, result;
struct dcerpc_binding_handle *b;
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
goto done;
@@ -2951,7 +2951,7 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c,
}
result = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(pipe_hnd),
- &ndr_table_lsarpc.syntax_id,
+ &ndr_table_lsarpc,
&lsa_pipe);
if (!NT_STATUS_IS_OK(result)) {
d_fprintf(stderr, _("Couldn't open LSA pipe. Error was %s\n"),
@@ -6188,7 +6188,7 @@ static NTSTATUS rpc_trustdom_get_pdc(struct net_context *c,
/* Try netr_GetDcName */
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
&netr);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -6335,7 +6335,7 @@ static int rpc_trustdom_establish(struct net_context *c, int argc,
* Call LsaOpenPolicy and LsaQueryInfo
*/
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n", nt_errstr(nt_status) ));
@@ -6612,7 +6612,7 @@ static int rpc_trustdom_vampire(struct net_context *c, int argc,
return -1;
};
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
@@ -6790,7 +6790,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
return -1;
};
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
@@ -6906,7 +6906,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
/*
* Open \PIPE\samr and get needed policy handles
*/
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Could not initialise samr pipe. Error was %s\n", nt_errstr(nt_status)));
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index c5366760bc..a6ef11b254 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -245,7 +245,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
/* Fetch domain sid */
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Error connecting to LSA pipe. Error was %s\n",
@@ -280,7 +280,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
}
/* Create domain user */
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Error connecting to SAM pipe. Error was %s\n",
@@ -447,7 +447,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
/* Now check the whole process from top-to-bottom */
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Error connecting to NETLOGON pipe. Error was %s\n",
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 60860663c6..120cfa6af9 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -85,7 +85,7 @@ static NTSTATUS net_sh_run(struct net_context *c,
return NT_STATUS_NO_MEMORY;
}
- status = cli_rpc_pipe_open_noauth(ctx->cli, &cmd->table->syntax_id,
+ status = cli_rpc_pipe_open_noauth(ctx->cli, cmd->table,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("Could not open pipe: %s\n"),
diff --git a/source3/utils/net_rpc_trust.c b/source3/utils/net_rpc_trust.c
index 9060700be1..5e58103fb0 100644
--- a/source3/utils/net_rpc_trust.c
+++ b/source3/utils/net_rpc_trust.c
@@ -210,7 +210,7 @@ static NTSTATUS connect_and_get_info(TALLOC_CTX *mem_ctx,
return status;
}
- status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc.syntax_id, pipe_hnd);
+ status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc, pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Failed to initialise lsa pipe with error [%s]\n",
nt_errstr(status)));
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index a4282ec421..13a0ef12d8 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -45,7 +45,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c,
ZERO_STRUCT(pol);
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&lsa_pipe);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
@@ -256,7 +256,7 @@ NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
return nt_status;
}
- nt_status = cli_rpc_pipe_open_noauth(cli_tmp, &table->syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli_tmp, table,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("couldn't not initialize pipe\n"));
@@ -571,7 +571,7 @@ static NTSTATUS net_scan_dc_noad(struct net_context *c,
ZERO_STRUCTP(dc_info);
ZERO_STRUCT(pol);
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -634,7 +634,7 @@ NTSTATUS net_scan_dc(struct net_context *c,
ZERO_STRUCTP(dc_info);
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_dssetup.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_dssetup,
&dssetup_pipe);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10,("net_scan_dc: failed to open dssetup pipe with %s, "
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index b66c34e61d..56d3bfe42d 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -122,7 +122,7 @@ static struct con_struct *create_cs(struct net_context *c,
}
nt_status = cli_rpc_pipe_open_noauth(cs->cli,
- &ndr_table_lsarpc.syntax_id,
+ &ndr_table_lsarpc,
&cs->lsapipe);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 39400c8bdd..d3d60bc8ea 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -96,7 +96,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
goto tcon_fail;
}
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&p);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
@@ -146,7 +146,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
goto tcon_fail;
}
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&p);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
@@ -187,14 +187,13 @@ static NTSTATUS cli_lsa_lookup_domain_sid(struct cli_state *cli,
struct policy_handle handle;
NTSTATUS status, result;
TALLOC_CTX *frame = talloc_stackframe();
- const struct ndr_syntax_id *lsarpc_syntax = &ndr_table_lsarpc.syntax_id;
status = cli_tree_connect(cli, "IPC$", "?????", "", 0);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
- status = cli_rpc_pipe_open_noauth(cli, lsarpc_syntax, &rpc_pipe);
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc, &rpc_pipe);
if (!NT_STATUS_IS_OK(status)) {
goto tdis;
}
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index bf1f95c25f..2791b93424 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -58,7 +58,7 @@ static bool cli_open_policy_hnd(void)
NTSTATUS ret;
cli_ipc = connect_one("IPC$");
ret = cli_rpc_pipe_open_noauth(cli_ipc,
- &ndr_table_lsarpc.syntax_id,
+ &ndr_table_lsarpc,
&global_pipe_hnd);
if (!NT_STATUS_IS_OK(ret)) {
return False;
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 40b1f096ad..5c07b122b2 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -177,7 +177,7 @@ static bool get_rpc_shares(struct cli_state *cli,
return False;
}
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(status)) {