mod_dav_fs.c revision 6b745319b1099edacf401e8911efa480440f999a
6ae232055d4d8a97267517c5e50074c2c819941and/* ====================================================================
6ae232055d4d8a97267517c5e50074c2c819941and * The Apache Software License, Version 1.1
6ae232055d4d8a97267517c5e50074c2c819941and * Copyright (c) 2000 The Apache Software Foundation. All rights
6ae232055d4d8a97267517c5e50074c2c819941and * reserved.
6ae232055d4d8a97267517c5e50074c2c819941and * Redistribution and use in source and binary forms, with or without
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc * modification, are permitted provided that the following conditions
6ae232055d4d8a97267517c5e50074c2c819941and * are met:
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * 1. Redistributions of source code must retain the above copyright
2e545ce2450a9953665f701bb05350f0d3f26275nd * notice, this list of conditions and the following disclaimer.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * 2. Redistributions in binary form must reproduce the above copyright
6ae232055d4d8a97267517c5e50074c2c819941and * notice, this list of conditions and the following disclaimer in
6ae232055d4d8a97267517c5e50074c2c819941and * the documentation and/or other materials provided with the
6ae232055d4d8a97267517c5e50074c2c819941and * distribution.
3f08db06526d6901aa08c110b5bc7dde6bc39905nd * 3. The end-user documentation included with the redistribution,
6ae232055d4d8a97267517c5e50074c2c819941and * if any, must include the following acknowledgment:
6ae232055d4d8a97267517c5e50074c2c819941and * "This product includes software developed by the
6ae232055d4d8a97267517c5e50074c2c819941and * Apache Software Foundation (http://www.apache.org/)."
b43f840409794ed298e8634f6284741f193b6c4ftakashi * Alternately, this acknowledgment may appear in the software itself,
6ae232055d4d8a97267517c5e50074c2c819941and * if and wherever such third-party acknowledgments normally appear.
6ae232055d4d8a97267517c5e50074c2c819941and * 4. The names "Apache" and "Apache Software Foundation" must
b43f840409794ed298e8634f6284741f193b6c4ftakashi * not be used to endorse or promote products derived from this
11495c9f0bd33e51a25b4d532beadfbcf9b944a3nilgun * software without prior written permission. For written
6ae232055d4d8a97267517c5e50074c2c819941and * permission, please contact apache@apache.org.
6ae232055d4d8a97267517c5e50074c2c819941and * 5. Products derived from this software may not be called "Apache",
b43f840409794ed298e8634f6284741f193b6c4ftakashi * nor may "Apache" appear in their name, without prior written
b43f840409794ed298e8634f6284741f193b6c4ftakashi * permission of the Apache Software Foundation.
b43f840409794ed298e8634f6284741f193b6c4ftakashi * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
6ae232055d4d8a97267517c5e50074c2c819941and * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
6ae232055d4d8a97267517c5e50074c2c819941and * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6ae232055d4d8a97267517c5e50074c2c819941and * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
6ae232055d4d8a97267517c5e50074c2c819941and * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6ae232055d4d8a97267517c5e50074c2c819941and * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
6ae232055d4d8a97267517c5e50074c2c819941and * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
6ae232055d4d8a97267517c5e50074c2c819941and * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6ae232055d4d8a97267517c5e50074c2c819941and * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
6ae232055d4d8a97267517c5e50074c2c819941and * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
6ae232055d4d8a97267517c5e50074c2c819941and * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6ae232055d4d8a97267517c5e50074c2c819941and * SUCH DAMAGE.
6ae232055d4d8a97267517c5e50074c2c819941and * ====================================================================
6ae232055d4d8a97267517c5e50074c2c819941and * This software consists of voluntary contributions made by many
6ae232055d4d8a97267517c5e50074c2c819941and * individuals on behalf of the Apache Software Foundation. For more
6ae232055d4d8a97267517c5e50074c2c819941and * information on the Apache Software Foundation, please see
6ae232055d4d8a97267517c5e50074c2c819941and/* per-server configuration */
6ae232055d4d8a97267517c5e50074c2c819941andtypedef struct {
6ae232055d4d8a97267517c5e50074c2c819941and const char *lockdb_path;
6ae232055d4d8a97267517c5e50074c2c819941and conf = ap_get_module_config(r->server->module_config, &dav_fs_module);
6ae232055d4d8a97267517c5e50074c2c819941andstatic void *dav_fs_create_server_config(ap_pool_t *p, server_rec *s)
6ae232055d4d8a97267517c5e50074c2c819941and child->lockdb_path ? child->lockdb_path : parent->lockdb_path;
6ae232055d4d8a97267517c5e50074c2c819941and * Command handler for the DAVLockDB directive, which is TAKE1
6ae232055d4d8a97267517c5e50074c2c819941andstatic const char *dav_fs_cmd_davlockdb(cmd_parms *cmd, void *config,
6ae232055d4d8a97267517c5e50074c2c819941and const char *arg1)
6ae232055d4d8a97267517c5e50074c2c819941and conf->lockdb_path = ap_server_root_relative(cmd->pool, arg1);
6ae232055d4d8a97267517c5e50074c2c819941and /* per server */
6ae232055d4d8a97267517c5e50074c2c819941and AP_INIT_TAKE1("DAVLockDB", dav_fs_cmd_davlockdb, NULL, RSRC_CONF,
6ae232055d4d8a97267517c5e50074c2c819941and "specify a lock database"),
6ae232055d4d8a97267517c5e50074c2c819941andstatic void register_hooks(void)
6ae232055d4d8a97267517c5e50074c2c819941and ap_hook_get_resource(dav_fs_hook_get_resource, NULL, NULL, AP_HOOK_MIDDLE);
6ae232055d4d8a97267517c5e50074c2c819941and ap_hook_get_lock_hooks(dav_fs_get_lock_hooks, NULL, NULL, AP_HOOK_MIDDLE);
6ae232055d4d8a97267517c5e50074c2c819941and ap_hook_get_propdb_hooks(dav_fs_get_propdb_hooks, NULL, NULL,
6ae232055d4d8a97267517c5e50074c2c819941and ap_hook_gather_propsets(dav_fs_gather_propsets, NULL, NULL,
6ae232055d4d8a97267517c5e50074c2c819941and ap_hook_find_liveprop(dav_fs_find_liveprop, NULL, NULL, AP_HOOK_MIDDLE);