Codebase list libnss-nisplus / 774d86e
Check for rpc/netdb.h and rpc/rpcent.h header files and xdecrypt function. If xdecrypt does not exist, don't compile getsecretkey function. Thorsten Kukuk 8 years ago
5 changed file(s) with 48 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 2016-03-22 Thorsten Kukuk <kukuk@thkukuk.de>
1
2 * src/nisplus-rpc.c: Include netdb.h or rpcent.h depending
3 on configure result.
4
5 * src/nisplus-publickey.c (_nss_nisplus_getsecretkey): Only
6 compile if xdecrypt exist.
7
8 * configure.ac: Check for xdecrypt function.
9 * configure.ac: Check for rpc/netdb.h, rpcent.h header files.
10
011 2016-03-15 Thorsten Kukuk <kukuk@thkukuk.de>
112
213 * release version 1.1
77
88 /* Define to 1 if you have the <memory.h> header file. */
99 #undef HAVE_MEMORY_H
10
11 /* Define to 1 if you have the <rpc/netdb.h> header file. */
12 #undef HAVE_RPC_NETDB_H
13
14 /* Define to 1 if you have the <rpc/rpcent.h> header file. */
15 #undef HAVE_RPC_RPCENT_H
1016
1117 /* Define to 1 if you have the <stdint.h> header file. */
1218 #undef HAVE_STDINT_H
2834
2935 /* Define to 1 if you have the <unistd.h> header file. */
3036 #undef HAVE_UNISTD_H
37
38 /* Define to 1 if you have the `xdecrypt' function. */
39 #undef HAVE_XDECRYPT
3140
3241 /* Define to the sub-directory in which libtool stores uninstalled libraries.
3342 */
2525
2626 dnl Checks for libraries.
2727 PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [TIRPC_LIBS=""])
28 old_CFLAGS=$CFLAGS
29 old_LIBS=$LIBS
30 old_CPPFLAGS=$CPPFLAGS
31 CFLAGS="$CFLAGS $TIRPC_CFLAGS"
32 LIBS="$LIBS $TIRPC_LIBS"
33 CPPFLAGS="$CPPFLAGS $TIRPC_CFLAGS"
34 AC_CHECK_HEADERS([rpc/netdb.h rpc/rpcent.h])
35 AC_CHECK_FUNCS([xdecrypt])
36 CFLAGS=$old_CFLAGS
37 LIBS=$old_LIBS
38 CPPFLAGS=$old_CPPFLAGS
39
2840 PKG_CHECK_MODULES([LIBNSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL_LIBS="-lnsl"],[LIBNSL_LIBS=""])])
2941
3042 AC_OUTPUT([Makefile src/Makefile])
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
1616 <http://www.gnu.org/licenses/>. */
17
18 #ifdef HAVE_CONFIG_H
19 #include <config.h>
20 #endif
1721
1822 #include <nss.h>
1923 #include <ctype.h>
113117 }
114118
115119
120 #if !defined(HAVE_XDECRYPT)
121 #warning getsecretkey support will be missing!
122 #else
116123 enum nss_status
117124 _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
118125 int *errnop)
202209
203210 return NSS_STATUS_SUCCESS;
204211 }
212 #endif /* HAVE_XDECRYPT */
205213
206214
207215 /* Parse information from the passed string.
1515 License along with the GNU C Library; if not, see
1616 <http://www.gnu.org/licenses/>. */
1717
18 #ifdef HAVE_CONFIG_H
19 #include <config.h>
20 #endif
21
1822 #include <ctype.h>
1923 #include <errno.h>
2024 #include <nss.h>
2125 #include <string.h>
26 #if defined(HAVE_RPC_NETDB_H)
2227 #include <rpc/netdb.h>
28 #elif defined(HAVE_RPC_RPCENT_H)
29 #include <rpc/rpcent.h>
30 #endif
2331 #include <rpcsvc/nis.h>
2432
2533 #include "libc-lock.h"