summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 15:01:31 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:01:31 +0200
commitba122a081aee861e68809372b535a5c92cfa5b80 (patch)
treedbd0b778a312e1c342f21d0a648c713ea65522ef
parent4c82c26e60d40fdb758b9b64b94f6c29007a1555 (diff)
downloadslackbuilds-ba122a081aee861e68809372b535a5c92cfa5b80.tar.gz
network/mod_hosts_access: Initial import
-rw-r--r--network/mod_hosts_access/README27
-rw-r--r--network/mod_hosts_access/mod_hosts_access.SlackBuild71
-rw-r--r--network/mod_hosts_access/mod_hosts_access.info8
-rw-r--r--network/mod_hosts_access/slack-desc11
4 files changed, 117 insertions, 0 deletions
diff --git a/network/mod_hosts_access/README b/network/mod_hosts_access/README
new file mode 100644
index 0000000000..7ee4568d72
--- /dev/null
+++ b/network/mod_hosts_access/README
@@ -0,0 +1,27 @@
+mod_hosts_access
+
+This is a DSO (dynamically shared object) module for the Apache webserver
+that uses libwrap (TCP Wrapper) to check if the connecting hosts is allowed.
+
+To enable it, add to /etc/apache/httpd.conf following lines:
+
+LoadModule hosts_access_module libexec/apache/mod_hosts_access.so
+AddModule mod_hosts_access.c
+
+At appropriate places (i.e. where other modules are loaded similarly).
+
+The /etc/hosts.{allow,deny} access control checking for the "httpd" service
+can now be enabled or disabled on a per directory basis, by adding HostsAccess
+directive to its declaration, e.g.:
+
+# First, we configure the "default" to be a very restrictive set of
+# permissions.
+#
+<Directory />
+ HostsAccess On
+ Options FollowSymLinks
+ AllowOverride None
+</Directory>
+
+The same can be done in a .htaccess file if AllowOverride Limit has been set.
+
diff --git a/network/mod_hosts_access/mod_hosts_access.SlackBuild b/network/mod_hosts_access/mod_hosts_access.SlackBuild
new file mode 100644
index 0000000000..9aee005834
--- /dev/null
+++ b/network/mod_hosts_access/mod_hosts_access.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Slackware build script for mod_hosts_access (libwrap support in Apache)
+# Written by Menno E. Duursma
+
+PRGNAM=mod_hosts_access
+VERSION=1.1.0
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=`pwd`
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+if [ ! -z CFLAGS ]; then
+ CFLAGS_OLD="${CFLAGS}"
+ CFLAGS="$SLKCFLAGS"
+else
+ CFLAGS_WASSET=no
+ export CFLAGS
+fi
+
+# Compile module as DSO (dynmically shared object)
+apxs -ca mod_hosts_access.c -lwrap -lnsl
+
+# Restore compiler flags
+if [ -z CFLAGS_WASSET ]; then
+ unset CFLAGS
+else
+ CFLAGS="${CFLAGS_OLD}"
+fi
+
+# Strip binary
+strip mod_hosts_access.so
+
+# Create target dir, copy module into place
+mkdir -p $PKG/usr/libexec/apache
+cp mod_hosts_access.so $PKG/usr/libexec/apache
+
+# Copy program documentation into the package, including this script
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Clean up the extra stuff
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/$PRGNAM-$VERSION
+ rm -rf $PKG
+fi
diff --git a/network/mod_hosts_access/mod_hosts_access.info b/network/mod_hosts_access/mod_hosts_access.info
new file mode 100644
index 0000000000..a17fb58fae
--- /dev/null
+++ b/network/mod_hosts_access/mod_hosts_access.info
@@ -0,0 +1,8 @@
+PRGNAM="mod_hosts_access"
+VERSION="1.1.0"
+HOMEPAGE="http://www.klomp.org/mod_hosts_access/"
+DOWNLOAD="http://dl.sourceforge.net/httpd-garage/mod_hosts_access-1.1.0.tar.gz"
+MD5SUM="2e4fd22e778c8d98d433344a46421eb7"
+MAINTAINER="Menno E. Duursma"
+EMAIL="druiloor@zonnet.nl"
+APPROVED="robw810"
diff --git a/network/mod_hosts_access/slack-desc b/network/mod_hosts_access/slack-desc
new file mode 100644
index 0000000000..015175c9ee
--- /dev/null
+++ b/network/mod_hosts_access/slack-desc
@@ -0,0 +1,11 @@
+mod_hosts_access: mod_hosts_access (Apache hosts ACL module)
+mod_hosts_access:
+mod_hosts_access: Httpd support for Wietse Venema's TCP Wrapper (libwrap)
+mod_hosts_access: hosts based access control system
+mod_hosts_access:
+mod_hosts_access: mod_hosts_access is developed by
+mod_hosts_access: Vincent Partington, Ken Coar
+mod_hosts_access:
+mod_hosts_access: Please see the README for instructions no how to enable it.
+mod_hosts_access:
+mod_hosts_access: