From 541f3cf639699d23b9a96e6c615027a5be4581a9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 7 Jun 2011 17:21:28 +0200 Subject: s3-rpc_server: Migrate rpc function to tsocket_address. Signed-off-by: Andrew Bartlett --- source3/rpc_client/cli_winreg_int.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_winreg_int.c b/source3/rpc_client/cli_winreg_int.c index 1828b419a9..edb622dcef 100644 --- a/source3/rpc_client/cli_winreg_int.c +++ b/source3/rpc_client/cli_winreg_int.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_winreg_c.h" #include "rpc_client/cli_winreg_int.h" #include "rpc_server/rpc_ncacn_np.h" +#include "../lib/tsocket/tsocket.h" /** * Split path into hive name and subkeyname @@ -95,18 +96,25 @@ static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx, struct policy_handle *key_handle, WERROR *pwerr) { - static struct client_address client_id; + struct tsocket_address *local; struct dcerpc_binding_handle *binding_handle; struct winreg_String wkey, wkeyclass; NTSTATUS status; WERROR result = WERR_OK; + int rc; - strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr)); - client_id.name = "127.0.0.1"; + rc = tsocket_address_inet_from_strings(mem_ctx, + "ip", + "127.0.0.1", + 0, + &local); + if (rc < 0) { + return NT_STATUS_NO_MEMORY; + } status = rpcint_binding_handle(mem_ctx, &ndr_table_winreg, - &client_id, + local, session_info, msg_ctx, &binding_handle); -- cgit