libtirpc/006-rework-features.diff
Marcus Meissner 7ef180a926 Accepting request 306489 from home:kukuk:NIS
- 003-fix-gssapi.patch: Correct fix for GSS ABI breakage
- 006-rework-features.diff: Rework tirpc-features.h

- 003-fix-gssapi.patch: Update, one chunk did go lost

OBS-URL: https://build.opensuse.org/request/show/306489
OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=45
2015-05-18 15:45:32 +00:00

170 lines
4.4 KiB
Diff

diff --git a/configure.ac b/configure.ac
index 290c635..5d11a69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +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])
+ AC_DEFINE([TIRPC_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])
@@ -22,7 +22,7 @@ AC_ARG_ENABLE(authdes,
[],[enable_authdes=no])
AM_CONDITIONAL(AUTHDES, test "x$enable_authdes" = xyes)
if test "x$enable_authdes" = xyes; then
- AC_DEFINE([HAVE_AUTHDES], [1],
+ AC_DEFINE([TIRPC_AUTHDES], [1],
[Define to 1 if DES authentication is enabled])
CFLAG_AUTHDES="-DHAVE_AUTHDES=1"
AC_SUBST([CFLAG_AUTHDES])
diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h
index f7fa16c..6cf512a 100644
--- a/tirpc/rpc/auth.h
+++ b/tirpc/rpc/auth.h
@@ -164,7 +164,7 @@ union des_block {
};
typedef union des_block des_block;
-#ifdef HAVE_AUTHDES
+#ifdef TIRPC_AUTHDES
#ifdef __cplusplus
extern "C" {
#endif
@@ -172,7 +172,7 @@ extern bool_t xdr_des_block(XDR *, des_block *);
#ifdef __cplusplus
}
#endif
-#endif /* HAVE_AUTHDES */
+#endif /* TIRPC_AUTHDES */
/*
* Authentication info. Opaque to client.
@@ -320,7 +320,7 @@ extern AUTH *authnone_create(void); /* takes no parameters */
}
#endif
-#ifdef HAVE_AUTHDES
+#ifdef TIRPC_AUTHDES
/*
* DES style authentication
* AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -338,7 +338,7 @@ extern AUTH *authdes_seccreate (const char *, const u_int, const char *,
#ifdef __cplusplus
}
#endif
-#endif /* HAVE_AUTHDES */
+#endif /* TIRPC_AUTHDES */
#ifdef __cplusplus
extern "C" {
@@ -362,9 +362,9 @@ extern int host2netname(char *, const char *, const char *);
extern int user2netname(char *, const uid_t, const char *);
extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
extern int netname2host(char *, char *, const int);
-#ifdef HAVE_AUTHDES
+#ifdef TIRPC_AUTHDES
extern void passwd2des ( char *, char * );
-#endif /* HAVE_AUTHDES */
+#endif /* TIRPC_AUTHDES */
#ifdef __cplusplus
}
#endif
diff --git a/tirpc/rpc/rpc.h b/tirpc/rpc/rpc.h
index 8f37454..942959a 100644
--- a/tirpc/rpc/rpc.h
+++ b/tirpc/rpc/rpc.h
@@ -54,15 +54,15 @@
#include <rpc/rpc_msg.h> /* protocol for rpc messages */
#include <rpc/auth_unix.h> /* protocol for unix style cred */
-#ifdef HAVE_AUTHDES
+#ifdef TIRPC_AUTHDES
/*
* Uncomment-out the next line if you are building the rpc library with
* DES Authentication (see the README file in the secure_rpc/ directory).
*/
#include <rpc/auth_des.h> /* protocol for des style cred */
-#endif /* HAVE_AUTHDES */
+#endif /* TIRPC_AUTHDES */
-#ifdef HAVE_GSSAPI
+#ifdef TIRPC_GSSAPI
#include <rpc/auth_gss.h> /* RPCSEC_GSS */
#endif
diff --git a/tirpc/rpc/rpcsec_gss.h b/tirpc/rpc/rpcsec_gss.h
index 217fc0d..da343ea 100644
--- a/tirpc/rpc/rpcsec_gss.h
+++ b/tirpc/rpc/rpcsec_gss.h
@@ -35,8 +35,6 @@
#include <rpc/auth.h>
#include <rpc/clnt.h>
-#include <gssapi/gssapi.h>
-
typedef enum {
rpcsec_gss_svc_default = 0,
rpcsec_gss_svc_none = 1,
@@ -44,6 +42,11 @@ typedef enum {
rpcsec_gss_svc_privacy = 3
} rpc_gss_service_t;
+#include <tirpc-features.h>
+
+#ifdef TIRPC_GSSAPI
+#include <gssapi/gssapi.h>
+
typedef struct {
int len;
char name[1];
@@ -129,4 +132,6 @@ bool_t rpc_gss_mech_to_oid(char *, rpc_gss_OID *);
bool_t rpc_gss_qop_to_num(char *, char *, u_int *);
__END_DECLS
+#endif /* TIRPC_GSSAPI */
+
#endif /* !_TIRPC_RPCSEC_GSS_H */
diff --git a/tirpc/rpc/svc_auth.h b/tirpc/rpc/svc_auth.h
index dbd8cc9..0fbee5d 100644
--- a/tirpc/rpc/svc_auth.h
+++ b/tirpc/rpc/svc_auth.h
@@ -41,10 +41,6 @@
#ifndef _RPC_SVC_AUTH_H
#define _RPC_SVC_AUTH_H
-#include <tirpc-features.h>
-
-#ifdef HAVE_GSSAPI
-
#include <rpc/rpcsec_gss.h>
typedef struct {
@@ -55,8 +52,6 @@ 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 72e18bc..39fa64e 100644
--- a/tirpc/tirpc-features.h.in
+++ b/tirpc/tirpc-features.h.in
@@ -2,9 +2,9 @@
#define _TIRPC_FEATURES_H
/* Define to 1 if DES authentication is enabled */
-#undef HAVE_AUTHDES
+#undef TIRPC_AUTHDES
/* Define to 1 if GSSAPI is enabled */
-#undef HAVE_GSSAPI
+#undef TIRPC_GSSAPI
#endif /* _TIRPC_FEATURES_H */