DCERPC_AUTH_LEVEL_PRIVACY, domain, &netlogon_pipe);
} else {
result = cli_rpc_pipe_open_noauth(
- *cli, &ndr_table_netlogon.syntax_id, &netlogon_pipe);
+ *cli, &ndr_table_netlogon, &netlogon_pipe);
}
if (!NT_STATUS_IS_OK(result)) {
int i;
struct dcerpc_binding_handle *b;
- 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)) {
return NT_STATUS_NO_MEMORY;
}
- status = cli_rpc_pipe_open_noauth(ipc->cli, &table->syntax_id, &p->pipe);
+ status = cli_rpc_pipe_open_noauth(ipc->cli, table, &p->pipe);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(p);
return status;
goto done;
}
- 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",
fstring trust_passwd;
NTSTATUS status;
- 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)) {
return status;
/* Open the domain */
- 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",
/* Open the domain */
- 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",
struct dcerpc_binding_handle *b;
/* Open the server service pipe */
- nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc,
&pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(1, ("net_share_enum_rpc pipe open fail!\n"));
ipc_srv->cli = ipc_cli;
nt_status = cli_rpc_pipe_open_noauth(
- ipc_srv->cli, &ndr_table_lsarpc.syntax_id, &pipe_hnd);
+ ipc_srv->cli, &ndr_table_lsarpc, &pipe_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(1, ("cli_nt_session_open fail!\n"));
errno = ENOTSUP;
* way.
*/
result = cli_rpc_pipe_open_noauth(
- cli, &ndr_table_samr.syntax_id, &pipe_hnd);
+ cli, &ndr_table_samr, &pipe_hnd);
}
if (!NT_STATUS_IS_OK(result)) {
result = NT_STATUS_UNSUCCESSFUL;
/* OK, this is ugly, but... try an anonymous pipe. */
- result = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+ result = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
&pipe_hnd);
if ( NT_STATUS_IS_OK(result) &&
/* open the LSARPC_PIPE */
- 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)) {
goto done;
/* Shouldn't we open this with schannel ? JRA. */
nt_status = cli_rpc_pipe_open_noauth(
- cli, &ndr_table_netlogon.syntax_id, &netlogon_pipe);
+ cli, &ndr_table_netlogon, &netlogon_pipe);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("modify_trust_password: unable to open the domain client session to machine %s. Error was : %s.\n",
dc_name, nt_errstr(nt_status)));
****************************************************************************/
NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
struct rpc_pipe_client **presult)
{
return cli_rpc_pipe_open_noauth_transport(cli, NCACN_NP,
- interface, presult);
+ &table->syntax_id, presult);
}
/****************************************************************************
struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
struct rpc_pipe_client **presult);
NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
struct rpc_pipe_client *netlogon_pipe = NULL;
NTSTATUS status;
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
&netlogon_pipe);
if (!NT_STATUS_IS_OK(status)) {
return status;
* Now start the NT Domain stuff :-).
*/
- ret = cli_rpc_pipe_open_noauth(the_cli, &ndr_table_spoolss.syntax_id, pp_pipe);
+ ret = cli_rpc_pipe_open_noauth(the_cli, &ndr_table_spoolss, pp_pipe);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(2,("spoolss_connect_to_client: unable to open the spoolss pipe on machine %s. Error was : %s.\n",
remote_machine, nt_errstr(ret)));
if ( !NT_STATUS_IS_OK(nt_status) )
return WERR_GENERAL_FAILURE;
- nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss,
&cli2);
if (!NT_STATUS_IS_OK(nt_status)) {
printf("failed to open spoolss pipe on server %s (%s)\n",
d_printf("testme\n");
status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
- &ndr_table_lsarpc.syntax_id,
+ &ndr_table_lsarpc,
&lsa_pipe);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&samr_pipe);
if (!NT_STATUS_IS_OK(status)) {
goto done;
goto error;
}
- result = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+ result = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
&lsapipe);
if (!NT_STATUS_IS_OK(result)) {
fprintf(stderr, "could not initialise lsa pipe. Error was %s\n", nt_errstr(result) );
printf("torture_open_connection failed\n");
goto fail;
}
- status = cli_rpc_pipe_open_noauth(cli, &ndr_table_rpcecho.syntax_id,
+ status = cli_rpc_pipe_open_noauth(cli, &ndr_table_rpcecho,
&p);
if (!NT_STATUS_IS_OK(status)) {
printf("Could not open echo pipe: %s\n", nt_errstr(status));
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);
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"));
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)) {
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. "
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;
}
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"),
/* 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;
* 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) ));
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",
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",
/*
* 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)));
/* 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",
}
/* 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",
/* 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",
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"),
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)));
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"));
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"));
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;
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, "
}
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)) {
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;
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;
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;
}
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;
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)) {
DEBUG(5, ("set_dc_type_and_flags_connect: domain %s\n", domain->name ));
status = cli_rpc_pipe_open_noauth(domain->conn.cli,
- &ndr_table_dssetup.syntax_id,
+ &ndr_table_dssetup,
&cli);
if (!NT_STATUS_IS_OK(status)) {
no_dssetup:
status = cli_rpc_pipe_open_noauth(domain->conn.cli,
- &ndr_table_lsarpc.syntax_id, &cli);
+ &ndr_table_lsarpc, &cli);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("set_dc_type_and_flags_connect: Could not bind to "
anonymous:
/* Finally fall back to anonymous. */
- status = cli_rpc_pipe_open_noauth(conn->cli, &ndr_table_samr.syntax_id,
+ status = cli_rpc_pipe_open_noauth(conn->cli, &ndr_table_samr,
&conn->samr_pipe);
if (!NT_STATUS_IS_OK(status)) {
anonymous:
result = cli_rpc_pipe_open_noauth(conn->cli,
- &ndr_table_lsarpc.syntax_id,
+ &ndr_table_lsarpc,
&conn->lsa_pipe);
if (!NT_STATUS_IS_OK(result)) {
result = NT_STATUS_PIPE_NOT_AVAILABLE;
TALLOC_FREE(conn->netlogon_pipe);
result = cli_rpc_pipe_open_noauth(conn->cli,
- &ndr_table_netlogon.syntax_id,
+ &ndr_table_netlogon,
&netlogon_pipe);
if (!NT_STATUS_IS_OK(result)) {
return result;