Ignore:
Timestamp:
Aug 15, 2010, 12:27:47 PM (14 years ago)
Author:
katerina
Message:

Fixes for tickets #215, #216, #217, #218, version bumped to 2.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_portcheck.c

    r257 r290  
    4747
    4848#define PORTMAP
     49#ifdef  HAVE_RPC_RPC_H
    4950#include <rpc/rpc.h>
    5051#ifdef  HAVE_RPC_RPCENT_H
     
    5354#include <rpc/pmap_clnt.h>
    5455#include <rpc/pmap_prot.h>
     56#endif
    5557#include <netdb.h>
    5658
     
    284286#endif
    285287
     288#ifdef  HAVE_RPC_RPC_H
    286289static char * sh_getrpcbynumber (int number, char * buf, size_t len)
    287290{
     
    324327  return NULL;
    325328}
     329#endif
    326330
    327331static char * sh_getservbyport (int port, const char * proto_in, char * buf, size_t len)
     
    756760                              unsigned long prot)
    757761{
     762#ifdef  HAVE_RPC_RPC_H
    758763  struct pmaplist * head;
    759764  char *r;
     
    786791      while (head != NULL);
    787792    }
    788 
     793#else
     794  (void) port;
     795  (void) address;
     796  (void) prot;
     797#endif
    789798  return NULL;
    790799}
     
    16651674  char * p;
    16661675
     1676#ifdef HAVE_RPC_RPC_H
    16671677  p = sh_getrpcbynumber(0, buf, sizeof(buf));
    16681678  CuAssertTrue(tc, p == NULL);
     
    16771687  CuAssertTrue(tc, 0 == strcmp(p, "ypbind"));
    16781688  CuAssertTrue(tc, 0 == strcmp(buf, "ypbind"));
     1689#endif
    16791690
    16801691  p = sh_getservbyport(0, SH_PROTO_STR(IPPROTO_TCP), buf, sizeof(buf));
    16811692  CuAssertTrue(tc, p == NULL);
    16821693
     1694#if !defined(HOST_IS_CYGWIN)
    16831695  p = sh_getservbyport(22, SH_PROTO_STR(IPPROTO_TCP), buf, sizeof(buf));
    16841696  CuAssertPtrNotNull(tc, p);
    16851697  CuAssertTrue(tc, 0 == strcmp(p, "ssh"));
    16861698  CuAssertTrue(tc, 0 == strcmp(buf, "ssh"));
     1699#endif
    16871700
    16881701  p = sh_getservbyport(13, SH_PROTO_STR(IPPROTO_UDP), buf, sizeof(buf));
Note: See TracChangeset for help on using the changeset viewer.