SHA256
1
0
forked from pool/libtirpc
libtirpc/001-tirpc-features.patch
Cristian Rodríguez 167c8f44ce Accepting request 305737 from home:kukuk:NIS
- Fix HAVE_AUTHDES/HAVE_GSSAPI in public header files
  (001-tirpc-features.patch)

- Update to official release 0.3.0. authdes was disabled by default
  upstream.
- Following patches were merged:
  - 001-symbol-versions-v5.patch
  - 003-add-des_crypt.diff
- Remove 002-old-automake.patch, not needed anymore

- Update 001-symbol-versions-v4.patch with
  001-symbol-versions-v5.patch: Add --disable-symvers option

- Update 003-add-des_crypt.diff, fix unresolved des functions

- Update to git
- Add 003-add-des_crypt.diff to fix unresolved *_crypt() functions

- Disable gssapi for SLE11, kerberos version is too old

- rpc/rpc.h requires now indirectly gssapi.h from krb5-devel

- Update to current git.
- The following patches were accepted upstream:
  - 003-xdr_h-fix.patch
  - 005-disable-rpcent.patch
  - 006-no-libnsl.patch
  - patch1_7.diff
  - patch2_7.diff
  - patch3_7.diff

OBS-URL: https://build.opensuse.org/request/show/305737
OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=43
2015-05-07 19:52:27 +00:00

100 lines
2.5 KiB
Diff

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/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..b308d2b 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.
*/
diff --git a/tirpc/tirpc-features.h.in b/tirpc/tirpc-features.h.in
index e69de29..72e18bc 100644
--- a/tirpc/tirpc-features.h.in
+++ 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 */