summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-27 08:30:53 -0400
committerSteve Dickson <steved@redhat.com>2015-04-27 08:40:23 -0400
commit9e0c7ac4879bd69d5dba7c81b40142feeb33d666 (patch)
tree31d5b4f4604ca9180f993c0fa40ba44858a37daa
parent8009bdc08bd250d4688963ed1d3e2427b440d851 (diff)
downloadrpcbind-9e0c7ac4879bd69d5dba7c81b40142feeb33d666.tar.gz
configure.ac: Check for rpcsvc/mount.h
The function check_callit() attempts to reference a number of defines from files that might not be available for everything but glibc. For simplicity assume that if there is no rpcsvc/mount.h all the other includes do not exist either. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--configure.ac2
-rw-r--r--src/security.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 27496c7..39cd129 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,6 @@ AS_IF([test x$enable_libwrap = xyes], [
AC_SEARCH_LIBS([pthread_create], [pthread])
-AC_CHECK_HEADERS(nss.h)
+AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
AC_OUTPUT([Makefile])
diff --git a/src/security.c b/src/security.c
index 70edef4..0c9453f 100644
--- a/src/security.c
+++ b/src/security.c
@@ -20,12 +20,29 @@
/*
* XXX for special case checks in check_callit.
*/
+#ifdef HAVE_RPCSVC_MOUNT_H
#include <rpcsvc/mount.h>
#include <rpcsvc/rquota.h>
#include <rpcsvc/nfs_prot.h>
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yppasswd.h>
+#else
+# define MOUNTPROC_MNT 1
+# define MOUNTPROC_UMNT 3
+# define NFS_PROGRAM 100003
+# define YPPROG 100004
+# define MOUNTPROG 100005
+# define YPBINDPROG 100007
+# define YPPASSWDPROG 100009
+# define RQUOTAPROG 100011
+
+# define YPBINDPROC_SETDOM 2
+# define YPPROC_MATCH 3
+# define YPPROC_FIRST 4
+# define YPPROC_NEXT 5
+# define YPPROC_ALL 8
+#endif
#include "rpcbind.h"