summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-20 22:52:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:32 -0500
commitb9630507694a4528accf551e187bfb1aeed179ce (patch)
tree126c3c60a7a57bc59725ba1dc79342930f031f7c /source4/librpc
parent8db177b652cdede2f509d6c96d1c99e875c2d284 (diff)
downloadsamba-b9630507694a4528accf551e187bfb1aeed179ce.tar.gz
samba-b9630507694a4528accf551e187bfb1aeed179ce.tar.bz2
samba-b9630507694a4528accf551e187bfb1aeed179ce.zip
r10368: when building the epm tower, don't put host names in the ip address
field, instead put a zero address. Note that zero is correct (ie. we shouldn't do the lookup) as in the client we want to send a zero for the server to fill in. When we make this call from the server we fill in a real IP. (This used to be commit e54c8b5658761c33d50a1a557d2ec77229b07b47)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 73a677cb62..42fc897fd6 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -798,7 +798,18 @@ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *
/* The 5th contains the network address */
if (num_protocols >= 3 && binding->host) {
- status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], binding->host);
+ if (is_ipaddress(binding->host)) {
+ status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
+ binding->host);
+ } else {
+ /* note that we don't attempt to resolve the
+ name here - when we get a hostname here we
+ are in the client code, and want to put in
+ a wildcard all-zeros IP for the server to
+ fill in */
+ status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
+ "0.0.0.0");
+ }
if (NT_STATUS_IS_ERR(status)) {
return status;
}