Date: Thu, 14 Apr 2005 17:17:13 +0300 From: Vasil Dimov <vd@datamax.bg> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/79909: Update port: net/honeyd to 1.0 Message-ID: <1113488233.187676.57439.nullmailer@sinanica.bg.datamax> Resent-Message-ID: <200504141420.j3EEKLT0080355@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 79909 >Category: ports >Synopsis: Update port: net/honeyd to 1.0 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Apr 14 14:20:21 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vasil Dimov >Release: FreeBSD 5.4-STABLE i386 >Organization: DataMax >Environment: System: FreeBSD sinanica.bg.datamax 5.4-STABLE FreeBSD 5.4-STABLE #5: Mon Apr 11 14:07:32 EEST 2005 root@sinanica.bg.datamax:/usr/obj/usr/src/sys/SINANICA-SMP i386 >Description: *) Install README and example conf with other stuff from the scripts subdirectory. *) Add some patches to make it compile and remove compiler warnings. It can now be compiled with -Wall -Werror (my favorite :). *) Sync pkg-plist. >How-To-Repeat: >Fix: --- honeyd_update_0.8b-1.0 begins here --- diff -urN honeyd.orig/Makefile honeyd/Makefile --- honeyd.orig/Makefile Wed Apr 13 02:21:39 2005 +++ honeyd/Makefile Thu Apr 14 15:50:43 2005 @@ -6,7 +6,7 @@ # PORTNAME= honeyd -PORTVERSION= 0.8b +PORTVERSION= 1.0 CATEGORIES= net MASTER_SITES= http://www.citi.umich.edu/u/provos/honeyd/ \ http://niels.xtdnet.nl/honeyd/ @@ -56,6 +56,8 @@ post-install: @${MKDIR} ${DATADIR}/scripts/snmp @cd ${WRKSRC}/scripts && \ + ${INSTALL_DATA} README* INSTALL* kuang2.conf \ + ${DATADIR}/scripts && \ ${INSTALL_SCRIPT} *.pl *.sh ${DATADIR}/scripts @cd ${WRKSRC}/scripts/snmp && \ ${INSTALL_DATA} README default.snmp *.tpl \ diff -urN honeyd.orig/distinfo honeyd/distinfo --- honeyd.orig/distinfo Mon May 17 16:20:49 2004 +++ honeyd/distinfo Thu Apr 14 15:55:31 2005 @@ -1,2 +1,2 @@ -MD5 (honeyd-0.8b.tar.gz) = 4f287d8d1abe22f96fe74f1318186617 -SIZE (honeyd-0.8b.tar.gz) = 523808 +MD5 (honeyd-1.0.tar.gz) = 5c5c6cc62d135075d021a6c1bc5c9a5b +SIZE (honeyd-1.0.tar.gz) = 600339 diff -urN honeyd.orig/files/patch-compat::sha1.h honeyd/files/patch-compat::sha1.h --- honeyd.orig/files/patch-compat::sha1.h Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-compat::sha1.h Thu Apr 14 16:19:17 2005 @@ -0,0 +1,30 @@ +--- compat/sha1.h.orig Thu Apr 14 16:07:26 2005 ++++ compat/sha1.h Thu Apr 14 12:52:54 2005 +@@ -18,21 +18,13 @@ + #include <sys/cdefs.h> + + __BEGIN_DECLS +-void SHA1Transform(u_int32_t [5], const unsigned char [64]) +- __attribute__((__bounded__(__minbytes__,1,5))) +- __attribute__((__bounded__(__minbytes__,2,64))); ++void SHA1Transform(u_int32_t [5], const unsigned char [64]); + void SHA1Init(SHA1_CTX *); +-void SHA1Update(SHA1_CTX *, const unsigned char *, unsigned int) +- __attribute__((__bounded__(__string__,2,3))); +-void SHA1Final(unsigned char [20], SHA1_CTX *) +- __attribute__((__bounded__(__minbytes__,1,20))); +-char *SHA1End(SHA1_CTX *, char *) +- __attribute__((__bounded__(__minbytes__,2,41))); +-char *SHA1File(char *, char *) +- __attribute__((__bounded__(__minbytes__,2,41))); +-char *SHA1Data(const unsigned char *, size_t, char *) +- __attribute__((__bounded__(__string__,1,2))) +- __attribute__((__bounded__(__minbytes__,3,41))); ++void SHA1Update(SHA1_CTX *, const unsigned char *, unsigned int); ++void SHA1Final(unsigned char [20], SHA1_CTX *); ++char *SHA1End(SHA1_CTX *, char *); ++char *SHA1File(char *, char *); ++char *SHA1Data(const unsigned char *, size_t, char *); + __END_DECLS + + #define SHA1_DIGESTSIZE 20 diff -urN honeyd.orig/files/patch-config.c honeyd/files/patch-config.c --- honeyd.orig/files/patch-config.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-config.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,11 @@ +--- config.c.orig Thu Apr 14 16:07:26 2005 ++++ config.c Thu Apr 14 14:55:34 2005 +@@ -838,7 +838,7 @@ + IP_PROTO_TCP, src.addr_ip, dst.addr_ip); + ip_checksum(pkt, iplen); + +- honeyd_recv_cb(&inter, &pkthdr, pkt); ++ honeyd_recv_cb((u_char *)&inter, &pkthdr, pkt); + } + gettimeofday(&tv_end, NULL); + timersub(&tv_end, &tv_start, &tv_end); diff -urN honeyd.orig/files/patch-configure honeyd/files/patch-configure --- honeyd.orig/files/patch-configure Sun Jun 23 11:58:05 2002 +++ honeyd/files/patch-configure Thu Jan 1 02:00:00 1970 @@ -1,17 +0,0 @@ ---- configure Wed Apr 17 17:43:14 2002 -+++ /home/dom/configure Sat May 4 15:05:43 2002 -@@ -2432,11 +2432,11 @@ - *) - echo "$as_me:2433: result: $withval" >&5 - echo "${ECHO_T}$withval" >&6 -- if test -f $withval/event.h -a -f $withval/libevent.a; then -+ if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi -- EVENTINC="-I$withval" -- EVENTLIB="-L$withval -levent" -+ EVENTINC="-I$withval/include" -+ EVENTLIB="-L$withval/lib -levent" - else - { { echo "$as_me:2441: error: event.h or libevent.a not found in $withval" >&5 - echo "$as_me: error: event.h or libevent.a not found in $withval" >&2;} diff -urN honeyd.orig/files/patch-dhcpclient.c honeyd/files/patch-dhcpclient.c --- honeyd.orig/files/patch-dhcpclient.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-dhcpclient.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,33 @@ +--- dhcpclient.c.orig Thu Apr 14 16:07:26 2005 ++++ dhcpclient.c Thu Apr 14 15:24:19 2005 +@@ -236,8 +236,8 @@ + { + struct dhcpclient_req *req = tmpl->dhcp_req; + struct dhcp_msg *msg = (struct dhcp_msg *)buf; +- size_t optlen = buflen - sizeof(*msg); +- uint8_t *p, *end, opt1, opt1len, *opt1p; ++ size_t optlen = buflen - sizeof(*msg), opt1len; ++ uint8_t *p, *end, opt1, *opt1p; + short replyreq = 0, ack = 0, done = 0; + struct netconf nc; + struct addr *which = NULL, ipmask; +@@ -472,7 +472,8 @@ + + memset(buf, 0, sizeof(buf)); + +- eth = (struct eth_hdr *)p = buf; ++ p = buf; ++ eth = (struct eth_hdr *)p; + eth_pack_hdr(eth, ETH_ADDR_BROADCAST, req->ea, ETH_TYPE_IP); + + restlen -= ETH_HDR_LEN; +@@ -524,7 +525,8 @@ + + memset(buf, 0, sizeof(buf)); + +- eth = (struct eth_hdr *)p = buf; ++ p = buf; ++ eth = (struct eth_hdr *)p; + eth_pack_hdr(eth, req->server_ea, req->ea, ETH_TYPE_IP); + + restlen -= ETH_HDR_LEN; diff -urN honeyd.orig/files/patch-honeyd.h honeyd/files/patch-honeyd.h --- honeyd.orig/files/patch-honeyd.h Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-honeyd.h Thu Apr 14 16:19:17 2005 @@ -0,0 +1,20 @@ +--- honeyd.h.orig Thu Apr 14 16:07:26 2005 ++++ honeyd.h Thu Apr 14 14:30:27 2005 +@@ -32,6 +32,8 @@ + #ifndef _HONEYD_H_ + #define _HONEYD_H_ + ++#include <pcap.h> ++ + #define PIDFILE "/var/run/honeyd.pid" + + #define TCP_DEFAULT_SIZE 512 +@@ -300,6 +302,8 @@ + char *honeyd_contoa(const struct tuple *); + + void honeyd_input(const struct interface *, struct ip_hdr *, u_short); ++ ++void honeyd_recv_cb(u_char *, const struct pcap_pkthdr *, const u_char *); + + /* Command prototypes for services */ + void cmd_droppriv(uid_t, gid_t); diff -urN honeyd.orig/files/patch-honeyd_overload.c honeyd/files/patch-honeyd_overload.c --- honeyd.orig/files/patch-honeyd_overload.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-honeyd_overload.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,10 @@ +--- honeyd_overload.c.orig Thu Apr 14 16:07:26 2005 ++++ honeyd_overload.c Thu Apr 14 15:32:19 2005 +@@ -127,7 +127,6 @@ + DECLARE(setsockopt, int, (int, int, int, const void *, socklen_t)); + DECLARE(getsockname, int, (int, struct sockaddr *, socklen_t *)); + +-DECLARE(recv, ssize_t, (int, void *, size_t, int)); + DECLARE(recvfrom, ssize_t, (int, void *, size_t, int, struct sockaddr *, + socklen_t *)); + diff -urN honeyd.orig/files/patch-interface.c honeyd/files/patch-interface.c --- honeyd.orig/files/patch-interface.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-interface.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,11 @@ +--- interface.c.orig Thu Apr 14 16:07:26 2005 ++++ interface.c Thu Apr 14 14:12:35 2005 +@@ -64,8 +64,6 @@ + /* Prototypes */ + int pcap_dloff(pcap_t *); + +-void honeyd_recv_cb(u_char *, const struct pcap_pkthdr *, const u_char *); +- + static char *interface_expandips(int, char **, int); + static void interface_recv(int, short, void *); + static void interface_poll_recv(int, short, void *); diff -urN honeyd.orig/files/patch-lex.c honeyd/files/patch-lex.c --- honeyd.orig/files/patch-lex.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-lex.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,74 @@ +--- lex.c.orig Thu Apr 14 16:07:26 2005 ++++ lex.c Thu Apr 14 14:48:11 2005 +@@ -153,8 +153,6 @@ + } \ + while ( 0 ) + +-#define unput(c) yyunput( c, yytext_ptr ) +- + /* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). +@@ -657,10 +655,6 @@ + #endif + #endif + +-#ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); +-#endif +- + #ifndef yytext_ptr + static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); + #endif +@@ -1662,51 +1656,6 @@ + + return yy_is_jam ? 0 : yy_current_state; + } +- +- +-#ifndef YY_NO_UNPUT +-#ifdef YY_USE_PROTOS +-static void yyunput( int c, register char *yy_bp ) +-#else +-static void yyunput( c, yy_bp ) +-int c; +-register char *yy_bp; +-#endif +- { +- register char *yy_cp = yy_c_buf_p; +- +- /* undo effects of setting up yytext */ +- *yy_cp = yy_hold_char; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- { /* need to shift things up to make room */ +- /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ +- yy_current_buffer->yy_buf_size + 2]; +- register char *source = +- &yy_current_buffer->yy_ch_buf[number_to_move]; +- +- while ( source > yy_current_buffer->yy_ch_buf ) +- *--dest = *--source; +- +- yy_cp += (int) (dest - source); +- yy_bp += (int) (dest - source); +- yy_current_buffer->yy_n_chars = +- yy_n_chars = yy_current_buffer->yy_buf_size; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- YY_FATAL_ERROR( "flex scanner push-back overflow" ); +- } +- +- *--yy_cp = (char) c; +- +- +- yytext_ptr = yy_bp; +- yy_hold_char = *yy_cp; +- yy_c_buf_p = yy_cp; +- } +-#endif /* ifndef YY_NO_UNPUT */ + + + #ifdef __cplusplus diff -urN honeyd.orig/files/patch-personality.c honeyd/files/patch-personality.c --- honeyd.orig/files/patch-personality.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-personality.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,38 @@ +--- personality.c.orig Thu Apr 14 16:07:26 2005 ++++ personality.c Thu Apr 14 12:57:11 2005 +@@ -64,6 +64,8 @@ + #include "xprobe_assoc.h" + #include "template.h" + ++//#define DEBUG_XPROBE_STRUCT ++ + /* ET - Moved SPLAY_HEAD to personality.h so xprobe_assoc.c could use it. */ + int npersons; + +@@ -1633,6 +1635,7 @@ + + /* !!!DEBUG FUNCTION!!! */ + ++#ifdef DEBUG_XPROBE_STRUCT + static void + print_xprobe_struct(struct xp_fingerprint *pers) + { +@@ -1693,6 +1696,7 @@ + printf ("icmp_unreach_echoed_3bit_flags: %d\n", + pers->flags.icmp_unreach_echoed_3bit_flags); + } ++#endif /* DEBUG_XPROBE_STRUCT */ + + void + print_perstree(void) +@@ -1727,7 +1731,9 @@ + /* Get a single fingerprint */ + new_print = get_fprint (fp); + if (new_print != NULL) { +- /* print_xprobe_struct (new_print); */ ++#ifdef DEBUG_XPROBE_STRUCT ++ print_xprobe_struct (new_print); ++#endif /* DEBUG_XPROBE_STRUCT */ + SPLAY_INSERT(xp_fprint_tree, &xp_fprints, new_print); + new_print = NULL; + } diff -urN honeyd.orig/files/patch-rrdtool.c honeyd/files/patch-rrdtool.c --- honeyd.orig/files/patch-rrdtool.c Thu Jan 1 02:00:00 1970 +++ honeyd/files/patch-rrdtool.c Thu Apr 14 16:19:17 2005 @@ -0,0 +1,20 @@ +--- rrdtool.c.orig Thu Apr 14 16:07:26 2005 ++++ rrdtool.c Thu Apr 14 15:31:15 2005 +@@ -444,7 +444,7 @@ + int + rrdtool_fork(struct rrdtool_drv *drv) + { +- char *argv[3]; ++ const char *argv[3]; + int pair[2]; + sigset_t sigmask; + +@@ -485,7 +485,7 @@ + + close(pair[1]); + +- if (execvp(drv->bin_path, argv) == -1) ++ if (execvp(drv->bin_path, (char *const *)argv) == -1) + err(1, "%s: execv(%s)", __func__, drv->bin_path); + + /* NOT REACHED */ diff -urN honeyd.orig/pkg-plist honeyd/pkg-plist --- honeyd.orig/pkg-plist Mon Apr 26 16:08:11 2004 +++ honeyd/pkg-plist Thu Apr 14 16:48:55 2005 @@ -1,32 +1,68 @@ -@comment $FreeBSD: ports/net/honeyd/pkg-plist,v 1.5 2004/04/16 23:15:46 clement Exp $ bin/honeyd bin/honeydctl include/honeyd/debug.h include/honeyd/hooks.h include/honeyd/plugins.h include/honeyd/plugins_config.h -@dirrm include/honeyd lib/honeyd/libhoneyd.so -@dirrm lib/honeyd -%%DATADIR%%/README -%%DATADIR%%/nmap.assoc -%%DATADIR%%/nmap.prints -%%DATADIR%%/xprobe2.conf -%%DATADIR%%/config.sample -%%DATADIR%%/config.ethernet -%%DATADIR%%/pf.os -%%DATADIR%%/scripts/mydoom.pl -%%DATADIR%%/scripts/proxy.pl -%%DATADIR%%/scripts/router-telnet.pl -%%DATADIR%%/scripts/smtp.pl -%%DATADIR%%/scripts/test.sh -%%DATADIR%%/scripts/web.sh +share/honeyd/README +share/honeyd/config.ethernet +share/honeyd/config.sample +share/honeyd/nmap.assoc +share/honeyd/nmap.prints +share/honeyd/pf.os +share/honeyd/webserver/htdocs/config.py +share/honeyd/webserver/htdocs/graphs/traffic_daily.gif +share/honeyd/webserver/htdocs/graphs/traffic_hourly.gif +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/layout.css +share/honeyd/webserver/htdocs/templates/config_ip.tmpl +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 +share/honeyd/webserver/htmltmpl.py +share/honeyd/webserver/server.py +share/honeyd/webserver/support.py +share/honeyd/xprobe2.conf %%DATADIR%%/scripts/snmp/README %%DATADIR%%/scripts/snmp/buildSNMPConfig.pl -%%DATADIR%%/scripts/snmp/default.snmp %%DATADIR%%/scripts/snmp/fake-snmp.pl -%%DATADIR%%/scripts/snmp/linux-2.4.snmp.tpl +%%DATADIR%%/scripts/snmp/default.snmp %%DATADIR%%/scripts/snmp/windows2000.snmp.tpl +%%DATADIR%%/scripts/snmp/linux-2.4.snmp.tpl +%%DATADIR%%/scripts/web.sh +%%DATADIR%%/scripts/router-telnet.pl +%%DATADIR%%/scripts/test.sh +%%DATADIR%%/scripts/mydoom.pl +%%DATADIR%%/scripts/README.mydoom +%%DATADIR%%/scripts/cmdexe.pl +%%DATADIR%%/scripts/README.cmdexe +%%DATADIR%%/scripts/README.kuang2 +%%DATADIR%%/scripts/INSTALL.kuang2 +%%DATADIR%%/scripts/kuang2.pl +%%DATADIR%%/scripts/kuang2.conf +%%DATADIR%%/scripts/smtp.pl +%%DATADIR%%/scripts/proxy.pl +@dirrm include/honeyd +@dirrm lib/honeyd @dirrm %%DATADIR%%/scripts/snmp @dirrm %%DATADIR%%/scripts +@dirrm %%DATADIR%%/webserver/htdocs/templates/inc +@dirrm %%DATADIR%%/webserver/htdocs/templates +@dirrm %%DATADIR%%/webserver/htdocs/graphs +@dirrm %%DATADIR%%/webserver/htdocs/images +@dirrm %%DATADIR%%/webserver/htdocs/styles +@dirrm %%DATADIR%%/webserver/htdocs +@dirrm %%DATADIR%%/webserver @dirrm %%DATADIR%% --- honeyd_update_0.8b-1.0 ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1113488233.187676.57439.nullmailer>