summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
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:45:53 +0000
commit82e373fb847b08b55176d0bcd78fdebf1c1b8689 (patch)
tree3322d2bcf50d94d613fa06dbec1a128db32356c3 /meta/recipes-extended/quota/quota/config-tcpwrappers.patch
parent3c94bfe8c57a3a9a1fefd5a36c64fb6071175e48 (diff)
downloadpoky-82e373fb847b08b55176d0bcd78fdebf1c1b8689.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. (From OE-Core rev: 16bbdef239942276a1740a3b9dfe4e8c34a16b29) 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/config-tcpwrappers.patch')
-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 @@
1Upstream-status: Pending
2
3--- quota-tools.orig/configure.in
4+++ quota-tools/configure.in
5@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
6 AC_SUBST(NETLINKLIBS)
7
8 AC_SEARCH_LIBS(gethostbyname, nsl)
9-AC_MSG_CHECKING(for host_access in -lwrap)
10-AC_CACHE_VAL(ac_cv_lib_wrap_main,
11- saved_LIBS="$LIBS"
12- LIBS="$LIBS -lwrap"
13- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
14- #include <stdio.h>
15- #include <sys/types.h>
16- #include <sys/socket.h>
17- #include <netinet/in.h>
18- #include <tcpd.h>
19- struct request_info request;
20- int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
21- dnl We always restore LIBS as we add -lwrap in the next check
22- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
23- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
24- ])
25
26-if test ${ac_cv_lib_wrap_main} = yes; then
27- AC_CHECK_HEADER(tcpd.h,, [
28- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
29- exit 1
30- ])
31- LIBS="$LIBS -lwrap"
32- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
33- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
34+AC_ARG_WITH(tcpwrappers,
35+ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
36+ ,
37+ with_tcpwrappers="try")
38+
39+if test "x$with_tcpwrappers" != xno; then
40+ AC_MSG_CHECKING(for host_access in -lwrap)
41+ AC_CACHE_VAL(ac_cv_lib_wrap_main,
42+ saved_LIBS="$LIBS"
43+ LIBS="$LIBS -lwrap"
44+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
45+ #include <stdio.h>
46+ #include <sys/types.h>
47+ #include <sys/socket.h>
48+ #include <netinet/in.h>
49+ #include <tcpd.h>
50+ struct request_info request;
51+ int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
52+ dnl We always restore LIBS as we add -lwrap in the next try
53+ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
54+ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
55+ ])
56+
57+ if test "x$ac_cv_lib_wrap_main" = xyes; then
58+ AC_CHECK_HEADER(tcpd.h,, [
59+ if test "x$with_tcpwrappers" != xtry; then
60+ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
61+ fi
62+ ])
63+
64+ LIBS="$LIBS -lwrap"
65+ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
66+ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
67+ elif test "x$with_tcpwrappers" != xtry; then
68+ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
69+ fi
70 fi
71
72+
73 dnl Checks for typedefs, structures, and compiler characteristics.
74 AC_C_CONST
75 AC_C_INLINE