From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 11 09:10:03 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D47B1065672 for ; Wed, 11 Mar 2009 09:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1FF4D8FC19 for ; Wed, 11 Mar 2009 09:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2B9A3NC013245 for ; Wed, 11 Mar 2009 09:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2B9A2eO013236; Wed, 11 Mar 2009 09:10:02 GMT (envelope-from gnats) Resent-Date: Wed, 11 Mar 2009 09:10:02 GMT Resent-Message-Id: <200903110910.n2B9A2eO013236@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Bjoern A. Zeeb" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCBA31065672 for ; Wed, 11 Mar 2009 09:00:08 +0000 (UTC) (envelope-from bz@zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC5B8FC1B for ; Wed, 11 Mar 2009 09:00:08 +0000 (UTC) (envelope-from bz@zabbadoz.net) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id B43AC41C667 for ; Wed, 11 Mar 2009 10:00:06 +0100 (CET) Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id fxRa51VlLwEY for ; Wed, 11 Mar 2009 10:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 0B34841C63C; Wed, 11 Mar 2009 10:00:06 +0100 (CET) Received: from storage.int.zabbadoz.net (storage.int.zabbadoz.net [10.111.66.189]) by mail.int.zabbadoz.net (Postfix) with ESMTP id B03934448E6; Wed, 11 Mar 2009 08:55:53 +0000 (UTC) Received: by storage.int.zabbadoz.net (Postfix, from userid 1060) id 6D6D94899B5; Wed, 11 Mar 2009 08:55:53 +0000 (UTC) Message-Id: <20090311085553.6D6D94899B5@storage.int.zabbadoz.net> Date: Wed, 11 Mar 2009 08:55:53 +0000 (UTC) From: "Bjoern A. Zeeb" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: "Bjoern A. Zeeb" Subject: ports/132528: [patch] www/apache22 no-accf fix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Bjoern A. Zeeb" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 09:10:03 -0000 >Number: 132528 >Category: ports >Synopsis: [patch] www/apache22 no-accf fix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 11 09:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Bjoern A. Zeeb >Release: FreeBSD 8.0-CURRENT amd64 >Organization: Zabbadoz.NeT >Environment: System: FreeBSD foo 8.0-CURRENT FreeBSD 8.0-CURRENT #0: 2009 bz@foo:/path/to/HEAD/sys/KERNEL amd64 >Description: When configuring an apache22 with virtual hosts even though apache22 is staretd with apache22_http_accept_enable="NO" and thus -DNOHTTPACCEPT it still complains that [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter >How-To-Repeat: Configure apache22 with virtual hosts, make sure you do not have the accf_* modules loaded and start apache22 with apache22_http_accept_enable="NO". Best observed inside jails where loading the modules is not possible either. PS: I am not sure if there isn't a bug in the apache22 startup script related to return codes from apache22_accf() and how sh(1) interprets them. Especially if you cannot load the accf module, noone would set -DNOHTTPACCEPT? >Fix: To be able to configure AcceptFilter http none AcceptFilter https none and make it work like local/etc/apache22/Includes/no-accf.conf does along with virtual hosts, etc. use the following patch (below). You can alos temporarily fetch it from: http://people.freebsd.org/~bz/www-apache22-accf-fix.diff Adds the new file files/patch-server__core.c . If it proves to be correct and working for everyone I'd like to submit it upstream. Index: www/apache22/files/patch-server__core.c =================================================================== RCS file: www/apache22/files/patch-server__core.c diff -N www/apache22/files/patch-server__core.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/apache22/files/patch-server__core.c 11 Mar 2009 08:35:07 -0000 @@ -0,0 +1,36 @@ +--- ./server/core.c.orig 2008-06-02 23:18:18.000000000 +0200 ++++ ./server/core.c 2009-03-09 15:05:57.000000000 +0100 +@@ -494,6 +494,7 @@ + core_server_config *base = (core_server_config *)basev; + core_server_config *virt = (core_server_config *)virtv; + core_server_config *conf; ++ const char *accfb, *accfc; + + conf = (core_server_config *)apr_pmemdup(p, virt, sizeof(core_server_config)); + +@@ -509,6 +510,25 @@ + conf->protocol = base->protocol; + } + ++ /* ++ * bz accept_filter(9) disable fix. ++ * ++ * You can only configure it in the base config but the ++ * values are copied and checked into virtual host configs, ++ * so if you disable it in base it will still be on in virt. ++ * To fix it, we overwrite each virt config if it does not ++ * match what is in base config for the hardcoded http(s). ++ */ ++ accfb = apr_table_get(base->accf_map, "http"); ++ accfc = apr_table_get(conf->accf_map, "http"); ++ if (accfb && accfc && strcmp(accfb, accfc)) ++ apr_table_set(conf->accf_map, "http", accfb); ++ ++ accfb = apr_table_get(base->accf_map, "https"); ++ accfc = apr_table_get(conf->accf_map, "https"); ++ if (accfb && accfc && strcmp(accfb, accfc)) ++ apr_table_set(conf->accf_map, "https", accfb); ++ + conf->sec_dir = apr_array_append(p, base->sec_dir, virt->sec_dir); + conf->sec_url = apr_array_append(p, base->sec_url, virt->sec_url); + >Release-Note: >Audit-Trail: >Unformatted: