summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota/quota
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2013-11-25 16:56:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-03 17:11:00 +0000
commit16bbdef239942276a1740a3b9dfe4e8c34a16b29 (patch)
tree95563ea208524af05c59bf8732e4107b31cbff0c /meta/recipes-extended/quota/quota
parent7078397ef39de43244fca7e24683b2a83913cbbf (diff)
downloadopenembedded-core-16bbdef239942276a1740a3b9dfe4e8c34a16b29.tar.gz
quota: apply patch to obey tcp-wrappers config
Without this, the tcpwrappers argument wasn't obeyed, and as such the build wasn't as deterministic as we'd prefer. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/quota/quota')
-rw-r--r--meta/recipes-extended/quota/quota/config-tcpwrappers.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
new file mode 100644
index 0000000000..94dc3f5dff
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
@@ -0,0 +1,75 @@
+Upstream-status: Pending
+
+--- quota-tools.orig/configure.in
++++ quota-tools/configure.in
+@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
+ AC_SUBST(NETLINKLIBS)
+
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+-AC_MSG_CHECKING(for host_access in -lwrap)
+-AC_CACHE_VAL(ac_cv_lib_wrap_main,
+- saved_LIBS="$LIBS"
+- LIBS="$LIBS -lwrap"
+- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+- #include <stdio.h>
+- #include <sys/types.h>
+- #include <sys/socket.h>
+- #include <netinet/in.h>
+- #include <tcpd.h>
+- struct request_info request;
+- int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
+- dnl We always restore LIBS as we add -lwrap in the next check
+- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
+- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
+- ])
+
+-if test ${ac_cv_lib_wrap_main} = yes; then
+- AC_CHECK_HEADER(tcpd.h,, [
+- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
+- exit 1
+- ])
+- LIBS="$LIBS -lwrap"
+- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
+- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
++AC_ARG_WITH(tcpwrappers,
++ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
++ ,
++ with_tcpwrappers="try")
++
++if test "x$with_tcpwrappers" != xno; then
++ AC_MSG_CHECKING(for host_access in -lwrap)
++ AC_CACHE_VAL(ac_cv_lib_wrap_main,
++ saved_LIBS="$LIBS"
++ LIBS="$LIBS -lwrap"
++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
++ #include <sys/types.h>
++ #include <sys/socket.h>
++ #include <netinet/in.h>
++ #include <tcpd.h>
++ struct request_info request;
++ int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
++ dnl We always restore LIBS as we add -lwrap in the next try
++ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
++ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
++ ])
++
++ if test "x$ac_cv_lib_wrap_main" = xyes; then
++ AC_CHECK_HEADER(tcpd.h,, [
++ if test "x$with_tcpwrappers" != xtry; then
++ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
++ fi
++ ])
++
++ LIBS="$LIBS -lwrap"
++ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
++ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
++ elif test "x$with_tcpwrappers" != xtry; then
++ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
++ fi
+ fi
+
++
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_INLINE