diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-04-27 15:12:32 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-05-27 07:13:56 +0200 |
commit | 9a6636a56e3565202d71ae7049431e3764575b79 (patch) | |
tree | 59057e1ef8bbc09ea751c890c8bdc80120eea342 /source3/rpc_server | |
parent | 56ebbb53c80a49f2d8dda8a108afc07669af333e (diff) | |
download | samba-9a6636a56e3565202d71ae7049431e3764575b79.tar.gz samba-9a6636a56e3565202d71ae7049431e3764575b79.tar.bz2 samba-9a6636a56e3565202d71ae7049431e3764575b79.zip |
s3:rpc_server: pass down local and remote tsocket_address to np_open()
metze
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index b5b8379efa..215557dd7b 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -1132,7 +1132,8 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx, } NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name, - const char *client_address, + const struct tsocket_address *local_address, + const struct tsocket_address *remote_address, struct auth_serversupplied_info *server_info, struct fake_file_handle **phandle) { @@ -1156,12 +1157,25 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name, } else { struct pipes_struct *p; struct ndr_syntax_id syntax; + const char *client_address; if (!is_known_pipename(name, &syntax)) { TALLOC_FREE(handle); return NT_STATUS_OBJECT_NAME_NOT_FOUND; } + if (tsocket_address_is_inet(remote_address, "ip")) { + client_address = tsocket_address_inet_addr_string( + remote_address, + talloc_tos()); + if (client_address == NULL) { + TALLOC_FREE(handle); + return NT_STATUS_NO_MEMORY; + } + } else { + client_address = ""; + } + p = make_internal_rpc_pipe_p(handle, &syntax, client_address, server_info); |