diff --git a/net/balance/Makefile b/net/balance/Makefile new file mode 100644 index 00000000000..0ae0c5cad7a --- /dev/null +++ b/net/balance/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/06/25 23:05:44 lebel Exp $ + +COMMENT= "tcp proxy with load balancing and failover mechanisms" + +VERSION= 2.24-1 +DISTNAME= balance-${VERSION} +PKGNAME= balance-${VERSION:S/-/./g} +CATEGORIES= net +NEED_VERSION= 1.414 + +HOMEPAGE= http://balance.sourceforge.net/ + +MAINTAINER= Jason Peel + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= balance + +ALL_TARGET= balance + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/balance ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/balance.1 ${PREFIX}/man/man1 + +post-install: + @${STRIP} ${PREFIX}/bin/balance + +.include diff --git a/net/balance/files/md5 b/net/balance/files/md5 new file mode 100644 index 00000000000..7f376162d3a --- /dev/null +++ b/net/balance/files/md5 @@ -0,0 +1,3 @@ +MD5 (balance-2.24-1.tar.gz) = b7e199e720bda1d7e53c969cb2cc3119 +RMD160 (balance-2.24-1.tar.gz) = cc7d1ab85316b23593b17dd91e3ee6a316103a4a +SHA1 (balance-2.24-1.tar.gz) = 6f33bf2518ee00708f577337145eb517686747fd diff --git a/net/balance/patches/patch-balance_c b/net/balance/patches/patch-balance_c new file mode 100644 index 00000000000..919a14bfc25 --- /dev/null +++ b/net/balance/patches/patch-balance_c @@ -0,0 +1,43 @@ +$OpenBSD: patch-balance_c,v 1.1.1.1 2001/06/25 23:05:45 lebel Exp $ +--- balance.c.orig Sun Jan 7 05:56:58 2001 ++++ balance.c Mon Jun 25 19:03:00 2001 +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include + + #ifdef __FreeBSD__ + #define MYBSD 1 +@@ -638,7 +638,7 @@ static usage() { + if((revision_copy=(char*) malloc(strlen(revision)+1))==NULL) { + fprintf(stderr,"malloc problem in usage()\n"); + } else { +- strcpy(revision_copy, revision); ++ strlcpy(revision_copy, revision, sizeof(revision_copy)); + token=strtok(revision_copy," "); + token=strtok(NULL," "); + version=token!=NULL?token:"*undefined*"; +@@ -1083,10 +1083,10 @@ char *argv[]; + serv_addr.sin_family = AF_INET; + if(bindhost != NULL) { + setipaddress(&serv_addr.sin_addr, bindhost); +- sprintf(bindhost_address, inet_ntoa(serv_addr.sin_addr)); ++ snprintf(bindhost_address, sizeof(bindhost_address), inet_ntoa(serv_addr.sin_addr)); + } else { + serv_addr.sin_addr.s_addr=htonl(INADDR_ANY); +- sprintf(bindhost_address,"0.0.0.0"); ++ snprintf(bindhost_address, sizeof(bindhost_address), "0.0.0.0"); + } + serv_addr.sin_port=htons(source_port); + +@@ -1096,7 +1096,7 @@ char *argv[]; + struct stat buffer; + int fd; + +- sprintf(rendezvousfile,"%sbalance.%d.%s",SHMDIR,source_port,bindhost_address); ++ snprintf(rendezvousfile, sizeof(rendezvousfile), "%sbalance.%d.%s",SHMDIR,source_port,bindhost_address); + + if(stat(rendezvousfile, &buffer) == -1) { + // File existiert (noch) nicht ... diff --git a/net/balance/pkg/DESCR b/net/balance/pkg/DESCR new file mode 100644 index 00000000000..8e43e081c24 --- /dev/null +++ b/net/balance/pkg/DESCR @@ -0,0 +1,9 @@ +Balance is a simple but powerful generic tcp proxy with round robin +load balancing and failover mechanisms. Its behaviour can be +controlled at runtime using a simple command line syntax. + +The latest release now supports the definition of channel groups +and connection counting and handling boosting the power and versatility +of balance one big step further. + +WWW: ${HOMEPAGE} diff --git a/net/balance/pkg/PLIST b/net/balance/pkg/PLIST new file mode 100644 index 00000000000..676d461e070 --- /dev/null +++ b/net/balance/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/06/25 23:05:45 lebel Exp $ +bin/balance +man/man1/balance.1 diff --git a/net/balance/pkg/SECURITY b/net/balance/pkg/SECURITY new file mode 100644 index 00000000000..a41fa189f33 --- /dev/null +++ b/net/balance/pkg/SECURITY @@ -0,0 +1,5 @@ +$OpenBSD: SECURITY,v 1.1.1.1 2001/06/25 23:05:45 lebel Exp $ + +Fixed several strcpy/sprintf issues. + +