From bryanf@st02.samurai.com  Mon Sep 12 02:02:19 2005
Return-Path: <bryanf@st02.samurai.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D635C16A41F;
	Mon, 12 Sep 2005 02:02:19 +0000 (GMT)
	(envelope-from bryanf@st02.samurai.com)
Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7F72B43D4C;
	Mon, 12 Sep 2005 02:02:19 +0000 (GMT)
	(envelope-from bryanf@st02.samurai.com)
Received: from localhost (mailbox.samurai.com [205.207.28.82])
	by mailbox.samurai.com (Postfix) with ESMTP id 8B3C62395A1;
	Sun, 11 Sep 2005 22:02:18 -0400 (EDT)
Received: from mailbox.samurai.com ([205.207.28.82])
 by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024)
 with LMTP id 92764-01-7; Sun, 11 Sep 2005 22:02:17 -0400 (EDT)
Received: from st02.samurai.com (st02.samurai.com [205.207.28.72])
	by mailbox.samurai.com (Postfix) with ESMTP id 10F9223955A;
	Sun, 11 Sep 2005 22:02:17 -0400 (EDT)
Received: by st02.samurai.com (Postfix, from userid 1001)
	id 01ADABC78; Sun, 11 Sep 2005 22:02:16 -0400 (EDT)
Message-Id: <20050912020216.01ADABC78@st02.samurai.com>
Date: Sun, 11 Sep 2005 22:02:16 -0400 (EDT)
From: Bryan Fullerton <fehwalker@gmail.com>
Reply-To: Bryan Fullerton <fehwalker@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: clement@FreeBSD.org
Subject: Can't actually set apache2 SUEXEC_DOCROOT
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86002
>Category:       ports
>Synopsis:       Can't actually set apache2 SUEXEC_DOCROOT
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    clement
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 12 02:10:19 GMT 2005
>Closed-Date:    Mon Sep 12 07:29:07 GMT 2005
>Last-Modified:  Mon Sep 12 07:29:07 GMT 2005
>Originator:     Bryan Fullerton
>Release:        FreeBSD 5.4-RELEASE-p4 i386
>Organization:
Samurai Consulting Inc.
>Environment:
System: FreeBSD st02.samurai.com 5.4-RELEASE-p4 FreeBSD 5.4-RELEASE-p4 #0: Tue Jul 19 12:14:18 EDT 2005 bryanf@st02.samurai.com:/export/obj/export/src/sys/GENERIC i386

Current ports tree, updated twice daily.

st02.bryanf:/usr/ports/www/apache2> grep FreeBSD Makefile|head -1
# $FreeBSD: ports/www/apache2/Makefile,v 1.228 2005/09/10 14:46:13 clement Exp $

>Description:

When the apache2 port is compiled with SUEXEC and SUEXEC_DOCROOT defines, the suexec binary is still compiled with the default Apache docroot AP_DOC_ROOT (defined as /usr/local/www in the port).

This is not a new problem, it's been there for at least the past 2 months (wasn't using suexec before that).

>How-To-Repeat:

st02.bryanf:/usr/ports/www/apache2> make -DWITH_SUEXEC -DSUEXEC_DOCROOT=/vws
[... compiling, no errors ...]

st02.bryanf:/usr/ports/www/apache2> sudo work/httpd-2.0.54/support/suexec -V
 -D AP_DOC_ROOT="/usr/local/www/data"
 -D AP_GID_MIN=1000
 -D AP_HTTPD_USER="www"
 -D AP_LOG_EXEC="/var/log/httpd-suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=1000
 -D AP_USERDIR_SUFFIX="public_html"


>Fix:

I'm sure it's somewhere in the Makefiles, but I don't have the time now to sort through them.

For now I'm manually hacking suexec.h with a fake AP_DOC_ROOT and recompiling in the work directory. Obviously this is less than ideal.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->clement 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 12 04:56:01 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86002 
State-Changed-From-To: open->closed 
State-Changed-By: clement 
State-Changed-When: Mon Sep 12 07:25:36 GMT 2005 
State-Changed-Why:  
Hi Bryan, 

you misused -D flags actually. 
> make -DWITH_SUEXEC -DSUEXEC_DOCROOT=/vws 
^^^^ 
What you have defined is: 
${WITH_SUEXEC} = 1 
${SUEXEC_DOCROOT=/vws} = 1 
It's definitly not what you want. 
Try: 
make -DWITH_SUEXEC SUEXEC_DOCROOT=/vws and it will work. 

regards, 
clem 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86002 
>Unformatted:
