Browse Source

Appending an updated version of honey package

Peter Smej 23 years ago
parent
commit
fd4719b822
4 changed files with 43 additions and 10 deletions
  1. 2 2
      honeyd/honeyd.conf
  2. 30 0
      honeyd/honeyd.patch
  3. 7 4
      honeyd/honeyd.spec
  4. 4 4
      honeyd/rc.honeyd

+ 2 - 2
honeyd/honeyd.conf

@@ -1,8 +1,8 @@
 # Example of a simple host template and its binding
 create testbox
 set testbox personality "FreeBSD 3.2-4.0"
-add testbox tcp port 80 "sh scripts/web.sh"
-add testbox tcp port 22 "sh scripts/test.sh $ipsrc $dport"
+add testbox tcp port 80 "sh @l_prefix@/share/honeyd/scripts/web.sh"
+add testbox tcp port 22 "sh @l_prefix@/share/honeyd/scripts/test.sh $ipsrc $dport"
 add testbox tcp port 23 proxy $ipsrc:23
 set testbox default tcp action reset
 

+ 30 - 0
honeyd/honeyd.patch

@@ -63,3 +63,33 @@
  # Contributed by grunby grunby@hades.ss.purchase.edu
  Fingerprint Microsoft NT 4.0 SP5-SP6
  TSeq(Class=RI%gcd=<6%SI=<DA16&>21A)
+Index: ipfrag.c
+===================================================================
+RCS file: /cvs/honeyd/ipfrag.c,v
+retrieving revision 1.9
+diff -u -r1.9 ipfrag.c
+--- ipfrag.c	17 Apr 2002 16:38:40 -0000	1.9
++++ ipfrag.c	19 Feb 2003 02:59:39 -0000
+@@ -241,12 +241,12 @@
+ 	if (prev && prev->off + prev->len > off) {
+ 		overlap = prev->off + prev->len - off;
+ 
+-		if (overlap > len) {
++		if (overlap >= len) {
+ 			if (fragq->fragp == FRAG_NEW) {
+ 				u_char *odata = prev->data + off - prev->off;
+ 				memcpy(odata, ent->data, len);
+ 			}
+-			goto drop_fragment;
++			goto free_fragment;
+ 		}
+ 
+ 		if (fragq->fragp == FRAG_OLD) {
+@@ -316,6 +316,7 @@
+ 
+  drop_fragment:
+ 	TAILQ_REMOVE(&fragq->fraglist, ent, next);
++ free_fragment:
+ 	ip_fragent_free(ent);
+ 	return (0);
+ }

+ 7 - 4
honeyd/honeyd.spec

@@ -23,7 +23,7 @@
 ##  SUCH DAMAGE.
 ##
 
-# FIXME: Test routing
+# FIXME: honeyd do not write a pid file
 
 #   package information
 Name:         honeyd
@@ -31,11 +31,11 @@ Summary:      Creates a Virtual Host on Network
 URL:          http://www.citi.umich.edu/u/provos/honeyd/
 Vendor:       Niels Provos
 Packager:     The OpenPKG Project
-Distribution: OpenPKG [JUNK]
+Distribution: OpenPKG [EVAL]
 Group:        Language
 License:      BSD License
 Version:      0.5
-Release:      20030220
+Release:      20030221
 
 #   list of sources
 Source0:      http://www.citi.umich.edu/u/provos/honeyd/honeyd-%{version}.tar.gz
@@ -86,7 +86,9 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
         $RPM_BUILD_ROOT%{l_prefix}/sbin \
         $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
-        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
+        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts \
+        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/base \
+        $RPM_BUILD_ROOT%{l_prefix}/var/honeyd
 
     #   install files
     %{l_shtool} install -c -s -m 755 \
@@ -113,6 +115,7 @@ AutoReqProv:  no
         scripts/web.sh $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
 
     %{l_shtool} install -c -m 755 \
+        -e 's;@l_prefix@;%{l_prefix};g' \
        %{SOURCE honeyd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
 
     %{l_shtool} install -c -m 755 \

+ 4 - 4
honeyd/rc.honeyd

@@ -8,11 +8,11 @@
 
 %start -p 200 -u @l_susr@
     opServiceEnabled honeyd || exit 0
-    @l_prefix@/sbin/honeyd -f @l_prefix@/etc/honeyd/honeyd.conf -p @l_prefix@/share/honeyd/nmap.prints -x  @l_prefix@/share/honeyd/xprobe2.conf -a
-@l_prefix@/share/honeyd/nmap.assoc >/dev/null 2>&1
+    cd @l_prefix@/share/honeyd/base/
+    @l_prefix@/sbin/honeyd -f @l_prefix@/etc/honeyd/honeyd.conf -p @l_prefix@/share/honeyd/nmap.prints -x  @l_prefix@/share/honeyd/xprobe2.conf -a @l_prefix@/share/honeyd/nmap.assoc >/dev/null 2>&1
 
 %stop -p 200 -u @l_susr@
-    opServiceEnabled honey || exit 0
+    opServiceEnabled honeyd || exit 0
     if [ -f @l_prefix@/var/honeyd/honeyd.pid ]; then
         kill -TERM `cat @l_prefix@/var/honeyd/honeyd.pid`
     fi
@@ -26,7 +26,7 @@
     @l_prefix@/sbin/honeyd -F @l_prefix@/etc/honeyd/honeyd.conf >/dev/null 2>&1
 
 %reload -u @l_susr@
-    opServiceEnabled amd || exit 0
+    opServiceEnabled honeyd || exit 0
     if [ -f @l_prefix@/var/honeyd/honeyd.pid ]; then
         kill -HUP `cat @l_prefix@/var/honeyd/honeyd.pid`
     fi