]> granicus.if.org Git - libtirpc/commitdiff
configure.ac: Allow for disabling auth DES
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 29 Apr 2015 15:11:30 +0000 (11:11 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 29 Apr 2015 21:05:33 +0000 (17:05 -0400)
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>
Makefile.am
configure.ac
libtirpc.pc.in
src/Makefile.am
src/rpc_soc.c
tirpc/rpc/auth.h
tirpc/rpc/rpc.h

index aa270f6b3950a4832b0699d3c9fb7cccc867a82a..2bf725c9766bf71f8035037cbc3fbbe72fd20526 100644 (file)
@@ -28,17 +28,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
 
index 80dec85febab14c4d459e372aba692d768d19d50..fe35afa10a2b3408279638328bf7c1ab6bf613e5 100644 (file)
@@ -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@:>@])],
@@ -42,4 +48,3 @@ AC_CHECK_FUNCS([getrpcbyname getrpcbynumber])
 AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
 AC_OUTPUT(libtirpc.pc)
 
-
index 38034c53eb1311661697ef098e8cddcd0e83b8db..ebbc66f99404f86391e62ec708cd3cad03a91a66 100644 (file)
@@ -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@
index 5f01ea5b7201a00e79b445bb319b1ec3294c6b1b..af0e42fd3d9560af72673c322c8a5fc6aec078bc 100644 (file)
@@ -68,7 +68,6 @@ endif
 ## DES authentication
 if AUTHDES
     libtirpc_la_SOURCES += auth_des.c authdes_prot.c
-    libtirpc_la_CFLAGS += -DHAVE_AUTHDES
 endif
 
 
index 65743238f5079fde5fcd4b20fe2e483c3e66edb4..1e2f4d6534d978d4007240ee0ced3012e90830c9 100644 (file)
@@ -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().
index 434d35cbd70a18f55a1be1a68ac32b9a6f1fb5d6..1b6c69937bed05e72076a06e05b78f18ffccd9d7 100644 (file)
@@ -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
index fac2fa9a36802b8495d307b8b36170577840b3a3..1dbb39104af7b43121e05d89b4e00a50294369e7 100644 (file)
 #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 */