update to 1.0.

help, many tests and ok sturm@
This commit is contained in:
aanriot 2005-07-23 14:24:52 +00:00
parent 47765956ee
commit b57dbdb04f
8 changed files with 125 additions and 84 deletions

View File

@ -1,30 +1,34 @@
# $OpenBSD: Makefile,v 1.8 2004/12/16 00:31:21 alek Exp $
# $OpenBSD: Makefile,v 1.9 2005/07/23 14:24:52 aanriot Exp $
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
COMMENT= "utility to create virtual hosts on a network"
DISTNAME= honeyd-0.8b
DISTNAME= honeyd-1.0
CATEGORIES= net
MASTER_SITES= ${HOMEPAGE} \
MASTER_SITES= http://www.citi.umich.edu/u/provos/honeyd/ \
http://niels.xtdnet.nl/honeyd/
HOMEPAGE= http://www.citi.umich.edu/u/provos/honeyd/
HOMEPAGE= http://www.honeyd.org/
# BSD
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c edit m ncurses pcap
WANTLIB= c edit m ncurses pcap pthread util z
USE_LIBTOOL= Yes
BUILD_DEPENDS= ${LOCALBASE}/lib/libdnet.a::net/libdnet
LIB_DEPENDS= dnet.1::net/libdnet \
python2.3.0.0::lang/python/2.3
RUN_DEPENDS= ::net/rrdtool
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS+=--without-python
SCRIPTS= proxy.pl router-telnet.pl smtp.pl test.sh web.sh
SCRIPTS= INSTALL.kuang2 README.cmdexe README.kuang2 \
README.mydoom cmdexe.pl kuang2.conf kuang2.pl \
mydoom.pl proxy.pl router-telnet.pl smtp.pl \
test.sh web.sh
SCRIPTS-snmp= README buildSNMPConfig.pl default.snmp fake-snmp.pl \
linux-2.4.snmp.tpl windows2000.snmp.tpl

View File

@ -1,4 +1,4 @@
MD5 (honeyd-0.8b.tar.gz) = 4f287d8d1abe22f96fe74f1318186617
RMD160 (honeyd-0.8b.tar.gz) = 82a7b7010642f73ac4cfbe9fb98088dfe543d2c4
SHA1 (honeyd-0.8b.tar.gz) = fe8054847b98003d52ec50a8376e51a9f76d41e5
SIZE (honeyd-0.8b.tar.gz) = 523808
MD5 (honeyd-1.0.tar.gz) = 5c5c6cc62d135075d021a6c1bc5c9a5b
RMD160 (honeyd-1.0.tar.gz) = d5c28f8987dd22d266348cf908f008423a63fc49
SHA1 (honeyd-1.0.tar.gz) = abff00cf7815b6448e5432be8b4710f39bf2119f
SIZE (honeyd-1.0.tar.gz) = 600339

View File

