From patchwork Mon Nov 2 22:12:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 7538441 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 32C96BEEA4 for ; Mon, 2 Nov 2015 22:13:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47C7D2062F for ; Mon, 2 Nov 2015 22:13:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 552322062B for ; Mon, 2 Nov 2015 22:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932119AbbKBWNB (ORCPT ); Mon, 2 Nov 2015 17:13:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43800 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932117AbbKBWM7 (ORCPT ); Mon, 2 Nov 2015 17:12:59 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id B6DC864; Mon, 2 Nov 2015 22:12:58 +0000 (UTC) Received: from smallhat.boston.devel.redhat.com (vpn-56-213.rdu2.redhat.com [10.10.56.213]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA2MCvmN009235; Mon, 2 Nov 2015 17:12:58 -0500 From: Steve Dickson To: Libtirpc-devel Mailing List Cc: Linux NFS Mailing list Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly Date: Mon, 2 Nov 2015 17:12:56 -0500 Message-Id: <1446502376-8252-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the latest libtirpc version to access the xp_auth one must use the SVC_XP_AUTH macro. To be backwards compatible a couple ifdefs were added to use the macro when it exists. Signed-off-by: Steve Dickson --- src/rpcb_svc_com.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c index 4ae93f1..22d6c84 100644 --- a/src/rpcb_svc_com.c +++ b/src/rpcb_svc_com.c @@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt) a.rmt_localvers = fi->versnum; xprt_set_caller(xprt, fi); +#if defined(SVC_XP_AUTH) + SVC_XP_AUTH(xprt) = svc_auth_none; +#else xprt->xp_auth = &svc_auth_none; +#endif svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a); +#if !defined(SVC_XP_AUTH) SVCAUTH_DESTROY(xprt->xp_auth); xprt->xp_auth = NULL; +#endif + done: if (buffer) free(buffer);