diff options
author | Francesco Colista <francesco.colista@gmail.com> | 2013-07-08 11:33:58 +0000 |
---|---|---|
committer | Francesco Colista <francesco.colista@gmail.com> | 2013-07-08 11:34:11 +0000 |
commit | 411a2782aaa756b3a8f3988763ac592cff1257b3 (patch) | |
tree | f3506a151a9b2e71ed9417f298e40f11e8d66418 /main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch | |
parent | 0852cf7df3027cc1addd921d31c0b032983196e0 (diff) | |
download | aports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.bz2 aports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.xz |
main/arpwatch: added several patches for improving options and security
Diffstat (limited to 'main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch')
-rw-r--r-- | main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch | 250 |
1 files changed, 250 insertions, 0 deletions
diff --git a/main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch b/main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch new file mode 100644 index 0000000000..3ab59fcb2a --- /dev/null +++ b/main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch @@ -0,0 +1,250 @@ +Patch for aclocal, Makefile.in, configure.in to handle srcdir correctly. + +diff -Naru arpwatch-2.1a15.orig/aclocal.m4 arpwatch-2.1a15/aclocal.m4 +--- arpwatch-2.1a15.orig/aclocal.m4 2006-03-28 11:55:40.000000000 +0400 ++++ arpwatch-2.1a15/aclocal.m4 2006-09-22 16:16:24.000000000 +0400 +@@ -50,7 +50,7 @@ + $1="-O" + $2="" + if test "${srcdir}" != "." ; then +- $2="-I\$\(srcdir\)" ++ $2="-I\$(srcdir)" + fi + if test "${CFLAGS+set}" = set; then + LBL_CFLAGS="$CFLAGS" +diff -Naru arpwatch-2.1a15.orig/configure.in arpwatch-2.1a15/configure.in +--- arpwatch-2.1a15.orig/configure.in 2006-06-22 00:34:29.000000000 +0400 ++++ arpwatch-2.1a15/configure.in 2006-09-22 16:16:24.000000000 +0400 +@@ -143,17 +143,17 @@ + AC_DEFINE(HAVE_DN_SKIPNAME) + fi + +-if test -f .devel ; then ++if test -f $srcdir/.devel ; then + AC_DEFINE(LBL) + fi + +-if test -r lbl/gnuc.h ; then +- rm -f gnuc.h +- ln -s lbl/gnuc.h gnuc.h ++if test -r $srcdir/lbl/gnuc.h ; then ++ rm -f $srcdir/gnuc.h ++ ln -s lbl/gnuc.h $srcdir/gnuc.h + fi + +-if test ! -r addresses.h ; then +- cp addresses.h.in addresses.h ++if test ! -r $srcdir/addresses.h ; then ++ cp $srcdir/addresses.h.in $srcdir/addresses.h + fi + + AC_SUBST(V_CCOPT) +@@ -166,12 +166,12 @@ + + AC_OUTPUT(Makefile) + +-if test ! -f arp.dat ; then ++if test ! -f $srcdir/arp.dat ; then + echo 'creating empty arp.dat file' +- touch arp.dat ++ touch $srcdir/arp.dat + fi + +-if test -f .devel ; then ++if test -f $srcdir/.devel ; then + make depend + fi + exit 0 +diff -Naru arpwatch-2.1a15.orig/configure.in.orig arpwatch-2.1a15/configure.in.orig +--- arpwatch-2.1a15.orig/configure.in.orig 1970-01-01 03:00:00.000000000 +0300 ++++ arpwatch-2.1a15/configure.in.orig 2006-06-22 00:34:29.000000000 +0400 +@@ -0,0 +1,177 @@ ++dnl @(#) $Header: /usr/src/local/sbin/arpwatch/RCS/configure.in,v 1.35 2006/06/21 20:34:27 leres Exp $ (LBL) ++dnl ++dnl Copyright (c) 1994, 1995, 1996, 1997, 1998, 2000, 2006 ++dnl The Regents of the University of California. All rights reserved. ++dnl ++dnl Process this file with autoconf to produce a configure script. ++dnl ++ ++AC_INIT(arpwatch.c) ++ ++AC_CANONICAL_SYSTEM ++ ++umask 002 ++ ++if test -z "$PWD" ; then ++ PWD=`pwd` ++fi ++ ++AC_LBL_C_INIT(V_CCOPT, V_INCLS) ++ ++AC_CHECK_HEADERS(fcntl.h memory.h) ++AC_HEADER_TIME ++ ++AC_REPLACE_FUNCS(bcopy strerror) ++ ++dnl The following generates a warning from autoconf... ++AC_C_BIGENDIAN ++ ++AC_LBL_TYPE_SIGNAL ++AC_LBL_UNION_WAIT ++ ++AC_CHECK_LIB(resolv, res_query) ++AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) ++ ++AC_PATH_PROG(V_SENDMAIL, sendmail, /usr/lib/sendmail, ++ $PATH:/usr/sbin:/usr/lib:/usr/bin:/usr/ucblib:/usr/local/etc) ++ ++case "$target_os" in ++ ++linux*) ++ V_INCLS="$V_INCLS -Ilinux-include" ++ ;; ++ ++osf3*) ++ # workaround around ip_hl vs. ip_vhl problem in netinet/ip.h ++ AC_DEFINE(__STDC__,2) ++ ;; ++esac ++ ++AC_LBL_CHECK_TYPE ++ ++AC_LBL_DEVEL(V_CCOPT) ++ ++AC_MSG_CHECKING(if ether_header uses ether_addr structs) ++AC_CACHE_VAL(ac_cv_ether_header_has_ea, ++ LBL_SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $V_INCLS" ++ AC_TRY_COMPILE([ ++# include <sys/types.h> ++# if __STDC__ ++ /* osf3 has REALLY good prototyes */ ++ struct mbuf; ++ struct rtentry; ++# endif ++# include <sys/socket.h> ++# include <net/if.h> ++# include <netinet/in.h> ++# include <netinet/if_ether.h>], ++ [u_int i = ++ sizeof(((struct ether_header *)0)->ether_dhost.ether_addr_octet)], ++ ac_cv_ether_header_has_ea=yes, ++ ac_cv_ether_header_has_ea=no) ++ CFLAGS="$LBL_SAVE_CFLAGS") ++AC_MSG_RESULT($ac_cv_ether_header_has_ea) ++if test $ac_cv_ether_header_has_ea = yes ; then ++ AC_DEFINE(ETHER_HEADER_HAS_EA) ++fi ++ ++AC_MSG_CHECKING(if ether_arp uses ether_addr structs) ++AC_CACHE_VAL(ac_cv_ether_arp_has_ea, ++ LBL_SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $V_INCLS" ++ AC_TRY_COMPILE([ ++# include <sys/types.h> ++# if __STDC__ ++ /* osf3 has REALLY good prototyes */ ++ struct mbuf; ++ struct rtentry; ++# endif ++# include <sys/socket.h> ++# include <net/if.h> ++# include <netinet/in.h> ++# include <netinet/if_ether.h>], ++ [u_int i = ++ sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)], ++ ac_cv_ether_arp_has_ea=yes, ++ ac_cv_ether_arp_has_ea=no) ++ CFLAGS="$LBL_SAVE_CFLAGS") ++AC_MSG_RESULT($ac_cv_ether_arp_has_ea) ++if test $ac_cv_ether_arp_has_ea = yes ; then ++ AC_DEFINE(ETHER_ARP_HAS_EA) ++fi ++ ++AC_MSG_CHECKING(if ether_arp uses erp_xsha member) ++AC_CACHE_VAL(ac_cv_struct_ether_arp_x, ++ LBL_SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $V_INCLS" ++ AC_TRY_COMPILE([ ++# include <sys/types.h> ++# include <sys/socket.h> ++# if __STDC__ ++ /* osf3 has REALLY good prototyes */ ++ struct mbuf; ++ struct rtentry; ++# endif ++# include <net/if.h> ++# include <netinet/in.h> ++# include <netinet/if_ether.h>], ++ [u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)], ++ ac_cv_struct_ether_arp_x=yes, ++ ac_cv_struct_ether_arp_x=no) ++ CFLAGS="$LBL_SAVE_CFLAGS") ++AC_MSG_RESULT($ac_cv_struct_ether_arp_x) ++if test $ac_cv_struct_ether_arp_x = yes ; then ++ AC_DEFINE(ETHER_ARP_HAS_X) ++fi ++ ++dnl ++dnl bind 8 does some routine name renaming so we must test specially ++dnl ++AC_MSG_CHECKING(for dn_skipname) ++AC_CACHE_VAL(ac_cv_have_dn_skipname, ++ AC_TRY_LINK([ ++# include <sys/types.h> ++# include <netinet/in.h> ++# include <arpa/nameser.h> ++# include <resolv.h>], ++ [(void)dn_skipname(0, 0);], ++ ac_cv_have_dn_skipname=yes, ++ ac_cv_have_dn_skipname=no)) ++AC_MSG_RESULT($ac_cv_have_dn_skipname) ++if test $ac_cv_have_dn_skipname = yes ; then ++ AC_DEFINE(HAVE_DN_SKIPNAME) ++fi ++ ++if test -f .devel ; then ++ AC_DEFINE(LBL) ++fi ++ ++if test -r lbl/gnuc.h ; then ++ rm -f gnuc.h ++ ln -s lbl/gnuc.h gnuc.h ++fi ++ ++if test ! -r addresses.h ; then ++ cp addresses.h.in addresses.h ++fi ++ ++AC_SUBST(V_CCOPT) ++AC_SUBST(V_INCLS) ++AC_SUBST(V_PCAPDEP) ++AC_SUBST(V_SENDMAIL) ++AC_SUBST(LBL_LIBS) ++ ++AC_PROG_INSTALL ++ ++AC_OUTPUT(Makefile) ++ ++if test ! -f arp.dat ; then ++ echo 'creating empty arp.dat file' ++ touch arp.dat ++fi ++ ++if test -f .devel ; then ++ make depend ++fi ++exit 0 +diff -Naru arpwatch-2.1a15.orig/Makefile.in arpwatch-2.1a15/Makefile.in +--- arpwatch-2.1a15.orig/Makefile.in 2000-06-15 04:39:55.000000000 +0400 ++++ arpwatch-2.1a15/Makefile.in 2006-09-22 16:16:24.000000000 +0400 +@@ -104,7 +104,7 @@ + version.o: version.c + version.c: $(srcdir)/VERSION + @rm -f $@ +- sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@ ++ sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $(srcdir)/$@ + + zap: zap.o intoa.o + $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil |