diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-04-26 13:18:41 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-04-27 13:00:25 +0200 |
commit | 606025f11de9e1b9fa7c6d69a6fc346ca984dd93 (patch) | |
tree | d9a6b3e61672e84b3db7451d27551253704b86b6 /source4 | |
parent | c42bb8e49c77517729f9b57a81fd07815b5b493a (diff) | |
download | samba-606025f11de9e1b9fa7c6d69a6fc346ca984dd93.tar.gz samba-606025f11de9e1b9fa7c6d69a6fc346ca984dd93.tar.bz2 samba-606025f11de9e1b9fa7c6d69a6fc346ca984dd93.zip |
s4:rpc_server/netlogon: use tsocket_address in dcesrv_netr_DsRGetDCNameEx2()
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index a62a2acf41..2650dc7e59 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -33,7 +33,7 @@ #include "lib/messaging/irpc.h" #include "librpc/gen_ndr/ndr_irpc.h" #include "cldap_server/cldap_server.h" -#include "lib/socket/socket.h" +#include "lib/tsocket/tsocket.h" struct netlogon_server_pipe_state { struct netr_Credential client_challenge; @@ -1525,7 +1525,8 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, struct ldb_context *sam_ctx; struct netr_DsRGetDCNameInfo *info; struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx; - struct socket_address *addr; + const struct tsocket_address *remote_address; + char *addr = NULL; const char *server_site_name; char *guid_str; struct netlogon_samlogon_response response; @@ -1539,8 +1540,11 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, return WERR_DS_UNAVAILABLE; } - addr = dce_call->conn->transport.get_peer_addr(dce_call->conn, mem_ctx); - W_ERROR_HAVE_NO_MEMORY(addr); + remote_address = dcesrv_connection_get_remote_address(dce_call->conn); + if (tsocket_address_is_inet(remote_address, "ip")) { + addr = tsocket_address_inet_addr_string(remote_address, mem_ctx); + W_ERROR_HAVE_NO_MEMORY(addr); + } /* "server_unc" is ignored by w2k3 */ @@ -1562,7 +1566,7 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, r->in.domain_name, NULL, guid_str, r->in.client_account, - r->in.mask, addr->addr, + r->in.mask, addr, NETLOGON_NT_VERSION_5EX_WITH_IP, lp_ctx, &response); if (!NT_STATUS_IS_OK(status)) { |