0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
  2. From: Steve Dickson <steved@redhat.com>
  3. Date: Mon, 2 Nov 2015 17:05:18 -0500
  4. Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly
  5. In the latest libtirpc version to access the xp_auth
  6. one must use the SVC_XP_AUTH macro. To be backwards
  7. compatible a couple ifdefs were added to use the
  8. macro when it exists.
  9. Signed-off-by: Steve Dickson <steved@redhat.com>
  10. [peda@axentia.se: backport from upstream]
  11. Signed-off-by: Peter Rosin <peda@axentia.se>
  12. ---
  13. src/rpcb_svc_com.c | 7 +++++++
  14. 1 file changed, 7 insertions(+)
  15. diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
  16. index 4ae93f1..22d6c84 100644
  17. --- a/src/rpcb_svc_com.c
  18. +++ b/src/rpcb_svc_com.c
  19. @@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt)
  20. a.rmt_localvers = fi->versnum;
  21. xprt_set_caller(xprt, fi);
  22. +#if defined(SVC_XP_AUTH)
  23. + SVC_XP_AUTH(xprt) = svc_auth_none;
  24. +#else
  25. xprt->xp_auth = &svc_auth_none;
  26. +#endif
  27. svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
  28. +#if !defined(SVC_XP_AUTH)
  29. SVCAUTH_DESTROY(xprt->xp_auth);
  30. xprt->xp_auth = NULL;
  31. +#endif
  32. +
  33. done:
  34. if (buffer)
  35. free(buffer);
  36. --
  37. 2.5.3