summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-10-31 19:28:16 +0100
committerVolker Lendecke <vl@samba.org>2009-11-07 09:14:15 +0100
commit2aa0af98677389359ee004c8b0030ab4faf0da98 (patch)
tree5e596989f4f93d8350d0fbbc6d6bca1474e77ac4 /source3/rpc_client
parentbd2ffb1c7a70ef9063b99a9318b3e185ddda84fe (diff)
downloadsamba-2aa0af98677389359ee004c8b0030ab4faf0da98.tar.gz
s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c16
-rw-r--r--source3/rpc_client/rpc_transport_np.c4
2 files changed, 11 insertions, 9 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index c6498701eb2..c4ba153e96d 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -86,7 +86,8 @@ static const struct pipe_id_info {
Return the pipe name from the interface.
****************************************************************************/
-const char *get_pipe_name_from_iface(const struct ndr_syntax_id *interface)
+const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx,
+ const struct ndr_syntax_id *interface)
{
char *guid_str;
const char *result;
@@ -107,7 +108,7 @@ const char *get_pipe_name_from_iface(const struct ndr_syntax_id *interface)
if (guid_str == NULL) {
return NULL;
}
- result = talloc_asprintf(talloc_tos(), "Interface %s.%d", guid_str,
+ result = talloc_asprintf(mem_ctx, "Interface %s.%d", guid_str,
(int)interface->if_version);
TALLOC_FREE(guid_str);
@@ -3683,7 +3684,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
}
DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe "
"%s failed with error %s\n",
- get_pipe_name_from_iface(interface),
+ get_pipe_name_from_syntax(talloc_tos(), interface),
nt_errstr(status) ));
TALLOC_FREE(result);
return status;
@@ -3691,7 +3692,8 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
DEBUG(10,("cli_rpc_pipe_open_noauth: opened pipe %s to machine "
"%s and bound anonymously.\n",
- get_pipe_name_from_iface(interface), cli->desthost));
+ get_pipe_name_from_syntax(talloc_tos(), interface),
+ cli->desthost));
*presult = result;
return NT_STATUS_OK;
@@ -3749,8 +3751,8 @@ static NTSTATUS cli_rpc_pipe_open_ntlmssp_internal(struct cli_state *cli,
DEBUG(10,("cli_rpc_pipe_open_ntlmssp_internal: opened pipe %s to "
"machine %s and bound NTLMSSP as user %s\\%s.\n",
- get_pipe_name_from_iface(interface), cli->desthost, domain,
- username ));
+ get_pipe_name_from_syntax(talloc_tos(), interface),
+ cli->desthost, domain, username ));
*presult = result;
return NT_STATUS_OK;
@@ -3943,7 +3945,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to machine %s "
"for domain %s and bound using schannel.\n",
- get_pipe_name_from_iface(interface),
+ get_pipe_name_from_syntax(talloc_tos(), interface),
cli->desthost, domain ));
*presult = result;
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index 73d23d8857e..c28664d007b 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -301,8 +301,8 @@ struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
}
state->transport->priv = state->transport_np;
- state->transport_np->pipe_name = get_pipe_name_from_iface(
- abstract_syntax);
+ state->transport_np->pipe_name = get_pipe_name_from_syntax(
+ state->transport_np, abstract_syntax);
state->transport_np->cli = cli;
subreq = cli_ntcreate_send(