patch-src_rpc_soc_c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --- libtirpc-1.0.1.orig/src/rpc_soc.c 2015-10-30 16:15:14.000000000 +0100
  2. +++ libtirpc-1.0.1/src/rpc_soc.c 2015-11-29 16:39:17.831379460 +0100
  3. @@ -61,7 +61,6 @@
  4. #include <string.h>
  5. #include <unistd.h>
  6. #include <fcntl.h>
  7. -#include <rpcsvc/nis.h>
  8. #include "rpc_com.h"
  9. @@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs,
  10. }
  11. /*
  12. - * Create the client des authentication object. Obsoleted by
  13. - * authdes_seccreate().
  14. - */
  15. -AUTH *
  16. -authdes_create(servername, window, syncaddr, ckey)
  17. - char *servername; /* network name of server */
  18. - u_int window; /* time to live */
  19. - struct sockaddr *syncaddr; /* optional hostaddr to sync with */
  20. - des_block *ckey; /* optional conversation key to use */
  21. -{
  22. - AUTH *nauth;
  23. - char hostname[NI_MAXHOST];
  24. -
  25. - if (syncaddr) {
  26. - /*
  27. - * Change addr to hostname, because that is the way
  28. - * new interface takes it.
  29. - */
  30. - switch (syncaddr->sa_family) {
  31. - case AF_INET:
  32. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
  33. - sizeof hostname, NULL, 0, 0) != 0)
  34. - goto fallback;
  35. - break;
  36. - case AF_INET6:
  37. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
  38. - sizeof hostname, NULL, 0, 0) != 0)
  39. - goto fallback;
  40. - break;
  41. - default:
  42. - goto fallback;
  43. - }
  44. - nauth = authdes_seccreate(servername, window, hostname, ckey);
  45. - return (nauth);
  46. - }
  47. -fallback:
  48. - return authdes_seccreate(servername, window, NULL, ckey);
  49. -}
  50. -
  51. -/*
  52. - * Create the client des authentication object. Obsoleted by
  53. - * authdes_pk_seccreate().
  54. - */
  55. -extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
  56. - const des_block *, nis_server *);
  57. -
  58. -AUTH *
  59. -authdes_pk_create(servername, pkey, window, syncaddr, ckey)
  60. - char *servername; /* network name of server */
  61. - netobj *pkey; /* public key */
  62. - u_int window; /* time to live */
  63. - struct sockaddr *syncaddr; /* optional hostaddr to sync with */
  64. - des_block *ckey; /* optional conversation key to use */
  65. -{
  66. - AUTH *nauth;
  67. - char hostname[NI_MAXHOST];
  68. -
  69. - if (syncaddr) {
  70. - /*
  71. - * Change addr to hostname, because that is the way
  72. - * new interface takes it.
  73. - */
  74. - switch (syncaddr->sa_family) {
  75. - case AF_INET:
  76. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
  77. - sizeof hostname, NULL, 0, 0) != 0)
  78. - goto fallback;
  79. - break;
  80. - default:
  81. - goto fallback;
  82. - }
  83. - nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
  84. - return (nauth);
  85. - }
  86. -fallback:
  87. - return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
  88. -}
  89. -
  90. -
  91. -/*
  92. * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
  93. */
  94. CLIENT *