summaryrefslogtreecommitdiff
path: root/source4/rpc_server/spoolss
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-26 13:22:01 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 13:00:25 +0200
commit772cf15eb969591d65598a03fee24a4e559158ea (patch)
tree1910dcb7cbc4089e04c7e74622244a9a44d89502 /source4/rpc_server/spoolss
parent606025f11de9e1b9fa7c6d69a6fc346ca984dd93 (diff)
downloadsamba-772cf15eb969591d65598a03fee24a4e559158ea.tar.gz
samba-772cf15eb969591d65598a03fee24a4e559158ea.tar.bz2
samba-772cf15eb969591d65598a03fee24a4e559158ea.zip
s4:rpc_server/spoolss: use tsocket_address in dcesrv_spoolss_check_server_name()
metze
Diffstat (limited to 'source4/rpc_server/spoolss')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 53e251f4ea..0fe8e0eb9b 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -24,7 +24,7 @@
#include "rpc_server/dcerpc_server.h"
#include "librpc/gen_ndr/ndr_spoolss.h"
#include "ntptr/ntptr.h"
-#include "lib/socket/socket.h"
+#include "lib/tsocket/tsocket.h"
#include "librpc/gen_ndr/ndr_spoolss_c.h"
#include "auth/credentials/credentials.h"
#include "param/param.h"
@@ -148,7 +148,8 @@ static WERROR dcesrv_spoolss_check_server_name(struct dcesrv_call_state *dce_cal
const char *server_name)
{
bool ret;
- struct socket_address *myaddr;
+ const struct tsocket_address *local_address;
+ char *myaddr;
const char **aliases;
const char *dnsdomain;
unsigned int i;
@@ -201,10 +202,12 @@ static WERROR dcesrv_spoolss_check_server_name(struct dcesrv_call_state *dce_cal
if (ret) return WERR_OK;
}
- myaddr = dcesrv_connection_get_my_addr(dce_call->conn, mem_ctx);
+ local_address = dcesrv_connection_get_local_address(dce_call->conn);
+
+ myaddr = tsocket_address_inet_addr_string(local_address, mem_ctx);
W_ERROR_HAVE_NO_MEMORY(myaddr);
- ret = strequal(myaddr->addr, server_name);
+ ret = strequal(myaddr, server_name);
talloc_free(myaddr);
if (ret) return WERR_OK;