WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
const char *server_name,
- const char *interface, uint32_t interface_version,
+ const struct ndr_syntax_id *interface,
struct rpc_pipe_client **presult)
{
struct rpc_pipe_client *result = NULL;
- struct ndr_syntax_id syntax;
NTSTATUS status;
WERROR werr;
struct cli_state *cli = NULL;
return WERR_INVALID_PARAM;
}
- if (!ndr_syntax_from_string(interface, interface_version, &syntax)) {
- return WERR_INVALID_PARAM;
- }
-
werr = libnetapi_open_ipc_connection(ctx, server_name, &cli);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
- status = pipe_cm_open(ctx, cli, &syntax, &result);
+ status = pipe_cm_open(ctx, cli, interface, &result);
if (!NT_STATUS_IS_OK(status)) {
libnetapi_set_error_string(ctx, "failed to open PIPE %s: %s",
- get_pipe_name_from_syntax(talloc_tos(), &syntax),
+ get_pipe_name_from_syntax(talloc_tos(), interface),
get_friendly_nt_error_msg(status));
return WERR_DEST_NOT_FOUND;
}
struct rpc_pipe_client *pipe_cli = NULL;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
WERROR werr;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
+ &ndr_table_netlogon.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
WERROR werr;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
+ &ndr_table_netlogon.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
struct rpc_pipe_client *pipe_cli = NULL;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
+ &ndr_table_netlogon.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
unsigned int old_timeout = 0;
werr = libnetapi_open_pipe(ctx, r->in.server,
- NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
+ &ndr_table_wkssvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
unsigned int old_timeout = 0;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
+ &ndr_table_wkssvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
const char *buffer = NULL;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
+ &ndr_table_wkssvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
WERROR werr;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
+ &ndr_table_wkssvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
WERROR werr;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
+ &ndr_table_wkssvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(alias_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(alias_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(alias_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(alias_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(alias_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
if (r->in.level == 3) {
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
+ &ndr_table_lsarpc.syntax_id,
&lsa_pipe);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
WERROR libnetapi_shutdown_cm(struct libnetapi_ctx *ctx);
WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
const char *server_name,
- const char *interface, uint32_t interface_version,
+ const struct ndr_syntax_id *interface,
struct rpc_pipe_client **presult);
WERROR libnetapi_samr_open_domain(struct libnetapi_ctx *mem_ctx,
struct rpc_pipe_client *pipe_cli,
union netr_CONTROL_QUERY_INFORMATION query;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
+ &ndr_table_netlogon.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
+ &ndr_table_netlogon.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
union srvsvc_NetSrvInfo info;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
struct srvsvc_NetRemoteTODInfo *info = NULL;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(info_ctr);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
+ &ndr_table_srvsvc.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
struct lsa_StringLarge message;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_INITSHUTDOWN_UUID,
- NDR_INITSHUTDOWN_VERSION,
+ &ndr_table_initshutdown.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
struct rpc_pipe_client *pipe_cli = NULL;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_INITSHUTDOWN_UUID,
- NDR_INITSHUTDOWN_VERSION,
+ &ndr_table_initshutdown.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
ZERO_STRUCT(user_handle);
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- NDR_SAMR_UUID, NDR_SAMR_VERSION,
+ &ndr_table_samr.syntax_id,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;