librpc: Added support to accept netbios names.
authorAndreas Schneider <asn@samba.org>
Tue, 4 Jan 2011 09:11:09 +0000 (10:11 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 27 Jan 2011 13:41:40 +0000 (14:41 +0100)
If we have a NCACN_NP pipe, the binding host is the netbios name an not
an IP address.

librpc/rpc/binding.c

index 7489073677fd1831d86c3350e83e46106bf10e36..b7c3a40a0d14763d950adc9a8acace91bb48a9f7 100644 (file)
@@ -758,7 +758,8 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
 
        /* The 5th contains the network address */
        if (num_protocols >= 3 && binding->host) {
-               if (is_ipaddress(binding->host)) {
+               if (is_ipaddress(binding->host) ||
+                   (binding->host[0] == '\\' && binding->host[1] == '\\')) {
                        status = dcerpc_floor_set_rhs_data(tower->floors, &tower->floors[4], 
                                                           binding->host);
                } else {