1
0
forked from rpms/rpcbind

Added autoconf rules to turn on secure host checking via libwrap. Also

turned on host check by default (bz 248284)
This commit is contained in:
Steve Dickson 2007-09-15 15:52:37 +00:00
parent 6c2c090540
commit f4e8f184ac
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,42 @@
commit 29827c82fbb78725478eaf53b140e14a77fad42f
Author: Steve Dickson <steved@redhat.com>
Date: Sat Sep 15 11:32:57 2007 -0400
Added autoconf rules to turn on secure host checking via libwrap.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/configure.in b/configure.in
index dfe5907..2bdf830 100644
--- a/configure.in
+++ b/configure.in
@@ -52,6 +52,14 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([tirpc], [clnt_create])
+AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking],
+ [case "${enableval}" in
+ yes) libwarp=true
+ AC_CHECK_LIB([wrap], [hosts_access]) ;;
+ no) libwarp=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
+ esac],[libwarp=false])
+AM_CONDITIONAL(LIBWRAP, test x$libwarp = xtrue)
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT()
diff --git a/src/Makefile.am b/src/Makefile.am
index fd80847..d66b43f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,10 @@ if WARMSTART
INCLUDES += -DWARMSTART
endif
+if LIBWRAP
+INCLUDES += -DLIBWRAP
+endif
+
bin_PROGRAMS = rpcbind rpcinfo

View File

@ -28,6 +28,7 @@ Patch2: rpcbind-0.1.4-debug.patch
Patch3: rpcbind-0.1.4-warmstarts.patch Patch3: rpcbind-0.1.4-warmstarts.patch
Patch4: rpcbind-0.1.4-rpcuser.patch Patch4: rpcbind-0.1.4-rpcuser.patch
Patch5: rpcbind-0.1.4-iff_up.patch Patch5: rpcbind-0.1.4-iff_up.patch
Patch6: rpcbind-0.1.4-libwrap.patch
%description %description
The rpcbind utility is a server that converts RPC program numbers into The rpcbind utility is a server that converts RPC program numbers into
@ -43,6 +44,8 @@ RPC calls on a server on that machine.
%patch4 -p1 %patch4 -p1
# 240873: rpcbind segfaults on startup - ipv6 related # 240873: rpcbind segfaults on startup - ipv6 related
%patch5 -p1 %patch5 -p1
# 248284: rpcbind ignores libwrap files
%patch6 -p1
%build %build
%ifarch s390 s390x %ifarch s390 s390x
@ -61,6 +64,7 @@ autoreconf -fisv
--enable-warmstarts \ --enable-warmstarts \
--with-statedir="$RPCBDIR" \ --with-statedir="$RPCBDIR" \
--with-rpcuser="$RPCBUSR" \ --with-rpcuser="$RPCBUSR" \
--enable-libwrap \
--enable-debug --enable-debug
make all make all
@ -121,7 +125,9 @@ fi
%dir %attr(700,rpc,rpc) /var/lib/rpcbind %dir %attr(700,rpc,rpc) /var/lib/rpcbind
%changelog %changelog
* Fri Sep 14 2007 Steve Dickson <steved@redhat.com> 0.1.4-8 * Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
- Added autoconf rules to turn on secure host checking
via libwrap. Also turned on host check by default (bz 248284)
- Changed init script to start service in runlevel 2 (bz 251568) - Changed init script to start service in runlevel 2 (bz 251568)
* Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7 * Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7