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
|
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 |
|
0 | 11 |
2016-03-15 Thorsten Kukuk <kukuk@thkukuk.de>
|
1 | 12 |
|
2 | 13 |
* release version 1.1
|
7 | 7 |
|
8 | 8 |
/* Define to 1 if you have the <memory.h> header file. */
|
9 | 9 |
#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
|
10 | 16 |
|
11 | 17 |
/* Define to 1 if you have the <stdint.h> header file. */
|
12 | 18 |
#undef HAVE_STDINT_H
|
|
28 | 34 |
|
29 | 35 |
/* Define to 1 if you have the <unistd.h> header file. */
|
30 | 36 |
#undef HAVE_UNISTD_H
|
|
37 |
|
|
38 |
/* Define to 1 if you have the `xdecrypt' function. */
|
|
39 |
#undef HAVE_XDECRYPT
|
31 | 40 |
|
32 | 41 |
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
33 | 42 |
*/
|
25 | 25 |
|
26 | 26 |
dnl Checks for libraries.
|
27 | 27 |
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 |
|
28 | 40 |
PKG_CHECK_MODULES([LIBNSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL_LIBS="-lnsl"],[LIBNSL_LIBS=""])])
|
29 | 41 |
|
30 | 42 |
AC_OUTPUT([Makefile src/Makefile])
|
14 | 14 |
You should have received a copy of the GNU Lesser General Public
|
15 | 15 |
License along with the GNU C Library; if not, see
|
16 | 16 |
<http://www.gnu.org/licenses/>. */
|
|
17 |
|
|
18 |
#ifdef HAVE_CONFIG_H
|
|
19 |
#include <config.h>
|
|
20 |
#endif
|
17 | 21 |
|
18 | 22 |
#include <nss.h>
|
19 | 23 |
#include <ctype.h>
|
|
113 | 117 |
}
|
114 | 118 |
|
115 | 119 |
|
|
120 |
#if !defined(HAVE_XDECRYPT)
|
|
121 |
#warning getsecretkey support will be missing!
|
|
122 |
#else
|
116 | 123 |
enum nss_status
|
117 | 124 |
_nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
|
118 | 125 |
int *errnop)
|
|
202 | 209 |
|
203 | 210 |
return NSS_STATUS_SUCCESS;
|
204 | 211 |
}
|
|
212 |
#endif /* HAVE_XDECRYPT */
|
205 | 213 |
|
206 | 214 |
|
207 | 215 |
/* Parse information from the passed string.
|
15 | 15 |
License along with the GNU C Library; if not, see
|
16 | 16 |
<http://www.gnu.org/licenses/>. */
|
17 | 17 |
|
|
18 |
#ifdef HAVE_CONFIG_H
|
|
19 |
#include <config.h>
|
|
20 |
#endif
|
|
21 |
|
18 | 22 |
#include <ctype.h>
|
19 | 23 |
#include <errno.h>
|
20 | 24 |
#include <nss.h>
|
21 | 25 |
#include <string.h>
|
|
26 |
#if defined(HAVE_RPC_NETDB_H)
|
22 | 27 |
#include <rpc/netdb.h>
|
|
28 |
#elif defined(HAVE_RPC_RPCENT_H)
|
|
29 |
#include <rpc/rpcent.h>
|
|
30 |
#endif
|
23 | 31 |
#include <rpcsvc/nis.h>
|
24 | 32 |
|
25 | 33 |
#include "libc-lock.h"
|