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 466b6dd..665d328 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 e3cb8af..7802304 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,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]) @@ -50,7 +50,7 @@ AC_ARG_ENABLE(symvers, [],[enable_symvers=yes]) AM_CONDITIONAL(SYMVERS, test "x$enable_symvers" = xyes) -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/auth.h b/tirpc/rpc/auth.h index f7fa16c..3e2d1cf 100644 --- a/tirpc/rpc/auth.h +++ b/tirpc/rpc/auth.h @@ -51,6 +51,7 @@ #include #include +#include #define MAX_AUTH_BYTES 400 #define MAXNETNAMELEN 255 /* maximum length of network user's name */ @@ -164,7 +165,7 @@ union des_block { }; typedef union des_block des_block; -#ifdef HAVE_AUTHDES +#ifdef TIRPC_AUTHDES #ifdef __cplusplus extern "C" { #endif @@ -172,7 +173,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 +321,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 +339,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 +363,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 392a7b9..7517264 100644 --- a/tirpc/rpc/rpc.h +++ b/tirpc/rpc/rpc.h @@ -39,6 +39,8 @@ #include #include +#include + /* external data representation interfaces */ #include /* generic (de)serializer */ @@ -52,13 +54,13 @@ #include /* protocol for rpc messages */ #include /* 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 /* protocol for des style cred */ -#endif /* HAVE_AUTHDES */ +#endif /* TIRPC_AUTHDES */ /* Server side only remote procedure callee */ #include /* service side authenticator */ diff --git a/tirpc/tirpc-features.h.in b/tirpc/tirpc-features.h.in new file mode 100644 index 0000000..9bea966 --- /dev/null +++ b/tirpc/tirpc-features.h.in @@ -0,0 +1,7 @@ +#ifndef _TIRPC_FEATURES_H +#define _TIRPC_FEATURES_H + +/* Define to 1 if DES authentication is enabled */ +#undef TIRPC_AUTHDES + +#endif /* _TIRPC_FEATURES_H */