aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2004-01-03 06:28:36 +0000
committerBruce M Simpson <bms@FreeBSD.org>2004-01-03 06:28:36 +0000
commit4a0e773f1ba5046fe79f887adc1d7ce9b9a88ac3 (patch)
tree46dc770a9d8a772af769f6bef141cebe03529cea /net
parent9cf1153a9a5c3d2c38b19a2c85b56a82d7a5e9aa (diff)
downloadports-4a0e773f1ba5046fe79f887adc1d7ce9b9a88ac3.tar.gz
ports-4a0e773f1ba5046fe79f887adc1d7ce9b9a88ac3.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/nocatsplash/Makefile46
-rw-r--r--net/nocatsplash/distinfo1
-rw-r--r--net/nocatsplash/files/patch-src::http.c35
-rw-r--r--net/nocatsplash/files/patch-src::splashd.c15
-rw-r--r--net/nocatsplash/pkg-descr9
-rw-r--r--net/nocatsplash/pkg-install36
-rw-r--r--net/nocatsplash/pkg-plist18
8 files changed, 161 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 4063e01a14e3..62dcc0816595 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -395,6 +395,7 @@
SUBDIR += nload
SUBDIR += nocatauth-gateway
SUBDIR += nocatauth-server
+ SUBDIR += nocatsplash
SUBDIR += nocol
SUBDIR += nrpe
SUBDIR += nrpep
diff --git a/net/nocatsplash/Makefile b/net/nocatsplash/Makefile
new file mode 100644
index 000000000000..6fb8583824d1
--- /dev/null
+++ b/net/nocatsplash/Makefile
@@ -0,0 +1,46 @@
+# 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/NoCatSplash/
+DISTNAME= NoCatSplash-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
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+IGNORE= Requires 5.x or later for pf(4) firewall support
+.endif
+
+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.post.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..638abfcf5c50
--- /dev/null
+++ b/net/nocatsplash/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+if [ -z "${WRAP_USER}" ]; then
+ WRAP_USER=nocat
+fi
+
+case $2 in
+ PRE-INSTALL)
+ UID=181
+ GID=${UID}
+ if [ ! -d "${NOCAT_DIR}" ]; then
+ mkdir -p ${NOCAT_DIR}
+ fi
+ if pw user show "${WRAP_USER}" 2>/dev/null; then
+ echo "You already have a user \"${WRAP_USER}\", so I will use it."
+ if pw usermod ${WRAP_USER} -d ${NOCAT_DIR}
+ then
+ echo "Changed home directory of \"${WRAP_USER}\" to \"${NOCAT_DIR}\""
+ else
+ "${NOCAT_DIR}\" failed..."
+ exit 1
+ fi
+ else
+ if pw useradd ${WRAP_USER} -u ${UID} \
+ -d ${NOCAT_DIR} -s /sbin/nologin -c "NoCat Daemon"
+ then
+ echo "Added user \"${WRAP_USER}\"."
+ else
+ echo "Adding user \"${WRAP_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