Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 13509 invoked from network); 29 Sep 2010 10:56:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 10:56:10 -0000 Received: (qmail 2179 invoked by uid 500); 29 Sep 2010 10:56:10 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 1673 invoked by uid 500); 29 Sep 2010 10:56:07 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 1665 invoked by uid 99); 29 Sep 2010 10:56:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 10:56:06 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [188.40.99.202] (HELO eru.sfritsch.de) (188.40.99.202) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 10:55:58 +0000 Received: from [10.1.1.6] (helo=k.localnet) by eru.sfritsch.de with esmtp (Exim 4.69) (envelope-from ) id 1P0uK2-0006iU-2A for dev@httpd.apache.org; Wed, 29 Sep 2010 12:55:38 +0200 From: Stefan Fritsch To: dev@httpd.apache.org Subject: Making the ssl expr parser thread safe Date: Wed, 29 Sep 2010 12:55:36 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-amd64; KDE/4.4.5; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201009291255.36515.sf@sfritsch.de> X-Virus-Checked: Checked by ClamAV on apache.org Hi, while looking if it would be possible to make an authz provider out of SSLRequire, I noticed that the ssl expression parser isn't even thread safe. After quite some fiddling, I think I have successfully converted the parser to be re-entrant. This requires bison instead of yacc (but the generated code does not fall under the GPL so this should not be a problem). Most of the changes are rather mechanical, because the state needs to be passed as parameters instead of being stored in global variables. The diffs are at http://people.apache.org/~sf/ssl_expr_source.diff http://people.apache.org/~sf/ssl_expr_generated.diff Is there anyone with yacc/bison/flex know how who wants to look at it? Or do I just commit it? It compiles and passes the test suite. Cheers, Stefan