patch-src_rpcbind_c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --- rpcbind-0.2.3.orig/src/rpcbind.c 2015-04-27 16:07:43.000000000 +0200
  2. +++ rpcbind-0.2.3/src/rpcbind.c 2016-10-08 18:20:04.000000000 +0200
  3. @@ -135,13 +135,13 @@ char *tcp_uaddr; /* Universal TCP addres
  4. static char servname[] = "rpcbind";
  5. static char superuser[] = "superuser";
  6. -int main __P((int, char *[]));
  7. +int main (int, char *[]);
  8. -static int init_transport __P((struct netconfig *));
  9. -static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
  10. - struct netbuf *));
  11. -static void terminate __P((int));
  12. -static void parseargs __P((int, char *[]));
  13. +static int init_transport (struct netconfig *);
  14. +static void rbllist_add (rpcprog_t, rpcvers_t, struct netconfig *,
  15. + struct netbuf *);
  16. +static void terminate (int);
  17. +static void parseargs (int, char *[]);
  18. int
  19. main(int argc, char *argv[])
  20. @@ -532,7 +532,7 @@ init_transport(struct netconfig *nconf)
  21. if ((aicode = getaddrinfo(hosts[nhostsbak],
  22. servname, &hints, &res)) != 0) {
  23. if ((aicode = getaddrinfo(hosts[nhostsbak],
  24. - "portmapper", &hints, &res)) != 0) {
  25. + "sunrpc", &hints, &res)) != 0) {
  26. syslog(LOG_ERR,
  27. "cannot get local address for %s: %s",
  28. nconf->nc_netid, gai_strerror(aicode));
  29. @@ -611,7 +611,7 @@ init_transport(struct netconfig *nconf)
  30. if ((strcmp(nconf->nc_netid, "local") != 0) &&
  31. (strcmp(nconf->nc_netid, "unix") != 0)) {
  32. if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
  33. - if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) {
  34. + if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) {
  35. printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode));
  36. syslog(LOG_ERR,
  37. "cannot get local address for %s: %s",