@ -1,12 +1,25 @@
$OpenBSD: patch-Makefile_in,v 1.2 2003/12/05 22:05:34 sturm Exp $
--- Makefile.in.orig 2003-11-27 04:47:00.000000000 +0100
+++ Makefile.in 2003-12-05 22:28:34.000000000 +0100
@@ -136,7 +136,7 @@ honeyd_LDADD = @LIBOBJS@ @PYTHONLIB@ @EV
# Allow plugins to use honeyd's functions:
honeyd_LDFLAGS = -export-dynamic
$OpenBSD: patch-Makefile_in,v 1.3 2005/07/23 14:24:52 aanriot Exp $
--- Makefile.in.orig Fri Dec 31 20:13:47 2004
+++ Makefile.in Tue Jul 5 18:10:57 2005
@@ -152,7 +152,7 @@ honeydctl_LDADD = @LIBOBJS@ @EDITLIB@ @L
honeydctl_INCLUDES = @EDITINC@
honeydctl_CFLAGS = -O2 -Wall
-CFLAGS = -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)"
+CFLAGS += -Wall -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)"
-CFLAGS = -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)" -DPATH_RRDTOOL="\"$(PATH_RRDTOOL)\""
+CFLAGS += -Wall -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)" -DPATH_RRDTOOL="\"$(PATH_RRDTOOL)\""
INCLUDES = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat @PYTHONINC@ @EVENTINC@ @PCAPINC@ @DNETINC@
INCLUDES = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat @PYTHONINC@ @EVENTINC@ @PCAPINC@ @DNETINC@ @ZINC@
@@ -664,9 +664,9 @@ libhoneyd.so: $(LIBHONEYDFILES)
install-data-local:
(cd $(top_srcdir) && tar -cf - $(top_srcdir)/webserver) | \
- (cd $(honeyddatadir) && tar -xf -)
- find $(honeyddatadir)/webserver -type f | xargs chmod a+r
- find $(honeyddatadir)/webserver -type d | xargs chmod a+xr
+ (cd $(DESTDIR)/$(honeyddatadir) && tar -xf -)
+ find $(DESTDIR)/$(honeyddatadir)/webserver -type f | xargs chmod a+r
+ find $(DESTDIR)/$(honeyddatadir)/webserver -type d | xargs chmod a+xr
dist-hook:
./distribute.py $(distdir)/

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-honeyd_c,v 1.1 2005/07/23 14:24:52 aanriot Exp $
--- honeyd.c.orig Fri Dec 31 20:13:37 2004
+++ honeyd.c Sat Jul 16 23:49:53 2005
@@ -3086,6 +3086,13 @@ main(int argc, char *argv[])
if (setrand)
rand_set(honeyd_rand, &setrand, sizeof(setrand));
+ /*
+ * Set the environment variable EVENT_NOKQUEUE to Yes because
+ * kqueue support doesn't handle BPF descriptors
+ */
+ if (setenv("EVENT_NOKQUEUE", "Yes", 1))
+ printf("EVENT_NOKQUEUE set");
+
/* Initalize libevent */
event_init();

View File

