summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-06-07 17:21:28 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-07-04 18:27:58 +1000
commit541f3cf639699d23b9a96e6c615027a5be4581a9 (patch)
treeb57974dfd0ba9ef1ce19c506e382ca1a1eac2381 /source3/rpc_client
parent6ac68a803e79984e8d3c065b7b366da0bdd495d6 (diff)
downloadsamba-541f3cf639699d23b9a96e6c615027a5be4581a9.tar.gz
samba-541f3cf639699d23b9a96e6c615027a5be4581a9.tar.bz2
samba-541f3cf639699d23b9a96e6c615027a5be4581a9.zip
s3-rpc_server: Migrate rpc function to tsocket_address.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_winreg_int.c16
1 files changed, 12 insertions, 4 deletions
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);