aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2006-07-28 20:53:31 +0800
committerehaupt <ehaupt@FreeBSD.org>2006-07-28 20:53:31 +0800
commit511cfb41cb272a9ce4ee220c430afe56c6ac9a15 (patch)
tree7f1b99652735e02cc2d9dd2b1bc00b4256b1dc26 /net-mgmt
parent58e4f88fc6034e5a5f106f89def28d8fb786162e (diff)
downloadfreebsd-ports-gnome-511cfb41cb272a9ce4ee220c430afe56c6ac9a15.tar.gz
freebsd-ports-gnome-511cfb41cb272a9ce4ee220c430afe56c6ac9a15.tar.zst
freebsd-ports-gnome-511cfb41cb272a9ce4ee220c430afe56c6ac9a15.zip
- Provide a patch to fix incorrect uses of strncpy
- Add an additional master site - Nuke patch-aa - Cleanup - Bump PORTREVISION - Take maintainer-ship Obtained from: OpenBSD
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/cidr/Makefile18
-rw-r--r--net-mgmt/cidr/distinfo6
-rw-r--r--net-mgmt/cidr/files/patch-aa29
-rw-r--r--net-mgmt/cidr/files/patch-cidr.c28
-rw-r--r--net-mgmt/cidr/pkg-descr11
5 files changed, 45 insertions, 47 deletions
diff --git a/net-mgmt/cidr/Makefile b/net-mgmt/cidr/Makefile
index 5e44cb0573a7..f7184b33aedf 100644
--- a/net-mgmt/cidr/Makefile
+++ b/net-mgmt/cidr/Makefile
@@ -6,22 +6,22 @@
PORTNAME= cidr
PORTVERSION= 2.3.2
+PORTREVISION= 1
CATEGORIES= net-mgmt
-MASTER_SITES= http://critical.ch/distfiles/
-MASTER_SITE_SUBDIR= nork
-DISTNAME= cidr-current
+MASTER_SITES= http://critical.ch/distfiles/ \
+ http://energy.critical.ch/distfiles/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= ehaupt@FreeBSD.org
COMMENT= RFC 1878 subnet calculator / helper
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-ALL_TARGET= cidr
-
MAN1= cidr.1
PLIST_FILES= bin/cidr
+do-build:
+ ${CC} ${CFLAGS} ${WRKSRC}/${PORTNAME}.c -o ${WRKSRC}/${PORTNAME}
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/cidr ${PREFIX}/bin/cidr
- ${INSTALL_MAN} ${WRKSRC}/cidr.1 ${PREFIX}/man/man1/cidr.1
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MANPREFIX}/man/man1
.include <bsd.port.mk>
diff --git a/net-mgmt/cidr/distinfo b/net-mgmt/cidr/distinfo
index 9e9c62cc8c0d..e830a843f2b3 100644
--- a/net-mgmt/cidr/distinfo
+++ b/net-mgmt/cidr/distinfo
@@ -1,3 +1,3 @@
-MD5 (cidr-current.tar.gz) = b349453a0196fddd3ffa0af5fbbacf54
-SHA256 (cidr-current.tar.gz) = e2ea8dd2d79c39140d12d71e515014b086b275286c36c50a1df277401fc147fe
-SIZE (cidr-current.tar.gz) = 17675
+MD5 (cidr-2.3.2.tar.gz) = b349453a0196fddd3ffa0af5fbbacf54
+SHA256 (cidr-2.3.2.tar.gz) = e2ea8dd2d79c39140d12d71e515014b086b275286c36c50a1df277401fc147fe
+SIZE (cidr-2.3.2.tar.gz) = 17675
diff --git a/net-mgmt/cidr/files/patch-aa b/net-mgmt/cidr/files/patch-aa
deleted file mode 100644
index 5434f36f13cb..000000000000
--- a/net-mgmt/cidr/files/patch-aa
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.orig Fri Jul 20 11:11:34 2001
-+++ Makefile Sat May 18 04:21:47 2002
-@@ -1,9 +1,8 @@
- VERSION=2.3.2
- RELEASE=1
-
--CC=gcc
- STRIP=strip
--CCFLAGS=-Wall
-+CCFLAGS= $(CFLAGS)
-
- SOL7FLAGS=-lsocket -lnsl
- SOL8FLAGS=-lresolv -lnsl
-@@ -13,15 +12,12 @@
-
- all :
- $(CC) $(CCFLAGS) cidr.c -o cidr
-- $(STRIP) cidr
-
- solaris8:
- $(CC) $(CCFLAGS) $(SOL8FLAGS) cidr.c -o cidr
-- $(STRIP) cidr
-
- solaris7:
- $(CC) $(CCFLAGS) $(SOL7FLAGS) cidr.c -o cidr
-- $(STRIP) cidr
-
- clean:
- rm -f cidr cidr.o \
diff --git a/net-mgmt/cidr/files/patch-cidr.c b/net-mgmt/cidr/files/patch-cidr.c
new file mode 100644
index 000000000000..22d83fa62c77
--- /dev/null
+++ b/net-mgmt/cidr/files/patch-cidr.c
@@ -0,0 +1,28 @@
+--- cidr.c.orig Fri Jul 28 14:36:39 2006
++++ cidr.c Fri Jul 28 14:39:28 2006
+@@ -140,14 +140,14 @@
+ }
+ }
+
+- strncpy(ip[2],argv[1],18);
++ strlcpy(ip[2],argv[1],19);
+
+ holdaddress=strtok(ip[2],sep);
+ if(holdaddress==NULL)
+ invalid(1);
+
+
+- strncpy(ip[0],holdaddress,strlen(holdaddress));
++ strlcpy(ip[0],holdaddress,strlen(holdaddress)+1);
+ if(ip[0]==NULL)
+ invalid(1);
+
+@@ -156,7 +156,7 @@
+ invalid(1);
+
+
+- strncpy(ip[1],holdprefix,strlen(holdprefix));
++ strlcpy(ip[1],holdprefix,strlen(holdprefix)+1);
+ if(ip[1]==NULL)
+ invalid(1);
+
diff --git a/net-mgmt/cidr/pkg-descr b/net-mgmt/cidr/pkg-descr
index 486dc316e448..0cb0f5e38c8b 100644
--- a/net-mgmt/cidr/pkg-descr
+++ b/net-mgmt/cidr/pkg-descr
@@ -1,6 +1,5 @@
-cidr is a tiny command-line tool for determining network and broadcast
-addresses a la RFC 1878. It takes an IP address and netmask and
-outputs the network address, broadcast address, and total number of
-addresses for the corresponding subnet. The IP can be in binary,
-decimal, hex, or dotted quad. The mask can be in binary, decimal, hex,
-dotted quad, or prefix.
+cidr is a tiny command-line tool for determining network and broadcast addresses
+a la RFC 1878. It takes an IP address and netmask and outputs the network
+address, broadcast address, and total number of addresses for the corresponding
+subnet. The IP can be in binary, decimal, hex, or dotted quad. The mask can be
+in binary, decimal, hex, dotted quad, or prefix.