From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: libtirpc-devel@lists.sourceforge.net
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Steve Dickson <SteveD@redhat.com>,
linux-nfs@vger.kernel.org
Subject: [PATCH v2 5/7] configure.ac: Allow for disabling auth DES
Date: Fri, 24 Apr 2015 02:27:40 +0200 [thread overview]
Message-ID: <1429835262-16861-6-git-send-email-rep.dot.nop@gmail.com> (raw)
In-Reply-To: <1429835262-16861-1-git-send-email-rep.dot.nop@gmail.com>
DES encryption might not be available.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
Makefile.am | 12 ++++++++----
configure.ac | 7 ++++++-
libtirpc.pc.in | 2 +-
src/Makefile.am | 1 -
src/rpc_soc.c | 2 +-
tirpc/rpc/auth.h | 10 ++++++++++
tirpc/rpc/rpc.h | 2 ++
7 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9b812eb..e588ae0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,17 +27,21 @@ nobase_include_HEADERS = tirpc/netconfig.h \
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
diff --git a/configure.ac b/configure.ac
index 3ebde36..bcc794e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,12 @@ AC_ARG_ENABLE(authdes,
[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@:>@])],
@@ -59,4 +65,3 @@ AM_CONDITIONAL([YP], [test "x$enable_nis" != xno])
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
AC_OUTPUT(libtirpc.pc)
-
diff --git a/libtirpc.pc.in b/libtirpc.pc.in
index 38034c5..ebbc66f 100644
--- a/libtirpc.pc.in
+++ b/libtirpc.pc.in
@@ -9,4 +9,4 @@ Requires:
Version: @PACKAGE_VERSION@
Libs: -L@libdir@ -ltirpc
Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I@includedir@/tirpc @CFLAG_AUTHDES@
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ba4444..081c2bd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,6 @@ endif
## DES authentication
if AUTHDES
libtirpc_la_SOURCES += auth_des.c authdes_prot.c
- libtirpc_la_CFLAGS += -DHAVE_AUTHDES
endif
if YP
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
index 6574323..1e2f4d6 100644
--- a/src/rpc_soc.c
+++ b/src/rpc_soc.c
@@ -520,7 +520,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
(resultproc_t) rpc_wrap_bcast, "udp");
}
-#if HAVE_AUTHDES
+#ifdef HAVE_AUTHDES
/*
* Create the client des authentication object. Obsoleted by
* authdes_seccreate().
diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h
index 434d35c..1b6c699 100644
--- a/tirpc/rpc/auth.h
+++ b/tirpc/rpc/auth.h
@@ -163,6 +163,8 @@ union des_block {
char c[8];
};
typedef union des_block des_block;
+
+#ifdef HAVE_AUTHDES
#ifdef __cplusplus
extern "C" {
#endif
@@ -170,6 +172,7 @@ extern bool_t xdr_des_block(XDR *, des_block *);
#ifdef __cplusplus
}
#endif
+#endif /* HAVE_AUTHDES */
/*
* Authentication info. Opaque to client.
@@ -316,6 +319,8 @@ extern AUTH *authnone_create(void); /* takes no parameters */
#ifdef __cplusplus
}
#endif
+
+#ifdef HAVE_AUTHDES
/*
* DES style authentication
* AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -333,6 +338,7 @@ extern AUTH *authdes_seccreate (const char *, const u_int, const char *,
#ifdef __cplusplus
}
#endif
+#endif /* HAVE_AUTHDES */
#ifdef __cplusplus
extern "C" {
@@ -356,7 +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
extern void passwd2des ( char *, char * );
+#endif /* HAVE_AUTHDES */
#ifdef __cplusplus
}
#endif
@@ -371,7 +379,9 @@ extern "C" {
#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
diff --git a/tirpc/rpc/rpc.h b/tirpc/rpc/rpc.h
index fac2fa9..1dbb391 100644
--- a/tirpc/rpc/rpc.h
+++ b/tirpc/rpc/rpc.h
@@ -52,11 +52,13 @@
#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 */
--
2.1.4
next prev parent reply other threads:[~2015-04-24 0:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 0:27 [PATCH v2 0/7] Rebase, resend Bernhard Reutner-Fischer
2015-04-24 0:27 ` [PATCH v2 1/7] delete src/config.h Bernhard Reutner-Fischer
2015-04-24 0:27 ` [PATCH v2 2/7] getrpcent: Fix compilation on glibc Bernhard Reutner-Fischer
2015-04-24 0:27 ` [PATCH v2 3/7] Make sure to include config.h Bernhard Reutner-Fischer
2015-04-24 0:27 ` [PATCH v2 4/7] configure.ac: Allow for disabling NIS Bernhard Reutner-Fischer
2016-06-02 14:51 ` [Libtirpc-devel] " Chuck Lever
2015-04-24 0:27 ` Bernhard Reutner-Fischer [this message]
2015-04-24 0:27 ` [PATCH v2 6/7] getrpcport: rephrase host lookup Bernhard Reutner-Fischer
2015-04-24 0:27 ` [PATCH v2 7/7] headers: if 0 out some unbuilt functions Bernhard Reutner-Fischer
2015-04-29 21:18 ` [Libtirpc-devel] [PATCH v2 0/7] Rebase, resend Steve Dickson
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=1429835262-16861-6-git-send-email-rep.dot.nop@gmail.com \
--to=rep.dot.nop@gmail.com \
--cc=SteveD@redhat.com \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.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).