|
|
ab3a3d |
autofs-5.0.7 - make yellow pages support optional
|
|
|
ab3a3d |
|
|
|
ab3a3d |
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
|
|
|
ab3a3d |
|
|
|
ab3a3d |
If rpcsvc/ypclnt.h is not available don't compile in Yellow Pages
|
|
|
ab3a3d |
support.
|
|
|
ab3a3d |
---
|
|
|
ab3a3d |
|
|
|
ab3a3d |
CHANGELOG | 1 +
|
|
|
ab3a3d |
Makefile.conf.in | 3 +++
|
|
|
ab3a3d |
configure | 16 ++++++++++++++++
|
|
|
ab3a3d |
configure.in | 9 +++++++++
|
|
|
ab3a3d |
include/config.h.in | 3 +++
|
|
|
ab3a3d |
lib/rpc_subs.c | 1 -
|
|
|
ab3a3d |
modules/Makefile | 9 +++++++--
|
|
|
ab3a3d |
7 files changed, 39 insertions(+), 3 deletions(-)
|
|
|
ab3a3d |
|
|
|
ab3a3d |
|
|
|
ab3a3d |
diff --git a/CHANGELOG b/CHANGELOG
|
|
|
ab3a3d |
index 1130db6..ed17163 100644
|
|
|
ab3a3d |
--- a/CHANGELOG
|
|
|
ab3a3d |
+++ b/CHANGELOG
|
|
|
ab3a3d |
@@ -25,6 +25,7 @@
|
|
|
ab3a3d |
- don't schedule new alarms after readmap.
|
|
|
ab3a3d |
- use numeric protocol ids instead of protoent structs.
|
|
|
ab3a3d |
- lib/defaults.c: use WITH_LDAP conditional around LDAP types.
|
|
|
ab3a3d |
+- make yellow pages support optional.
|
|
|
ab3a3d |
|
|
|
ab3a3d |
25/07/2012 autofs-5.0.7
|
|
|
ab3a3d |
=======================
|
|
|
ab3a3d |
diff --git a/Makefile.conf.in b/Makefile.conf.in
|
|
|
ab3a3d |
index 802318b..3766d45 100644
|
|
|
ab3a3d |
--- a/Makefile.conf.in
|
|
|
ab3a3d |
+++ b/Makefile.conf.in
|
|
|
ab3a3d |
@@ -43,6 +43,9 @@ NISPLUS = @HAVE_NISPLUS@
|
|
|
ab3a3d |
# SMBFS support: yes (1) no (0)
|
|
|
ab3a3d |
SMBFS = @HAVE_SMBMOUNT@
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+# YellowPages support: yes (1) no (0)
|
|
|
ab3a3d |
+YPCLNT = @HAVE_YPCLNT@
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
# Support for calling e2fsck when mounting ext2 filesystems
|
|
|
ab3a3d |
EXT2FS = @HAVE_E2FSCK@
|
|
|
ab3a3d |
|
|
|
ab3a3d |
diff --git a/configure b/configure
|
|
|
ab3a3d |
index 3722a46..cf6428c 100755
|
|
|
ab3a3d |
--- a/configure
|
|
|
ab3a3d |
+++ b/configure
|
|
|
ab3a3d |
@@ -614,6 +614,7 @@ XML_FLAGS
|
|
|
ab3a3d |
LIBLDAP
|
|
|
ab3a3d |
HAVE_LDAP
|
|
|
ab3a3d |
LDAP_FLAGS
|
|
|
ab3a3d |
+HAVE_YPCLNT
|
|
|
ab3a3d |
HAVE_NISPLUS
|
|
|
ab3a3d |
EGREP
|
|
|
ab3a3d |
GREP
|
|
|
ab3a3d |
@@ -4575,6 +4576,21 @@ fi
|
|
|
ab3a3d |
|
|
|
ab3a3d |
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+# YellowPages support?
|
|
|
ab3a3d |
+HAVE_YPCLNT=0
|
|
|
ab3a3d |
+ac_fn_c_check_header_mongrel "$LINENO" "rpcsvc/ypclnt.h" "ac_cv_header_rpcsvc_ypclnt_h" "$ac_includes_default"
|
|
|
ab3a3d |
+if test "x$ac_cv_header_rpcsvc_ypclnt_h" = xyes; then :
|
|
|
ab3a3d |
+ HAVE_YPCLNT=1
|
|
|
ab3a3d |
+fi
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
+if test "$HAVE_YPCLNT" = "1"; then
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
+$as_echo "#define HAVE_YPCLNT 1" >>confdefs.h
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
+fi
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
#
|
|
|
ab3a3d |
# OpenLDAP support? Expect that this may have a special directory...
|
|
|
ab3a3d |
#
|
|
|
ab3a3d |
diff --git a/configure.in b/configure.in
|
|
|
ab3a3d |
index 90bda62..363c376 100644
|
|
|
ab3a3d |
--- a/configure.in
|
|
|
ab3a3d |
+++ b/configure.in
|
|
|
ab3a3d |
@@ -213,6 +213,15 @@ HAVE_NISPLUS=0
|
|
|
ab3a3d |
AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
|
|
|
ab3a3d |
AC_SUBST(HAVE_NISPLUS)
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+# YellowPages support?
|
|
|
ab3a3d |
+HAVE_YPCLNT=0
|
|
|
ab3a3d |
+AC_CHECK_HEADER([rpcsvc/ypclnt.h], HAVE_YPCLNT=1)
|
|
|
ab3a3d |
+AC_SUBST(HAVE_YPCLNT)
|
|
|
ab3a3d |
+if test "$HAVE_YPCLNT" = "1"; then
|
|
|
ab3a3d |
+ AC_DEFINE(HAVE_YPCLNT, 1,
|
|
|
ab3a3d |
+ [Define if using YellowPages])
|
|
|
ab3a3d |
+fi
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
#
|
|
|
ab3a3d |
# OpenLDAP support? Expect that this may have a special directory...
|
|
|
ab3a3d |
#
|
|
|
ab3a3d |
diff --git a/include/config.h.in b/include/config.h.in
|
|
|
ab3a3d |
index 9bdf98a..7f1c5b5 100644
|
|
|
ab3a3d |
--- a/include/config.h.in
|
|
|
ab3a3d |
+++ b/include/config.h.in
|
|
|
ab3a3d |
@@ -72,6 +72,9 @@
|
|
|
ab3a3d |
/* Define to 1 if you have the <unistd.h> header file. */
|
|
|
ab3a3d |
#undef HAVE_UNISTD_H
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+/* Define if using YellowPages */
|
|
|
ab3a3d |
+#undef HAVE_YPCLNT
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
/* Use libxml2 tsd usage workaround */
|
|
|
ab3a3d |
#undef LIBXML2_WORKAROUND
|
|
|
ab3a3d |
|
|
|
ab3a3d |
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
|
|
ab3a3d |
index ad1d557..718caf9 100644
|
|
|
ab3a3d |
--- a/lib/rpc_subs.c
|
|
|
ab3a3d |
+++ b/lib/rpc_subs.c
|
|
|
ab3a3d |
@@ -27,7 +27,6 @@
|
|
|
ab3a3d |
#include <net/if.h>
|
|
|
ab3a3d |
#include <netinet/in.h>
|
|
|
ab3a3d |
#include <arpa/inet.h>
|
|
|
ab3a3d |
-#include <rpcsvc/ypclnt.h>
|
|
|
ab3a3d |
#include <errno.h>
|
|
|
ab3a3d |
#include <sys/ioctl.h>
|
|
|
ab3a3d |
#include <ctype.h>
|
|
|
ab3a3d |
diff --git a/modules/Makefile b/modules/Makefile
|
|
|
ab3a3d |
index 939da7c..c5deb24 100644
|
|
|
ab3a3d |
--- a/modules/Makefile
|
|
|
ab3a3d |
+++ b/modules/Makefile
|
|
|
ab3a3d |
@@ -5,13 +5,13 @@
|
|
|
ab3a3d |
-include ../Makefile.conf
|
|
|
ab3a3d |
include ../Makefile.rules
|
|
|
ab3a3d |
|
|
|
ab3a3d |
-SRCS := lookup_yp.c lookup_file.c lookup_program.c lookup_userhome.c \
|
|
|
ab3a3d |
+SRCS := lookup_file.c lookup_program.c lookup_userhome.c \
|
|
|
ab3a3d |
lookup_multi.c lookup_hosts.c lookup_dir.c \
|
|
|
ab3a3d |
parse_sun.c \
|
|
|
ab3a3d |
mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c \
|
|
|
ab3a3d |
mount_changer.c mount_bind.c
|
|
|
ab3a3d |
|
|
|
ab3a3d |
-MODS := lookup_yp.so lookup_file.so lookup_program.so lookup_userhome.so \
|
|
|
ab3a3d |
+MODS := lookup_file.so lookup_program.so lookup_userhome.so \
|
|
|
ab3a3d |
lookup_multi.so lookup_hosts.so lookup_dir.so \
|
|
|
ab3a3d |
parse_sun.so \
|
|
|
ab3a3d |
mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so \
|
|
|
ab3a3d |
@@ -37,6 +37,11 @@ ifeq ($(NISPLUS), 1)
|
|
|
ab3a3d |
MODS += lookup_nisplus.so
|
|
|
ab3a3d |
endif
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+ifeq ($(YPCLNT), 1)
|
|
|
ab3a3d |
+ SRCS += lookup_yp.c
|
|
|
ab3a3d |
+ MODS += lookup_yp.so
|
|
|
ab3a3d |
+endif
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
ifeq ($(LDAP), 1)
|
|
|
ab3a3d |
SRCS += lookup_ldap.c
|
|
|
ab3a3d |
MODS += lookup_ldap.so
|