pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42107: www/apache22 : Add support for mod_mysuexec in pkgsrc



>Number:         42107
>Category:       pkg
>Synopsis:       www/apache22 : Add support for mod_mysuexec in pkgsrc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 21 20:05:00 +0000 2009
>Originator:     Damian Lubosch
>Release:        NetBSD 5.0
>Organization:
>Environment:
NetBSD pauli.xiqit.de 5.0 NetBSD 5.0 (XEN3_DOM0) #0: Sun Apr 26 06:40:06 UTC 
2009  
builds%b6.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-RELEASE/amd64/200904260229Z-obj/home/builds/ab/netbsd-5-0-RELEASE/src/sys/arch/amd64/compile/XEN3_DOM0
 amd64

>Description:
It is possible to have Apache-suexec functionality in a virtual-domains 
environment within the Apache installation. e.g. the isp hosts webseite for 
domain www.example.net in /home/example.net/www the suexec ensures that 
example.net is in /home and its docroot is in www/
First, you have to compile apache with mk.conf:

PKG_OPTIONS.apache+=suexec
APACHE_SUEXEC_DOCROOT=/home

The new thing would be:
APACHE_SUEXEC_USERDIR="www"


Second you need mod_mysuexec.c and mod_suexec.h from 
http://alain.knaff.lu/howto/PhpSuexec/ 

Therefore, it would be nice to have the last quoted line in 
/usr/pkgsrc/www/apache22/options.mk: 

APACHE_SUEXEC_CONFIGURE_ARGS+=                                          \
        --with-suexec-bin=${PREFIX}/sbin/suexec                         \
        --with-suexec-caller=${APACHE_USER}                             \
        --with-suexec-safepath='${APACHE_SUEXEC_PATH:Q}'                \
        --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT:Q}                \
        --with-suexec-logfile=${APACHE_SUEXEC_LOGFILE:Q}                \
        --with-suexec-userdir=${APACHE_SUEXEC_USERDIR:Q}

(I hope the syntax for the last line is correct to read the information from 
mk.conf, I just used www there, to make it work)

Without the suexec-configure-option (here for www) " --with-suexec-userdir=www 
", suexec denies access to /home/*/www 


>How-To-Repeat:

>Fix:
I do not know if this is diff-ed correctly - I hope so.

pauli# diff -u options.mk options.mk.new                                       
--- options.mk  2009-09-21 21:53:08.000000000 +0200
+++ options.mk.new      2009-09-21 21:52:51.000000000 +0200
@@ -30,7 +30,8 @@
        --with-suexec-caller=${APACHE_USER}                             \
        --with-suexec-safepath='${APACHE_SUEXEC_PATH:Q}'                \
        --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT:Q}                \
-       --with-suexec-logfile=${APACHE_SUEXEC_LOGFILE:Q}                
+       --with-suexec-logfile=${APACHE_SUEXEC_LOGFILE:Q}                \
+       --with-suexec-userdir=www
 
 APACHE_MODULES+=        suexec
 CONFIGURE_ARGS+=        ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*}



Home | Main Index | Thread Index | Old Index