summaryrefslogtreecommitdiff
path: root/source3/librpc
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/librpc
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/librpc')
-rw-r--r--source3/librpc/rpc/dcerpc_ep.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index 3d1acbbee2..7341bc4b76 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -24,6 +24,7 @@
#include "rpc_client/cli_pipe.h"
#include "auth.h"
#include "rpc_server/rpc_ncacn_np.h"
+#include "../lib/tsocket/tsocket.h"
#define EPM_MAX_ANNOTATION_SIZE 64
@@ -170,14 +171,21 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx,
"none");
if (strcasecmp_m(rpcsrv_type, "embedded") == 0) {
- static struct client_address client_id;
-
- strlcpy(client_id.addr, "localhost", sizeof(client_id.addr));
- client_id.name = "localhost";
+ struct tsocket_address *local;
+ int rc;
+
+ rc = tsocket_address_inet_from_strings(tmp_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ return NT_STATUS_NO_MEMORY;
+ }
status = rpcint_binding_handle(tmp_ctx,
&ndr_table_epmapper,
- &client_id,
+ local,
get_session_info_system(),
server_messaging_context(),
&h);