- add patch to disable -w option

- tighten file perms so only root can run this and minus setuid/setgid
--
From: FreeBSD
This commit is contained in:
brad 2000-08-15 19:30:31 +00:00
parent 655d0a77b3
commit 7b9088a4e0
2 changed files with 21 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.19 2000/06/26 08:43:49 brad Exp $
# $OpenBSD: Makefile,v 1.20 2000/08/15 19:30:31 brad Exp $
# $FreeBSD: Makefile,v 1.2 1998/08/11 09:57:51 andreas Exp $
DISTNAME= ntop-1.1-src
PKGNAME= ntop-1.1
CATEGORIES= net
NEED_VERSION= 1.301
NEED_VERSION= 1.310
MASTER_SITES= ftp://ftp.unipi.it/pub/local/ntop/source/ \
http://www.freenix.no/~anders/ \
ftp://totem.fix.no/pub/mirrors/misc/
@ -27,6 +27,7 @@ INSTALL_TARGET= install install-man
WRKDIST= ${WRKDIR}/${PKGNAME}
post-install:
@chmod 700 ${PREFIX}/sbin/ntop
@strip ${PREFIX}/sbin/ntop
.include <bsd.port.mk>

View File

@ -0,0 +1,18 @@
--- ntop.c.orig Tue Aug 15 15:12:47 2000
+++ ntop.c Tue Aug 15 15:13:47 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);