Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 907249D86 for ; Sun, 17 Jun 2012 08:34:27 +0000 (UTC) Received: (qmail 37812 invoked by uid 500); 17 Jun 2012 08:34:27 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 37665 invoked by uid 500); 17 Jun 2012 08:34:25 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 37640 invoked by uid 99); 17 Jun 2012 08:34:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jun 2012 08:34:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jun 2012 08:34:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DA19C23889E1; Sun, 17 Jun 2012 08:34:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1351071 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/aaa/mod_authz_core.c Date: Sun, 17 Jun 2012 08:34:01 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120617083401.DA19C23889E1@eris.apache.org> Author: sf Date: Sun Jun 17 08:34:01 2012 New Revision: 1351071 URL: http://svn.apache.org/viewvc?rev=1351071&view=rev Log: Log error if 'Require expr' fails Modified: httpd/httpd/trunk/docs/log-message-tags/next-number httpd/httpd/trunk/modules/aaa/mod_authz_core.c Modified: httpd/httpd/trunk/docs/log-message-tags/next-number URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1351071&r1=1351070&r2=1351071&view=diff ============================================================================== --- httpd/httpd/trunk/docs/log-message-tags/next-number (original) +++ httpd/httpd/trunk/docs/log-message-tags/next-number Sun Jun 17 08:34:01 2012 @@ -1 +1 @@ -2320 +2321 Modified: httpd/httpd/trunk/modules/aaa/mod_authz_core.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_core.c?rev=1351071&r1=1351070&r2=1351071&view=diff ============================================================================== --- httpd/httpd/trunk/modules/aaa/mod_authz_core.c (original) +++ httpd/httpd/trunk/modules/aaa/mod_authz_core.c Sun Jun 17 08:34:01 2012 @@ -1045,11 +1045,18 @@ static authz_status expr_check_authoriza const ap_expr_info_t *expr = parsed_require_line; int rc = ap_expr_exec(r, expr, &err); - if (rc <= 0) - /* XXX: real error handling? */ + if (rc < 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02320) + "Error evaluating expression in 'Require expr': %s", + err); + return AUTHZ_GENERAL_ERROR; + } + else if (rc == 0) { return AUTHZ_DENIED; - else + } + else { return AUTHZ_GRANTED; + } } static const char *expr_parse_config(cmd_parms *cmd, const char *require_line,