@ -1,57 +0,0 @@
$OpenBSD: patch-honeyd_overload_c,v 1.2 2003/12/05 22:05:34 sturm Exp $
--- honeyd_overload.c.orig 2003-06-26 00:04:01.000000000 +0200
+++ honeyd_overload.c 2003-12-05 22:51:39.000000000 +0100
@@ -595,7 +595,7 @@ poll(struct pollfd *fds, int nfds, int t
ssize_t
recv(int sock, void *buf, size_t len, int flags)
{
- ssize_t ret;
+ socklen_t ret;
INIT;
@@ -611,14 +611,14 @@ ssize_t
recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *from,
socklen_t *fromlen)
{
- ssize_t ret;
+ socklen_t ret;
struct fd *nfd;
socklen_t flen = fromlen != NULL ? *fromlen : 0;
INIT;
- DPRINTF((stderr, "%s: called on %d, %p,%d\n",
- __func__, sock, from, len));
+ DPRINTF((stderr, "%s: called on %d, %p,%ld\n",
+ __func__, sock, from, (long)len));
ret = (*libc_recvfrom)(sock, buf, len, flags, from, fromlen);
@@ -640,7 +640,7 @@ sendto(int sock, const void *buf, size_t
const struct sockaddr *to, socklen_t tolen)
{
struct fd *nfd;
- ssize_t ret;
+ socklen_t ret;
INIT;
@@ -780,7 +780,7 @@ accept(int sock, struct sockaddr *addr,
{
struct fd *nfd;
struct sockaddr_storage sa;
- socklen_t salen;
+ size_t salen;
int fd;
INIT;
@@ -800,7 +800,7 @@ accept(int sock, struct sockaddr *addr,
}
/* XXX - something good happened! */
- DPRINTF((stderr, "%s: got %d (salen %d)\n", __func__, fd, salen));
+ DPRINTF((stderr, "%s: got %d (salen %ld)\n", __func__, fd, (long)salen));
/* Store for later */
nfd->rsalen = salen;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-pool_c,v 1.1 2005/07/23 14:24:52 aanriot Exp $
--- pool.c.orig Fri Jul 22 22:36:38 2005
+++ pool.c Fri Jul 22 22:37:17 2005
@@ -92,7 +92,7 @@ pool_alloc_size(struct pool *pool, size_
/* We want to use the last one as return */
if (i < max - 1) {
SLIST_INSERT_HEAD(&pool->entries, entry, next);
- p += sizeof(struct pool_entry) + size;
+ p += ALIGN(sizeof(struct pool_entry) + size);
}
}
}

View File

@ -2,8 +2,9 @@
Configuring honeyd for use on OpenBSD
-------------------------------------
The location to the honeyd configuration file must be specified via the
-f switch. Also, honeyd requires an arp daemon to (falsely) answer arp
queries. rarpd(8) in base or arpd from ports can both be used for this.
See honeyd(8) for more detailed information on setting up honeyd.
Honeyd requires an arp daemon to (falsely) answer arp queries. rarpd(8)
in base or arpd from ports can both be used for this. See honeyd(8) for
more detailed information on setting up honeyd.
To launch honeyd as a daemon, you can use the following command:
honeyd -u 546 -g 546 -f ${SYSCONFDIR}/honeyd.conf

View File

@ -1,4 +1,6 @@
@comment $OpenBSD: PLIST,v 1.4 2004/09/15 18:17:40 espie Exp $
@comment $OpenBSD: PLIST,v 1.5 2005/07/23 14:24:52 aanriot Exp $
@newgroup _honeyd:546
@newuser _honeyd:546:_honeyd:daemon:honeyd user:/nonexistent:/sbin/nologin
bin/honeyd
bin/honeydctl
include/honeyd/
@ -14,10 +16,19 @@ share/honeyd/
share/honeyd/README
share/honeyd/config.ethernet
share/honeyd/config.sample
@sample ${SYSCONFDIR}/honeyd.conf
share/honeyd/nmap.assoc
share/honeyd/nmap.prints
share/honeyd/pf.os
share/honeyd/scripts/
share/honeyd/scripts/INSTALL.kuang2
share/honeyd/scripts/README.cmdexe
share/honeyd/scripts/README.kuang2
share/honeyd/scripts/README.mydoom
share/honeyd/scripts/cmdexe.pl
share/honeyd/scripts/kuang2.conf
share/honeyd/scripts/kuang2.pl
share/honeyd/scripts/mydoom.pl
share/honeyd/scripts/proxy.pl
share/honeyd/scripts/router-telnet.pl
share/honeyd/scripts/smtp.pl
@ -30,4 +41,44 @@ share/honeyd/scripts/snmp/linux-2.4.snmp.tpl
share/honeyd/scripts/snmp/windows2000.snmp.tpl
share/honeyd/scripts/test.sh
share/honeyd/scripts/web.sh
share/honeyd/webserver/
@owner _honeyd
@group _honeyd
share/honeyd/webserver/htdocs/
share/honeyd/webserver/htdocs/config.py
share/honeyd/webserver/htdocs/graphs/
@comment no checksum
share/honeyd/webserver/htdocs/graphs/traffic_daily.gif
@comment no checksum
share/honeyd/webserver/htdocs/graphs/traffic_hourly.gif
share/honeyd/webserver/htdocs/images/
share/honeyd/webserver/htdocs/images/add.gif
share/honeyd/webserver/htdocs/images/arrow_down.gif
share/honeyd/webserver/htdocs/images/arrow_right.gif
share/honeyd/webserver/htdocs/images/delete.gif
share/honeyd/webserver/htdocs/images/edit.gif
share/honeyd/webserver/htdocs/images/google_logo.gif
share/honeyd/webserver/htdocs/images/logo.gif
share/honeyd/webserver/htdocs/index.py
share/honeyd/webserver/htdocs/styles/
share/honeyd/webserver/htdocs/styles/layout.css
share/honeyd/webserver/htdocs/templates/
share/honeyd/webserver/htdocs/templates/config_ip.tmpl
share/honeyd/webserver/htdocs/templates/inc/
share/honeyd/webserver/htdocs/templates/inc/footer.tmpl
share/honeyd/webserver/htdocs/templates/inc/header.tmpl
share/honeyd/webserver/htdocs/templates/inc/main.tmpl
share/honeyd/webserver/htdocs/templates/inc/nav.tmpl
share/honeyd/webserver/htdocs/templates/index.tmpl
share/honeyd/webserver/htdocs/templates/status_connections.tmpl
share/honeyd/webserver/htdocs/templates/status_stats.tmpl
@owner
@group
share/honeyd/webserver/htmltmpl.py
share/honeyd/webserver/server.py
share/honeyd/webserver/support.py
share/honeyd/xprobe2.conf
@extra share/honeyd/webserver/htdocs/templates/config_ip.tmplc
@extra share/honeyd/webserver/htdocs/templates/index.tmplc
@extra share/honeyd/webserver/htdocs/templates/status_stats.tmplc
@extra share/honeyd/webserver/server.pyc