[Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.7, 1.8
by Doctor Conrad
Author: prowley
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27829
Modified Files:
views.c
Log Message:
172683: Search filter does not work on physical entries within views
Index: views.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- views.c 22 Nov 2005 03:40:14 -0000 1.7
+++ views.c 5 Jan 2006 17:56:14 -0000 1.8
@@ -899,10 +899,12 @@
*/
pDescendentSubFilter = views_cache_create_descendent_filter(currentChild, useEntryID);
if(pDescendentSubFilter)
+ {
if(pOrSubFilter)
pOrSubFilter = slapi_filter_join_ex( LDAP_FILTER_OR, pOrSubFilter, pDescendentSubFilter, 0 );
else
pOrSubFilter = pDescendentSubFilter;
+ }
if(useEntryID)
{
@@ -1016,7 +1018,7 @@
pView->includeChildViewsFilter = views_cache_create_descendent_filter(pView, PR_TRUE);
/* add this view */
- view_filter_str = PR_smprintf("(parentid=%lu)", pView->entryid);
+ view_filter_str = PR_smprintf("(|(parentid=%lu)(entryid=%lu))", pView->entryid, pView->entryid);
if(pView->includeChildViewsFilter)
{
@@ -1674,7 +1676,7 @@
theView = views_cache_find_view(base);
/* if the view is disabled (we service subtree searches in this case) */
- if(!theView || !theView->viewfilter && scope == LDAP_SCOPE_ONELEVEL)
+ if(!theView || (!theView->viewfilter && scope == LDAP_SCOPE_ONELEVEL))
{
/* unlock the cache */
views_unlock();
@@ -1696,8 +1698,10 @@
#endif
}
-
- includeChildViewsFilter = slapi_filter_dup(theView->includeChildViewsFilter);
+ else
+ {
+ includeChildViewsFilter = slapi_filter_dup(theView->includeChildViewsFilter);
+ }
#ifdef _VIEW_DEBUG_FILTERS
slapi_filter_to_string(includeChildViewsFilter, includeChildViewsFilter_str, sizeof(includeChildViewsFilter_str));
@@ -1727,28 +1731,38 @@
#ifdef _VIEW_DEBUG_FILTERS
slapi_filter_to_string(clientFilter, clientFilter_str, sizeof(clientFilter_str));
#endif
+ /* There are two major clauses in a views filter, one looks
+ for entries that match the view filters themselves plus
+ the presented client filter, and the other looks for entries
+ that exist in the view hierarchy that also match the client
+ presented filter
+ */
- /* client supplied filter AND inclusion filter - make sure we can see views */
+ /* client supplied filter AND views inclusion filter
+ - make sure we can see entries in the view tree */
if(scope == LDAP_SCOPE_ONELEVEL)
{
- Slapi_Filter *clientSeeViewsFilter = 0; /* view filter to see views */
-
- clientSeeViewsFilter = slapi_filter_dup(clientFilter);
+ /* this filter is to lock our view to the onelevel search */
if(excludeGrandChildViewsFilter)
- seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, excludeGrandChildViewsFilter, clientSeeViewsFilter, 0 );
- else
- seeViewsFilter = clientSeeViewsFilter;
+ {
+ seeViewsFilter = excludeGrandChildViewsFilter;
+ }
}
-
- /* this filter is to lock our view to the subtree at hand */
- if(seeViewsFilter && includeChildViewsFilter)
- seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, includeChildViewsFilter, seeViewsFilter, 0 );
else
{
+ /* this filter is to lock our view to the subtree search */
if(includeChildViewsFilter)
+ {
seeViewsFilter = includeChildViewsFilter;
+ }
}
-
+
+ /* but only view tree entries that match the client filter */
+ if(seeViewsFilter)
+ {
+ seeViewsFilter = slapi_filter_join_ex( LDAP_FILTER_AND, slapi_filter_dup(clientFilter), seeViewsFilter, 0 );
+ }
+
/* create target filter */
if(includeAncestorFiltersFilter)
outFilter = slapi_filter_join_ex( LDAP_FILTER_AND, includeAncestorFiltersFilter, clientFilter, 0 );
17 years, 2 months
[Fedora-directory-commits] mod_nss LICENSE,1.1,1.2
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19046
Modified Files:
LICENSE
Log Message:
This file was copied directly from the Apache distribution. Remove the
extra per-module stuff that doesn't apply.
Index: LICENSE
===================================================================
RCS file: /cvs/dirsec/mod_nss/LICENSE,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LICENSE 16 Sep 2005 12:59:33 -0000 1.1
+++ LICENSE 4 Jan 2006 22:13:32 -0000 1.2
@@ -199,480 +199,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
-
-
-APACHE HTTP SERVER SUBCOMPONENTS:
-
-The Apache HTTP Server includes a number of subcomponents with
-separate copyright notices and license terms. Your use of the source
-code for the these subcomponents is subject to the terms and
-conditions of the following licenses.
-
-For the mod_mime_magic component:
-
-/*
- * mod_mime_magic: MIME type lookup via file magic numbers
- * Copyright (c) 1996-1997 Cisco Systems, Inc.
- *
- * This software was submitted by Cisco Systems to the Apache Group in July
- * 1997. Future revisions and derivatives of this source code must
- * acknowledge Cisco Systems as the original contributor of this module.
- * All other licensing and usage conditions are those of the Apache Group.
- *
- * Some of this code is derived from the free version of the file command
- * originally posted to comp.sources.unix. Copyright info for that program
- * is included below as required.
- * ---------------------------------------------------------------------------
- * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin.
- *
- * This software is not subject to any license of the American Telephone and
- * Telegraph Company or of the Regents of the University of California.
- *
- * Permission is granted to anyone to use this software for any purpose on any
- * computer system, and to alter it and redistribute it freely, subject to
- * the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of this
- * software, no matter how awful, even if they arise from flaws in it.
- *
- * 2. The origin of this software must not be misrepresented, either by
- * explicit claim or by omission. Since few users ever read sources, credits
- * must appear in the documentation.
- *
- * 3. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software. Since few users ever read
- * sources, credits must appear in the documentation.
- *
- * 4. This notice may not be removed or altered.
- * -------------------------------------------------------------------------
- *
- */
-
-
-For the modules\mappers\mod_imap.c component:
-
- "macmartinized" polygon code copyright 1992 by Eric Haines, erich(a)eye.com
-
-For the server\util_md5.c component:
-
-/************************************************************************
- * NCSA HTTPd Server
- * Software Development Group
- * National Center for Supercomputing Applications
- * University of Illinois at Urbana-Champaign
- * 605 E. Springfield, Champaign, IL 61820
- * httpd(a)ncsa.uiuc.edu
- *
- * Copyright (C) 1995, Board of Trustees of the University of Illinois
- *
- ************************************************************************
- *
- * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code
- *
- * Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc.
- * Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon
- * University (see Copyright below).
- * Portions of Content-MD5 code Copyright (C) 1991 Bell Communications
- * Research, Inc. (Bellcore) (see Copyright below).
- * Portions extracted from mpack, John G. Myers - jgm+(a)cmu.edu
- * Content-MD5 Code contributed by Martin Hamilton (martin(a)net.lut.ac.uk)
- *
- */
-
-
-/* these portions extracted from mpack, John G. Myers - jgm+(a)cmu.edu */
-/* (C) Copyright 1993,1994 by Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of Carnegie
- * Mellon University not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission. Carnegie Mellon University makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
- * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
- *
- * Permission to use, copy, modify, and distribute this material
- * for any purpose and without fee is hereby granted, provided
- * that the above copyright notice and this permission notice
- * appear in all copies, and that the name of Bellcore not be
- * used in advertising or publicity pertaining to this
- * material without the specific, prior written permission
- * of an authorized representative of Bellcore. BELLCORE
- * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
- * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
- * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
- */
-
-For the srclib\apr\include\apr_md5.h component:
-/*
- * This is work is derived from material Copyright RSA Data Security, Inc.
- *
- * The RSA copyright statement and Licence for that original material is
- * included below. This is followed by the Apache copyright statement and
- * licence for the modifications made to that material.
- */
-
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD5 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-For the srclib\apr\passwd\apr_md5.c component:
-
-/*
- * This is work is derived from material Copyright RSA Data Security, Inc.
- *
- * The RSA copyright statement and Licence for that original material is
- * included below. This is followed by the Apache copyright statement and
- * licence for the modifications made to that material.
- */
-
-/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
- */
-
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD5 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-/*
- * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0
- * MD5 crypt() function, which is licenced as follows:
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk(a)login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-For the srclib\apr-util\crypto\apr_md4.c component:
-
- * This is derived from material copyright RSA Data Security, Inc.
- * Their notice is reproduced below in its entirety.
- *
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD4 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-For the srclib\apr-util\include\apr_md4.h component:
-
- *
- * This is derived from material copyright RSA Data Security, Inc.
- * Their notice is reproduced below in its entirety.
- *
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD4 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-
-For the srclib\apr-util\test\testdbm.c component:
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * This file came from the SDBM package (written by oz(a)nexus.yorku.ca).
- * That package was under public domain. This file has been ported to
- * APR, updated to ANSI C and other, newer idioms, and added to the Apache
- * codebase under the above copyright and license.
- */
-
-
-For the srclib\apr-util\test\testmd4.c component:
-
- *
- * This is derived from material copyright RSA Data Security, Inc.
- * Their notice is reproduced below in its entirety.
- *
- * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
- * rights reserved.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-For the srclib\apr-util\xml\expat\conftools\install-sh component:
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-
-For the srclib\pcre\install-sh component:
-
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-
-For the pcre component:
-
-PCRE LICENCE
-------------
-
-PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-Written by: Philip Hazel <ph10(a)cam.ac.uk>
-
-University of Cambridge Computing Service,
-Cambridge, England. Phone: +44 1223 334714.
-
-Copyright (c) 1997-2001 University of Cambridge
-
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. In practice, this means that if you use
- PCRE in software which you distribute to others, commercially or
- otherwise, you must put a sentence like this
-
- Regular expression support is provided by the PCRE library package,
- which is open source software, written by Philip Hazel, and copyright
- by the University of Cambridge, England.
-
- somewhere reasonably visible in your documentation and in any relevant
- files or online help data or similar. A reference to the ftp site for
- the source, that is, to
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
-
- should also be given in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL),
- then the terms of that licence shall supersede any condition above with
- which it is incompatible.
-
-The documentation for PCRE, supplied in the "doc" directory, is distributed
-under the same terms as the software itself.
-
-End PCRE LICENCE
-
-
-For the test\zb.c component:
-
-/* ZeusBench V1.01
- ===============
-
-This program is Copyright (C) Zeus Technology Limited 1996.
-
-This program may be used and copied freely providing this copyright notice
-is not removed.
-
-This software is provided "as is" and any express or implied waranties,
-including but not limited to, the implied warranties of merchantability and
-fitness for a particular purpose are disclaimed. In no event shall
-Zeus Technology Ltd. be liable for any direct, indirect, incidental, special,
-exemplary, or consequential damaged (including, but not limited to,
-procurement of substitute good or services; loss of use, data, or profits;
-or business interruption) however caused and on theory of liability. Whether
-in contract, strict liability or tort (including negligence or otherwise)
-arising in any way out of the use of this software, even if advised of the
-possibility of such damage.
-
- Written by Adam Twiss (adam(a)zeus.co.uk). March 1996
-
-Thanks to the following people for their input:
- Mike Belshe (mbelshe(a)netscape.com)
- Michael Campanella (campanella(a)stevms.enet.dec.com)
-
-*/
-
-For the expat xml parser component:
-
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- and Clark Cooper
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====================================================================
17 years, 2 months
[Fedora-directory-commits] mod_nss Makefile.am, 1.7, 1.8 Makefile.in, 1.12, 1.13 configure, 1.9, 1.10 configure.in, 1.6, 1.7 mod_nss.c, 1.9, 1.10 mod_nss.h, 1.8, 1.9 nss_engine_pphrase.c, 1.3, 1.4 nss_engine_vars.c, 1.3, 1.4 nss_expr_eval.c, 1.2, 1.3 nss_expr_parse.c, 1.1, 1.2 nss_expr_parse.h, 1.1, 1.2 nss_expr_parse.y, 1.1, 1.2 nss_expr_scan.c, 1.1, 1.2
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18945
Modified Files:
Makefile.am Makefile.in configure configure.in mod_nss.c
mod_nss.h nss_engine_pphrase.c nss_engine_vars.c
nss_expr_eval.c nss_expr_parse.c nss_expr_parse.h
nss_expr_parse.y nss_expr_scan.c
Log Message:
Changes to allow the mod_nss to work in Apache 2.2.0. Based on a patch
from Oden Eriksson.
The conditional to determine which API to use is a bit weak at the moment
but it works with Apache 2.0.54 and 2.2.0.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/mod_nss/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.am 3 Oct 2005 14:59:26 -0000 1.7
+++ Makefile.am 4 Jan 2006 22:07:57 -0000 1.8
@@ -7,11 +7,13 @@
## Define the source file for the module
libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c
+libmodnss_la_LDFLAGS = -module -avoid-version
## Set the includes and libraries needed
INCLUDES = -I@apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@
LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4
@SSL2_TRUE@AM_CFLAGS=-DWANT_SSL2
+EXTRA_CPPFLAGS=@extra_cppflags@
install-libLTLIBRARIES: libmodnss.la
@APXS@ -i -a -n nss libmodnss.la
@@ -65,7 +67,7 @@
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+ $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/mod_nss/Makefile.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Makefile.in 3 Nov 2005 19:46:24 -0000 1.12
+++ Makefile.in 4 Jan 2006 22:07:57 -0000 1.13
@@ -94,6 +94,7 @@
apache_inc = @apache_inc@
apache_prefix = @apache_prefix@
apr_inc = @apr_inc@
+extra_cppflags = @extra_cppflags@
install_sh = @install_sh@
nspr_dir = @nspr_dir@
nspr_inc = @nspr_inc@
@@ -108,14 +109,16 @@
nss_pcache_SOURCES = nss_pcache.c
libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c
+libmodnss_la_LDFLAGS = -module -avoid-version
INCLUDES = -I@apache_inc@ @nspr_inc@ @nss_inc@ @apr_inc@
LIBS = @nspr_lib@ @nss_lib@ -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lplc4 -lplds4 -lnspr4
@SSL2_TRUE@AM_CFLAGS = -DWANT_SSL2
+EXTRA_CPPFLAGS = @extra_cppflags@
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+ $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -127,7 +130,6 @@
CONFIG_CLEAN_FILES = nss.conf gencert
LTLIBRARIES = $(lib_LTLIBRARIES)
-libmodnss_la_LDFLAGS =
libmodnss_la_LIBADD =
am_libmodnss_la_OBJECTS = mod_nss.lo nss_engine_config.lo \
nss_engine_init.lo nss_engine_io.lo nss_engine_kernel.lo \
Index: configure
===================================================================
RCS file: /cvs/dirsec/mod_nss/configure,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure 3 Nov 2005 19:46:24 -0000 1.9
+++ configure 4 Jan 2006 22:07:57 -0000 1.10
@@ -466,7 +466,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SSL2_TRUE SSL2_FALSE APR_CONFIG APXS PKG_CONFIG apr_inc apache_inc apache_conf apache_prefix apache_bin nspr_inc nspr_lib nss_inc nss_lib nspr_dir nss_dir extra_cppflags LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -8452,7 +8452,7 @@
enableval="$enable_ssl2"
ssl2=$enableval
else
- ssl2=yes
+ ssl2=no
fi;
if test $ssl2 = yes; then
echo "$as_me:$LINENO: result: yes" >&5
@@ -8649,6 +8649,7 @@
apache_conf=`$APXS -q SYSCONFDIR`
apache_prefix=`$APXS -q PREFIX`
apache_bin=`$APXS -q SBINDIR`
+extra_cppflags=`$APXS -q EXTRA_CPPFLAGS`
if ! test -f "$apache_inc/apr.h"; then
if test -z "$apr_inc"; then
@@ -8949,6 +8950,7 @@
+
# Write config.status and the Makefile
ac_config_files="$ac_config_files Makefile nss.conf gencert"
cat >confcache <<\_ACEOF
@@ -9679,6 +9681,7 @@
s,@nss_lib@,$nss_lib,;t t
s,@nspr_dir@,$nspr_dir,;t t
s,@nss_dir@,$nss_dir,;t t
+s,@extra_cppflags@,$extra_cppflags,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
Index: configure.in
===================================================================
RCS file: /cvs/dirsec/mod_nss/configure.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure.in 26 Sep 2005 19:38:52 -0000 1.6
+++ configure.in 4 Jan 2006 22:07:58 -0000 1.7
@@ -25,7 +25,7 @@
AC_MSG_CHECKING(for SSL2)
AC_ARG_ENABLE(ssl2,
[ --enable-ssl2 enable SSLv2 (default=no)],
- ssl2=$enableval, ssl2=yes)
+ ssl2=$enableval, ssl2=no)
if test $ssl2 = yes; then
AC_MSG_RESULT(yes)
else
@@ -104,6 +104,7 @@
apache_conf=`$APXS -q SYSCONFDIR`
apache_prefix=`$APXS -q PREFIX`
apache_bin=`$APXS -q SBINDIR`
+extra_cppflags=`$APXS -q EXTRA_CPPFLAGS`
if ! test -f "$apache_inc/apr.h"; then
if test -z "$apr_inc"; then
@@ -257,6 +258,7 @@
AC_SUBST(nss_lib)
AC_SUBST(nspr_dir)
AC_SUBST(nss_dir)
+AC_SUBST(extra_cppflags)
# Write config.status and the Makefile
AC_OUTPUT(Makefile nss.conf gencert)
Index: mod_nss.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mod_nss.c 3 Oct 2005 14:59:26 -0000 1.9
+++ mod_nss.c 4 Jan 2006 22:07:58 -0000 1.10
@@ -362,7 +362,7 @@
return APR_SUCCESS;
}
-static const char *nss_hook_http_method(const request_rec *r)
+static const char *nss_hook_http_scheme(const request_rec *r)
{
SSLSrvConfigRec *sc = mySrvConfig(r->server);
@@ -394,7 +394,11 @@
ap_hook_pre_connection(nss_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
ap_hook_post_config (nss_init_Module, NULL,NULL, APR_HOOK_MIDDLE);
- ap_hook_http_method (nss_hook_http_method, NULL,NULL, APR_HOOK_MIDDLE);
+#ifndef AP_SERVER_MAJORVERSION_NUMBER
+ ap_hook_http_method (nss_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE);
+#else
+ ap_hook_http_scheme (nss_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE);
+#endif
ap_hook_default_port (nss_hook_default_port, NULL,NULL, APR_HOOK_MIDDLE);
ap_hook_pre_config (nss_hook_pre_config, NULL,NULL, APR_HOOK_MIDDLE);
ap_hook_child_init (nss_init_Child, NULL,NULL, APR_HOOK_MIDDLE);
Index: mod_nss.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mod_nss.h 3 Oct 2005 14:59:26 -0000 1.8
+++ mod_nss.h 4 Jan 2006 22:07:58 -0000 1.9
@@ -316,6 +316,15 @@
int fortezza_only;
PRInt32 version; // protocol version valid for this cipher
} cipher_properties;
+
+/* Compatibility between Apache 2.0.x and 2.2.x. The numeric version of
+ * the version first appeared in Apache 2.2.0 */
+#ifndef AP_SERVER_MAJORVERSION_NUMBER
+typedef struct regex_t ap_regex_t;
+#define AP_REG_EXTENDED REG_EXTENDED
+#define AP_REG_NOSUB REG_NOSUB
+#define AP_REG_ICASE REG_ICASE
+#endif
enum sslversion { SSL2=1, SSL3=2, TLS=4};
Index: nss_engine_pphrase.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nss_engine_pphrase.c 4 Aug 2005 16:18:49 -0000 1.3
+++ nss_engine_pphrase.c 4 Jan 2006 22:07:58 -0000 1.4
@@ -125,7 +125,7 @@
snprintf(buf, 1024, "STOR\t%s\t%s", PK11_GetTokenName(slot), passwd);
rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL);
- if (!APR_STATUS_IS_SUCCESS(rv)) {
+ if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv);
nss_die();
@@ -139,9 +139,9 @@
memset(buf, 0, sizeof(buf));
rv = apr_file_read(parg->mc->proc.out, buf, &nBytes);
- if (APR_STATUS_IS_SUCCESS(rv))
+ if (rv = APR_SUCCESS)
res = atoi(buf);
- if (!APR_STATUS_IS_SUCCESS(rv) ||
+ if (rv != APR_SUCCESS ||
(res != PIN_SUCCESS && res != PIN_INCORRECTPW)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv);
@@ -245,7 +245,7 @@
snprintf(buf, 1024, "RETR\t%s", token_name);
rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL);
- if (!APR_STATUS_IS_SUCCESS(rv)) {
+ if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv);
nss_die();
@@ -256,7 +256,7 @@
*/
memset(buf, 0, sizeof(buf));
rv = apr_file_read(parg->mc->proc.out, buf, &nBytes);
- if (!APR_STATUS_IS_SUCCESS(rv)) {
+ if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv);
nss_die();
Index: nss_engine_vars.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nss_engine_vars.c 31 May 2005 14:32:42 -0000 1.3
+++ nss_engine_vars.c 4 Jan 2006 22:07:58 -0000 1.4
@@ -100,7 +100,11 @@
else if (strcEQ(var, "REQUEST_METHOD"))
result = (char *)(r->method);
else if (strcEQ(var, "REQUEST_SCHEME"))
+#ifndef AP_SERVER_MAJORVERSION_NUMBER
result = (char *)ap_http_method(r);
+#else
+ result = (char *)ap_http_scheme(r);
+#endif
else if (strcEQ(var, "REQUEST_URI"))
result = r->uri;
else if (strcEQ(var, "SCRIPT_FILENAME") ||
Index: nss_expr_eval.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_expr_eval.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nss_expr_eval.c 31 May 2005 14:32:42 -0000 1.2
+++ nss_expr_eval.c 4 Jan 2006 22:07:58 -0000 1.3
@@ -113,24 +113,24 @@
nss_expr *e1;
nss_expr *e2;
char *word;
- regex_t *regex;
+ ap_regex_t *regex;
e1 = (nss_expr *)node->node_arg1;
e2 = (nss_expr *)node->node_arg2;
word = nss_expr_eval_word(r, e1);
- regex = (regex_t *)(e2->node_arg1);
+ regex = (ap_regex_t *)(e2->node_arg1);
return (ap_regexec(regex, word, 0, NULL, 0) == 0);
}
case op_NRE: {
nss_expr *e1;
nss_expr *e2;
char *word;
- regex_t *regex;
+ ap_regex_t *regex;
e1 = (nss_expr *)node->node_arg1;
e2 = (nss_expr *)node->node_arg2;
word = nss_expr_eval_word(r, e1);
- regex = (regex_t *)(e2->node_arg1);
+ regex = (ap_regex_t *)(e2->node_arg1);
return !(ap_regexec(regex, word, 0, NULL, 0) == 0);
}
default: {
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 nss_expr_parse.c
Index: nss_expr_parse.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nss_expr_parse.c 31 May 2005 14:32:42 -0000 1.1
+++ nss_expr_parse.c 4 Jan 2006 22:07:58 -0000 1.2
@@ -1,479 +1,856 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
-/* A Bison parser, made from nss_expr_parse.y
- by GNU Bison version 1.28 */
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-#define YYBISON 1 /* Identify Bison output. */
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
-#define T_TRUE 257
-#define T_FALSE 258
-#define T_DIGIT 259
-#define T_ID 260
-#define T_STRING 261
-#define T_REGEX 262
-#define T_REGEX_I 263
-#define T_FUNC_FILE 264
-#define T_OP_EQ 265
-#define T_OP_NE 266
-#define T_OP_LT 267
-#define T_OP_LE 268
-#define T_OP_GT 269
-#define T_OP_GE 270
-#define T_OP_REG 271
-#define T_OP_NRE 272
-#define T_OP_IN 273
-#define T_OP_OR 274
-#define T_OP_AND 275
-#define T_OP_NOT 276
+/* All symbols defined below should begin with nss_expr_yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum nss_expr_yytokentype {
+ T_TRUE = 258,
+ T_FALSE = 259,
+ T_DIGIT = 260,
+ T_ID = 261,
+ T_STRING = 262,
+ T_REGEX = 263,
+ T_REGEX_I = 264,
+ T_FUNC_FILE = 265,
+ T_OP_EQ = 266,
+ T_OP_NE = 267,
+ T_OP_LT = 268,
+ T_OP_LE = 269,
+ T_OP_GT = 270,
+ T_OP_GE = 271,
+ T_OP_REG = 272,
+ T_OP_NRE = 273,
+ T_OP_IN = 274,
+ T_OP_OR = 275,
+ T_OP_AND = 276,
+ T_OP_NOT = 277
+ };
+#endif
+#define T_TRUE 258
+#define T_FALSE 259
+#define T_DIGIT 260
+#define T_ID 261
+#define T_STRING 262
+#define T_REGEX 263
+#define T_REGEX_I 264
+#define T_FUNC_FILE 265
+#define T_OP_EQ 266
+#define T_OP_NE 267
+#define T_OP_LT 268
+#define T_OP_LE 269
+#define T_OP_GT 270
+#define T_OP_GE 271
+#define T_OP_REG 272
+#define T_OP_NRE 273
+#define T_OP_IN 274
+#define T_OP_OR 275
+#define T_OP_AND 276
+#define T_OP_NOT 277
+
+
+
+/* Copy the first part of user declarations. */
#line 22 "nss_expr_parse.y"
#include "mod_nss.h"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 26 "nss_expr_parse.y"
-typedef union {
+typedef union YYSTYPE {
char *cpVal;
nss_expr *exVal;
} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+/* Line 191 of yacc.c. */
+#line 129 "y.tab.c"
+# define nss_expr_yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 53
-#define YYFLAG -32768
-#define YYNTBASE 29
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? nss_expr_yytranslate[x] : 36)
-
-static const char nss_expr_yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 28, 2, 2, 23,
- 24, 2, 2, 27, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 25, 2, 26, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
[...1792 lines suppressed...]
+ if (nss_expr_yychar == YYEOF)
+ for (;;)
+ {
+ YYPOPSTACK;
+ if (nss_expr_yyssp == nss_expr_yyss)
+ YYABORT;
+ YYDSYMPRINTF ("Error: popping", nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp, nss_expr_yylsp);
+ nss_expr_yydestruct (nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp);
+ }
+ }
+ else
+ {
+ YYDSYMPRINTF ("Error: discarding", nss_expr_yytoken, &nss_expr_yylval, &nss_expr_yylloc);
+ nss_expr_yydestruct (nss_expr_yytoken, &nss_expr_yylval);
+ nss_expr_yychar = YYEMPTY;
- nss_expr_yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- nss_expr_yyerrstatus = 3; /* Each real token shifted decrements this */
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto nss_expr_yyerrlab1;
- goto nss_expr_yyerrhandle;
-nss_expr_yyerrdefault: /* current state does not do anything special for the error token. */
+/*---------------------------------------------------.
+| nss_expr_yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+nss_expr_yyerrorlab:
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- nss_expr_yyn = nss_expr_yydefact[nss_expr_yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (nss_expr_yyn) goto nss_expr_yydefault;
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ nss_expr_yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto nss_expr_yyerrorlab;
#endif
-nss_expr_yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (nss_expr_yyssp == nss_expr_yyss) YYABORT;
- nss_expr_yyvsp--;
- nss_expr_yystate = *--nss_expr_yyssp;
-#ifdef YYLSP_NEEDED
- nss_expr_yylsp--;
-#endif
+ nss_expr_yyvsp -= nss_expr_yylen;
+ nss_expr_yyssp -= nss_expr_yylen;
+ nss_expr_yystate = *nss_expr_yyssp;
+ goto nss_expr_yyerrlab1;
-#if YYDEBUG != 0
- if (nss_expr_yydebug)
- {
- short *ssp1 = nss_expr_yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != nss_expr_yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-nss_expr_yyerrhandle:
+/*-------------------------------------------------------------.
+| nss_expr_yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+nss_expr_yyerrlab1:
+ nss_expr_yyerrstatus = 3; /* Each real token shifted decrements this. */
- nss_expr_yyn = nss_expr_yypact[nss_expr_yystate];
- if (nss_expr_yyn == YYFLAG)
- goto nss_expr_yyerrdefault;
+ for (;;)
+ {
+ nss_expr_yyn = nss_expr_yypact[nss_expr_yystate];
+ if (nss_expr_yyn != YYPACT_NINF)
+ {
+ nss_expr_yyn += YYTERROR;
+ if (0 <= nss_expr_yyn && nss_expr_yyn <= YYLAST && nss_expr_yycheck[nss_expr_yyn] == YYTERROR)
+ {
+ nss_expr_yyn = nss_expr_yytable[nss_expr_yyn];
+ if (0 < nss_expr_yyn)
+ break;
+ }
+ }
- nss_expr_yyn += YYTERROR;
- if (nss_expr_yyn < 0 || nss_expr_yyn > YYLAST || nss_expr_yycheck[nss_expr_yyn] != YYTERROR)
- goto nss_expr_yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (nss_expr_yyssp == nss_expr_yyss)
+ YYABORT;
- nss_expr_yyn = nss_expr_yytable[nss_expr_yyn];
- if (nss_expr_yyn < 0)
- {
- if (nss_expr_yyn == YYFLAG)
- goto nss_expr_yyerrpop;
- nss_expr_yyn = -nss_expr_yyn;
- goto nss_expr_yyreduce;
+ YYDSYMPRINTF ("Error: popping", nss_expr_yystos[*nss_expr_yyssp], nss_expr_yyvsp, nss_expr_yylsp);
+ nss_expr_yydestruct (nss_expr_yystos[nss_expr_yystate], nss_expr_yyvsp);
+ YYPOPSTACK;
+ nss_expr_yystate = *nss_expr_yyssp;
+ YY_STACK_PRINT (nss_expr_yyss, nss_expr_yyssp);
}
- else if (nss_expr_yyn == 0)
- goto nss_expr_yyerrpop;
if (nss_expr_yyn == YYFINAL)
YYACCEPT;
-#if YYDEBUG != 0
- if (nss_expr_yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
+ YYDPRINTF ((stderr, "Shifting error token, "));
*++nss_expr_yyvsp = nss_expr_yylval;
-#ifdef YYLSP_NEEDED
- *++nss_expr_yylsp = nss_expr_yylloc;
-#endif
+
nss_expr_yystate = nss_expr_yyn;
goto nss_expr_yynewstate;
- nss_expr_yyacceptlab:
- /* YYACCEPT comes here. */
- if (nss_expr_yyfree_stacks)
- {
- free (nss_expr_yyss);
- free (nss_expr_yyvs);
-#ifdef YYLSP_NEEDED
- free (nss_expr_yyls);
-#endif
- }
- return 0;
- nss_expr_yyabortlab:
- /* YYABORT comes here. */
- if (nss_expr_yyfree_stacks)
- {
- free (nss_expr_yyss);
- free (nss_expr_yyvs);
-#ifdef YYLSP_NEEDED
- free (nss_expr_yyls);
+/*-------------------------------------.
+| nss_expr_yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+nss_expr_yyacceptlab:
+ nss_expr_yyresult = 0;
+ goto nss_expr_yyreturn;
+
+/*-----------------------------------.
+| nss_expr_yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+nss_expr_yyabortlab:
+ nss_expr_yyresult = 1;
+ goto nss_expr_yyreturn;
+
+#ifndef nss_expr_yyoverflow
+/*----------------------------------------------.
+| nss_expr_yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+nss_expr_yyoverflowlab:
+ nss_expr_yyerror ("parser stack overflow");
+ nss_expr_yyresult = 2;
+ /* Fall through. */
+#endif
+
+nss_expr_yyreturn:
+#ifndef nss_expr_yyoverflow
+ if (nss_expr_yyss != nss_expr_yyssa)
+ YYSTACK_FREE (nss_expr_yyss);
#endif
- }
- return 1;
+ return nss_expr_yyresult;
}
+
+
#line 128 "nss_expr_parse.y"
@@ -1077,3 +1437,4 @@
return 2;
}
+
Index: nss_expr_parse.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nss_expr_parse.h 31 May 2005 14:32:42 -0000 1.1
+++ nss_expr_parse.h 4 Jan 2006 22:07:58 -0000 1.2
@@ -1,27 +1,94 @@
-typedef union {
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum nss_expr_yytokentype {
+ T_TRUE = 258,
+ T_FALSE = 259,
+ T_DIGIT = 260,
+ T_ID = 261,
+ T_STRING = 262,
+ T_REGEX = 263,
+ T_REGEX_I = 264,
+ T_FUNC_FILE = 265,
+ T_OP_EQ = 266,
+ T_OP_NE = 267,
+ T_OP_LT = 268,
+ T_OP_LE = 269,
+ T_OP_GT = 270,
+ T_OP_GE = 271,
+ T_OP_REG = 272,
+ T_OP_NRE = 273,
+ T_OP_IN = 274,
+ T_OP_OR = 275,
+ T_OP_AND = 276,
+ T_OP_NOT = 277
+ };
+#endif
+#define T_TRUE 258
+#define T_FALSE 259
+#define T_DIGIT 260
+#define T_ID 261
+#define T_STRING 262
+#define T_REGEX 263
+#define T_REGEX_I 264
+#define T_FUNC_FILE 265
+#define T_OP_EQ 266
+#define T_OP_NE 267
+#define T_OP_LT 268
+#define T_OP_LE 269
+#define T_OP_GT 270
+#define T_OP_GE 271
+#define T_OP_REG 272
+#define T_OP_NRE 273
+#define T_OP_IN 274
+#define T_OP_OR 275
+#define T_OP_AND 276
+#define T_OP_NOT 277
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 26 "nss_expr_parse.y"
+typedef union YYSTYPE {
char *cpVal;
nss_expr *exVal;
} YYSTYPE;
-#define T_TRUE 257
-#define T_FALSE 258
-#define T_DIGIT 259
-#define T_ID 260
-#define T_STRING 261
-#define T_REGEX 262
-#define T_REGEX_I 263
-#define T_FUNC_FILE 264
-#define T_OP_EQ 265
-#define T_OP_NE 266
-#define T_OP_LT 267
-#define T_OP_LE 268
-#define T_OP_GT 269
-#define T_OP_GE 270
-#define T_OP_REG 271
-#define T_OP_NRE 272
-#define T_OP_IN 273
-#define T_OP_OR 274
-#define T_OP_AND 275
-#define T_OP_NOT 276
-
+/* Line 1275 of yacc.c. */
+#line 86 "y.tab.h"
+# define nss_expr_yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
extern YYSTYPE nss_expr_yylval;
+
+
+
Index: nss_expr_parse.y
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_expr_parse.y,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nss_expr_parse.y 31 May 2005 14:32:42 -0000 1.1
+++ nss_expr_parse.y 4 Jan 2006 22:07:58 -0000 1.2
@@ -100,18 +100,18 @@
;
regex : T_REGEX {
- regex_t *regex;
+ ap_regex_t *regex;
if ((regex = ap_pregcomp(nss_expr_info.pool, $1,
- REG_EXTENDED|REG_NOSUB)) == NULL) {
+ AP_REG_EXTENDED|AP_REG_NOSUB)) == NULL) {
nss_expr_error = "Failed to compile regular expression";
YYERROR;
}
$$ = nss_expr_make(op_Regex, regex, NULL);
}
| T_REGEX_I {
- regex_t *regex;
+ ap_regex_t *regex;
if ((regex = ap_pregcomp(nss_expr_info.pool, $1,
- REG_EXTENDED|REG_NOSUB|REG_ICASE)) == NULL) {
+ AP_REG_EXTENDED|AP_REG_NOSUB|AP_REG_ICASE)) == NULL) {
nss_expr_error = "Failed to compile regular expression";
YYERROR;
}
Index: nss_expr_scan.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_expr_scan.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nss_expr_scan.c 31 May 2005 14:32:42 -0000 1.1
+++ nss_expr_scan.c 4 Jan 2006 22:07:58 -0000 1.2
@@ -1432,6 +1432,7 @@
#endif /* ifndef YY_NO_UNPUT */
+#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
@@ -1503,7 +1504,7 @@
return c;
}
-
+#endif /* YY_NO_INPUT */
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
17 years, 2 months