From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 21 20:40:07 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F028716A469 for ; Wed, 21 Feb 2007 20:40:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id CC7B313C441 for ; Wed, 21 Feb 2007 20:40:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1LKe7ej082276 for ; Wed, 21 Feb 2007 20:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1LKe7Iv082275; Wed, 21 Feb 2007 20:40:07 GMT (envelope-from gnats) Resent-Date: Wed, 21 Feb 2007 20:40:07 GMT Resent-Message-Id: <200702212040.l1LKe7Iv082275@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Babak Farrokhi Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DE7C16A690 for ; Wed, 21 Feb 2007 20:30:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 73A8213C481 for ; Wed, 21 Feb 2007 20:30:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1LKUDZM089343 for ; Wed, 21 Feb 2007 20:30:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l1LKUDJr089342; Wed, 21 Feb 2007 20:30:13 GMT (envelope-from nobody) Message-Id: <200702212030.l1LKUDJr089342@www.freebsd.org> Date: Wed, 21 Feb 2007 20:30:13 GMT From: Babak Farrokhi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/109407: [patch] update port net-mgmt/chillispot to 1.1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2007 20:40:08 -0000 >Number: 109407 >Category: ports >Synopsis: [patch] update port net-mgmt/chillispot to 1.1.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 21 20:40:07 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Babak Farrokhi >Release: 6.2-STABLE >Organization: >Environment: FreeBSD devbox.datak-telecom.net 6.2-STABLE FreeBSD 6.2-STABLE #2: Mon Jan 15 13:35:36 IRST 2007 root@devbox.datak-telecom.net:/usr/obj/usr/src/sys/SMP i386 >Description: - Update to 1.1.0 (using patches from maintainer's website) >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN chillispot.orig/Makefile chillispot/Makefile --- chillispot.orig/Makefile Wed Feb 21 22:57:58 2007 +++ chillispot/Makefile Wed Feb 21 23:03:52 2007 @@ -6,8 +6,7 @@ # PORTNAME= chillispot -PORTVERSION= 1.0 -PORTREVISION= 2 +PORTVERSION= 1.1.0 CATEGORIES= net-mgmt MASTER_SITES= http://www.chillispot.org/download/ \ http://www.geeklan.co.uk/files/ \ diff -ruN chillispot.orig/distinfo chillispot/distinfo --- chillispot.orig/distinfo Wed Feb 21 22:57:58 2007 +++ chillispot/distinfo Wed Feb 21 23:03:59 2007 @@ -1,3 +1,3 @@ -MD5 (chillispot-1.0.tar.gz) = 997827a9302a85920cfbc1334092ac0c -SHA256 (chillispot-1.0.tar.gz) = ea00bf63d420f515b9ec034eff6ca04c517459232899b7582f8435b7c097eebf -SIZE (chillispot-1.0.tar.gz) = 440103 +MD5 (chillispot-1.1.0.tar.gz) = 9d2597756af3fa14d7331b4a3651fc9b +SHA256 (chillispot-1.1.0.tar.gz) = b505ab963af8423ef8ae844951ef05fe1554630b448f1174074e9881cb474a01 +SIZE (chillispot-1.1.0.tar.gz) = 452749 diff -ruN chillispot.orig/files/patch-chilli.c chillispot/files/patch-chilli.c --- chillispot.orig/files/patch-chilli.c Thu Jan 1 03:30:00 1970 +++ chillispot/files/patch-chilli.c Wed Feb 21 23:38:54 2007 @@ -0,0 +1,24 @@ +--- src/chilli.c.orig Sun Sep 24 21:18:25 2006 ++++ src/chilli.c Wed Feb 21 23:36:18 2007 +@@ -284,11 +284,21 @@ + return 0; + } + ++#ifdef HAVE_CLEARENV + if (clearenv() != 0) { + sys_err(LOG_ERR, __FILE__, __LINE__, errno, + "clearenv() did not return 0!"); + exit(0); + } ++#else ++ extern char **environ; ++ environ[0] = NULL; ++ if (environ[0] != NULL) { ++ sys_err(LOG_ERR, __FILE__, __LINE__, errno, ++ "Venture37 doesn't know what he's doing!!!"); ++ exit(0); ++ } ++#endif + + set_env("DEV", tun->devname, 0, NULL, NULL, NULL); + set_env("NET", NULL, 0, &appconn->net, NULL, NULL); diff -ruN chillispot.orig/files/patch-config.h.in chillispot/files/patch-config.h.in --- chillispot.orig/files/patch-config.h.in Thu Jan 1 03:30:00 1970 +++ chillispot/files/patch-config.h.in Wed Feb 21 23:37:46 2007 @@ -0,0 +1,12 @@ +--- config.h.in.orig Sun Sep 24 23:04:53 2006 ++++ config.h.in Wed Feb 21 23:36:18 2007 +@@ -52,6 +52,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDLIB_H + ++/* Define to 1 if you have the `clearenv' function. */ ++#undef HAVE_CLEARENV ++ + /* Define to 1 if you have the `strdup' function. */ + #undef HAVE_STRDUP + diff -ruN chillispot.orig/files/patch-src_chilli.c chillispot/files/patch-src_chilli.c --- chillispot.orig/files/patch-src_chilli.c Wed Feb 21 22:57:58 2007 +++ chillispot/files/patch-src_chilli.c Thu Jan 1 03:30:00 1970 @@ -1,55 +0,0 @@ ---- src/chilli.c.orig Mon Dec 26 08:06:46 2005 -+++ src/chilli.c Mon Dec 26 08:10:01 2005 -@@ -14,13 +14,14 @@ - #include - #include - #include -+#include -+#include -+#include - #include - #include - #include --#include - #include - #include --#include - - #if defined(__linux__) - #include -@@ -460,13 +461,13 @@ - memset(options.uamokmask, 0, sizeof(options.uamokmask)); - options.uamoknetlen = 0; - for (numargs = 0; numargs < args_info.uamallowed_given; ++numargs) { -+ char *p1 = NULL; -+ char *p2 = NULL; -+ char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1); - if (options.debug & DEBUG_CONF) { - printf ("Uamallowed #%d: %s\n", - numargs, args_info.uamallowed_arg[numargs]); - } -- char *p1 = NULL; -- char *p2 = NULL; -- char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1); - strcpy(p3, args_info.uamallowed_arg[numargs]); - p1 = p3; - if ((p2 = strchr(p1, ','))) { -@@ -766,14 +767,14 @@ - memset(options.macok, 0, sizeof(options.macok)); - options.macoklen = 0; - for (numargs = 0; numargs < args_info.macallowed_given; ++numargs) { -- if (options.debug & DEBUG_CONF) { -- printf ("Macallowed #%d: %s\n", numargs, -- args_info.macallowed_arg[numargs]); -- } - char *p1 = NULL; - char *p2 = NULL; - char *p3 = malloc(strlen(args_info.macallowed_arg[numargs])+1); - int i; -+ if (options.debug & DEBUG_CONF) { -+ printf ("Macallowed #%d: %s\n", numargs, -+ args_info.macallowed_arg[numargs]); -+ } - strcpy(p3, args_info.macallowed_arg[numargs]); - p1 = p3; - if ((p2 = strchr(p1, ','))) { diff -ruN chillispot.orig/files/patch-src_dhcp.c chillispot/files/patch-src_dhcp.c --- chillispot.orig/files/patch-src_dhcp.c Wed Feb 21 22:57:58 2007 +++ chillispot/files/patch-src_dhcp.c Thu Jan 1 03:30:00 1970 @@ -1,16 +0,0 @@ ---- src/dhcp.c.orig Mon Dec 26 08:22:52 2005 -+++ src/dhcp.c Mon Dec 26 08:29:56 2005 -@@ -37,9 +37,12 @@ - #include - #include - #include -+#if __FreeBSD_version > 500000 - #include /* ISO C99 types */ --#include -+#endif -+#include - #include -+#include - - #if defined(__linux__) - #include diff -ruN chillispot.orig/files/patch-src_redir.c chillispot/files/patch-src_redir.c --- chillispot.orig/files/patch-src_redir.c Wed Feb 21 22:57:58 2007 +++ chillispot/files/patch-src_redir.c Thu Jan 1 03:30:00 1970 @@ -1,21 +0,0 @@ ---- src/redir.c.orig Mon Dec 26 08:13:05 2005 -+++ src/redir.c Mon Dec 26 08:22:35 2005 -@@ -9,15 +9,15 @@ - * - */ - --#include --#include -- - #include - #include - #include - #include - #include - -+#include -+#include -+#include - #include - #include - #include diff -ruN chillispot.orig/files/patch-src_syserr.c chillispot/files/patch-src_syserr.c --- chillispot.orig/files/patch-src_syserr.c Wed Feb 21 22:57:58 2007 +++ chillispot/files/patch-src_syserr.c Thu Jan 1 03:30:00 1970 @@ -1,18 +0,0 @@ ---- src/syserr.c.orig Mon Dec 26 08:30:20 2005 -+++ src/syserr.c Mon Dec 26 08:30:46 2005 -@@ -10,13 +10,13 @@ - */ - - #include -+#include - #include - #include -+#include - #include - #include - #include --#include --#include - - #include "syserr.h" - diff -ruN chillispot.orig/files/patch-tun.c chillispot/files/patch-tun.c --- chillispot.orig/files/patch-tun.c Thu Jan 1 03:30:00 1970 +++ chillispot/files/patch-tun.c Wed Feb 21 23:39:09 2007 @@ -0,0 +1,105 @@ +--- src/tun.c.orig Sun Sep 24 21:18:25 2006 ++++ src/tun.c Wed Feb 21 23:36:18 2007 +@@ -366,7 +366,7 @@ + this->addrs++; + return 0; + +-#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + + int fd; + struct ifaliasreq areq; +@@ -445,7 +445,7 @@ + #if defined(__linux__) + ifr.ifr_netmask.sa_family = AF_INET; + +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len = + sizeof (struct sockaddr_in); + ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len = +@@ -497,7 +497,7 @@ + ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr = + netmask->s_addr; + +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr = + netmask->s_addr; + +@@ -526,7 +526,7 @@ + + tun_sifflags(this, IFF_UP | IFF_RUNNING); + +-#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + tun_addroute(this, dstaddr, addr, netmask); + this->routes = 1; + #endif +@@ -585,7 +585,7 @@ + close(fd); + return 0; + +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + + struct { + struct rt_msghdr rt; +@@ -674,7 +674,7 @@ + #if defined(__linux__) + struct ifreq ifr; + +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */ + int devnum; + struct ifaliasreq areq; +@@ -722,7 +722,7 @@ + ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */ + return 0; + +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + + /* Find suitable device */ + for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */ +@@ -854,7 +854,7 @@ + int tun_decaps(struct tun_t *this) + { + +-#if defined(__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#if defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + + unsigned char buffer[PACKET_MAX]; + int status; +@@ -910,7 +910,7 @@ + + return write(tun->fd, buffer, len+4); + +-#elif defined(__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__APPLE__) ++#elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__APPLE__) + + return write(tun->fd, pack, len); + +@@ -951,11 +951,21 @@ + return 0; + } + ++#ifdef HAVE_CLEARENV + if (clearenv() != 0) { + sys_err(LOG_ERR, __FILE__, __LINE__, errno, + "clearenv() did not return 0!"); + exit(0); + } ++#else ++ extern char **environ; ++ environ[0] = NULL; ++ if (environ[0] != NULL) { ++ sys_err(LOG_ERR, __FILE__, __LINE__, errno, ++ "Venture37 doesn't know what he's doing!!!"); ++ exit(0); ++ } ++#endif + + if (setenv("DEV", tun->devname, 1) != 0) { + sys_err(LOG_ERR, __FILE__, __LINE__, errno, >Release-Note: >Audit-Trail: >Unformatted: