aboutsummaryrefslogtreecommitdiff
path: root/net/ntop/files
diff options
context:
space:
mode:
authorJohann Visagie <wjv@FreeBSD.org>2002-01-16 08:41:15 +0000
committerJohann Visagie <wjv@FreeBSD.org>2002-01-16 08:41:15 +0000
commit8c8d8c5decd09609d4ab5b38dc9266a6240a1568 (patch)
tree940d4dcaa42ac806f8ae3c92e7a3a5d08cc169b9 /net/ntop/files
parentccd1417439a71286178faac97de4b9acbc50a983 (diff)
Notes
Diffstat (limited to 'net/ntop/files')
-rw-r--r--net/ntop/files/ntop.sh57
-rw-r--r--net/ntop/files/patch-Makefile.am23
-rw-r--r--net/ntop/files/patch-ah11
-rw-r--r--net/ntop/files/patch-configure.in23
-rw-r--r--net/ntop/files/patch-main.c11
-rw-r--r--net/ntop/files/patch-sec118
6 files changed, 114 insertions, 29 deletions
diff --git a/net/ntop/files/ntop.sh b/net/ntop/files/ntop.sh
new file mode 100644
index 000000000000..e620e484b6d4
--- /dev/null
+++ b/net/ntop/files/ntop.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+#----------------------------------------------------------------------
+# The following variables may be changed
+#
+
+# Network interface(s) to be monitored;
+# may be blank, or comma-separated list
+interfaces=''
+
+# User to run ntop as; leave blank for root
+userid='nobody'
+
+# [IP:]port for serving HTTP; set to '0' to disable
+http_port='3000'
+
+# [IP:]port for serving HTTPS; set to '0' to disable
+# The certificate is %%PREFIX%%/share/ntop/ntop-cert.pem
+https_port='3001'
+
+# Directory for ntop.access.log
+logdir='/var/log'
+
+# Specify any additional arguments here - see ntop(8)
+additional_args='-E'
+
+#
+# End of user-configurable variables
+#----------------------------------------------------------------------
+
+args='-d -t0'
+
+[ ! -z $interfaces ] && args="$args -i $interfaces"
+[ ! -z $http_port ] && args="$args -w $http_port"
+[ ! -z $https_port ] && args="$args -W $https_port"
+[ ! -z $logdir ] && args="$args -a ${logdir}"
+[ ! -z $userid ] && args="$args -u $userid"
+[ ! -z "$additional_args" ] && args="$args $additional_args"
+
+case "$1" in
+start)
+ [ -d $logdir ] && touch ${logdir}/ntop.access.log \
+ && chown $userid ${logdir}/ntop.access.log
+ [ -d %%PREFIX%%/share/ntop ] && cd %%PREFIX%%/share/ntop
+ [ -x %%PREFIX%%/bin/ntop ] && %%PREFIX%%/bin/ntop $args \
+ && echo -n ' ntop'
+ ;;
+stop)
+ killall ntop >/dev/null 2>&1 && echo -n ' ntop'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac
+
+exit 0
diff --git a/net/ntop/files/patch-Makefile.am b/net/ntop/files/patch-Makefile.am
new file mode 100644
index 000000000000..72ef8187fcda
--- /dev/null
+++ b/net/ntop/files/patch-Makefile.am
@@ -0,0 +1,23 @@
+--- Makefile.am.orig Thu Dec 27 18:00:25 2001
++++ Makefile.am Tue Jan 8 14:31:14 2002
+@@ -145,7 +145,7 @@
+ libntopreport_la_LIBADD = $(MORELIBS)
+ libntopreport_la_LDFLAGS = -version-info @NTOP_VERSION_INFO@ -release @NTOP_RELEASE@ -export-dynamic @DYN_FLAGS@
+
+-man_MANS = ntop.8 intop/intop.1
++man_MANS = ntop.8 ntop-rules.8
+
+ .PHONY: snapshot
+
+@@ -219,10 +219,10 @@
+ /bin/rm -f privkey.pem cert.pem
+
+ install-data-local:
+- @cp -p ntop-cert.pem $(bindir)/ntop-cert.pem
+ @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins;
+ @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop;
+ @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop/html;
++ @cp -p ntop-cert.pem $(datadir)/ntop/ntop-cert.pem
+ @for file in $(NTOPHTML); do \
+ if test -d $$file; then \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop/$$file; \
diff --git a/net/ntop/files/patch-ah b/net/ntop/files/patch-ah
deleted file mode 100644
index 12de2d1fd9ba..000000000000
--- a/net/ntop/files/patch-ah
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.old Thu May 6 12:14:29 1999
-+++ configure Thu May 6 12:14:37 1999
-@@ -676,7 +676,7 @@
- :
- fi
-
-- V_CCOPT="-O"
-+ V_CCOPT=""
- V_INCLS=""
- if test "${srcdir}" != "." ; then
- V_INCLS="-I\$\(srcdir\)"
diff --git a/net/ntop/files/patch-configure.in b/net/ntop/files/patch-configure.in
new file mode 100644
index 000000000000..1634f091385e
--- /dev/null
+++ b/net/ntop/files/patch-configure.in
@@ -0,0 +1,23 @@
+--- configure.in.orig Thu Nov 8 16:29:04 2001
++++ configure.in Tue Dec 11 13:20:46 2001
+@@ -893,16 +893,11 @@
+ dnl>
+ dnl> user defined directory passed as option at configuration time
+ dnl>
+- if test ".${GDCHART_ROOT}" != .; then
+- if test -d $GDCHART_ROOT &&
+- test -r $GDCHART_ROOT/libgdchart.a &&
+- test -r $GDCHART_ROOT/gdc.h &&
+- test -r $GDCHART_ROOT/gd-1.8.3/libgd.a &&
+- test -r $GDCHART_ROOT/gd-1.8.3/gd.h &&
+- test -r $GDCHART_ROOT/zlib-1.1.3/libz.a; then
++ if test 1; then
++ if test -d $GDCHART_ROOT; then
+ GDCHART_ROOT=`cd ${GDCHART_ROOT} && pwd`
+- MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart -L$GDCHART_ROOT/gd-1.8.3 -lgd -L$GDCHART_ROOT/gd-1.8.3/libpng-1.0.8 -lpng -L$GDCHART_ROOT/zlib-1.1.3 -lz"
+- INCS="${INCS} -I$GDCHART_ROOT"
++ MORELIBS="${MORELIBS} -L${prefix}/lib -lgdchart -lgd -lpng -lz"
++ INCS="${INCS} -I${prefix}/include/gd"
+ AC_DEFINE(HAVE_GDCHART)
+ AC_MSG_RESULT([found in $GDCHART_ROOT])
+ else
diff --git a/net/ntop/files/patch-main.c b/net/ntop/files/patch-main.c
new file mode 100644
index 000000000000..42e05291d303
--- /dev/null
+++ b/net/ntop/files/patch-main.c
@@ -0,0 +1,11 @@
+--- main.c.orig Tue Nov 13 13:44:26 2001
++++ main.c Tue Dec 4 17:00:15 2001
+@@ -400,7 +400,7 @@
+ }
+
+ snprintf(accessLogPath, sizeof(accessLogPath), "%s/%s",
+- dbPath, DETAIL_ACCESS_LOG_FILE_PATH);
++ accessLogPath, DETAIL_ACCESS_LOG_FILE_PATH);
+
+ initLogger(); /* Do not call this function before dbPath
+ is initialized */
diff --git a/net/ntop/files/patch-sec1 b/net/ntop/files/patch-sec1
deleted file mode 100644
index a8bfdf73ef25..000000000000
--- a/net/ntop/files/patch-sec1
+++ /dev/null
@@ -1,18 +0,0 @@
---- ntop.c.orig Wed Apr 28 10:49:00 1999
-+++ ntop.c Sat Aug 12 23:19:04 2000
-@@ -325,13 +325,8 @@
- break;
-
- case 'w':
-- if(!isdigit(optarg[0])) {
-- printf("FATAL ERROR: flag -w expects a numeric argument.\n");
-- exit(-1);
-- }
-- webMode++;
-- webPort = atoi(optarg);
-- break;
-+ fprintf(stderr, "-w mode is disabled for security reasons.\n");
-+ exit(-1);
-
- default:
- usage(0);