diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2003-12-08 22:42:45 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2003-12-08 22:42:45 +0000 |
commit | 2440657742b1c436ea6c80d81de6bc6220f9da44 (patch) | |
tree | aa5e5b124445a5586b8ae384f21eb332a1293cfa /net | |
parent | 080e6db266e5df288a61d130b8b2801f12711bea (diff) | |
download | ports-2440657742b1c436ea6c80d81de6bc6220f9da44.tar.gz ports-2440657742b1c436ea6c80d81de6bc6220f9da44.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/NoCatSplash/Makefile | 42 | ||||
-rw-r--r-- | net/NoCatSplash/distinfo | 1 | ||||
-rw-r--r-- | net/NoCatSplash/files/patch-src::http.c | 35 | ||||
-rw-r--r-- | net/NoCatSplash/files/patch-src::splashd.c | 15 | ||||
-rw-r--r-- | net/NoCatSplash/pkg-descr | 9 | ||||
-rw-r--r-- | net/NoCatSplash/pkg-install | 48 | ||||
-rw-r--r-- | net/NoCatSplash/pkg-plist | 18 |
8 files changed, 169 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index f88d3d749fbc..1dcaf775fc91 100644 --- a/net/Makefile +++ b/net/Makefile @@ -8,6 +8,7 @@ SUBDIR += DarwinStreamingServer SUBDIR += GeoIP SUBDIR += NeTraMet + SUBDIR += NoCatSplash SUBDIR += SSLtelnet SUBDIR += adasockets SUBDIR += aget diff --git a/net/NoCatSplash/Makefile b/net/NoCatSplash/Makefile new file mode 100644 index 000000000000..80d40e7b5d94 --- /dev/null +++ b/net/NoCatSplash/Makefile @@ -0,0 +1,42 @@ +# New ports collection makefile for: NoCatSplash +# Date created: 19 November 2003 +# Whom: Bruce M Simpson <bms@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= NoCatSplash +PORTVERSION= 0.82 +CATEGORIES= net +MASTER_SITES= http://nocat.net/download/${PORTNAME}/ +DISTNAME= ${PORTNAME}-nightly +EXTRACT_SUFX= .tgz + +MAINTAINER= bms@FreeBSD.org +COMMENT= Open 802.11 Splash Screen + +BUILD_DEPENDS= \ + ${LOCALBASE}/sbin/pfctl:${PORTSDIR}/security/pf +RUN_DEPENDS= \ + ${LOCALBASE}/sbin/pfctl:${PORTSDIR}/security/pf + +#BROKEN= Does not yet operate with the pf\(4\) firewall on FreeBSD + +CONFLICTS= NoCatAuth-Server-* + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_GNOME= glib12 + +CONFIGURE_ARGS+= --disable-dependency-tracking +CONFIGURE_ARGS+= --disable-glibtest +CONFIGURE_ARGS+= --with-firewall=pfctl +CONFIGURE_ARGS+= --with-ghttpd +.if defined(AUTHMODE) +CONFIGURE_ARGS+= --with-mode=${AUTHMODE} +.endif +.if defined(DOCROOT) +CONFIGURE_ARGS+= --with-docroot=${DOCROOT} +.endif + +.include <bsd.port.mk> diff --git a/net/NoCatSplash/distinfo b/net/NoCatSplash/distinfo new file mode 100644 index 000000000000..e3005a886df1 --- /dev/null +++ b/net/NoCatSplash/distinfo @@ -0,0 +1 @@ +MD5 (NoCatSplash-nightly.tgz) = 43516d61ef740616cee961bec6b926fa diff --git a/net/NoCatSplash/files/patch-src::http.c b/net/NoCatSplash/files/patch-src::http.c new file mode 100644 index 000000000000..fe05e81b9ac9 --- /dev/null +++ b/net/NoCatSplash/files/patch-src::http.c @@ -0,0 +1,35 @@ +--- src/http.c.orig Wed Nov 19 16:26:07 2003 ++++ src/http.c Wed Nov 19 16:29:22 2003 +@@ -1,8 +1,10 @@ +-# include <glib.h> +-# include <fcntl.h> +-# include <sys/stat.h> ++# include <sys/param.h> + # include <sys/types.h> ++# include <sys/stat.h> + # include <sys/socket.h> ++# include <netinet/in.h> ++# include <glib.h> ++# include <fcntl.h> + # include <arpa/inet.h> + # include <unistd.h> + # include <errno.h> +@@ -17,9 +19,6 @@ + # define BUF_SIZ 16384 + # endif + +-// not portable, apparently +-# include <sys/sendfile.h> +- + GIOChannel *http_bind_socket( const char *ip, int port, int queue ) { + struct sockaddr_in addr; + int fd, r, n = 1; +@@ -354,7 +353,7 @@ + return -1; + } + +- r = sendfile( out_fd, in_fd, &len, s.st_size ); ++ r = sendfile(in_fd, out_fd, 0, s.st_size, NULL, &len, 0); + if (r == -1) { + g_warning("http_sendfile send: %m"); + return -1; diff --git a/net/NoCatSplash/files/patch-src::splashd.c b/net/NoCatSplash/files/patch-src::splashd.c new file mode 100644 index 000000000000..a08519c35cff --- /dev/null +++ b/net/NoCatSplash/files/patch-src::splashd.c @@ -0,0 +1,15 @@ +--- src/splashd.c.orig Wed Nov 19 16:29:47 2003 ++++ src/splashd.c Wed Nov 19 16:30:28 2003 +@@ -1,7 +1,10 @@ ++# include <sys/param.h> ++# include <sys/types.h> ++# include <sys/socket.h> ++# include <netinet/in.h> ++# include <pthread.h> + # include <glib.h> + # include <stdio.h> +-# include <netinet/in.h> +-# include <sys/socket.h> + # include <signal.h> + # include <string.h> + # include <time.h> diff --git a/net/NoCatSplash/pkg-descr b/net/NoCatSplash/pkg-descr new file mode 100644 index 000000000000..eb7bbd50b5d1 --- /dev/null +++ b/net/NoCatSplash/pkg-descr @@ -0,0 +1,9 @@ +NoCatSplash is a Open Public Network Gateway Daemon. It performs as a +[captive/open/active] portal. When run on a gateway/router on a network, +all web requests are redirected until the client either logs in or clicks +"I Accept" to an AUP. The gateway daemon then changes the firewall rules +on the gateway to pass traffic for that client (based on IP address and +MAC address). + +Bruce +bms@FreeBSD.org diff --git a/net/NoCatSplash/pkg-install b/net/NoCatSplash/pkg-install new file mode 100644 index 000000000000..73769bdea007 --- /dev/null +++ b/net/NoCatSplash/pkg-install @@ -0,0 +1,48 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +if [ -z "${ENABLE_USER}" ]; then + ENABLE_USER=nocat +fi + +if [ -z "${ENABLE_GROUP}" ]; then + ENABLE_GROUP=nocat +fi + +case $2 in + PRE-INSTALL) + UID=181 + GID=${UID} + if pw group show "${ENABLE_GROUP}" 2>/dev/null; then + echo "You already have a group \"${ENABLE_GROUP}\", so I will use it." + else + if pw groupadd ${ENABLE_GROUP} -g ${GID}; then + echo "Added group \"${ENABLE_GROUP}\." + else + echo "Adding group \"${ENABLE_GROUP}\" failed." + exit 1 + fi + fi + + if pw user show "${ENABLE_USER}" 2>/dev/null; then + echo "You already have a user \"${ENABLE_USER}\", so I will use it." + if pw usermod ${ENABLE_USER} -d ${NOCAT_DIR} + then + echo "Changed home directory of \"${ENABLE_USER}\" to \"${SYSCONF_DIR}\"" + else + "${SYSCONF_DIR}\" failed..." + exit 1 + fi + else + if pw useradd ${ENABLE_USER} -u ${UID} -g ${ENABLE_GROUP} -h \ + -d ${SYSCONF_DIR} -s /sbin/nologin -c "NoCat Daemon" + then + echo "Added user \"${ENABLE_USER}\"." + else + echo "Adding user \"${ENABLE_USER}\" failed..." + exit 1 + fi + fi + ;; +esac diff --git a/net/NoCatSplash/pkg-plist b/net/NoCatSplash/pkg-plist new file mode 100644 index 000000000000..95f4b35a4a4a --- /dev/null +++ b/net/NoCatSplash/pkg-plist @@ -0,0 +1,18 @@ +share/nocat/htdocs/test.html +share/nocat/htdocs/status.html +share/nocat/htdocs/splash.html +share/nocat/htdocs/images/update.gif +share/nocat/htdocs/images/skip.gif +share/nocat/htdocs/images/reset.gif +share/nocat/htdocs/images/register.gif +share/nocat/htdocs/images/logout.gif +share/nocat/htdocs/images/login.gif +share/nocat/htdocs/images/continue.gif +share/nocat/htdocs/images/auth_logo.gif +@dirrm share/nocat/htdocs/images +@dirrm share/nocat/htdocs +@dirrm share/nocat +sbin/splashd +sbin/ghttpd +@dirrm libexec/nocat +etc/nocat.conf |