summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-26 13:37:12 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 13:01:59 +0200
commitbb04e90259315fd49fe1222b7c8f7fce23f1a2b6 (patch)
treea15080914cbdf658cc84c7b7214a3c091401e7ff /source4/ntvfs
parent8fb3292c993302b74247d6fa4795b279b131abcf (diff)
downloadsamba-bb04e90259315fd49fe1222b7c8f7fce23f1a2b6.tar.gz
samba-bb04e90259315fd49fe1222b7c8f7fce23f1a2b6.tar.bz2
samba-bb04e90259315fd49fe1222b7c8f7fce23f1a2b6.zip
s4:ntvfs/ipc: pass the already given tsocket_address structures to the named_pipe_auth code
metze
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 1a76b9747b..2d40d1f484 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -251,9 +251,7 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
struct tevent_req *subreq;
const char *fname;
const char *directory;
- struct socket_address *client_sa;
struct tsocket_address *client_addr;
- struct socket_address *server_sa;
struct tsocket_address *server_addr;
int ret;
DATA_BLOB delegated_creds = data_blob_null;
@@ -316,33 +314,8 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
&state->info3);
NT_STATUS_NOT_OK_RETURN(status);
- client_sa = ntvfs_get_peer_addr(ntvfs, state);
- if (!client_sa) {
- return NT_STATUS_INTERNAL_ERROR;
- }
-
- server_sa = ntvfs_get_my_addr(ntvfs, state);
- if (!server_sa) {
- return NT_STATUS_INTERNAL_ERROR;
- }
-
- ret = tsocket_address_inet_from_strings(state, "ip",
- client_sa->addr,
- client_sa->port,
- &client_addr);
- if (ret == -1) {
- status = map_nt_error_from_unix(errno);
- return status;
- }
-
- ret = tsocket_address_inet_from_strings(state, "ip",
- server_sa->addr,
- server_sa->port,
- &server_addr);
- if (ret == -1) {
- status = map_nt_error_from_unix(errno);
- return status;
- }
+ client_addr = ntvfs_get_local_address(ipriv->ntvfs);
+ server_addr = ntvfs_get_remote_address(ipriv->ntvfs);
if (req->session_info->credentials) {
struct gssapi_creds_container *gcc;