use EPMAPPER_PORT constant instead of 135
authorAndrew Tridgell <tridge@samba.org>
Thu, 27 Nov 2003 04:04:31 +0000 (04:04 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 27 Nov 2003 04:04:31 +0000 (04:04 +0000)
(This used to be commit 953ab587dc5a625d0fb557fdcac122a3b2ed0224)

source4/librpc/idl/epmapper.idl
source4/librpc/rpc/dcerpc_tcp.c
source4/librpc/rpc/dcerpc_util.c

index 78070aefff7b29124f304f37148e0401dbe7cc96..e09d729c81925d6fa282397d6d00c4e97206cac6 100644 (file)
@@ -24,6 +24,8 @@ interface epmapper
        const string NDR_GUID = "8a885d04-1ceb-11c9-9fe8-08002b104860";
        const string NDR_GUID_VERSION = 2;
 
+       const uint32 EPMAPPER_PORT = 135;
+
        typedef struct {
                GUID uuid;
                uint16 version;
index b3523e6855d5bcad24e4c2ca389c459c1e17321f..c50b71c3f0899265d76c034972e00210b2fd27ee 100644 (file)
@@ -153,7 +153,7 @@ NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p,
        struct in_addr addr;
 
        if (port == 0) {
-               port = 135;
+               port = EPMAPPER_PORT;
        }
 
        addr.s_addr = interpret_addr(server);
index 1f349e9a4ba9c8c82f59034f764e9f7254e71de7..fa69425ab09e2ee5a30ad0df24aa0b02b444ee01 100644 (file)
@@ -62,13 +62,13 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server,
        GUID guid;
        struct epm_twr_t twr, *twr_r;
 
-       if (strcmp(uuid, DCERPC_EPMAPPER_UUID) == 0) {
+       if (strcasecmp(uuid, DCERPC_EPMAPPER_UUID) == 0) {
                /* don't lookup epmapper via epmapper! */
-               *port = 135;
+               *port = EPMAPPER_PORT;
                return NT_STATUS_OK;
        }
 
-       status = dcerpc_pipe_open_tcp(&p, server, 135);
+       status = dcerpc_pipe_open_tcp(&p, server, EPMAPPER_PORT);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }