From patchwork Thu May 7 20:24:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 6360791 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C7B2F9F373 for ; Thu, 7 May 2015 20:24:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D566920303 for ; Thu, 7 May 2015 20:24:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5658F202FF for ; Thu, 7 May 2015 20:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751313AbbEGUYe (ORCPT ); Thu, 7 May 2015 16:24:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43769 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbbEGUYd (ORCPT ); Thu, 7 May 2015 16:24:33 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t47KOLXP021390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 7 May 2015 16:24:21 -0400 Received: from smallhat.boston.devel.redhat.com (vpn-63-67.rdu2.redhat.com [10.10.63.67]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t47KOJjo018336; Thu, 7 May 2015 16:24:20 -0400 Message-ID: <554BC9F3.6020005@RedHat.com> Date: Thu, 07 May 2015 16:24:19 -0400 From: Steve Dickson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Thorsten Kukuk CC: Mike Frysinger , libtirpc-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org Subject: [PATCH V2] Fix Build w/gssapi disabled References: <1430983149-22199-1-git-send-email-vapier@gentoo.org> <20150507115248.GA20243@suse.de> <554B86E2.8090908@RedHat.com> <20150507163326.GA6156@suse.de> <554B98E9.4040601@RedHat.com> <20150507181206.GA7810@suse.de> <554BC53C.5080807@RedHat.com> <554BC730.3000004@RedHat.com> In-Reply-To: <554BC730.3000004@RedHat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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 This version seems to work now. I wonder if this warrants a 0.3.1 release... How do other library deal with API breakage? steved. From 6cc5a243f62fbe32fe5f24f4c549a42b1c2b4adc Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 7 May 2015 16:14:04 -0400 Subject: [PATCH] Fix Build w/gssapi disabled A regression was introduced by commit d5259e75 that broke the --disable-gssapi configuration flag causing numerous compile errors. This patch fixes those errors but then the config flag is used it breaks API with previous releases. Signed-off-by: Steve Dickson --- .gitignore | 2 ++ Makefile.am | 4 +++- configure.ac | 3 ++- src/svc_auth_gss.c | 5 ++++- tirpc/rpc/rpc.h | 4 +++- tirpc/rpc/svc_auth.h | 8 ++++++++ tirpc/tirpc-features.h.in | 10 ++++++++++ 7 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 tirpc/tirpc-features.h.in diff --git a/.gitignore b/.gitignore index b7814a3..fad274f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ libtirpc.pc lib*.a src/libtirpc.la src/libtirpc_la-*.lo +tirpc/stamp-h2 +tirpc/tirpc-features.h # generic editor backup et al *~ .stgitmail.txt diff --git a/Makefile.am b/Makefile.am index 2bf725c..2bce3b0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,9 +4,11 @@ ACLOCAL_AMFLAGS = -I m4 noinst_HEADERS = tirpc/reentrant.h \ tirpc/getpeereid.h \ tirpc/libc_private.h \ - tirpc/un-namespace.h + tirpc/un-namespace.h \ + tirpc/tirpc-features.h.in nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/tirpc-features.h \ tirpc/rpcsvc/crypt.x \ tirpc/rpcsvc/crypt.h \ tirpc/rpc/xdr.h \ diff --git a/configure.ac b/configure.ac index 711b054..290c635 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ AC_ARG_ENABLE(gssapi, AM_CONDITIONAL(GSS, test "x$enable_gssapi" = xyes) if test "x$enable_gssapi" = xyes; then + AC_DEFINE([HAVE_GSSAPI], [1], [Define to 1 if GSSAPI is enabled]) GSSAPI_CFLAGS=`krb5-config --cflags gssapi` GSSAPI_LIBS=`krb5-config --libs gssapi` AC_SUBST([GSSAPI_CFLAGS]) @@ -41,7 +42,7 @@ AC_ARG_ENABLE(symvers, AM_CONDITIONAL(SYMVERS, test "x$enable_symvers" = xyes) AC_PROG_CC -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([config.h tirpc/tirpc-features.h]) AC_PROG_LIBTOOL AC_HEADER_DIRENT AC_PREFIX_DEFAULT(/usr) diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c index d95eae1..e0a5c6a 100644 --- a/src/svc_auth_gss.c +++ b/src/svc_auth_gss.c @@ -34,8 +34,11 @@ */ -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include #include #include #include diff --git a/tirpc/rpc/rpc.h b/tirpc/rpc/rpc.h index 1dbb391..8f37454 100644 --- a/tirpc/rpc/rpc.h +++ b/tirpc/rpc/rpc.h @@ -35,6 +35,8 @@ #ifndef _TIRPC_RPC_H #define _TIRPC_RPC_H +#include + #include /* some typedefs */ #include #include @@ -60,7 +62,7 @@ #include /* protocol for des style cred */ #endif /* HAVE_AUTHDES */ -#ifdef HAVE_RPCSEC_GSS +#ifdef HAVE_GSSAPI #include /* RPCSEC_GSS */ #endif diff --git a/tirpc/rpc/svc_auth.h b/tirpc/rpc/svc_auth.h index 44b38bf..dbd8cc9 100644 --- a/tirpc/rpc/svc_auth.h +++ b/tirpc/rpc/svc_auth.h @@ -41,6 +41,10 @@ #ifndef _RPC_SVC_AUTH_H #define _RPC_SVC_AUTH_H +#include + +#ifdef HAVE_GSSAPI + #include typedef struct { @@ -51,6 +55,8 @@ typedef struct { u_int seq_num; } svc_rpc_gss_parms_t; +#endif /* HAVE_GSSAPI */ + /* * Interface to server-side authentication flavors. */ @@ -63,8 +69,10 @@ typedef struct SVCAUTH { int (*svc_ah_destroy)(struct SVCAUTH *); } *svc_ah_ops; caddr_t svc_ah_private; +#ifdef HAVE_GSSAPI svc_rpc_gss_parms_t svc_gss_params; rpc_gss_rawcred_t raw_cred; +#endif } SVCAUTH; #define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ diff --git a/tirpc/tirpc-features.h.in b/tirpc/tirpc-features.h.in new file mode 100644 index 0000000..72e18bc --- /dev/null +++ b/tirpc/tirpc-features.h.in @@ -0,0 +1,10 @@ +#ifndef _TIRPC_FEATURES_H +#define _TIRPC_FEATURES_H + +/* Define to 1 if DES authentication is enabled */ +#undef HAVE_AUTHDES + +/* Define to 1 if GSSAPI is enabled */ +#undef HAVE_GSSAPI + +#endif /* _TIRPC_FEATURES_H */