From af9597a2b212b6ed9faf8bf62efd024fba4e39d8 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 23 Mar 2014 20:38:17 +0100 Subject: remove rsh code --- package/ipcad/patches/patch-Makefile | 169 +++++++++++++++++++++++++++++++++++ package/ipcad/patches/patch-cfg_y | 60 +++++++++++++ 2 files changed, 229 insertions(+) create mode 100644 package/ipcad/patches/patch-Makefile create mode 100644 package/ipcad/patches/patch-cfg_y (limited to 'package/ipcad') diff --git a/package/ipcad/patches/patch-Makefile b/package/ipcad/patches/patch-Makefile new file mode 100644 index 000000000..8ced9f13a --- /dev/null +++ b/package/ipcad/patches/patch-Makefile @@ -0,0 +1,169 @@ +--- ipcad-3.7.3.orig/Makefile 2007-04-22 10:08:45.000000000 +0200 ++++ ipcad-3.7.3/Makefile 2014-03-23 17:59:56.000000000 +0100 +@@ -1,4 +1,163 @@ +-all: bootstrap + +-bootstrap: +- ./configure && make ++prefix= /usr ++exec_prefix= ${prefix} ++bindir= /usr/bin ++sysconfdir= /etc ++datadir= /usr/share ++ ++CC= /home/wbx/hudson/toolchain_x86_64-linux-gnu/usr/bin/arm-openadk-linux-muslgnueabihf-gcc ++LDFLAGS= -L/home/wbx/hudson/target_arm_musl_eabihf/lib -L/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-z,relro,-z,now ++LIBS= -lpcap ++CFLAGS= -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3 -DHAVE_CONFIG_H -W -Wall ++CPPFLAGS=-DIPCAD_VERSION=\"3.7.3\" ++CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\" ++CPPFLAGS+=-DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE ++CPPFLAGS+=-DPSRC_pcap -DIFST_linux ++ ++YACC=bison -y ++LEX=flex ++INSTALL=/usr/bin/install -c ++ ++MANROOT=/usr/share/man/man ++MAN8=${MANROOT}8 ++MAN5=${MANROOT}5 ++ ++NROFF= groff -Tascii -mandoc ++ ++PACKAGE=ipcad ++TARGETS=ipcad ++VERSION=3.7.3 ++ ++IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o ++IPCAD_OBJS+= ifst_linux.o # Interface statistics ++IPCAD_OBJS+= ifs_list.o # Interface statistics ++IPCAD_OBJS+= loop-pcap.o # Method of capturing ++IPCAD_OBJS+= loop-file.o # Method of capturing ++IPCAD_OBJS+= loop-divert.o # Method of capturing ++IPCAD_OBJS+= loop-dynamic.o # Method of capturing ++IPCAD_OBJS+= loop-ulog.o loop-ipq.o # Methods of capturing ++IPCAD_OBJS+= psrc.o psrc-pcap.o # Initialize capturers ++IPCAD_OBJS+= psrc-ipq.o psrc-ulog.o # Initialize capturers ++IPCAD_OBJS+= psrc-file.o # Initialize capturers ++IPCAD_OBJS+= psrc-dynamic.o # Initialize capturers ++IPCAD_OBJS+= psrc-divert.o # Initialize capturers ++IPCAD_OBJS+= wrap_oclose.o # Special file descriptors cache ++IPCAD_OBJS+= genhash.o # General hashing ++ ++all: ${TARGETS} man ++ ++ipcad: ${IPCAD_OBJS} ++ ${CC} ${CFLAGS} -o $@ ${IPCAD_OBJS} ${LDFLAGS} ${LIBS} ++ ++.SUFFIXES: ++.SUFFIXES: .o .c .0 .8 .5 ++ ++.c.o: ++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -c $< ++ ++.8.0: ++ ${NROFF} $< > $@ ++ ++.5.0: ++ ${NROFF} $< > $@ ++ ++cfgy.h cfgy.c: cfg.y ++ ${YACC} -p ipcacfg -d cfg.y ++ @mv y.tab.c cfgy.c ++ @mv y.tab.h cfgy.h ++ ++cshelly.h cshelly.c: cshell.y ++ ${YACC} -p CS -d cshell.y ++ @mv y.tab.c cshelly.c ++ @mv y.tab.h cshelly.h ++ ++cslex.c: cslex.l ++ ${LEX} -s -p -Cem -ocslex.c -PCS cslex.l ++ ++cfglex.c: cfglex.l ++ ${LEX} -s -p -Cem -ocfglex.c -Pipcacfg cfglex.l ++ ++ ++man: ipcad.8 ipcad.conf.5 ++ ++distdir = $(PACKAGE)-$(VERSION) ++distdir: ++ rm -rf $(distdir) ++ mkdir $(distdir) ++ cp *.c *.h $(distdir) ++ cp ipcad.8 ipcad.conf.5 $(distdir) ++ cp *.y *.l $(distdir) ++ cp *.in configure install-sh $(distdir) ++ cp ipcad.conf.default $(distdir) ++ cp ipcad.conf.simple $(distdir) ++ cp ipcad.spec.in $(distdir) ++ cp Makefile.in Makefile $(distdir) ++ cp ChangeLog INSTALL README TODO BUGS AUTHORS COPYING FAQ $(distdir) ++ cd $(distdir) && make distclean ++ ++dist: distdir ++ tar chof - $(distdir) | GZIP="--best" gzip -c > $(distdir).tar.gz ++ rm -rf $(distdir) ++ ++clean: ++ rm -f *.o ${TARGETS} *.core 1 ++ rm -f *.0 ++ ++distclean: clean ++ rm -f config.h ++ rm -f config.cache config.log config.status ++ rm -f Makefile ++ rm -f $(distdir).tar.gz ++ rm -f ipcad.spec ++ (echo "all: bootstrap"; echo; echo "bootstrap:"; \ ++ echo " ./configure && make") > Makefile ++ ++maintainer-clean: distclean ++ @echo "This command is intended for maintainers to use; it" ++ @echo "deletes files that may need special tools to rebuild." ++ rm -f Makefile ++ rm -f *.tab.* cfgy.? *lex.c ++ rm -f config.h.in configure ++ ++install: all install-bin install-conf ++ ++install-bin: ++ @${INSTALL} -d $(DESTDIR)${bindir} ++ ${INSTALL} ipcad $(DESTDIR)${bindir} ++ ++install-man: man ++ ${INSTALL} -m 444 ipcad.8 $(DESTDIR)${MAN8}/ipcad.8 ++ ${INSTALL} -m 444 ipcad.conf.5 $(DESTDIR)${MAN5}/ipcad.conf.5 ++ ++install-conf: ++ @${INSTALL} -d $(DESTDIR)${sysconfdir} ++ ${INSTALL} -m 644 ipcad.conf.simple $(DESTDIR)${sysconfdir}/ipcad.conf.simple ++ -@diff ${sysconfdir}/ipcad.conf \ ++ ${sysconfdir}/ipcad.conf.default >/dev/null 2>&1; \ ++ if [ "$$?" -eq 0 ] || [ ! -f ${sysconfdir}/ipcad.conf ]; then \ ++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \ ++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \ ++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \ ++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \ ++ echo "**********************************************"; \ ++ echo "* Please customize ${sysconfdir}/ipcad.conf *"; \ ++ echo "**********************************************"; \ ++ else \ ++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \ ++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \ ++ echo "*********************************************"; \ ++ echo "* Updated ${sysconfdir}/ipcad.conf.default *"; \ ++ echo "*********************************************"; \ ++ fi ++ @echo "" ++ @echo "Now you might want to 'make install-man'" ++ @echo "" ++ ++ ++uninstall: ++ rm -f ${bindir}/ipcad ++ rm -f ${sysconfdir}/ipcad.conf.default ++ rm -f ${sysconfdir}/ipcad.conf.simple ++ rm -f ${MAN8}/ipcad.8 ++ rm -f ${MAN5}/ipcad.conf.5 ++ diff --git a/package/ipcad/patches/patch-cfg_y b/package/ipcad/patches/patch-cfg_y new file mode 100644 index 000000000..11fbc7564 --- /dev/null +++ b/package/ipcad/patches/patch-cfg_y @@ -0,0 +1,60 @@ +--- ipcad-3.7.3.orig/cfg.y 2007-04-22 10:08:45.000000000 +0200 ++++ ipcad-3.7.3/cfg.y 2014-03-23 18:03:07.000000000 +0100 +@@ -3,7 +3,6 @@ + #include "headers.h" + #include "cfgvar.h" + #include "servers.h" +-#include "rsh.h" + #include "opt.h" + #include "storage.h" + +@@ -214,49 +213,6 @@ block: + | CAPTURE_PORTS DENY { + conf->capture_ports = 0; + } +- | RSH ALLOW at_ip { +- if(add_server(rsh_server, "RSH Server", &($3), 514)) +- return yyerror("Failed to install RSH server"); +- fprintf(stderr, "Configured RSH Server listening at %s\n", +- inet_ntoa($3)); +- } +- | RSH DENY at_ip { +- fprintf(stderr, "Warning: Option at line %d has no effect\n", +- ipcacfglineno); +- } +- | RSH TIMEOUT EQ TOK_STRING { +- int to_ms; +- to_ms = atoi($4); +- free($4); +- if(to_ms < 0) +- to_ms = -1; /* INFTIM */ +- else +- to_ms = to_ms * 1000; +- rsh_rw_timeout = to_ms; +- } +- | RSH TOK_STRING privlevel { +- cfg_add_rsh_host("", $2, $3); +- free($2); +- } +- | RSH AT TOK_STRING privlevel { +- cfg_add_rsh_host("", $3, $4); +- free($3); +- } +- | RSH TOK_STRING AT TOK_STRING privlevel { +- cfg_add_rsh_host($2, $4, $5); +- free($2); free($4); +- } +- | RSH TTL EQ TOK_STRING { +- conf->rsh_ttl = atoi($4); +- free($4); +- } +- | TTL EQ TOK_STRING { +- fprintf(stderr, "WARNING: \"ttl = %s;\" at line %d: " +- "Obsolete syntax. Please use \"rsh ttl = %s;\"\n", +- $3, ipcacfglineno, $3); +- conf->rsh_ttl = atoi($3); +- free($3); +- } + | NetFlow + | CHROOT EQ TOK_STRING { + if(conf->chroot_to) -- cgit v1.2.3