You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.4 KiB

  1. From 79975eb4104667be85abd06874c258438826b674 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
  3. Date: Fri, 24 Jul 2015 14:45:52 +0200
  4. Subject: [PATCH] Disable DES authentification support
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. uClibc and musl does not provide DES authentication.
  9. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  10. [peda@axentia.se: update for 1.0.1]
  11. Signed-off-by: Peter Rosin <peda@axentia.se>
  12. [bernd.kuhls@t-online.de: update for 1.0.2]
  13. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  14. ---
  15. src/Makefile.am | 2 +-
  16. src/rpc_soc.c | 32 --------------------------------
  17. 2 files changed, 1 insertion(+), 33 deletions(-)
  18. diff --git a/src/Makefile.am b/src/Makefile.am
  19. index 960a522..3a88e31 100644
  20. --- a/src/Makefile.am
  21. +++ b/src/Makefile.am
  22. @@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
  23. pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
  24. rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
  25. rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
  26. - svc_auth_des.c \
  27. svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
  28. - auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
  29. + debug.c
  30. ## XDR
  31. libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
  32. diff --git a/src/svc_auth.c b/src/svc_auth.c
  33. --- a/src/svc_auth.c
  34. +++ b/src/svc_auth.c
  35. @@ -114,9 +114,6 @@ _gss_authenticate(rqst, msg, no_dispatch)
  36. case AUTH_SHORT:
  37. dummy = _svcauth_short(rqst, msg);
  38. return (dummy);
  39. - case AUTH_DES:
  40. - dummy = _svcauth_des(rqst, msg);
  41. - return (dummy);
  42. #ifdef HAVE_RPCSEC_GSS
  43. case RPCSEC_GSS:
  44. dummy = _svcauth_gss(rqst, msg, no_dispatch);
  45. diff --git a/src/rpc_soc.c b/src/rpc_soc.c
  46. index e146ed4..161a1ec 100644
  47. --- a/src/rpc_soc.c
  48. +++ b/src/rpc_soc.c
  49. @@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
  50. }
  51. /*
  52. - * Create the client des authentication object. Obsoleted by
  53. - * authdes_seccreate().
  54. - */
  55. -AUTH *
  56. -authdes_create(servername, window, syncaddr, ckey)
  57. - char *servername; /* network name of server */
  58. - u_int window; /* time to live */
  59. - struct sockaddr *syncaddr; /* optional hostaddr to sync with */
  60. - des_block *ckey; /* optional conversation key to use */
  61. -{
  62. - AUTH *nauth;
  63. - char hostname[NI_MAXHOST];
  64. -
  65. - if (syncaddr) {
  66. - /*
  67. - * Change addr to hostname, because that is the way
  68. - * new interface takes it.
  69. - */
  70. - switch (syncaddr->sa_family) {
  71. - case AF_INET:
  72. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
  73. - sizeof hostname, NULL, 0, 0) != 0)
  74. - goto fallback;
  75. - break;
  76. - case AF_INET6:
  77. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
  78. - sizeof hostname, NULL, 0, 0) != 0)
  79. - goto fallback;
  80. - break;
  81. - default:
  82. - goto fallback;
  83. - }
  84. - nauth = authdes_seccreate(servername, window, hostname, ckey);
  85. - return (nauth);
  86. - }
  87. -fallback:
  88. - return authdes_seccreate(servername, window, NULL, ckey);
  89. -}
  90. -
  91. -/*
  92. - * Create the client des authentication object. Obsoleted by
  93. - * authdes_pk_seccreate().
  94. - */
  95. -extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
  96. - const des_block *, nis_server *);
  97. -
  98. -AUTH *
  99. -authdes_pk_create(servername, pkey, window, syncaddr, ckey)
  100. - char *servername; /* network name of server */
  101. - netobj *pkey; /* public key */
  102. - u_int window; /* time to live */
  103. - struct sockaddr *syncaddr; /* optional hostaddr to sync with */
  104. - des_block *ckey; /* optional conversation key to use */
  105. -{
  106. - AUTH *nauth;
  107. - char hostname[NI_MAXHOST];
  108. -
  109. - if (syncaddr) {
  110. - /*
  111. - * Change addr to hostname, because that is the way
  112. - * new interface takes it.
  113. - */
  114. - switch (syncaddr->sa_family) {
  115. - case AF_INET:
  116. - if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
  117. - sizeof hostname, NULL, 0, 0) != 0)
  118. - goto fallback;
  119. - break;
  120. - default:
  121. - goto fallback;
  122. - }
  123. - nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
  124. - return (nauth);
  125. - }
  126. -fallback:
  127. - return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
  128. -}
  129. -
  130. -
  131. -/*
  132. * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
  133. */
  134. CLIENT *
  135. --
  136. 2.4.6