linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Thorsten Kukuk <kukuk@suse.de>
Cc: Mike Frysinger <vapier@gentoo.org>,
	libtirpc-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org
Subject: Re: [PATCH V2] Fix Build w/gssapi disabled
Date: Thu, 07 May 2015 23:33:26 -0400	[thread overview]
Message-ID: <554C2E86.6020304@RedHat.com> (raw)
In-Reply-To: <554BC9F3.6020005@RedHat.com>



On 05/07/2015 04:24 PM, Steve Dickson wrote:
> 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 <kukuk@suse.de>
> 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 <steved@redhat.com>
Committed...

steved.

> ---
>  .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 <sys/types.h>
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
>  
> +#include <sys/types.h>
>  #include <unistd.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> 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 <tirpc-features.h>
> +
>  #include <rpc/types.h>		/* some typedefs */
>  #include <sys/socket.h>
>  #include <netinet/in.h>
> @@ -60,7 +62,7 @@
>  #include <rpc/auth_des.h>	/* protocol for des style cred */
>  #endif /* HAVE_AUTHDES */
>  
> -#ifdef HAVE_RPCSEC_GSS
> +#ifdef HAVE_GSSAPI
>  #include <rpc/auth_gss.h>   /* 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 <tirpc-features.h>
> +
> +#ifdef HAVE_GSSAPI
> +
>  #include <rpc/rpcsec_gss.h>
>  
>  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 */
> 

      parent reply	other threads:[~2015-05-08  3:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  7:19 [PATCH libtirpc] fix build w/gssapi disabled Mike Frysinger
2015-05-07  7:40 ` [Libtirpc-devel] " Thorsten Kukuk
2015-05-07  8:23   ` Mike Frysinger
2015-05-07  8:51     ` Thorsten Kukuk
2015-05-07 11:52 ` Thorsten Kukuk
2015-05-07 15:12   ` Mike Frysinger
2015-05-07 15:24     ` Steve Dickson
2015-05-07 15:38   ` Steve Dickson
2015-05-07 16:33     ` Thorsten Kukuk
2015-05-07 16:55       ` Steve Dickson
2015-05-07 18:12         ` Thorsten Kukuk
2015-05-07 20:04           ` Steve Dickson
2015-05-07 20:12             ` Steve Dickson
2015-05-07 20:24               ` [PATCH V2] Fix Build " Steve Dickson
2015-05-08  2:03                 ` Mike Frysinger
2015-05-08  8:17                   ` Thorsten Kukuk
2015-05-08 21:27                     ` Steve Dickson
2015-05-08 22:34                       ` Thorsten Kukuk
2015-05-08  3:33                 ` Steve Dickson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554C2E86.6020304@RedHat.com \
    --to=steved@redhat.com \
    --cc=kukuk@suse.de \
    --cc=libtirpc-devel@lists.sourceforge.net \
    --cc=linux-nfs@vger.kernel.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).