DES encryption might not be available.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
tirpc/rpc/pmap_prot.h \
tirpc/rpc/pmap_clnt.h \
tirpc/rpc/nettype.h \
- tirpc/rpc/des.h \
- tirpc/rpc/des_crypt.h \
tirpc/rpc/clnt_stat.h \
tirpc/rpc/clnt_soc.h \
tirpc/rpc/clnt.h \
tirpc/rpc/auth_unix.h \
tirpc/rpc/auth_kerb.h \
tirpc/rpc/auth.h \
- tirpc/rpc/auth_gss.h \
+ tirpc/rpc/auth_gss.h
+
+if AUTHDES
+nobase_include_HEADERS += \
+ tirpc/rpc/des.h \
+ tirpc/rpc/des_crypt.h \
tirpc/rpc/auth_des.h
-
+endif
+
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = libtirpc.pc
[AC_HELP_STRING([--disable-authdes], [Disable DES authentication @<:@default=no@:>@])],
[],[enable_authdes=yes])
AM_CONDITIONAL(AUTHDES, test x$enable_authdes = xyes)
+if test x$enable_authdes = xyes; then
+ AC_DEFINE([HAVE_AUTHDES], [1],
+ [Define to 1 if DES authentication is enabled])
+ CFLAG_AUTHDES="-DHAVE_AUTHDES=1"
+ AC_SUBST([CFLAG_AUTHDES])
+fi
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])],
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
AC_OUTPUT(libtirpc.pc)
-
Version: @PACKAGE_VERSION@
Libs: -L@libdir@ -ltirpc
Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I@includedir@/tirpc @CFLAG_AUTHDES@
## DES authentication
if AUTHDES
libtirpc_la_SOURCES += auth_des.c authdes_prot.c
- libtirpc_la_CFLAGS += -DHAVE_AUTHDES
endif
(resultproc_t) rpc_wrap_bcast, "udp");
}
-#if HAVE_AUTHDES
+#ifdef HAVE_AUTHDES
/*
* Create the client des authentication object. Obsoleted by
* authdes_seccreate().
char c[8];
};
typedef union des_block des_block;
+
+#ifdef HAVE_AUTHDES
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
+#endif /* HAVE_AUTHDES */
/*
* Authentication info. Opaque to client.
#ifdef __cplusplus
}
#endif
+
+#ifdef HAVE_AUTHDES
/*
* DES style authentication
* AUTH *authsecdes_create(servername, window, timehost, ckey)
#ifdef __cplusplus
}
#endif
+#endif /* HAVE_AUTHDES */
#ifdef __cplusplus
extern "C" {
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
extern void passwd2des ( char *, char * );
+#endif /* HAVE_AUTHDES */
#ifdef __cplusplus
}
#endif
#endif
extern int key_decryptsession(const char *, des_block *);
extern int key_encryptsession(const char *, des_block *);
+#ifdef HAVE_AUTHDES
extern int key_gendes(des_block *);
+#endif /* HAVE_AUTHDES */
extern int key_setsecret(const char *);
extern int key_secretkey_is_set(void);
#ifdef __cplusplus
#include <rpc/rpc_msg.h> /* protocol for rpc messages */
#include <rpc/auth_unix.h> /* protocol for unix style cred */
+#ifdef HAVE_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 */
#ifdef HAVE_RPCSEC_GSS
#include <rpc/auth_gss.h> /* RPCSEC_GSS */