diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-12-23 10:19:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-12-24 17:38:33 +0100 |
commit | 4e2da423de260468f0457410b0556088f00420d4 (patch) | |
tree | 5996a08dfd0d5a60ad7599549dd55ebb6eced360 /source4/smb_server | |
parent | d3ee0f021b7670404fdcb6171957dbf06ddf0651 (diff) | |
download | samba-4e2da423de260468f0457410b0556088f00420d4.tar.gz samba-4e2da423de260468f0457410b0556088f00420d4.tar.bz2 samba-4e2da423de260468f0457410b0556088f00420d4.zip |
s4:smb_server: fix mixing socket_address and tsocket_address
metze
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/smb/sesssetup.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/smb_server/smb/sesssetup.c b/source4/smb_server/smb/sesssetup.c index 37f69abc12..8cd2edcee3 100644 --- a/source4/smb_server/smb/sesssetup.c +++ b/source4/smb_server/smb/sesssetup.c @@ -29,6 +29,7 @@ #include "smb_server/smb_server.h" #include "smbd/service_stream.h" #include "param/param.h" +#include "../lib/tsocket/tsocket.h" /* setup the OS, Lanman and domain portions of a session setup reply @@ -100,7 +101,7 @@ failed: static void sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *sess) { struct auth_usersupplied_info *user_info = NULL; - struct socket_address *remote_address; + struct tsocket_address *remote_address; const char *remote_machine = NULL; sess->old.out.vuid = 0; @@ -119,11 +120,12 @@ static void sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *sess) remote_machine = req->smb_conn->negotiate.calling_name->name; } - remote_address = socket_get_peer_addr(req->smb_conn->connection->socket, req); + remote_address = socket_get_remote_addr(req->smb_conn->connection->socket, req); if (!remote_address) goto nomem; if (!remote_machine) { - remote_machine = remote_address->addr; + remote_machine = tsocket_address_inet_addr_string(remote_address, req); + if (!remote_machine) goto nomem; } user_info = talloc(req, struct auth_usersupplied_info); @@ -206,7 +208,7 @@ static void sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess) NTSTATUS status; struct auth_context *auth_context; struct auth_usersupplied_info *user_info = NULL; - struct socket_address *remote_address; + struct tsocket_address *remote_address; const char *remote_machine = NULL; sess->nt1.out.vuid = 0; @@ -245,11 +247,12 @@ static void sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess) remote_machine = req->smb_conn->negotiate.calling_name->name; } - remote_address = socket_get_peer_addr(req->smb_conn->connection->socket, req); + remote_address = socket_get_remote_addr(req->smb_conn->connection->socket, req); if (!remote_address) goto nomem; if (!remote_machine) { - remote_machine = remote_address->addr; + remote_machine = tsocket_address_inet_addr_string(remote_address, req); + if (!remote_machine) goto nomem; } user_info = talloc(req, struct auth_usersupplied_info); |