Author: tridge
Date: 2005-09-20 22:52:54 +0000 (Tue, 20 Sep 2005)
New Revision: 10368

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10368

Log:

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.

Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c  2005-09-20 22:36:34 UTC 
(rev 10367)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c  2005-09-20 22:52:54 UTC 
(rev 10368)
@@ -798,7 +798,18 @@
        
        /* 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;
                }

Reply via email to