summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2003-01-02 06:40:32 +0000
committerjlam <jlam>2003-01-02 06:40:32 +0000
commit8b9ca9a66258f215a9ebf4b60397e0e3dea6ed6e (patch)
treea21e363233793f2a3cfa664073b69fb60cac3105
parent09d101d21dd3059b30e2e18cb1e4d9b0b57a9d78 (diff)
downloadpkgsrc-8b9ca9a66258f215a9ebf4b60397e0e3dea6ed6e.tar.gz
Require a iasp user and group (defaulting to APACHE_{USER,GROUP}) and
run the iASP proxy server as that user for improved security. Bump PKGREVISION on www/iasp to 1.
-rw-r--r--doc/CHANGES3
-rw-r--r--www/iasp/Makefile16
-rw-r--r--www/iasp/PLIST4
-rw-r--r--www/iasp/files/gen-scripts.sh12
-rw-r--r--www/iasp/files/iasp.sh5
5 files changed, 28 insertions, 12 deletions
diff --git a/doc/CHANGES b/doc/CHANGES
index a6f104c1b71..063150a6082 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.969 2003/01/02 03:22:07 rh Exp $
+$NetBSD: CHANGES,v 1.970 2003/01/02 06:42:08 jlam Exp $
Changes to the packages collection and infrastructure in 2003:
@@ -11,3 +11,4 @@ Changes to the packages collection and infrastructure in 2003:
Updated tcm to 2.01nb1 [jmmv 2003-01-01]
Updated gnome-vfs to 1.0.3nb1 [rh 2003-01-02]
Updated gnome-mime-data to 2.0.1nb2 [rh 2003-01-02]
+ Updated iasp to 2.1.1nb1 [jlam 2003-01-02]
diff --git a/www/iasp/Makefile b/www/iasp/Makefile
index 31e0f3df4b7..78df06cc70c 100644
--- a/www/iasp/Makefile
+++ b/www/iasp/Makefile
@@ -1,13 +1,15 @@
-# $NetBSD: Makefile,v 1.1.1.1 2003/01/01 07:03:40 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2003/01/02 06:40:32 jlam Exp $
.include "../iasp/Makefile.common"
PKGNAME= iasp-${IASP_VERSION}
+PKGREVISION= 1
COMMENT= Instant ASP: Java implementation of Active Server Pages
WRKSRC= ${WRKDIR}/${IASP_DIR}
SCRIPTS_ENV+= CAT=${CAT:Q}
+SCRIPTS_ENV+= CHMOD=${CHMOD:Q}
SCRIPTS_ENV+= ECHO=${ECHO:Q}
SCRIPTS_ENV+= SED=${SED:Q}
SCRIPTS_ENV+= SH=${SH:Q}
@@ -15,7 +17,17 @@ SCRIPTS_ENV+= IASP=${IASP_DESTDIR}
FILES_SUBST= IASP=${IASP_DESTDIR}
PLIST_SUBST= IASP=${IASP_DESTDIR:S/^${PREFIX}\///}
-OWN_DIRS= ${IASP_DESTDIR} ${IASP_DESTDIR}/logs
+IASP_USER?= ${APACHE_USER}
+IASP_GROUP?= ${APACHE_GROUP}
+BUILD_DEFS+= IASP_USER IASP_GROUP
+FILES_SUBST+= IASP_USER=${IASP_USER}
+FILES_SUBST+= IASP_GROUP=${IASP_GROUP}
+
+PKG_USERS= ${IASP_USER}:${IASP_GROUP}
+PKG_GROUPS= ${IASP_GROUP}
+
+OWN_DIRS= ${IASP_DESTDIR}
+OWN_DIRS_PERMS= ${IASP_DESTDIR}/logs ${IASP_USER} ${IASP_GROUP} 0750
CONFDIR= ${IASP_DESTDIR}/properties
SFILES= cdonts.properties dbserver.properties
SFILES+= ejb.properties loadbalance.properties
diff --git a/www/iasp/PLIST b/www/iasp/PLIST
index 952b8b37a9e..b57427c8fdd 100644
--- a/www/iasp/PLIST
+++ b/www/iasp/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2003/01/01 07:03:42 jlam Exp $
+@comment $NetBSD: PLIST,v 1.2 2003/01/02 06:40:33 jlam Exp $
etc/rc.d/iasp
etc/rc.d/iasp_admin
${IASP}/README_EN
@@ -1236,6 +1236,8 @@ ${IASP}/stop-server.sh
@dirrm ${IASP}/docs/iasp/samples/database/CloudscapeDB
@dirrm ${IASP}/docs/iasp/samples/database
@dirrm ${IASP}/docs/iasp/samples
+@comment Remove any auto-generated images.
+@unexec ${RM} -f %D/${IASP}/docs/iasp/images/*.gif
@dirrm ${IASP}/docs/iasp/images
@dirrm ${IASP}/docs/iasp/features/image
@dirrm ${IASP}/docs/iasp/features
diff --git a/www/iasp/files/gen-scripts.sh b/www/iasp/files/gen-scripts.sh
index 5bc7e89fe30..88b54885332 100644
--- a/www/iasp/files/gen-scripts.sh
+++ b/www/iasp/files/gen-scripts.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: gen-scripts.sh,v 1.1.1.1 2003/01/01 07:03:42 jlam Exp $
+# $NetBSD: gen-scripts.sh,v 1.2 2003/01/02 06:40:33 jlam Exp $
IASP_CLASSPATH=
for classpath in ${WRKSRC}/lib/*.jar ${WRKSRC}/servlets; do
@@ -58,32 +58,32 @@ ${CAT} > ${WRKSRC}/start-server.sh << EOF
. ${IASP}/iasp-common.conf
eval exec \${JAVA} servlet.http.HttpServer
EOF
-chmod u+x ${WRKSRC}/start-server.sh
+${CHMOD} 555 ${WRKSRC}/start-server.sh
${CAT} > ${WRKSRC}/stop-server.sh << EOF
#!${SH}
. ${IASP}/iasp-common.conf
eval exec \${JAVA} servlet.http.HttpServerControl webserver
EOF
-chmod u+x ${WRKSRC}/stop-server.sh
+${CHMOD} 555 ${WRKSRC}/stop-server.sh
${CAT} > ${WRKSRC}/start-admin.sh << EOF
#!${SH}
. ${IASP}/iasp-common.conf
eval exec \${JAVA} servlet.webserver.WebHttpServer
EOF
-chmod u+x ${WRKSRC}/start-admin.sh
+${CHMOD} 555 ${WRKSRC}/start-admin.sh
${CAT} > ${WRKSRC}/stop-admin.sh << EOF
#!${SH}
. ${IASP}/iasp-common.conf
eval exec \${JAVA} servlet.http.HttpServerControl adminserver
EOF
-chmod u+x ${WRKSRC}/stop-admin.sh
+${CHMOD} 555 ${WRKSRC}/stop-admin.sh
${CAT} > ${WRKSRC}/connector.sh << EOF
#!${SH}
. ${IASP}/iasp-common.conf
eval exec \${JAVA} connector.iasp_connector
EOF
-chmod u+x ${WRKSRC}/connector.sh
+${CHMOD} 555 ${WRKSRC}/connector.sh
diff --git a/www/iasp/files/iasp.sh b/www/iasp/files/iasp.sh
index 8b1357630af..a706904d09c 100644
--- a/www/iasp/files/iasp.sh
+++ b/www/iasp/files/iasp.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: iasp.sh,v 1.1.1.1 2003/01/01 07:03:42 jlam Exp $
+# $NetBSD: iasp.sh,v 1.2 2003/01/02 06:40:33 jlam Exp $
#
# PROVIDE: iasp
# REQUIRE: DAEMON
@@ -12,12 +12,13 @@ fi
name="iasp"
rcvar=$name
+iasp_user="@IASP_USER@"
start_cmd=iasp_start
stop_cmd=iasp_stop
iasp_start()
{
- @IASP@/start-server.sh &
+ @SU@ -m ${iasp_user} -c "exec @IASP@/start-server.sh" &
sleep 2
}